cuke_modeler 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3d45c74a6f723c171dac766c39700fe913bb5780
4
- data.tar.gz: e75f758bd4197d5ba5894c1c147d8a9e8a393d0e
3
+ metadata.gz: da3b1aed057251e7c6513b83c294cb27705319a4
4
+ data.tar.gz: af14c32fc742dd5688239503ae94b6cd9f42f9f6
5
5
  SHA512:
6
- metadata.gz: d1be16e1d99e64f661d87b22fa5efce4feb84444b7c498628ee964ef491a621c1c041b1437c1e6c265abf784bfb6ac80ee2048433402c40889be9555761c4cd4
7
- data.tar.gz: f9866720e77b5d436b5e88dbeb791bc7b92384bd39ceb3c55cd201570c2868b09de93eec85f260940da0f98de32ce162b0bcb1899b9db9545b133d5041f5066e
6
+ metadata.gz: 4e5e864536c3d4e488bec100864289e39a339e4c24deb07c1635ce24ba09bee4f003829f07aa7172a0d7ff1cf7a997670a715d3f746e25a3192ff9fff16c0d72
7
+ data.tar.gz: 5ce9dafbb2f20e00ddafa59c25654041716d0db6f943dccf48e85a1504e77a6f211d432853a8408771b93e3dbb639e108ff4e87073c08d191518e45af49c2ec8
data/History.md ADDED
@@ -0,0 +1,133 @@
1
+ ### Version 1.0.1 / 2016-09-10
2
+
3
+ * In the Readme file, added a link to the published documentation.
4
+
5
+
6
+ ### Version 1.0.0 / 2016-09-08
7
+
8
+ * All modeled elements of a Cucumber test suite are now modeled with actual
9
+ classes. Previously, some elements (such as tags or rows in an example table)
10
+ were modeled with simple strings.
11
+
12
+ * A base model class has been added in order to simplify adding new element
13
+ models. Other classes and modules used for organizing common model behavior
14
+ have been created/removed/renamed.
15
+
16
+ * Feature file models now only have a single feature model instead of a
17
+ collection of them (that would only ever have one item in it).
18
+
19
+ * Rows in an example table and rows in a step table no longer use two different
20
+ classes for modeling.
21
+
22
+ * Background models can now be compared to other models that have steps (i.e.
23
+ scenarios and outlines).
24
+
25
+ * All models for Gherkin elements now track the line number from which they
26
+ originate in a source file.
27
+
28
+ * The source line of a model is now a mutable attribute instead of being read
29
+ only.
30
+
31
+ * The file path of a feature file is now a mutable attribute instead of being
32
+ read only.
33
+
34
+ * Standardized the initial values of the attributes of abstractly created
35
+ models so that they are consistent across model types.
36
+
37
+ * Added specific ancestor types for scenario, outline, and background models as
38
+ alternatives to the generic 'test' ancestor type.
39
+
40
+ * Extra whitespace around parsed element descriptions is now trimmed away
41
+ before being stored in a model.
42
+
43
+ * Adding rows to examples via hashes can now be done without regard to the
44
+ order of the keys in the hash. The correct order can be determined by the
45
+ model.
46
+
47
+ * The saved parsing data that is generated by the 'gherkin' gem is no longer
48
+ duplicated for each model, resulting in significantly less memory usage.
49
+
50
+ * String output of models has been improved. More special characters in Gherkin
51
+ (e.g. vertical bars in rows) are appropriately escaped in the string output
52
+ of a model and several minor bugs related to using model string output as the
53
+ input text for new models have been fixed.
54
+
55
+ * Removed the backdoor used to pass around model data during the model creation
56
+ process. Model input can now only be text.
57
+
58
+ * Simple counting methods have been removed. Ruby's collection methods are just
59
+ as easy to use directly when dealing with classes that contain collections
60
+ and the removal of these counting methods simplifies the codebase.
61
+
62
+ * The 'World' module has been removed. The scope of this gem is to model files
63
+ written in Gherkin. Concepts like 'step definitions' and 'hooks' are better
64
+ left to libraries that include (possibly programming language specific) test
65
+ execution logic within their scope of concern.
66
+
67
+ * Step models no longer have 'arguments' because they require the concept of
68
+ step definitions, which are no longer within the scope of this gem.
69
+
70
+ * Removed deprecated behavior
71
+ - Marked
72
+ - Doc strings no longer use an array of strings to model their content
73
+ - Tables no longer use nested arrays of strings to model their rows
74
+ - Models that have descriptions no longer use an array of strings to
75
+ model their description
76
+ - The convenient (read: awkward) #step_text has been removed.
77
+ - Unmarked
78
+ - Examples no longer use an array of hashes to model their rows
79
+
80
+ * Various methods have been renamed.
81
+
82
+
83
+ ### Version 0.4.1 / 2016-05-12
84
+
85
+ * Increased the flexibility of input when adding rows to an Example object. Non-
86
+ string values can now be used as input and they will be converted into
87
+ strings. Original input objects are not modified.
88
+
89
+ * Added some error checking around adding value rows to an Example object
90
+ without adding a parameter row as well.
91
+
92
+
93
+ ### Version 0.4.0 / 2016-05-01
94
+
95
+ * The path of a Directory object is now a changeable attribute instead of only
96
+ being populated if the instance was given a diretory to model.
97
+
98
+ * Bug fix - Fixed a bug that occurred if a Directory object was asked for its
99
+ #name when it was created as 'abstract' instead of modeling an existing
100
+ directory.
101
+
102
+
103
+ ### Version 0.3.0 / 2016-04-24
104
+
105
+ * Support for version 4.x of the 'gherkin' gem added.
106
+
107
+ * Bug fix - Fixed a bug that was preventing Example objects from being created
108
+ from text if that text had less Gherkin structure than normal.
109
+
110
+
111
+ ### Version 0.2.0 / 2016-02-21
112
+
113
+ * Better error feedback when parsing errors are encountered. It is now easier
114
+ to tell which file contained invalid Gherkin.
115
+
116
+
117
+ ### Version 0.1.0 / 2016-02-10
118
+
119
+ * Support for version 3.x of the 'gherkin' gem added.
120
+
121
+ * Bug fix - The saved parsing data that is generated by the 'gherkin' gem is no
122
+ longer modified by the rest of the model creation process.
123
+
124
+
125
+ ### Version 0.0.2 / 2015-11-22
126
+
127
+ * Bug fix - Fixed a bug that was causing object comparison using #== to not
128
+ work when comparing some models to other types of objects.
129
+
130
+
131
+ ### Version 0.0.1 / 2014-06-02
132
+
133
+ * Initial release
data/README.md CHANGED
@@ -1,13 +1,15 @@
1
1
  # CukeModeler
