cql 1.5.0 → 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: c1a6431920afce8b5bb22168816f947c7754873d
4
- data.tar.gz: 52a8f8287a9ae24f702ccbd7f511689a058ee962
2
+ SHA256:
3
+ metadata.gz: 8e2ede22500087bd23e0fa23013c227997688d6689bf56f39b2586a2b355d215
4
+ data.tar.gz: 4f19858e121c952b4acd0446d1d3658053914c0cea0ec94611e0b9fdb8343812
5
5
  SHA512:
6
- metadata.gz: e86ebe5acdb55af2cb9bf1d9012e5a3046ccfd7d45a9c402b03e710e1f0f8f7289b10ab12b28d8ac4306fdaacb666d4001e793560b6064aa736050a5b44857dc
7
- data.tar.gz: e60182bd6a14971947a91a1a5a364835665a8ee2764a4eab5e1708834379e51a9d370593dce21b91be3f549a813a8b506172142fbc96b26d32105defeb396fb6
6
+ metadata.gz: aa034bbfab89ca066255c714953a80494e2c5bf38fd4fcfae873707ea175f49d6f5584c63c7abc6f2ab51c82518e832a12b9f5079d98581d68e4bf8fa71ca8f4
7
+ data.tar.gz: 6dcfa7d2993c2f0ffadce2836bd0a6a5eaec73c2030a67c217cae376a0f133275533ef3d495283fbd6206cf7e2f59f9360fc0a3e5b40a99088894b447628e5ec
data/lib/cql/dsl.rb CHANGED
@@ -80,8 +80,13 @@ module CQL
80
80
 
81
81
  # Not a part of the public API. Subject to change at any time.
82
82
  class Comparison
83
- attr_accessor :operator, :amount
84
83
 
84
+ # the operator used for comparison
85
+ attr_accessor :operator,
86
+ # value that will be compared against
87
+ :amount
88
+
89
+ # Creates a new comparison object
85
90
  def initialize operator, amount
86
91
  @operator = operator
87
92
  @amount = amount
data/lib/cql/filters.rb CHANGED
@@ -2,12 +2,16 @@ module CQL
2
2
 
3
3
  # Not a part of the public API. Subject to change at any time.
4
4
  class TagFilter
5
+
6
+ # Tags to match
5
7
  attr_reader :tags
6
8
 
9
+ # Creates a new filter
7
10
  def initialize tags
8
11
  @tags = tags
9
12
  end
10
13
 
14
+ # Returns whether or not the object has the target tags
11
15
  def has_tags?(object, target_tags)
