cuke_modeler 1.0.3 → 1.0.4

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: 1918fdba29731f9245ec6e80b77b64f92428bd6e
4
- data.tar.gz: f823ab2cc837ebba7994be52255ceea98ca276a3
3
+ metadata.gz: c92f8c24b0eb10a93381bc8c70e4afff4be3af22
4
+ data.tar.gz: 878358f86a7f812b4d2268e708155f1c34b31ce1
5
5
  SHA512:
6
- metadata.gz: 45546e2f8d77d4edafdd57a4ad648ce28b859b54614d94d7673f7aafdae766c2478eb2eff9393e33f9334e0583049efedecec02b2fb6bcea9d9cd9faa22ecf91
7
- data.tar.gz: ef236d460ecb932f5c8475378baa7fd56dfb178580cd65108ff726eec12c9ea5fda43951912fe59f22580d0a1c70a2404d74e70faf766c5de499cd4f35238c47
6
+ metadata.gz: 3fd79be1950f2d569a4456aca2c5eca55e2243e4957a0d094c657224c1179709adb19b353d1a46da74e556e3ebafa551f4c3e97e7537f0072074e9c572ea3514
7
+ data.tar.gz: d9852037c1c5394afa1240fd3f2a3ddde314606a999fd6ab93360bffd70df27a1cc58d0a852acf9c85f33db9f6367daf0fd4e8f9985825008f167dc6f734fa82
data/.gitignore CHANGED
@@ -15,3 +15,4 @@ spec/reports
15
15
  test/tmp
16
16
  test/version_tmp
17
17
  tmp
