Skip to content

Commit

Permalink
Finish renames
Browse files Browse the repository at this point in the history
  • Loading branch information
aslakhellesoy committed Jan 9, 2020
1 parent 4fc2f1c commit 4e3e875
Show file tree
Hide file tree
Showing 127 changed files with 6,496 additions and 0 deletions.
1 change: 1 addition & 0 deletions .rsync
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
../.templates/default.mk default.mk
127 changes: 127 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
# CHANGE LOG
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

----
## [Unreleased]

### Added

### Changed

### Deprecated

### Removed

### Fixed

## [2.0.3] - 2019-12-10

### Changed

* Upgrades to `cucumber-parent:2.0.2`
* [Ruby] Renamed gem to `tag-expressions`

### Removed

* [Ruby] Removed `tag-expressions` executable

## [2.0.2] - 2019-07-15

### Fixed

* Fix incomplete 2.0.1 release

## [2.0.1] - 2019-07-15

### Fixed

* Fix incomplete 2.0.0 release

## [2.0.0] - 2019-07-10

### Added
* Go: New implementation.
([#339](https://github.com/cucumber/cucumber/pull/339)
[charlierudolph])

### Changed
* JavaScript: Changed API to return a `parse` function rather than a class with a `parse` method.
* JavaScript: Refactored to TypeScript

### Removed
* Java: OSGi support has been removed.
([#412](https://github.com/cucumber/cucumber/issues/412)
[aslakhellesoy])

### Fixed
* Documentation links now point to new website (cucumber.io)
([#560](https://github.com/cucumber/cucumber/issues/560)
[luke-hill])

## [1.1.1] - 2017-12-01

### Fixed
* Java: Fix OSGI exported package
([#309](https://github.com/cucumber/cucumber/pull/309)
by [mpkorstanje])

## [1.1.0] - 2017-11-28

### Added
* Ruby: Added `tag-expressions` command-line tool for tag expressions
([#282](https://github.com/cucumber/cucumber/pull/282)
by [aslakhellesoy])
* Escape special chars in tags
([#286](https://github.com/cucumber/cucumber/pull/286)
[#285](https://github.com/cucumber/cucumber/issues/285)
by [link89])

### Fixed
* Don't support RPN
([#304](https://github.com/cucumber/cucumber/issues/304)
by [aslakhellesoy])
* Parse empty tag expressions (always evaluates to true)
([#296](https://github.com/cucumber/cucumber/issues/296)
by [aslakhellesoy])

## [1.0.1] - 2017-05-28

### Fixed
* javascript:
([#76](https://github.com/cucumber/cucumber/pull/76)
[#78](https://github.com/cucumber/cucumber/pull/78)
[#104](https://github.com/cucumber/cucumber/issues/104)
by [charlierudolph])
* java: Make the jar a bundle to support OSGi
([#99](https://github.com/cucumber/cucumber/pull/99)
by [brasmusson])
* Add a [changelog](keepachangelog.com)
([#213](https://github.com/cucumber/cucumber/issues/213)
by [aslakhellesoy])

## 1.0.0 - 2016-09-01

### Added

* First stable release!

<!-- Releases -->
[Unreleased]: https://github.com/cucumber/cucumber/compare/tag-expressions/v2.0.3...master
[2.0.2]: https://github.com/cucumber/cucumber/compare/tag-expressions/v2.0.3...tag-expressions/v2.0.2
[2.0.2]: https://github.com/cucumber/cucumber/compare/tag-expressions/v2.0.1...tag-expressions/v2.0.2
[2.0.2]: https://github.com/cucumber/cucumber/compare/tag-expressions/v2.0.3...tag-expressions/v2.0.2
[2.0.1]: https://github.com/cucumber/cucumber/compare/tag-expressions/v2.0.0...tag-expressions/v2.0.1
[2.0.0]: https://github.com/cucumber/cucumber/compare/tag-expressions-v1.1.1...tag-expressions/v2.0.0
[1.1.1]: https://github.com/cucumber/cucumber/compare/tag-expressions-v1.1.0...tag-expressions-v1.1.1
[1.1.0]: https://github.com/cucumber/cucumber/compare/tag-expressions-v1.0.1...tag-expressions-v1.1.0
[1.0.1]: https://github.com/cucumber/cucumber/releases/tag/tag-expressions-v1.0.1

<!-- Contributors -->
[aslakhellesoy]: https://github.com/aslakhellesoy
[brasmusson]: https://github.com/brasmusson
[charlierudolph]: https://github.com/charlierudolph
[link89]: https://github.com/link89
[luke-hill]: https://github.com/luke-hill
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
MAKEFILES = $(wildcard */Makefile)
include default.mk
65 changes: 65 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Tag Expressions

Tag Expressions provide a simple query language for tags. The simplest tag expression is
simply a single tag, for example:

@smoke

A slightly more elaborate expression may combine tags, for example:

@smoke and not @ui

Tag Expressions are used for two purposes:

1. Run a subset of scenarios (using the `--tags expression` option of the [command line](#))
2. Specify that a hook should only run for a subset of scenarios (using [tagged hooks](#))

Tag Expressions are [boolean expressions](https://en.wikipedia.org/wiki/Boolean_expression)
of tags with the logical operators `and`, `or` and `not`.

For more complex Tag Expressions you can use parenthesis for clarity, or to change operator precedence:

(@smoke or @ui) and (not @slow)

(The [standard library](../docs/standard-library.adoc#implementations) list indicates
what Cucumber implementations currently support Tag Expressions).

## Migrating from old style tags

* `--tags @dev` stays the same
* `--tags ~@dev` becomes `--tags 'not @dev'`
* `--tags @foo,@bar` becomes `--tags '@foo or @bar'`
* `--tags @foo --tags @bar` becomes `--tags '@foo and bar'`
* `--tags ~@foo --tags @bar,@zap` becomes `--tags 'not @foo and (@bar or @zap)'`

## Internal design

The implementation is based on a modified version of Edsger Dijkstra's
[Shunting Yard algorithm](https://en.wikipedia.org/wiki/Shunting-yard_algorithm)
that produces an expression tree instead of a postfix notation.

For example this expression:

expression = "not @a or @b and not @c or not @d or @e and @f"

Would parse into this expression tree:

# Get the root of the tree - an Expression object.
expressionNode = parser.parse(expression)

or
/ \
or and
/ \ / \
or not @e @f
/ \ \
not and @d
/ / \
@a @b not
\
@c

The root node of tree can then be evaluated for different combinations of tags.
For example:

result = expressionNode.evaluate(["@a", "@c", "@d"]) # => false
88 changes: 88 additions & 0 deletions default.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# Please update /.templates/default.mk and sync:
#
# source scripts/functions.sh && rsync_files
#
ALPINE = $(shell which apk 2> /dev/null)
LIBNAME = $(shell basename $$(pwd))

default: $(patsubst %/Makefile,default-%,$(MAKEFILES))
.PHONY: default

default-%: %
cd $< && make default
.PHONY: default-%

update-dependencies: $(patsubst %/Makefile,update-dependencies-%,$(MAKEFILES))
.PHONY: update-dependencies

update-dependencies-%: %
cd $< && make update-dependencies
.PHONY: update-dependencies-%

update-version: $(patsubst %/Makefile,update-version-%,$(MAKEFILES))

update-version: update-changelog

update-changelog:
ifdef NEW_VERSION
cat CHANGELOG.md | ../scripts/update_changelog.sh $(NEW_VERSION) > CHANGELOG.md.tmp
mv CHANGELOG.md.tmp CHANGELOG.md
else
@echo -e "\033[0;31mNEW_VERSION is not defined. Can't update version :-(\033[0m"
exit 1
endif
.PHONY: update-changelog

update-version-%: %
cd $< && make update-version
.PHONY: update-version-%

pre-release: $(patsubst %/Makefile,pre-release-%,$(MAKEFILES))
.PHONY: pre-release

pre-release-%: %
cd $< && make pre-release
.PHONY: pre-release-%

release: update-version clean default create-and-push-release-tag publish
.PHONY: release

publish: $(patsubst %/Makefile,publish-%,$(MAKEFILES))
.PHONY: publish

publish-%: %
cd $< && make publish
.PHONY: publish-%

create-and-push-release-tag:
git commit -am "Release $(LIBNAME) v$(NEW_VERSION)"
git tag -s "$(LIBNAME)/v$(NEW_VERSION)" -m "Release $(LIBNAME) v$(NEW_VERSION)"
git push --tags
.PHONY: create-and-push-release-tag

post-release: $(patsubst %/Makefile,post-release-%,$(MAKEFILES))
.PHONY: post-release

post-release: commit-and-push-post-release

post-release-%: %
cd $< && make post-release
.PHONY: post-release-%

commit-and-push-post-release:
ifdef NEW_VERSION
git push --tags
git commit -am "Post release $(LIBNAME) v$(NEW_VERSION)" 2> /dev/null || true
git push
else
@echo -e "\033[0;31mNEW_VERSION is not defined.\033[0m"
exit 1
endif
.PHONY: commit-and-push-post-release

clean: $(patsubst %/Makefile,clean-%,$(MAKEFILES))
.PHONY: clean

clean-%: %
cd $< && make clean
.PHONY: clean-%
5 changes: 5 additions & 0 deletions go/.github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
PLEASE DO NOT CREATE ISSUES IN THIS REPO.
THIS REPO IS A READ-ONLY MIRROR.

Create your issue in the Cucumber monorepo instead:
https://github.com/cucumber/cucumber/issues
5 changes: 5 additions & 0 deletions go/.github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
PLEASE DO NOT CREATE PULL REAUESTS IN THIS REPO.
THIS REPO IS A READ-ONLY MIRROR.

Create your pull request in the Cucumber monorepo instead:
https://github.com/cucumber/cucumber/pulls
14 changes: 14 additions & 0 deletions go/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.built
.compared
.deps
.dist
.dist-compressed
.go-get
.gofmt
.linted
.tested*
acceptance/
bin/
dist/
dist_compressed/
*.bin
3 changes: 3 additions & 0 deletions go/.rsync
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
../../LICENSE LICENSE
../../.templates/github/ .github/
../../.templates/go/ .
1 change: 1 addition & 0 deletions go/.subrepo
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cucumber/tag-expressions-go
21 changes: 21 additions & 0 deletions go/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) Cucumber Ltd

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
1 change: 1 addition & 0 deletions go/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include default.mk
5 changes: 5 additions & 0 deletions go/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Cucumber Tag Expressions for Go

[![Build Status](https://travis-ci.org/cucumber/tag-expressions-go.svg?branch=master)](https://travis-ci.org/cucumber/tag-expressions-go)

[The docs are here](https://cucumber.io/docs/cucumber/api/#tag-expressions).
Loading

0 comments on commit 4e3e875

Please sign in to comment.