screengem 0.11.0 → 0.15.0

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
  SHA256:
3
- metadata.gz: cd011339a587030b0f8c3e17df9684755b66025d6728228be0e4333c716cb71c
4
- data.tar.gz: aa205821d3e4a36495f5d2614807c2f85189cd0c053218e926c055bab8ee90ff
3
+ metadata.gz: 24319c88be9815217f65514730892e857eda19fd239ae0969f3c821fa44333d0
4
+ data.tar.gz: cf295c1f7bece490659980ea1818bb3960464fbec4f37db379ae64f5a9603ae1
5
5
  SHA512:
6
- metadata.gz: 78ee26817bdf61174c260f6e8d9ec4b2108c595671a7cad0a79dfadf6355d283126196d124f08704a5e28579ca3c7e7b12cdab5232aa62a82998644e35bf117b
7
- data.tar.gz: 4761eea85f9258e23b9b34efd5eb271c3e84738615e347bc0fe694fc257e7156deee4f11f16aed9f451c37ee0e13e5c0bfa2521efbe8a2fec34f0666630b0d80
6
+ metadata.gz: 6d3add892b0904a3e64fec1692abf8390c256128a4e4bad6e2613fae7a47569d194d5a04f22d46522bfd57d3fd86c3500a2656b66f2286246aca98569af6011d
7
+ data.tar.gz: 8f6b7a5d7c6cf8145611dbfee8ec8007bf817ae6a26faeddf020c0ca6104be27a09982d16fceb96dd6f782a72c2d0f818bb75cbed7e769bd88e07e3d387eed38
data/.rubocop.yml CHANGED
@@ -1,7 +1,18 @@
1
1
  require: rubocop-rspec
2
2
 
3
3
  AllCops:
4
- TargetRubyVersion: 2.5
4
+ NewCops: enable
5
+ TargetRubyVersion: 2.7
6
+
7
+ Gemspec/RequireMFA:
8
+ Enabled: false
9
+
10
+ Lint/ConstantDefinitionInBlock:
11
+ Exclude:
12
+ - spec/**/*_spec.rb
13
+
14
+ Layout/LineLength:
15
+ Max: 120
5
16
 
6
17
  Layout/SpaceAroundMethodCallOperator:
7
18
  Enabled: false
@@ -18,15 +29,16 @@ Metrics/AbcSize:
18
29
  Metrics/BlockLength:
19
30
  Enabled: false
20
31
 
21
- Metrics/LineLength:
22
- Max: 120
23
-
24
32
  Metrics/MethodLength:
25
33
  Enabled: false
26
34
 
27
35
  Metrics/ModuleLength:
28
36
  Enabled: false
29
37
 
38
+ Naming/VariableNumber:
39
+ Enabled: true
40
+ EnforcedStyle: snake_case
41
+
30
42
  RSpec/AnyInstance:
31
43
  Enabled: false
32
44
 
@@ -36,6 +48,9 @@ RSpec/DescribedClass:
36
48
  RSpec/ExampleLength:
37
49
  Max: 20
38
50
 
51
+ RSpec/MultipleMemoizedHelpers:
52
+ Max: 8
53
+
39
54
  RSpec/MultipleExpectations:
40
55
  Max: 5
41
56
 
@@ -63,6 +78,9 @@ Style/HashTransformValues:
63
78
  Style/Documentation:
64
79
  Enabled: false
65
80
 
81
+ Style/DocumentDynamicEvalDefinition:
82
+ Enabled: false
83
+
66
84
  Style/EmptyMethod:
67
85
  Enabled: false
68
86
 
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.6.6
1
+ 2.7.4
data/CHANGELOG.md CHANGED
@@ -2,6 +2,25 @@
2
2
 
3
3
  ## master (unreleased)
4
4
 
5
+ ## 0.15.0 (2022-01-23)
6
+
7
+ * Add actor hooks
8
+
9
+ ## 0.14.0 (2022-01-06)
10
+
11
+ * Update the thor dependency
12
+ * Latest development dependencies
13
+
14
+ ## 0.13.0 (2021-06-13)
15
+
16
+ * Relax the ActiveSupport dependency
17
+ * Latest development dependencies
18
+
19
+ ## 0.12.0 (2021-01-27)
20
+
21
+ * Relax the thor dependency
22
+ * Latest development dependencies
23
+
5
24
  ## 0.11.0 (2020-04-26)