2
2
 
3
- There comes a time in every programmer's adventures with Cucumber when they want to do Really Cool
4
- Stuff with their tests. This usually necessitates scanning all of their feature files and playing
5
- with the output. While the **[gherkin](https://github.com/cucumber/gherkin)** gem does a fine job of parsing feature files, reading or even
6
- manipulating the resulting Abstract Syntax Tree is not always fun. **cuke_modeler** comes to the
7
- rescue by providing a modeling layer that is easier to work with.
3
+ There comes a time in every programmer's adventures with Cucumber when they
4
+ want to do Really Cool Stuff with their tests. This usually necessitates
5
+ scanning all of their feature files and playing with the output. While the
6
+ **[gherkin](https://github.com/cucumber/gherkin)** gem does a fine job of parsing feature files, reading or even manipulating
7
+ the resulting Abstract Syntax Tree is not always fun. **cuke_modeler** comes to
8
+ the rescue by providing a modeling layer that is easier to work with.
8
9
 
9
- Whether you just want something that will let you easily inspect your test suite or you are looking
10
- for a foundation tool upon which to build something Really Neat, this gem has you covered.
10
+ Whether you just want something that will let you easily inspect your test
11
+ suite or you are looking for a foundation tool upon which to build something
12
+ Really Neat, this gem has you covered.
11
13
 
12
14
 
13
15
  ## Installation
@@ -31,7 +33,8 @@ First, load up the gem code.
31
33
  require 'cuke_modeler'
32
34
 
33
35
  Next, choose what you want to model. Directories and feature files are the most
34
- common thing to model but smaller portions of a test suite can be modeled as well.
36
+ common thing to model but smaller portions of a test suite can be modeled as
37
+ well.
35
38
 
36
39
  directory = CukeModeler::Directory.new('path/to/the/code_directory')
37
40
  file = CukeModeler::FeatureFile.new('path/to/the/feature_file')
@@ -58,30 +61,37 @@ and setting their attributes afterward.
58
61
 
59
62
  test.to_s #=> "Scenario:\n Given some step"
60
63
 
61
- One could, if so inclined, use this method to dynamically edit or even create an
62
- entire test suite!
64
+ One could, if so inclined, use this method to dynamically edit or even create
65
+ an entire test suite!
66
+
67
+ For more information on the different models and how to use them, see the
68
+ [documentation](http://www.relishapp.com/enkessler/CukeModeler/docs).
63
69
 
64
70
 
65
71
  ## Modeling other versions of Cucumber
66
72
 
67
- Although this gem is written in Ruby and requires it to run, the modeling capabilities provided are for
68
- the feature file layer of a Cucumber test suite. As such, any feature file that is written in Gherkin can
69
- be modeled, even if that feature is ultimately run with SpecFlow (Cucumber for C#), Lettuce (Cucumber for
70
- Python), or some other flavor of Cucumber.
73
+ Although this gem is written in Ruby and requires it to run, the modeling
74
+ capabilities provided are for the feature file layer of a Cucumber test suite.
75
+ As such, any feature file that is written in Gherkin can be modeled, even if
76
+ that feature is ultimately run with SpecFlow (Cucumber for C#), Lettuce
77
+ (Cucumber for Python), or some other flavor of Cucumber.
71
78
 
72
79
 
73
80
  ### Other gems that are (or soon will be) powered by cuke_modeler
74
81
 
75
- * https://github.com/enkessler/cql
76
- * https://github.com/enkessler/cuketagger
77
- * https://github.com/enkessler/cuke_cataloger
78
- * https://github.com/grange-insurance/cuke_slicer
82
+ * [cql](https://github.com/enkessler/cql)
83
+ * [cuketagger](https://github.com/enkessler/cuketagger)
84
+ * [cuke_cataloger](https://github.com/enkessler/cuke_cataloger)
85
+ * [cuke_slicer](https://github.com/grange-insurance/cuke_slicer)
79
86
 
80
87
 
81
88
  ## Contributing
82
89
 
83
90
  1. Fork it
84
- 2. Create your feature branch (off of the development branch): `git checkout -b my-new-feature`
85
- 3. Commit your changes: `git commit -am 'Add some feature'`
86
- 4. Push to the branch: `git push origin my-new-feature`
91
+ 2. Create your feature branch (off of the development branch)
92
+ `git checkout -b my-new-feature`
93
+ 3. Commit your changes
94
+ `git commit -am 'Add some feature'`
95
+ 4. Push to the branch
96
+ `git push origin my-new-feature`
87
97
  5. Create new Pull Request
@@ -1,4 +1,4 @@
1
1
  module CukeModeler
2
2
  # The gem version
3
- VERSION = "1.0.0"
3
+ VERSION = "1.0.1"
4
4
  end
data/todo.txt CHANGED
@@ -14,7 +14,6 @@ parsing module needs json/multijson require line?
14
14
  # todo - incorporate cuke_modeler extensions from other projects
15
15
  # todo - add plenty of testing around weird and minimal gherkin text for all models
16
16
 
17
- convert hitory file to .md format
18
17
  restructure project into new way that I did the other one
19
18
 
20
19
  Backlog
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cuke_modeler
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Kessler
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-08 00:00:00.000000000 Z
11
+ date: 2016-09-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gherkin
@@ -161,7 +161,7 @@ files:
161
161
  - ".simplecov"
162
162
  - ".travis.yml"
163
163
  - Gemfile
164
- - History.rdoc
164
+ - History.md
165
165
  - LICENSE.txt
166
166
  - README.md
167
167
  - Rakefile
data/History.rdoc DELETED
@@ -1,108 +0,0 @@
1
- === Version 1.0.0 / 2016-09-08
2
-
3
- * All modeled elements of a Cucumber test suite are now modeled with actual classes. Previously, some elements (such as
4
- tags or rows in an example table) were modeled with simple strings.
5
-
6
- * A base model class has been added in order to simplify adding new element models. Other classes and modules used for
7
- organizing common model behavior have been created/removed/renamed.
8
-
9
- * Feature file models now only have a single feature model instead of a collection of them (that would only ever have
10
- one item in it).
11
-
12
- * Rows in an example table and rows in a step table no longer use two different classes for modeling.
13
-
14
- * Background models can now be compared to other models that have steps (i.e. scenarios and outlines).
15
-
16
- * All models for Gherkin elements now track the line number from which they originate in a source file.
17
-
18
- * The source line of a model is now a mutable attribute instead of being read only.
19
-
20
- * The file path of a feature file is now a mutable attribute instead of being read only.
21
-
22
- * Standardized the initial values of the attributes of abstractly created models so that they are consistent across
23
- model types.
24
-
25
- * Added specific ancestor types for scenario, outline, and background models as alternatives to the generic 'test'
26
- ancestor type.
27
-
28
- * Extra whitespace around parsed element descriptions is now trimmed away before being stored in a model.
29
-
30
- * Adding rows to examples via hashes can now be done without regard to the order of the keys in the hash. The correct
31
- order can be determined by the model.
32
-
33
- * The saved parsing data that is generated by the 'gherkin' gem is no longer duplicated for each model, resulting in
34
- significantly less memory usage.
35
-
36
- * String output of models has been improved. More special characters in Gherkin (e.g. vertical bars in rows) are
37
- appropriately escaped in the string output of a model and several minor bugs related to using model string output as
38
- the input text for new models have been fixed.
39
-
40
- * Removed the backdoor used to pass around model data during the model creation process. Model input can now only be
41
- text.
42
-
43
- * Simple counting methods have been removed. Ruby's collection methods are just as easy to use directly when dealing
44
- with classes that contain collections and the removal of these counting methods simplifies the codebase.
45
-
46
- * The 'World' module has been removed. The scope of this gem is to model files written in Gherkin. Concepts like
47
- 'step definitions' and 'hooks' are better left to libraries that include (possibly programming language specific)
48
- test execution logic within their scope of concern.
49
-
50
- * Step models no longer have 'arguments' because they require the concept of step definitions, which are no longer
51
- within the scope of this gem.
52
-
53
- * Removed deprecated behavior
54
- - Marked
55
- - Doc strings no longer use an array of strings to model their content
56
- - Tables no longer use nested arrays of strings to model their rows
57
- - Models that have descriptions no longer use an array of strings to model their description
58
- - The convenient (read: awkward) #step_text has been removed.
59
- - Unmarked
60
- - Examples no longer use an array of hashes to model their rows
61
-
62
- * Various methods have been renamed.
63
-
64
-
65
- === Version 0.4.1 / 2016-05-12
66
-
67
- * Increased the flexibility of input when adding rows to an Example object. Non-string values can now be used as input
68
- and they will be converted into strings. Original input objects are not modified.
69
- * Added some error checking around adding value rows to an Example object without adding a parameter row as well.
70
-
71
-
72
- === Version 0.4.0 / 2016-05-01
73
-
74
- * The path of a Directory object is now a changeable attribute instead of only being populated if the instance was
75
- given a diretory to model.
76
- * Bug fix - Fixed a bug that occurred if a Directory object was asked for its #name when it was created as 'abstract'
77
- instead of modeling an existing directory.
78
-
79
-
80
- === Version 0.3.0 / 2016-04-24
81
-
82
- * Support for version 4.x of the 'gherkin' gem added.
83
- * Bug fix - Fixed a bug that was preventing Example objects from being created from text if that text had less Gherkin
84
- structure than normal.
85
-
86
-
87
- === Version 0.2.0 / 2016-02-21
88
-
89
- * Better error feedback when parsing errors are encountered. It is now easier to tell which file contained invalid
90
- Gherkin.
91
-
92
-
93
- === Version 0.1.0 / 2016-02-10
94
-
95
- * Support for version 3.x of the 'gherkin' gem added.
96
- * Bug fix - The saved parsing data that is generated by the 'gherkin' gem is no longer modified by the rest of the
97
- model creation process.
98
-
99
-
100
- === Version 0.0.2 / 2015-11-22
101
-
102
- * Bug fix - Fixed a bug that was causing object comparison using #== to not work when comparing some models to other
103
- types of objects.
104
-
105
-
106
- === Version 0.0.1 / 2014-06-02
107
-
108
- * Initial release