12
16
  target_tags.all? { |target_tag|
13
17
  tags = object.tags
@@ -27,14 +31,18 @@ module CQL
27
31
 
28
32
  # Not a part of the public API. Subject to change at any time.
29
33
  class ContentMatchFilter
34
+
35
+ # Pattern to match
30
36
  attr_reader :pattern
31
37
 
38
+ # Creates a new filter
32
39
  def initialize(pattern)
33
40
  raise(ArgumentError, "Can only match a String or Regexp. Got #{pattern.class}.") unless pattern.is_a?(String) || pattern.is_a?(Regexp)
34
41
 
35
42
  @pattern = pattern
36
43
  end
37
44
 
45
+ # Returns whether or not the content matches the pattern
38
46
  def content_match?(content)
39
47
  if pattern.is_a?(String)
40
48
  content.any? { |thing| thing == pattern }
@@ -47,8 +55,13 @@ module CQL
47
55
 
48
56
  # Not a part of the public API. Subject to change at any time.
49
57
  class TypeCountFilter
50
- attr_reader :types, :comparison
51
58
 
59
+ # the types of object that will be filtered against
60
+ attr_reader :types,
61
+ # the comparison that will be made between the objects
62
+ :comparison
63
+
64
+ # Creates a new filter
52
65
  def initialize types, comparison
53
66
  @types = types
54
67
  @comparison = comparison
data/lib/cql/query.rb CHANGED
@@ -5,9 +5,12 @@ module CQL
5
5
 
6
6
  include Dsl
7
7
 
8
- attr_reader :data, :what
9
-
8
+ # the root object that will be queried
9
+ attr_reader :data,
10
+ # what kinds of objects will be selected
11
+ :what
10
12
 
13
+ # Creates a new query object
11
14
  def initialize(directory, &block)
12
15
  # Set root object
13
16
  @data = directory
@@ -7,6 +7,7 @@ module CQL
7
7
  include Queriable
8
8
 
9
9
 
10
+ # Creates a new repository object based on the passed directory path or model
10
11
  def initialize(repository_root)
11
12
  case
12
13
  when repository_root.is_a?(String)
data/lib/cql/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module CQL
2
2
  # The current version of the gem
3
- VERSION = '1.5.0'
3
+ VERSION = '1.5.1'
4
4
  end
@@ -7,13 +7,11 @@ gemspec :path => "../../"
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' # (For the relish gem) Ruby 1.8.x dropped somewhere in the 2.x series
11
- gem 'rest-client', '< 1.7.0' # (For the relish gem) Ruby 1.8.x dropped on/after this version
10
+ gem 'rainbow', '< 2.0' # Ruby 1.8.x support dropped after this version
12
11
  gem 'rake', '< 11.0' # Rake dropped 1.8.x support after this version
13
12
  elsif RUBY_VERSION =~ /^1\./
14
13
  gem 'cucumber', '< 2.0.0'
15
14
  gem 'mime-types', '< 3.0.0' # Requires Ruby 2.x on/after this version
16
- gem 'rest-client', '< 2.0.0' # Requires Ruby 2.x on/after this version
17
15
  gem 'rake', '< 12.3.0' # Requires Ruby 2.x on/after this version
18
16
  end
19
17
 
@@ -22,10 +20,6 @@ if RUBY_VERSION =~ /^1\./
22
20
  gem 'json', '< 2.0' # The 'json' gem drops pre-Ruby 2.x support on/after this version
23
21
  gem 'term-ansicolor', '< 1.4' # The 'term-ansicolor' gem requires Ruby 2.x on/after this version
24
22
  gem 'unf_ext', '< 0.0.7.3' # Requires Ruby 2.x on/after this version
25
-
26
- if RbConfig::CONFIG['host_os'].downcase =~ /mswin|msys|mingw32/
27
- gem 'ffi', '< 1.9.15' # The 'ffi' gem, for Windows, requires Ruby 2.x on/after this version
28
- end
29
23
  end
30
24
 
31
25
  if RUBY_VERSION =~ /^2\.[23456789]/
@@ -7,13 +7,11 @@ gemspec :path => "../../"
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' # (For the relish gem) Ruby 1.8.x dropped somewhere in the 2.x series
11
- gem 'rest-client', '< 1.7.0' # (For the relish gem) Ruby 1.8.x dropped on/after this version
10
+ gem 'rainbow', '< 2.0' # Ruby 1.8.x support dropped after this version
12
11
  gem 'rake', '< 11.0' # Rake dropped 1.8.x support after this version
13
12
  elsif RUBY_VERSION =~ /^1\./
14
13
  gem 'cucumber', '< 2.0.0'
15
14
  gem 'mime-types', '< 3.0.0' # Requires Ruby 2.x on/after this version
16
- gem 'rest-client', '< 2.0.0' # Requires Ruby 2.x on/after this version
17
15
  gem 'rake', '< 12.3.0' # Requires Ruby 2.x on/after this version
18
16
  end
19
17
 
@@ -22,10 +20,6 @@ if RUBY_VERSION =~ /^1\./
22
20
  gem 'json', '< 2.0' # The 'json' gem drops pre-Ruby 2.x support on/after this version
23
21
  gem 'term-ansicolor', '< 1.4' # The 'term-ansicolor' gem requires Ruby 2.x on/after this version
24
22
  gem 'unf_ext', '< 0.0.7.3' # Requires Ruby 2.x on/after this version
25
-
26
- if RbConfig::CONFIG['host_os'].downcase =~ /mswin|msys|mingw32/
27
- gem 'ffi', '< 1.9.15' # The 'ffi' gem, for Windows, requires Ruby 2.x on/after this version
28
- end
29
23
  end
30
24
 
31
25
  if RUBY_VERSION =~ /^2\.[23456789]/
@@ -0,0 +1,25 @@
1
+ require "#{File.dirname(__FILE__)}/spec_helper"
2
+
3
+
4
+ describe 'the gem' do
5
+
6
+ let(:gemspec) { eval(File.read "#{File.dirname(__FILE__)}/../../../cql.gemspec") }
7
+
8
+
9
+ it 'validates cleanly' do
10
+ mock_ui = Gem::MockGemUi.new
11
+ Gem::DefaultUserInteraction.use_ui(mock_ui) { gemspec.validate }
12
+
13
+ expect(mock_ui.error).to_not match(/warn/i)
14
+ end
15
+
16
+ end
17
+
18
+
19
+ describe CQL do
20
+
21
+ it "has a version number" do
22
+ expect(CQL::VERSION).not_to be nil
23
+ end
24
+
25
+ end
@@ -18,6 +18,8 @@ require "#{this_dir}/line_count_filterable_specs"
18
18
  require "#{this_dir}/line_filterable_specs"
19
19
  require "#{this_dir}/queriable_specs"
20
20
 
21
+ require 'rubygems/mock_gem_ui'
22
+
21
23
  CQL_FEATURE_FIXTURES_DIRECTORY = "#{this_dir}/../../fixtures/features"
22
24
 
23
25
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cql
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Kessler
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-06-21 00:00:00.000000000 Z
12
+ date: 2019-04-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: cuke_modeler
@@ -110,33 +110,33 @@ dependencies:
110
110
  - !ruby/object:Gem::Version
111
111
  version: 1.0.0
112
112
  - !ruby/object:Gem::Dependency
113
- name: relish
113
+ name: bundler
114
114
  requirement: !ruby/object:Gem::Requirement
115
115
  requirements:
116
- - - "~>"
116
+ - - "<"
117
117
  - !ruby/object:Gem::Version
118
- version: '0.0'
118
+ version: '3.0'
119
119
  type: :development
120
120
  prerelease: false
121
121
  version_requirements: !ruby/object:Gem::Requirement
122
122
  requirements:
123
- - - "~>"
123
+ - - "<"
124
124
  - !ruby/object:Gem::Version
125
- version: '0.0'
125
+ version: '3.0'
126
126
  - !ruby/object:Gem::Dependency
127
- name: bundler
127
+ name: rainbow
128
128
  requirement: !ruby/object:Gem::Requirement
129
129
  requirements:
130
- - - "~>"
130
+ - - "<"
131
131
  - !ruby/object:Gem::Version
132
- version: '1.5'
132
+ version: 4.0.0
133
133
  type: :development
134
134
  prerelease: false
135
135
  version_requirements: !ruby/object:Gem::Requirement
136
136
  requirements:
137
- - - "~>"
137
+ - - "<"
138
138
  - !ruby/object:Gem::Version
139
- version: '1.5'
139
+ version: 4.0.0
140
140
  description: CQL is a domain specific language used for querying a Cucumber (or other
141
141
  Gherkin based) test suite. The goal of CQL is to increase the ease with which useful
142
142
  information can be extracted from a modeled test suite and turned into summarized
@@ -228,6 +228,7 @@ files:
228
228
  - testing/rspec/spec/clauses/transform_clause_spec.rb
229
229
  - testing/rspec/spec/clauses/with_clause_spec.rb
230
230
  - testing/rspec/spec/clauses/without_clause_spec.rb
231
+ - testing/rspec/spec/cql_spec.rb
231
232
  - testing/rspec/spec/dsl_spec.rb
232
233
  - testing/rspec/spec/filter_example_spec.rb
233
234
  - testing/rspec/spec/filter_feature_dsl_spec.rb
@@ -266,7 +267,10 @@ required_ruby_version: !ruby/object:Gem::Requirement
266
267
  requirements:
267
268
  - - ">="
268
269
  - !ruby/object:Gem::Version
269
- version: '0'
270
+ version: 1.8.7
271
+ - - "<"
272
+ - !ruby/object:Gem::Version
273
+ version: '3.0'
270
274
  required_rubygems_version: !ruby/object:Gem::Requirement
271
275
  requirements:
272
276
  - - ">="
@@ -274,7 +278,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
274
278
  version: '0'
275
279
  requirements: []
276
280
  rubyforge_project:
277
- rubygems_version: 2.5.2
281
+ rubygems_version: 2.7.6
278
282
  signing_key:
279
283
  specification_version: 4
280
284
  summary: A gem providing functionality to query a Cucumber test suite.
@@ -350,6 +354,7 @@ test_files:
350
354
  - testing/rspec/spec/clauses/transform_clause_spec.rb
351
355
  - testing/rspec/spec/clauses/without_clause_spec.rb
352
356
  - testing/rspec/spec/clauses/with_clause_spec.rb
357
+ - testing/rspec/spec/cql_spec.rb
353
358
  - testing/rspec/spec/dsl_spec.rb
354
359
  - testing/rspec/spec/filter_example_spec.rb
355
360
  - testing/rspec/spec/filter_feature_dsl_spec.rb