screengem 0.13.0 → 0.16.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: ac2f7d84aaffa8c289ae50df7e43bbb0c383fd484f0189b164506f0b1a179c15
4
- data.tar.gz: 17052ca08f46778aa1b1af991f30fa6cf299a09a900432f9f9144a3feaba53aa
3
+ metadata.gz: '05882b1d14fcb9e81a7b940a395de8e34167d0652ee564800be2cb5b784633d6'
4
+ data.tar.gz: 91ba212fd5c24bb7b1ddae9b79a4504aca3f1d8cba2949a16aaf5691091b9420
5
5
  SHA512:
6
- metadata.gz: df490d4d6ebd176d35657c5b11d9e01aeb925adb86b4f0724c2d43615c3a72976512666e7bebedb1658de2428c6d2455f53bb9e5819d53f4d5be25e57b52b5d7
7
- data.tar.gz: eb386240b263bdcf4366513165b3e123bc0f91604dd939d1f4b43cde2e961aca8f9f0abe76381e78db10dbc4245c71e9c0162c0e1e727eda89c5b1f93ce4d6c9
6
+ metadata.gz: 4203bdfd6d5d28f387bcbb5df19a02f318e73465f5b845103d8e3c365dfbb3a91999b8897b3f93aa48956c2a3b36b54e57dd6e95a4bdd930cf2bca56707680a0
7
+ data.tar.gz: 6a16b7076d33d3eeeb80c30c7b1fc5a107524a5ca0d93fd308eebb10092ee43ce206e63a7466154f4ec7fb9a7151c36b884f4e121fdc203caf2cd6dd43b1b80d
data/.gitignore CHANGED
@@ -1,4 +1,5 @@
1
1
  /.bundle/
2
+ /.idea/
2
3
  /.yardoc
3
4
  /_yardoc/
4
5
  /coverage/
data/.rubocop.yml CHANGED
@@ -1,13 +1,19 @@
1
1
  require: rubocop-rspec
2
2
 
3
3
  AllCops:
4
- TargetRubyVersion: 2.7
5
4
  NewCops: enable
5
+ TargetRubyVersion: 2.7
6
+
7
+ Gemspec/RequireMFA:
8
+ Enabled: false
6
9
 
7
10
  Lint/ConstantDefinitionInBlock:
8
11
  Exclude:
9
12
  - spec/**/*_spec.rb
10
13
 
14
+ Layout/LineLength:
15
+ Max: 120
16
+
11
17
  Layout/SpaceAroundMethodCallOperator:
12
18
  Enabled: false
13
19
 
@@ -23,9 +29,6 @@ Metrics/AbcSize:
23
29
  Metrics/BlockLength:
24
30
  Enabled: false
25
31
 
26
- Metrics/LineLength:
27
- Max: 120
28
-
29
32
  Metrics/MethodLength:
30
33
  Enabled: false
31
34
 
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.7.3
1
+ 2.7.6
data/CHANGELOG.md CHANGED
@@ -1,6 +1,21 @@
1
1
  # Change log
2
2
 
3
- ## master (unreleased)
3
+ ## main (unreleased)
4
+
5
+ ## 0.16.0 (2022-08-03)
6
+
7
+ * Allow actor to recall with a default
8
+ * Update the capybara dependency
9
+ * Latest development dependencies
10
+
11
+ ## 0.15.0 (2022-01-23)
12
+
13
+ * Add actor hooks
14
+
15
+ ## 0.14.0 (2022-01-06)
16
+
17
+ * Update the thor dependency
18
+ * Latest development dependencies
4
19
 
5
20
  ## 0.13.0 (2021-06-13)
6
21
 
@@ -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,18 +43,22 @@ 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
  #
41
- def recall(tag, reload: true)
42
- unless recollections.key?(tag)
53
+ def recall(tag, default: nil, reload: true)
54
+ unless recollections.key?(tag) || default.present?
43
55
  raise <<~MSG
44
56
  #{name} does not recall #{tag}
45
57
  #{name} recalls: #{recollections.keys.to_sentence}
46
58
  MSG
47
59
  end
48
60
 
49
- recollections.fetch(tag).tap do |value|
61
+ recollections.fetch(tag, default).tap do |value|
50
62
  value.reload if reload && value.respond_to?(:reload)
51
63
  end
52
64
  end
@@ -1,3 +1,3 @@
1
1
  module Screengem
2
- VERSION = "0.13.0"
2
+ VERSION = "0.16.0"
3
3
  end
data/screengem.gemspec CHANGED
@@ -29,16 +29,17 @@ Gem::Specification.new do |spec|
29
29
  spec.require_paths = ["lib"]