18
+ .idea/*
data/Gemfile CHANGED
@@ -7,8 +7,6 @@ gemspec
7
7
  if RUBY_VERSION =~ /^1\.8/
8
8
  gem 'cucumber', '<1.3.0'
9
9
  gem 'gherkin', '<2.12.0'
10
- gem 'mime-types', '<2.0.0'
11
- gem 'rest-client', '<1.7.0'
12
10
  gem 'rake', '< 11.0' # Rake dropped 1.8.x support after this version
13
11
  elsif RUBY_VERSION =~ /^1\./
14
12
  gem 'cucumber', '<2.0.0'
@@ -17,6 +15,7 @@ end
17
15
  if RUBY_VERSION =~ /^1\./
18
16
  gem 'tins', '< 1.7' # The 'tins' gem requires Ruby 2.x on/after this version
19
17
  gem 'json', '< 2.0' # The 'json' gem drops pre-Ruby 2.x support on/after this version
18
+ gem 'term-ansicolor', '< 1.4' # The 'term-ansicolor' gem requires Ruby 2.x on/after this version
20
19
  end
21
20
 
22
21
  if RUBY_VERSION =~ /^2\./
data/History.md CHANGED
@@ -1,3 +1,9 @@
1
+ ### Version 1.0.4 / 2016-10-07
2
+
3
+ * Bug Fix - Fixed a bug that caused some models to include nil objects in their
4
+ children collection if they did not have the relevant child object.
5
+
6
+
1
7
  ### Version 1.0.3 / 2016-09-12
2
8
 
3
9
  * Fixed a gem dependency that was accidentally declared with '<=' instead of '<'.
@@ -35,7 +35,7 @@ module CukeModeler
35
35
 
36
36
  # Returns the model objects that belong to this model.
37
37
  def children
38
- [@feature]
38
+ @feature ? [@feature] : []
39
39
  end
40
40
 
41
41
  # Returns a string representation of this model. For a feature file
@@ -39,7 +39,7 @@ module CukeModeler
39
39
 
40
40
  # Returns the model objects that belong to this model.
41
41
  def children
42
- [block]
42
+ block ? [block] : []
43
43
  end
44
44
 
45
45
  # Returns a string representation of this model. For a step model,
@@ -1,4 +1,4 @@
1
1
  module CukeModeler
2
2
  # The gem version
3
- VERSION = "1.0.3"
3
+ VERSION = "1.0.4"
4
4
  end
@@ -6,8 +6,6 @@ gem "gherkin", "< 3.0.0"
6
6
  # cuke_modeler can play with pretty much any version of these but they all play differently with Ruby
7
7
  if RUBY_VERSION =~ /^1\.8/
8
8
  gem 'cucumber', '<1.3.0'
9
- gem 'mime-types', '<2.0.0'
10
- gem 'rest-client', '<1.7.0'
11
9
  gem 'rake', '< 11.0' # Rake dropped 1.8.x support after this version
12
10
  elsif RUBY_VERSION =~ /^1\./
13
11
  gem 'cucumber', '>=1.0.0', '<2.0.0'
@@ -16,6 +14,7 @@ end
16
14
  if RUBY_VERSION =~ /^1\./
17
15
  gem 'tins', '< 1.7' # The 'tins' gem requires Ruby 2.x on/after this version
18
16
  gem 'json', '< 2.0' # The 'json' gem drops pre-Ruby 2.x support on/after this version
17
+ gem 'term-ansicolor', '< 1.4' # The 'term-ansicolor' gem requires Ruby 2.x on/after this version
19
18
  end
20
19
 
21
20
  if RUBY_VERSION =~ /^2\.[23456789]/
@@ -6,14 +6,13 @@ gem "gherkin", "~> 3.0"
6
6
  # cuke_modeler can play with pretty much any version of these but they all play differently with Ruby
7
7
  if RUBY_VERSION =~ /^1\.8/
8
8
  gem 'cucumber', '<1.3.0'
9
- gem 'mime-types', '<2.0.0'
10
- gem 'rest-client', '<1.7.0'
11
9
  gem 'rake', '< 11.0' # Rake dropped 1.8.x support after this version
12
10
  end
13
11
 
14
12
  if RUBY_VERSION =~ /^1\./
15
13
  gem 'tins', '< 1.7' # The 'tins' gem requires Ruby 2.x on/after this version
16
14
  gem 'json', '< 2.0' # The 'json' gem drops pre-Ruby 2.x support on/after this version
15
+ gem 'term-ansicolor', '< 1.4' # The 'term-ansicolor' gem requires Ruby 2.x on/after this version
17
16
  end
18
17
 
19
18
  if RUBY_VERSION =~ /^2\.[23456789]/
@@ -6,14 +6,13 @@ gem "gherkin", "~> 4.0"
6
6
  # cuke_modeler can play with pretty much any version of these but they all play differently with Ruby
7
7
  if RUBY_VERSION =~ /^1\.8/
8
8
  gem 'cucumber', '<1.3.0'
9
- gem 'mime-types', '<2.0.0'
10
- gem 'rest-client', '<1.7.0'
11
9
  gem 'rake', '< 11.0' # Rake dropped 1.8.x support after this version
12
10
  end
13
11
 
14
12
  if RUBY_VERSION =~ /^1\./
15
13
  gem 'tins', '< 1.7' # The 'tins' gem requires Ruby 2.x on/after this version
16
14
  gem 'json', '< 2.0' # The 'json' gem drops pre-Ruby 2.x support on/after this version
15
+ gem 'term-ansicolor', '< 1.4' # The 'term-ansicolor' gem requires Ruby 2.x on/after this version
17
16
  end
18
17
 
19
18
  if RUBY_VERSION =~ /^2\.[23456789]/
@@ -15,4 +15,11 @@ shared_examples_for 'a containing model' do
15
15
  expect(model.children).to be_an(Array)
16
16
  end
17
17
 
18
+ it 'does not return objects for children that it does not have' do
19
+ # Ensuring an empty, childless model
20
+ model = clazz.new
21
+
22
+ expect(model.children).to_not include(nil)
23
+ end
24
+
18
25
  end
data/todo.txt CHANGED
@@ -7,9 +7,6 @@ Show less boilerplate code in the documentation
7
7
 
8
8
  document helper modules as not part of the public API
9
9
 
10
- See if the 'stringio' require is really needed.
11
- See if the 'version' require is really needed.
12
- parsing module needs json/multijson require line?
13
10
  # todo - remove hard coded newlines in feature files so that Relish and other text editors can wrap them on its own
14
11
  # todo - incorporate cuke_modeler extensions from other projects
15
12
  # todo - add plenty of testing around weird and minimal gherkin text for all models
@@ -19,12 +16,9 @@ Backlog
19
16
  -------------
20
17
 
21
18
  replace joined array source text with single string source text/heredocs
22
- Make sure that specs use clazz instead of fully specifying the class under test (done)
23
19
  Don't bother to test directory create/destroy around unit tests
24
20
  unit testing around parsing/modeling cases (whitespace, indentation, minimalistic feature elements, etc.)
25
21
  replace "\n" usages with the currently set record separator (i.e "\$" )
26
- Clean up step verifications (done)
27
- Figure out why using empty files for directory_modeling.feature doesn't work (done)
28
22
  Fix transient test failures (permission denied file access problems)
29
23
  make sure that all classes and tests are covered and attaches to code coverage
30
24
  use 'here doc' for source text construction in rspec tests
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.3
4
+ version: 1.0.4
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-12 00:00:00.000000000 Z
11
+ date: 2016-10-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gherkin