6
25
 
7
26
  ### Breaking Changes
data/README.md CHANGED
@@ -51,7 +51,7 @@ Capybara is available to all screen elements and is the recommended way to inter
51
51
  Actors are able to answer questions. A question is considered to be answered affirmatively
52
52
  when no exception is thrown and negatively when an exception is thrown.
53
53
 
54
- RSpec matchers are available to all questions and are the recommended way to implement a question.
54
+ [RSpec expectations](https://github.com/rspec/rspec-expectations) are available in all questions and are the recommended way to implement a question.
55
55
 
56
56
  ## Dampening
57
57
 
@@ -17,6 +17,8 @@ module Screengem
17
17
  # Used by an actor to ask one or more questions in a step definition.
18
18
  #
19
19
  def asks(*questions)
20
+ before_actor_asks(*questions)
21
+
20
22
  questions.each do |question|
21
23
  question.configure(self, screen).answer
22
24
  end
@@ -24,10 +26,16 @@ module Screengem
24
26
  self
25
27
  end
26
28
 
29
+ def before_actor_asks(*_questions)
30
+ # Hook to customize actor behaviour.
31
+ end
32
+
27
33
  #
28
34
  # Used by an actor to perform one or more tasks in a step definition.
29
35
  #
30
36
  def performs(*tasks)
37
+ before_actor_performs(*tasks)
38
+
31
39
  tasks.each do |task|
32
40
  task.configure(self, screen).perform
33
41
  end
@@ -35,6 +43,10 @@ module Screengem
35
43
  self
36
44
  end
37
45
 
46
+ def before_actor_performs(*_tasks)
47
+ # Hook to customize actor behaviour.
48
+ end
49
+
38
50
  #
39
51
  # Used by an actor to recall a value for the specified tag.
40
52
  #
@@ -6,7 +6,7 @@ module Screengem
6
6
  class QuestionFactory < BasicObject
7
7
  include ::Singleton
8
8
 
9
- def method_missing(question_name, *args) # rubocop:disable Style/MethodMissingSuper
9
+ def method_missing(question_name, *args)
10
10
  question_class_name = "#{question_name}_question".camelize
11
11
  question_class = "#{question_scope}::#{question_class_name}".constantize
12
12
 
@@ -6,7 +6,7 @@ module Screengem
6
6
  class TaskFactory < BasicObject
7
7
  include ::Singleton
8
8
 
9
- def method_missing(task_name, *args) # rubocop:disable Style/MethodMissingSuper
9
+ def method_missing(task_name, *args)
10
10
  task_class_name = "#{task_name}_task".camelize
11
11
  task_class = "#{task_scope}::#{task_class_name}".constantize
12
12
 
@@ -1,3 +1,3 @@
1
1
  module Screengem
2
- VERSION = "0.11.0"
2
+ VERSION = "0.15.0"
3
3
  end
data/screengem.gemspec CHANGED
@@ -27,18 +27,19 @@ Gem::Specification.new do |spec|
27
27
  spec.bindir = "exe"
28
28
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
29
29
  spec.require_paths = ["lib"]
30
- spec.required_ruby_version = ">= 2.5"
30
+ spec.required_ruby_version = ">= 2.7"
31
31
 
32
- spec.add_runtime_dependency "activesupport", ">= 4.2", "< 6.1"
32
+ spec.add_runtime_dependency "activesupport", ">= 5.2", "< 6.2"
33
33
  spec.add_runtime_dependency "capybara", ">= 2.18", "< 4.0"
34
- spec.add_runtime_dependency "require_all", ">= 2.0", "< 4.0"
35
- spec.add_runtime_dependency "rspec-expectations", "~> 3.8"
36
- spec.add_runtime_dependency "thor", ">= 0.20", "< 1.1"
34
+ spec.add_runtime_dependency "require_all", ">= 3.0", "< 4.0"
35
+ spec.add_runtime_dependency "rspec-expectations", "~> 3.10"
36
+ spec.add_runtime_dependency "thor", "~> 1.2"
37
37
 
38
38
  spec.add_development_dependency "rake", "~> 13.0"
39
39
  spec.add_development_dependency "rspec", "~> 3.9"
40
- spec.add_development_dependency "rubocop", "~> 0.82"
41
- spec.add_development_dependency "rubocop-performance", "~> 1.5"
42
- spec.add_development_dependency "rubocop-rspec", "~> 1.38"
43
- spec.add_development_dependency "simplecov", "~> 0.18"
40
+ spec.add_development_dependency "rubocop", "~> 1.24"
41
+ spec.add_development_dependency "rubocop-performance", "~> 1.13"
42
+ spec.add_development_dependency "rubocop-rake", "~> 0.6"
43
+ spec.add_development_dependency "rubocop-rspec", "~> 2.7"
44
+ spec.add_development_dependency "simplecov", "~> 0.21"
44
45
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: screengem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0
4
+ version: 0.15.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alistair McKinnell
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-04-25 00:00:00.000000000 Z
11
+ date: 2022-01-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -16,20 +16,20 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '4.2'
19
+ version: '5.2'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '6.1'
22
+ version: '6.2'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: '4.2'
29
+ version: '5.2'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '6.1'
32
+ version: '6.2'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: capybara
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -56,7 +56,7 @@ dependencies:
56
56
  requirements:
57
57
  - - ">="
58
58
  - !ruby/object:Gem::Version
59
- version: '2.0'
59
+ version: '3.0'
60
60
  - - "<"
61
61
  - !ruby/object:Gem::Version
62
62
  version: '4.0'
@@ -66,7 +66,7 @@ dependencies:
66
66
  requirements:
67
67
  - - ">="
68
68
  - !ruby/object:Gem::Version
69
- version: '2.0'
69
+ version: '3.0'
70
70
  - - "<"
71
71
  - !ruby/object:Gem::Version
72
72
  version: '4.0'
@@ -76,34 +76,28 @@ dependencies:
76
76
  requirements:
77
77
  - - "~>"
78
78
  - !ruby/object:Gem::Version
79
- version: '3.8'
79
+ version: '3.10'
80
80
  type: :runtime
81
81
  prerelease: false
82
82
  version_requirements: !ruby/object:Gem::Requirement
83
83
  requirements:
84
84
  - - "~>"
85
85
  - !ruby/object:Gem::Version
86
- version: '3.8'
86
+ version: '3.10'
87
87
  - !ruby/object:Gem::Dependency
88
88
  name: thor
89
89
  requirement: !ruby/object:Gem::Requirement
90
90
  requirements:
91
- - - ">="
92
- - !ruby/object:Gem::Version
93
- version: '0.20'
94
- - - "<"
91
+ - - "~>"
95
92
  - !ruby/object:Gem::Version
96
- version: '1.1'
93
+ version: '1.2'
97
94
  type: :runtime
98
95
  prerelease: false
99
96
  version_requirements: !ruby/object:Gem::Requirement
100
97
  requirements:
101
- - - ">="
102
- - !ruby/object:Gem::Version
103
- version: '0.20'
104
- - - "<"
98
+ - - "~>"
105
99
  - !ruby/object:Gem::Version
106
- version: '1.1'
100
+ version: '1.2'
107
101
  - !ruby/object:Gem::Dependency
108
102
  name: rake
109
103
  requirement: !ruby/object:Gem::Requirement
@@ -138,57 +132,71 @@ dependencies:
138
132
  requirements:
139
133
  - - "~>"
140
134
  - !ruby/object:Gem::Version
141
- version: '0.82'
135
+ version: '1.24'
142
136
  type: :development
143
137
  prerelease: false
144
138
  version_requirements: !ruby/object:Gem::Requirement
145
139
  requirements:
146
140
  - - "~>"
147
141
  - !ruby/object:Gem::Version
148
- version: '0.82'
142
+ version: '1.24'
149
143
  - !ruby/object:Gem::Dependency
150
144
  name: rubocop-performance
151
145
  requirement: !ruby/object:Gem::Requirement
152
146
  requirements:
153
147
  - - "~>"
154
148
  - !ruby/object:Gem::Version
155
- version: '1.5'
149
+ version: '1.13'
150
+ type: :development
151
+ prerelease: false
152
+ version_requirements: !ruby/object:Gem::Requirement
153
+ requirements:
154
+ - - "~>"
155
+ - !ruby/object:Gem::Version
156
+ version: '1.13'
157
+ - !ruby/object:Gem::Dependency
158
+ name: rubocop-rake
159
+ requirement: !ruby/object:Gem::Requirement
160
+ requirements:
161
+ - - "~>"
162
+ - !ruby/object:Gem::Version
163
+ version: '0.6'
156
164
  type: :development
157
165
  prerelease: false
158
166
  version_requirements: !ruby/object:Gem::Requirement
159
167
  requirements:
160
168
  - - "~>"
161
169
  - !ruby/object:Gem::Version
162
- version: '1.5'
170
+ version: '0.6'
163
171
  - !ruby/object:Gem::Dependency
164
172
  name: rubocop-rspec
165
173
  requirement: !ruby/object:Gem::Requirement
166
174
  requirements:
167
175
  - - "~>"
168
176
  - !ruby/object:Gem::Version
169
- version: '1.38'
177
+ version: '2.7'
170
178
  type: :development
171
179
  prerelease: false
172
180
  version_requirements: !ruby/object:Gem::Requirement
173
181
  requirements:
174
182
  - - "~>"
175
183
  - !ruby/object:Gem::Version
176
- version: '1.38'
184
+ version: '2.7'
177
185
  - !ruby/object:Gem::Dependency
178
186
  name: simplecov
179
187
  requirement: !ruby/object:Gem::Requirement
180
188
  requirements:
181
189
  - - "~>"
182
190
  - !ruby/object:Gem::Version
183
- version: '0.18'
191
+ version: '0.21'
184
192
  type: :development
185
193
  prerelease: false
186
194
  version_requirements: !ruby/object:Gem::Requirement
187
195
  requirements:
188
196
  - - "~>"
189
197
  - !ruby/object:Gem::Version
190
- version: '0.18'
191
- description:
198
+ version: '0.21'
199
+ description:
192
200
  email:
193
201
  - alistairm@nulogy.com
194
202
  executables:
@@ -201,7 +209,6 @@ files:
201
209
  - ".rubocop"
202
210
  - ".rubocop.yml"
203
211
  - ".ruby-version"
204
- - ".travis.yml"
205
212
  - CHANGELOG.md
206
213
  - CODE_OF_CONDUCT.md
207
214
  - Gemfile
@@ -244,7 +251,7 @@ metadata:
244
251
  changelog_uri: https://github.com/nulogy/screengem/blob/master/CHANGELOG.md
245
252
  source_code_uri: https://github.com/nulogy/screengem
246
253
  bug_tracker_uri: https://github.com/nulogy/screengem/issues
247
- post_install_message:
254
+ post_install_message:
248
255
  rdoc_options: []
249
256
  require_paths:
250
257
  - lib
@@ -252,15 +259,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
252
259
  requirements:
253
260
  - - ">="
254
261
  - !ruby/object:Gem::Version
255
- version: '2.5'
262
+ version: '2.7'
256
263
  required_rubygems_version: !ruby/object:Gem::Requirement
257
264
  requirements:
258
265
  - - ">="
259
266
  - !ruby/object:Gem::Version
260
267
  version: '0'
261
268
  requirements: []
262
- rubygems_version: 3.0.3
263
- signing_key:
269
+ rubygems_version: 3.3.5
270
+ signing_key:
264
271
  specification_version: 4
265
272
  summary: Ruby implementation of the Screengem Pattern.
266
273
  test_files: []
data/.travis.yml DELETED
@@ -1,5 +0,0 @@
1
- sudo: false
2
- language: ruby
3
- rvm:
4
- - 2.3.3
5
- before_install: gem install bundler -v 1.16.2