30
30
  spec.required_ruby_version = ">= 2.7"
31
31
 
32
- spec.add_runtime_dependency "activesupport", ">= 5.2", "< 6.2"
33
- spec.add_runtime_dependency "capybara", ">= 2.18", "< 4.0"
32
+ spec.add_runtime_dependency "activesupport", ">= 5.2", "< 7.0"
33
+ spec.add_runtime_dependency "capybara", ">= 3.0", "< 4.0"
34
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", ">= 0.20", "< 1.2"
35
+ spec.add_runtime_dependency "rspec-expectations", "~> 3.11"
36
+ spec.add_runtime_dependency "thor", "~> 1.2"
37
37
 
38
38
  spec.add_development_dependency "rake", "~> 13.0"
39
- spec.add_development_dependency "rspec", "~> 3.9"
40
- spec.add_development_dependency "rubocop", "~> 1.8"
41
- spec.add_development_dependency "rubocop-performance", "~> 1.9"
42
- spec.add_development_dependency "rubocop-rspec", "~> 2.1"
39
+ spec.add_development_dependency "rspec", "~> 3.11"
40
+ spec.add_development_dependency "rubocop", "~> 1.32"
41
+ spec.add_development_dependency "rubocop-performance", "~> 1.14"
42
+ spec.add_development_dependency "rubocop-rake", "~> 0.6"
43
+ spec.add_development_dependency "rubocop-rspec", "~> 2.12"
43
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.13.0
4
+ version: 0.16.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alistair McKinnell
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-06-13 00:00:00.000000000 Z
11
+ date: 2022-08-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: '5.2'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '6.2'
22
+ version: '7.0'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,14 +29,14 @@ dependencies:
29
29
  version: '5.2'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '6.2'
32
+ version: '7.0'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: capybara
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - ">="
38
38
  - !ruby/object:Gem::Version
39
- version: '2.18'
39
+ version: '3.0'
40
40
  - - "<"
41
41
  - !ruby/object:Gem::Version
42
42
  version: '4.0'
@@ -46,7 +46,7 @@ dependencies:
46
46
  requirements:
47
47
  - - ">="
48
48
  - !ruby/object:Gem::Version
49
- version: '2.18'
49
+ version: '3.0'
50
50
  - - "<"
51
51
  - !ruby/object:Gem::Version
52
52
  version: '4.0'
@@ -76,32 +76,26 @@ dependencies:
76
76
  requirements:
77
77
  - - "~>"
78
78
  - !ruby/object:Gem::Version
79
- version: '3.10'
79
+ version: '3.11'
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.10'
86
+ version: '3.11'
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
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
100
  version: '1.2'
107
101
  - !ruby/object:Gem::Dependency
@@ -124,56 +118,70 @@ dependencies:
124
118
  requirements:
125
119
  - - "~>"
126
120
  - !ruby/object:Gem::Version
127
- version: '3.9'
121
+ version: '3.11'
128
122
  type: :development
129
123
  prerelease: false
130
124
  version_requirements: !ruby/object:Gem::Requirement
131
125
  requirements:
132
126
  - - "~>"
133
127
  - !ruby/object:Gem::Version
134
- version: '3.9'
128
+ version: '3.11'
135
129
  - !ruby/object:Gem::Dependency
136
130
  name: rubocop
137
131
  requirement: !ruby/object:Gem::Requirement
138
132
  requirements:
139
133
  - - "~>"
140
134
  - !ruby/object:Gem::Version
141
- version: '1.8'
135
+ version: '1.32'
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: '1.8'
142
+ version: '1.32'
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.9'
149
+ version: '1.14'
150
+ type: :development
151
+ prerelease: false
152
+ version_requirements: !ruby/object:Gem::Requirement
153
+ requirements:
154
+ - - "~>"
155
+ - !ruby/object:Gem::Version
156
+ version: '1.14'
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.9'
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: '2.1'
177
+ version: '2.12'
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: '2.1'
184
+ version: '2.12'
177
185
  - !ruby/object:Gem::Dependency
178
186
  name: simplecov
179
187
  requirement: !ruby/object:Gem::Requirement
@@ -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
@@ -259,7 +266,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
259
266
  - !ruby/object:Gem::Version
260
267
  version: '0'
261
268
  requirements: []
262
- rubygems_version: 3.1.6
269
+ rubygems_version: 3.3.18
263
270
  signing_key:
264
271
  specification_version: 4
265
272
  summary: Ruby implementation of the Screengem Pattern.
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