chop 0.27.0 → 0.28.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: 06dae0b0190a3ec10f90abda7f5e19d5c8cc46d8c34850d800b7fd13687b9c4c
4
- data.tar.gz: 18364b86f246ac84c09864121323af7d1d56d4bb12e2869519d4086050853a04
3
+ metadata.gz: 14fa6c9c1d455338511760552d836cf35b8646cb6b4fdf5b6785635b000054d6
4
+ data.tar.gz: 0366a3cf17eb9eb12b069b4c4f2d6bc0dd428abf775057b60b5fd5582455d3c1
5
5
  SHA512:
6
- metadata.gz: 55591167c97f7305a483083fa51ae51a7fa619a19b22e670ded3ef50af3e5405c177a5da422f32e2ec1f2a1e5b04c3260296f11873479881b319f794bcc3f08f
7
- data.tar.gz: f7c4ee1dfbfdf7908137c051b98d1ad8ae46987df16b9a70508247c72c1c844279d5c376b858f164c1a7426fbf8451ad62f49d1f24f84cd0c7f110a47d34ce60
6
+ metadata.gz: ce4a4af5691ff635f9dec5bf574cbab37b4d93d1e1d888009310453b2ddadeb9cb54b92e1dba073dd5e843310012844714d45ca377c30cc61a126e6161ab2cfa
7
+ data.tar.gz: f50fe6242863ab47e6de5779dcdd2570cb6b92e20fe28d05b428c18c0ab1af4770681ec448820ddc3118f28ea06432275054ec9061fc0b6840c260fb045203c1
@@ -5,17 +5,8 @@ jobs:
5
5
  strategy:
6
6
  fail-fast: false
7
7
  matrix:
8
- gemfile: [ rails_5.1, rails_5.2, rails_6.0, rails_6.1, rails_7.0 ]
9
- ruby: [ 2.5, 2.6, 2.7, '3.0' ]
10
- exclude:
11
- - gemfile: rails_5.1
12
- ruby: 3.0
13
- - gemfile: rails_5.2
14
- ruby: 3.0
15
- - gemfile: rails_7.0
16
- ruby: 2.5
17
- - gemfile: rails_7.0
18
- ruby: 2.6
8
+ gemfile: [ rails_6.0, rails_6.1, rails_7.0 ]
9
+ ruby: [ 2.7, '3.0' ]
19
10
 
20
11
  runs-on: ubuntu-latest
21
12
  env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
data/Appraisals CHANGED
@@ -1,21 +1,9 @@
1
- appraise "rails-5.1" do
2
- gem "rails", "~>5.1.0"
3
- gem "capybara", "~>3.35.0" # 3.36 requires ruby 2.6+
4
- end
5
-
6
- appraise "rails-5.2" do
7
- gem "rails", "~>5.2.0"
8
- gem "capybara", "~>3.35.0" # 3.36 requires ruby 2.6+
9
- end
10
-
11
1
  appraise "rails-6.0" do
12
2
  gem "rails", "~>6.0.0"
13
- gem "capybara", "~>3.35.0" # 3.36 requires ruby 2.6+
14
3
  end
15
4
 
16
5
  appraise "rails-6.1" do
17
6
  gem "rails", "~>6.1.0"
18
- gem "capybara", "~>3.35.0" # 3.36 requires ruby 2.6+
19
7
  end
20
8
 
21
9
  appraise "rails-7.0" do
data/Gemfile CHANGED
@@ -4,5 +4,6 @@ source 'https://rubygems.org'
4
4
  gemspec
5
5
 
6
6
  gem "byebug"
7
- gem "webrick"
7
+ gem "puma", "~>5.0"
8
+ gem "rack", "~>2.0"
8
9
 
@@ -3,8 +3,8 @@
3
3
  source "https://rubygems.org"
4
4
 
5
5
  gem "byebug"
6
- gem "webrick"
6
+ gem "puma", "~>5.0"
7
+ gem "rack", "~>2.0"
7
8
  gem "rails", "~>6.0.0"
8
- gem "capybara", "~>3.35.0"
9
9
 
10
10
  gemspec path: "../"
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- chop (0.27.0)
4
+ chop (0.28.0)
5
5
  activerecord
6
6
  capybara
7
7
  cucumber
@@ -83,37 +83,30 @@ GEM
83
83
  cliver (0.3.2)
84
84
  concurrent-ruby (1.1.9)
85
85
  crass (1.0.6)
86
- cucumber (7.1.0)
86
+ cucumber (8.0.0)
87
87
  builder (~> 3.2, >= 3.2.4)
88
- cucumber-core (~> 10.1, >= 10.1.0)
89
- cucumber-create-meta (~> 6.0, >= 6.0.1)
90
- cucumber-cucumber-expressions (~> 14.0, >= 14.0.0)
91
- cucumber-gherkin (~> 22.0, >= 22.0.0)
92
- cucumber-html-formatter (~> 17.0, >= 17.0.0)
93
- cucumber-messages (~> 17.1, >= 17.1.1)
94
- cucumber-wire (~> 6.2, >= 6.2.0)
95
- diff-lcs (~> 1.4, >= 1.4.4)
96
- mime-types (~> 3.3, >= 3.3.1)
97
- multi_test (~> 0.1, >= 0.1.2)
88
+ cucumber-ci-environment (~> 9.0, >= 9.0.4)
89
+ cucumber-core (~> 11.0, >= 11.0.0)
90
+ cucumber-cucumber-expressions (~> 15.1, >= 15.1.1)
91
+ cucumber-gherkin (~> 23.0, >= 23.0.1)
92
+ cucumber-html-formatter (~> 19.1, >= 19.1.0)
93
+ cucumber-messages (~> 18.0, >= 18.0.0)
94
+ diff-lcs (~> 1.5, >= 1.5.0)
95
+ mime-types (~> 3.4, >= 3.4.1)
96
+ multi_test (~> 1.1, >= 1.1.0)
98
97
  sys-uname (~> 1.2, >= 1.2.2)
99
- cucumber-core (10.1.0)
100
- cucumber-gherkin (~> 22.0, >= 22.0.0)
101
- cucumber-messages (~> 17.1, >= 17.1.1)
102
- cucumber-tag-expressions (~> 4.0, >= 4.0.2)
103
- cucumber-create-meta (6.0.4)
104
- cucumber-messages (~> 17.1, >= 17.1.1)
105
- sys-uname (~> 1.2, >= 1.2.2)
106
- cucumber-cucumber-expressions (14.0.0)
107
- cucumber-gherkin (22.0.0)
108
- cucumber-messages (~> 17.1, >= 17.1.1)
109
- cucumber-html-formatter (17.0.0)
110
- cucumber-messages (~> 17.1, >= 17.1.0)
111
- cucumber-messages (17.1.1)
98
+ cucumber-ci-environment (9.1.0)
99
+ cucumber-core (11.0.0)
100
+ cucumber-gherkin (~> 23.0, >= 23.0.1)
101
+ cucumber-messages (~> 18.0, >= 18.0.0)
102
+ cucumber-tag-expressions (~> 4.1, >= 4.1.0)
103
+ cucumber-cucumber-expressions (15.2.0)
104
+ cucumber-gherkin (23.0.1)
105
+ cucumber-messages (~> 18.0, >= 18.0.0)
106
+ cucumber-html-formatter (19.2.0)
107
+ cucumber-messages (~> 18.0, >= 18.0.0)
108
+ cucumber-messages (18.0.0)
112
109
  cucumber-tag-expressions (4.1.0)
113
- cucumber-wire (6.2.0)
114
- cucumber-core (~> 10.1, >= 10.1.0)
115
- cucumber-cucumber-expressions (~> 14.0, >= 14.0.0)
116
- cucumber-messages (~> 17.1, >= 17.1.1)
117
110
  cuprite (0.13)
118
111
  capybara (>= 2.1, < 4)
119
112
  ferrum (~> 0.11.0)
@@ -124,7 +117,7 @@ GEM
124
117
  cliver (~> 0.3)
125
118
  concurrent-ruby (~> 1.1)
126
119
  websocket-driver (>= 0.6, < 0.8)
127
- ffi (1.15.4)
120
+ ffi (1.15.5)
128
121
  globalid (1.0.0)
129
122
  activesupport (>= 5.0)
130
123
  i18n (1.8.11)
@@ -138,16 +131,18 @@ GEM
138
131
  method_source (1.0.0)
139
132
  mime-types (3.4.1)
140
133
  mime-types-data (~> 3.2015)
141
- mime-types-data (3.2021.1115)
134
+ mime-types-data (3.2022.0105)
142
135
  mini_mime (1.1.2)
143
136
  mini_portile2 (2.6.1)
144
137
  minitest (5.15.0)
145
- multi_test (0.1.2)
138
+ multi_test (1.1.0)
146
139
  nio4r (2.5.8)
147
140
  nokogiri (1.12.5)
148
141
  mini_portile2 (~> 2.6.1)
149
142
  racc (~> 1.4)
150
143
  public_suffix (4.0.6)
144
+ puma (5.6.5)
145
+ nio4r (~> 2.0)
151
146
  racc (1.6.0)
152
147
  rack (2.2.3)
153
148
  rack-test (1.1.0)
@@ -211,7 +206,6 @@ GEM
211
206
  tilt (2.0.10)
212
207
  tzinfo (1.2.9)
213
208
  thread_safe (~> 0.1)
214
- webrick (1.7.0)
215
209
  websocket-driver (0.7.5)
216
210
  websocket-extensions (>= 0.1.0)
217
211
  websocket-extensions (0.1.5)
@@ -225,14 +219,14 @@ PLATFORMS
225
219
  DEPENDENCIES
226
220
  appraisal
227
221
  byebug
228
- capybara (~> 3.35.0)
229
222
  chop!
230
223
  cuprite
224
+ puma (~> 5.0)
225
+ rack (~> 2.0)
231
226
  rails (~> 6.0.0)
232
227
  rake
233
228
  rspec
234
229
  slim
235
- webrick
236
230
 
237
231
  BUNDLED WITH
238
232
  2.2.32
@@ -3,8 +3,8 @@
3
3
  source "https://rubygems.org"
4
4
 
5
5
  gem "byebug"
6
- gem "webrick"
6
+ gem "puma", "~>5.0"
7
+ gem "rack", "~>2.0"
7
8
  gem "rails", "~>6.1.0"
8
- gem "capybara", "~>3.35.0"
9
9
 
10
10
  gemspec path: "../"
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- chop (0.27.0)
4
+ chop (0.28.0)
5
5
  activerecord
6
6
  capybara
7
7
  cucumber
@@ -87,37 +87,30 @@ GEM
87
87
  cliver (0.3.2)
88
88
  concurrent-ruby (1.1.9)
89
89
  crass (1.0.6)
90
- cucumber (7.1.0)
90
+ cucumber (8.0.0)
91
91
  builder (~> 3.2, >= 3.2.4)
92
- cucumber-core (~> 10.1, >= 10.1.0)
93
- cucumber-create-meta (~> 6.0, >= 6.0.1)
94
- cucumber-cucumber-expressions (~> 14.0, >= 14.0.0)
95
- cucumber-gherkin (~> 22.0, >= 22.0.0)
96
- cucumber-html-formatter (~> 17.0, >= 17.0.0)
97
- cucumber-messages (~> 17.1, >= 17.1.1)
98
- cucumber-wire (~> 6.2, >= 6.2.0)
99
- diff-lcs (~> 1.4, >= 1.4.4)
100
- mime-types (~> 3.3, >= 3.3.1)
101
- multi_test (~> 0.1, >= 0.1.2)
92
+ cucumber-ci-environment (~> 9.0, >= 9.0.4)
93
+ cucumber-core (~> 11.0, >= 11.0.0)
94
+ cucumber-cucumber-expressions (~> 15.1, >= 15.1.1)
95
+ cucumber-gherkin (~> 23.0, >= 23.0.1)
96
+ cucumber-html-formatter (~> 19.1, >= 19.1.0)
97
+ cucumber-messages (~> 18.0, >= 18.0.0)
98
+ diff-lcs (~> 1.5, >= 1.5.0)
99
+ mime-types (~> 3.4, >= 3.4.1)
100
+ multi_test (~> 1.1, >= 1.1.0)
102
101
  sys-uname (~> 1.2, >= 1.2.2)
103
- cucumber-core (10.1.0)
104
- cucumber-gherkin (~> 22.0, >= 22.0.0)
105
- cucumber-messages (~> 17.1, >= 17.1.1)
106
- cucumber-tag-expressions (~> 4.0, >= 4.0.2)
107
- cucumber-create-meta (6.0.4)
108
- cucumber-messages (~> 17.1, >= 17.1.1)
109
- sys-uname (~> 1.2, >= 1.2.2)
110
- cucumber-cucumber-expressions (14.0.0)
111
- cucumber-gherkin (22.0.0)
112
- cucumber-messages (~> 17.1, >= 17.1.1)
113
- cucumber-html-formatter (17.0.0)
114
- cucumber-messages (~> 17.1, >= 17.1.0)
115
- cucumber-messages (17.1.1)
102
+ cucumber-ci-environment (9.1.0)
103
+ cucumber-core (11.0.0)
104
+ cucumber-gherkin (~> 23.0, >= 23.0.1)
105
+ cucumber-messages (~> 18.0, >= 18.0.0)
106
+ cucumber-tag-expressions (~> 4.1, >= 4.1.0)
107
+ cucumber-cucumber-expressions (15.2.0)
108
+ cucumber-gherkin (23.0.1)
109
+ cucumber-messages (~> 18.0, >= 18.0.0)
110
+ cucumber-html-formatter (19.2.0)
111
+ cucumber-messages (~> 18.0, >= 18.0.0)
112
+ cucumber-messages (18.0.0)
116
113
  cucumber-tag-expressions (4.1.0)
117
- cucumber-wire (6.2.0)
118
- cucumber-core (~> 10.1, >= 10.1.0)
119
- cucumber-cucumber-expressions (~> 14.0, >= 14.0.0)
120
- cucumber-messages (~> 17.1, >= 17.1.1)
121
114
  cuprite (0.13)
122
115
  capybara (>= 2.1, < 4)
123
116
  ferrum (~> 0.11.0)
@@ -128,7 +121,7 @@ GEM
128
121
  cliver (~> 0.3)
129
122
  concurrent-ruby (~> 1.1)
130
123
  websocket-driver (>= 0.6, < 0.8)
131
- ffi (1.15.4)
124
+ ffi (1.15.5)
132
125
  globalid (1.0.0)
133
126
  activesupport (>= 5.0)
134
127
  i18n (1.8.11)
@@ -142,16 +135,18 @@ GEM
142
135
  method_source (1.0.0)
143
136
  mime-types (3.4.1)
144
137
  mime-types-data (~> 3.2015)
145
- mime-types-data (3.2021.1115)
138
+ mime-types-data (3.2022.0105)
146
139
  mini_mime (1.1.2)
147
140
  mini_portile2 (2.6.1)
148
141
  minitest (5.15.0)
149
- multi_test (0.1.2)
142
+ multi_test (1.1.0)
150
143
  nio4r (2.5.8)
151
144
  nokogiri (1.12.5)
152
145
  mini_portile2 (~> 2.6.1)
153
146
  racc (~> 1.4)
154
147
  public_suffix (4.0.6)
148
+ puma (5.6.5)
149
+ nio4r (~> 2.0)
155
150
  racc (1.6.0)
156
151
  rack (2.2.3)
157
152
  rack-test (1.1.0)
@@ -214,7 +209,6 @@ GEM
214
209
  tilt (2.0.10)
215
210
  tzinfo (2.0.4)
216
211
  concurrent-ruby (~> 1.0)
217
- webrick (1.7.0)
218
212
  websocket-driver (0.7.5)
219
213
  websocket-extensions (>= 0.1.0)
220
214
  websocket-extensions (0.1.5)
@@ -228,14 +222,14 @@ PLATFORMS
228
222
  DEPENDENCIES
229
223
  appraisal
230
224
  byebug
231
- capybara (~> 3.35.0)
232
225
  chop!
233
226
  cuprite
227
+ puma (~> 5.0)
228
+ rack (~> 2.0)
234
229
  rails (~> 6.1.0)
235
230
  rake
236
231
  rspec
237
232
  slim
238
- webrick
239
233
 
240
234
  BUNDLED WITH
241
235
  2.2.32
@@ -3,7 +3,8 @@
3
3
  source "https://rubygems.org"
4
4
 
5
5
  gem "byebug"
6
- gem "webrick"
6
+ gem "puma", "~>5.0"
7
+ gem "rack", "~>2.0"
7
8
  gem "rails", "~>7.0.0"
8
9
 
9
10
  gemspec path: "../"
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- chop (0.27.0)
4
+ chop (0.28.0)
5
5
  activerecord
6
6
  capybara
7
7
  cucumber
@@ -88,37 +88,30 @@ GEM
88
88
  cliver (0.3.2)
89
89
  concurrent-ruby (1.1.9)
90
90
  crass (1.0.6)
91
- cucumber (7.1.0)
91
+ cucumber (8.0.0)
92
92
  builder (~> 3.2, >= 3.2.4)
93
- cucumber-core (~> 10.1, >= 10.1.0)
94
- cucumber-create-meta (~> 6.0, >= 6.0.1)
95
- cucumber-cucumber-expressions (~> 14.0, >= 14.0.0)
96
- cucumber-gherkin (~> 22.0, >= 22.0.0)
97
- cucumber-html-formatter (~> 17.0, >= 17.0.0)
98
- cucumber-messages (~> 17.1, >= 17.1.1)
99
- cucumber-wire (~> 6.2, >= 6.2.0)
100
- diff-lcs (~> 1.4, >= 1.4.4)
101
- mime-types (~> 3.3, >= 3.3.1)
102
- multi_test (~> 0.1, >= 0.1.2)
93
+ cucumber-ci-environment (~> 9.0, >= 9.0.4)
94
+ cucumber-core (~> 11.0, >= 11.0.0)
95
+ cucumber-cucumber-expressions (~> 15.1, >= 15.1.1)
96
+ cucumber-gherkin (~> 23.0, >= 23.0.1)
97
+ cucumber-html-formatter (~> 19.1, >= 19.1.0)
98
+ cucumber-messages (~> 18.0, >= 18.0.0)
99
+ diff-lcs (~> 1.5, >= 1.5.0)
100
+ mime-types (~> 3.4, >= 3.4.1)
101
+ multi_test (~> 1.1, >= 1.1.0)
103
102
  sys-uname (~> 1.2, >= 1.2.2)
104
- cucumber-core (10.1.0)
105
- cucumber-gherkin (~> 22.0, >= 22.0.0)
106
- cucumber-messages (~> 17.1, >= 17.1.1)
107
- cucumber-tag-expressions (~> 4.0, >= 4.0.2)
108
- cucumber-create-meta (6.0.4)
109
- cucumber-messages (~> 17.1, >= 17.1.1)
110
- sys-uname (~> 1.2, >= 1.2.2)
111
- cucumber-cucumber-expressions (14.0.0)
112
- cucumber-gherkin (22.0.0)
113
- cucumber-messages (~> 17.1, >= 17.1.1)
114
- cucumber-html-formatter (17.0.0)
115
- cucumber-messages (~> 17.1, >= 17.1.0)
116
- cucumber-messages (17.1.1)
103
+ cucumber-ci-environment (9.1.0)
104
+ cucumber-core (11.0.0)
105
+ cucumber-gherkin (~> 23.0, >= 23.0.1)
106
+ cucumber-messages (~> 18.0, >= 18.0.0)
107
+ cucumber-tag-expressions (~> 4.1, >= 4.1.0)
108
+ cucumber-cucumber-expressions (15.2.0)
109
+ cucumber-gherkin (23.0.1)
110
+ cucumber-messages (~> 18.0, >= 18.0.0)
111
+ cucumber-html-formatter (19.2.0)
112
+ cucumber-messages (~> 18.0, >= 18.0.0)
113
+ cucumber-messages (18.0.0)
117
114
  cucumber-tag-expressions (4.1.0)
118
- cucumber-wire (6.2.0)
119
- cucumber-core (~> 10.1, >= 10.1.0)
120
- cucumber-cucumber-expressions (~> 14.0, >= 14.0.0)
121
- cucumber-messages (~> 17.1, >= 17.1.1)
122
115
  cuprite (0.13)
123
116
  capybara (>= 2.1, < 4)
124
117
  ferrum (~> 0.11.0)
@@ -129,7 +122,7 @@ GEM
129
122
  cliver (~> 0.3)
130
123
  concurrent-ruby (~> 1.1)
131
124
  websocket-driver (>= 0.6, < 0.8)
132
- ffi (1.15.4)
125
+ ffi (1.15.5)
133
126
  globalid (1.0.0)
134
127
  activesupport (>= 5.0)
135
128
  i18n (1.8.11)
@@ -144,16 +137,18 @@ GEM
144
137
  method_source (1.0.0)
145
138
  mime-types (3.4.1)
146
139
  mime-types-data (~> 3.2015)
147
- mime-types-data (3.2021.1115)
140
+ mime-types-data (3.2022.0105)
148
141
  mini_mime (1.1.2)
149
142
  mini_portile2 (2.6.1)
150
143
  minitest (5.15.0)
151
- multi_test (0.1.2)
144
+ multi_test (1.1.0)
152
145
  nio4r (2.5.8)
153
146
  nokogiri (1.12.5)
154
147
  mini_portile2 (~> 2.6.1)
155
148
  racc (~> 1.4)
156
149
  public_suffix (4.0.6)
150
+ puma (5.6.5)
151
+ nio4r (~> 2.0)
157
152
  racc (1.6.0)
158
153
  rack (2.2.3)
159
154
  rack-test (1.1.0)
@@ -209,7 +204,6 @@ GEM
209
204
  tilt (2.0.10)
210
205
  tzinfo (2.0.4)
211
206
  concurrent-ruby (~> 1.0)
212
- webrick (1.7.0)
213
207
  websocket-driver (0.7.5)
214
208
  websocket-extensions (>= 0.1.0)
215
209
  websocket-extensions (0.1.5)
@@ -225,11 +219,12 @@ DEPENDENCIES
225
219
  byebug
226
220
  chop!
227
221
  cuprite
222
+ puma (~> 5.0)
223
+ rack (~> 2.0)
228
224
  rails (~> 7.0.0)
229
225
  rake
230
226
  rspec
231
227
  slim
232
- webrick
233
228
 
234
229
  BUNDLED WITH
235
230
  2.2.32
data/lib/chop/diff.rb CHANGED
@@ -4,9 +4,9 @@ require "active_support/core_ext/class/attribute"
4
4
  require "active_support/hash_with_indifferent_access"
5
5
 
6
6
  module Chop
7
- class Diff < Struct.new(:selector, :table, :session, :block)
8
- def self.diff! selector, table, session: Capybara.current_session, &block
9
- new(selector, table, session, block).diff!
7
+ class Diff < Struct.new(:selector, :table, :session, :timeout, :block)
8
+ def self.diff! selector, table, session: Capybara.current_session, timeout: Capybara.default_max_wait_time, &block
9
+ new(selector, table, session, timeout, block).diff!
10
10
  end
11
11
 
12
12
  def cell_to_image_filename cell
@@ -23,7 +23,7 @@ module Chop
23
23
 
24
24
  attr_accessor :header_transformations, :transformations
25
25
 
26
- def initialize selector = nil, table = nil, session = Capybara.current_session, block = nil, &other_block
26
+ def initialize selector = nil, table = nil, session = Capybara.current_session, timeout = Capybara.default_max_wait_time, block = nil, &other_block
27
27
  super
28
28
  self.selector ||= default_selector
29
29
  self.header_transformations = []
@@ -160,7 +160,7 @@ module Chop
160
160
  if selector.is_a?(Capybara::Node::Element)
161
161
  selector
162
162
  else
163
- session.find(selector)
163
+ session.find(selector, wait: timeout)
164
164
  end
165
165
  rescue Capybara::ElementNotFound
166
166
  raise unless @allow_not_found
data/lib/chop/dsl.rb CHANGED
@@ -2,11 +2,13 @@ require "active_support/inflector"
2
2
 
3
3
  module Chop
4
4
  module DSL
5
+ extend self
6
+
5
7
  def create! klass, table, &block
6
8
  Create.create! klass, table, &block
7
9
  end
8
10
 
9
- def diff! selector, table, session: Capybara.current_session, as: nil, &block
11
+ def diff! selector, table, session: Capybara.current_session, as: nil, timeout: nil, &block
10
12
  class_name = if as
11
13
  as.to_s
12
14
  elsif selector.respond_to?(:tag_name)
@@ -15,32 +17,34 @@ module Chop
15
17
  session.find(selector).tag_name
16
18
  end.camelize
17
19
  klass = const_get("Chop::#{class_name}")
18
- klass.diff! selector, table, session: session, &block
20
+ kwargs = { session: session }
21
+ kwargs[:timeout] = timeout if timeout.present?
22
+ klass.diff! selector, table, **kwargs, &block
19
23
  end
20
24
 
21
25
  def fill_in! table
22
26
  Form.fill_in! table
23
27
  end
24
28
  end
25
- end
26
29
 
27
- if defined?(Cucumber::MultilineArgument::DataTable)
28
- Cucumber::MultilineArgument::DataTable.prepend Module.new {
29
- def create! klass, &block
30
- Chop.create! klass, self, &block
31
- end
30
+ if defined?(Cucumber::MultilineArgument::DataTable)
31
+ Cucumber::MultilineArgument::DataTable.prepend Module.new {
32
+ def create! klass, &block
33
+ DSL.create! klass, self, &block
34
+ end
32
35
 
33
- def diff! other_table="table", **kwargs, &block
34
- if other_table.respond_to?(:tag_name) || (other_table.is_a?(String) && !other_table.include?("|"))
35
- Chop.diff! other_table, self, **kwargs, &block
36
- else
37
- super
36
+ def diff! other_table="table", **kwargs, &block
37
+ if other_table.respond_to?(:tag_name) || (other_table.is_a?(String) && !other_table.include?("|"))
38
+ DSL.diff! other_table, self, **kwargs, &block
39
+ else
40
+ super
41
+ end
38
42
  end
39
- end
40
43
 
41
- def fill_in!
42
- Chop.fill_in! self
43
- end
44
- }
44
+ def fill_in!
45
+ DSL.fill_in! self
46
+ end
47
+ }
48
+ end
45
49
  end
46
50
 
data/lib/chop/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Chop
2
- VERSION = "0.27.0"
2
+ VERSION = "0.28.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chop
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.27.0
4
+ version: 0.28.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Micah Geisel
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-07-20 00:00:00.000000000 Z
11
+ date: 2022-12-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -141,10 +141,6 @@ files:
141
141
  - bin/setup
142
142
  - chop.gemspec
143
143
  - gemfiles/.bundle/config
144
- - gemfiles/rails_5.1.gemfile
145
- - gemfiles/rails_5.1.gemfile.lock
146
- - gemfiles/rails_5.2.gemfile
147
- - gemfiles/rails_5.2.gemfile.lock
148
144
  - gemfiles/rails_6.0.gemfile
149
145
  - gemfiles/rails_6.0.gemfile.lock
150
146
  - gemfiles/rails_6.1.gemfile
@@ -1,10 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "byebug"
6
- gem "webrick"
7
- gem "rails", "~>5.1.0"
8
- gem "capybara", "~>3.35.0"
9
-
10
- gemspec path: "../"
@@ -1,216 +0,0 @@
1
- PATH
2
- remote: ..
3
- specs:
4
- chop (0.27.0)
5
- activerecord
6
- capybara
7
- cucumber
8
-
9
- GEM
10
- remote: https://rubygems.org/
11
- specs:
12
- actioncable (5.1.7)
13
- actionpack (= 5.1.7)
14
- nio4r (~> 2.0)
15
- websocket-driver (~> 0.6.1)
16
- actionmailer (5.1.7)
17
- actionpack (= 5.1.7)
18
- actionview (= 5.1.7)
19
- activejob (= 5.1.7)
20
- mail (~> 2.5, >= 2.5.4)
21
- rails-dom-testing (~> 2.0)
22
- actionpack (5.1.7)
23
- actionview (= 5.1.7)
24
- activesupport (= 5.1.7)
25
- rack (~> 2.0)
26
- rack-test (>= 0.6.3)
27
- rails-dom-testing (~> 2.0)
28
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
29
- actionview (5.1.7)
30
- activesupport (= 5.1.7)
31
- builder (~> 3.1)
32
- erubi (~> 1.4)
33
- rails-dom-testing (~> 2.0)
34
- rails-html-sanitizer (~> 1.0, >= 1.0.3)
35
- activejob (5.1.7)
36
- activesupport (= 5.1.7)
37
- globalid (>= 0.3.6)
38
- activemodel (5.1.7)
39
- activesupport (= 5.1.7)
40
- activerecord (5.1.7)
41
- activemodel (= 5.1.7)
42
- activesupport (= 5.1.7)
43
- arel (~> 8.0)
44
- activesupport (5.1.7)
45
- concurrent-ruby (~> 1.0, >= 1.0.2)
46
- i18n (>= 0.7, < 2)
47
- minitest (~> 5.1)
48
- tzinfo (~> 1.1)
49
- addressable (2.8.0)
50
- public_suffix (>= 2.0.2, < 5.0)
51
- appraisal (2.4.1)
52
- bundler
53
- rake
54
- thor (>= 0.14.0)
55
- arel (8.0.0)
56
- builder (3.2.4)
57
- byebug (11.1.3)
58
- capybara (3.35.3)
59
- addressable
60
- mini_mime (>= 0.1.3)
61
- nokogiri (~> 1.8)
62
- rack (>= 1.6.0)
63
- rack-test (>= 0.6.3)
64
- regexp_parser (>= 1.5, < 3.0)
65
- xpath (~> 3.2)
66
- cliver (0.3.2)
67
- concurrent-ruby (1.1.9)
68
- crass (1.0.6)
69
- cucumber (7.1.0)
70
- builder (~> 3.2, >= 3.2.4)
71
- cucumber-core (~> 10.1, >= 10.1.0)
72
- cucumber-create-meta (~> 6.0, >= 6.0.1)
73
- cucumber-cucumber-expressions (~> 14.0, >= 14.0.0)
74
- cucumber-gherkin (~> 22.0, >= 22.0.0)
75
- cucumber-html-formatter (~> 17.0, >= 17.0.0)
76
- cucumber-messages (~> 17.1, >= 17.1.1)
77
- cucumber-wire (~> 6.2, >= 6.2.0)
78
- diff-lcs (~> 1.4, >= 1.4.4)
79
- mime-types (~> 3.3, >= 3.3.1)
80
- multi_test (~> 0.1, >= 0.1.2)
81
- sys-uname (~> 1.2, >= 1.2.2)
82
- cucumber-core (10.1.0)
83
- cucumber-gherkin (~> 22.0, >= 22.0.0)
84
- cucumber-messages (~> 17.1, >= 17.1.1)
85
- cucumber-tag-expressions (~> 4.0, >= 4.0.2)
86
- cucumber-create-meta (6.0.4)
87
- cucumber-messages (~> 17.1, >= 17.1.1)
88
- sys-uname (~> 1.2, >= 1.2.2)
89
- cucumber-cucumber-expressions (14.0.0)
90
- cucumber-gherkin (22.0.0)
91
- cucumber-messages (~> 17.1, >= 17.1.1)
92
- cucumber-html-formatter (17.0.0)
93
- cucumber-messages (~> 17.1, >= 17.1.0)
94
- cucumber-messages (17.1.1)
95
- cucumber-tag-expressions (4.1.0)
96
- cucumber-wire (6.2.0)
97
- cucumber-core (~> 10.1, >= 10.1.0)
98
- cucumber-cucumber-expressions (~> 14.0, >= 14.0.0)
99
- cucumber-messages (~> 17.1, >= 17.1.1)
100
- cuprite (0.13)
101
- capybara (>= 2.1, < 4)
102
- ferrum (~> 0.11.0)
103
- diff-lcs (1.5.0)
104
- erubi (1.10.0)
105
- ferrum (0.11)
106
- addressable (~> 2.5)
107
- cliver (~> 0.3)
108
- concurrent-ruby (~> 1.1)
109
- websocket-driver (>= 0.6, < 0.8)
110
- ffi (1.15.4)
111
- globalid (1.0.0)
112
- activesupport (>= 5.0)
113
- i18n (1.8.11)
114
- concurrent-ruby (~> 1.0)
115
- loofah (2.13.0)
116
- crass (~> 1.0.2)
117
- nokogiri (>= 1.5.9)
118
- mail (2.7.1)
119
- mini_mime (>= 0.1.1)
120
- method_source (1.0.0)
121
- mime-types (3.4.1)
122
- mime-types-data (~> 3.2015)
123
- mime-types-data (3.2021.1115)
124
- mini_mime (1.1.2)
125
- mini_portile2 (2.6.1)
126
- minitest (5.15.0)
127
- multi_test (0.1.2)
128
- nio4r (2.5.8)
129
- nokogiri (1.12.5)
130
- mini_portile2 (~> 2.6.1)
131
- racc (~> 1.4)
132
- public_suffix (4.0.6)
133
- racc (1.6.0)
134
- rack (2.2.3)
135
- rack-test (1.1.0)
136
- rack (>= 1.0, < 3)
137
- rails (5.1.7)
138
- actioncable (= 5.1.7)
139
- actionmailer (= 5.1.7)
140
- actionpack (= 5.1.7)
141
- actionview (= 5.1.7)
142
- activejob (= 5.1.7)
143
- activemodel (= 5.1.7)
144
- activerecord (= 5.1.7)
145
- activesupport (= 5.1.7)
146
- bundler (>= 1.3.0)
147
- railties (= 5.1.7)
148
- sprockets-rails (>= 2.0.0)
149
- rails-dom-testing (2.0.3)
150
- activesupport (>= 4.2.0)
151
- nokogiri (>= 1.6)
152
- rails-html-sanitizer (1.4.2)
153
- loofah (~> 2.3)
154
- railties (5.1.7)
155
- actionpack (= 5.1.7)
156
- activesupport (= 5.1.7)
157
- method_source
158
- rake (>= 0.8.7)
159
- thor (>= 0.18.1, < 2.0)
160
- rake (13.0.6)
161
- regexp_parser (2.2.0)
162
- rspec (3.10.0)
163
- rspec-core (~> 3.10.0)
164
- rspec-expectations (~> 3.10.0)
165
- rspec-mocks (~> 3.10.0)
166
- rspec-core (3.10.1)
167
- rspec-support (~> 3.10.0)
168
- rspec-expectations (3.10.1)
169
- diff-lcs (>= 1.2.0, < 2.0)
170
- rspec-support (~> 3.10.0)
171
- rspec-mocks (3.10.2)
172
- diff-lcs (>= 1.2.0, < 2.0)
173
- rspec-support (~> 3.10.0)
174
- rspec-support (3.10.3)
175
- slim (4.1.0)
176
- temple (>= 0.7.6, < 0.9)
177
- tilt (>= 2.0.6, < 2.1)
178
- sprockets (4.0.2)
179
- concurrent-ruby (~> 1.0)
180
- rack (> 1, < 3)
181
- sprockets-rails (3.2.2)
182
- actionpack (>= 4.0)
183
- activesupport (>= 4.0)
184
- sprockets (>= 3.0.0)
185
- sys-uname (1.2.2)
186
- ffi (~> 1.1)
187
- temple (0.8.2)
188
- thor (1.1.0)
189
- thread_safe (0.3.6)
190
- tilt (2.0.10)
191
- tzinfo (1.2.9)
192
- thread_safe (~> 0.1)
193
- webrick (1.7.0)
194
- websocket-driver (0.6.5)
195
- websocket-extensions (>= 0.1.0)
196
- websocket-extensions (0.1.5)
197
- xpath (3.2.0)
198
- nokogiri (~> 1.8)
199
-
200
- PLATFORMS
201
- ruby
202
-
203
- DEPENDENCIES
204
- appraisal
205
- byebug
206
- capybara (~> 3.35.0)
207
- chop!
208
- cuprite
209
- rails (~> 5.1.0)
210
- rake
211
- rspec
212
- slim
213
- webrick
214
-
215
- BUNDLED WITH
216
- 2.2.32
@@ -1,10 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "byebug"
6
- gem "webrick"
7
- gem "rails", "~>5.2.0"
8
- gem "capybara", "~>3.35.0"
9
-
10
- gemspec path: "../"
@@ -1,222 +0,0 @@
1
- PATH
2
- remote: ..
3
- specs:
4
- chop (0.27.0)
5
- activerecord
6
- capybara
7
- cucumber
8
-
9
- GEM
10
- remote: https://rubygems.org/
11
- specs:
12
- actioncable (5.2.6)
13
- actionpack (= 5.2.6)
14
- nio4r (~> 2.0)
15
- websocket-driver (>= 0.6.1)
16
- actionmailer (5.2.6)
17
- actionpack (= 5.2.6)
18
- actionview (= 5.2.6)
19
- activejob (= 5.2.6)
20
- mail (~> 2.5, >= 2.5.4)
21
- rails-dom-testing (~> 2.0)
22
- actionpack (5.2.6)
23
- actionview (= 5.2.6)
24
- activesupport (= 5.2.6)
25
- rack (~> 2.0, >= 2.0.8)
26
- rack-test (>= 0.6.3)
27
- rails-dom-testing (~> 2.0)
28
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
29
- actionview (5.2.6)
30
- activesupport (= 5.2.6)
31
- builder (~> 3.1)
32
- erubi (~> 1.4)
33
- rails-dom-testing (~> 2.0)
34
- rails-html-sanitizer (~> 1.0, >= 1.0.3)
35
- activejob (5.2.6)
36
- activesupport (= 5.2.6)
37
- globalid (>= 0.3.6)
38
- activemodel (5.2.6)
39
- activesupport (= 5.2.6)
40
- activerecord (5.2.6)
41
- activemodel (= 5.2.6)
42
- activesupport (= 5.2.6)
43
- arel (>= 9.0)
44
- activestorage (5.2.6)
45
- actionpack (= 5.2.6)
46
- activerecord (= 5.2.6)
47
- marcel (~> 1.0.0)
48
- activesupport (5.2.6)
49
- concurrent-ruby (~> 1.0, >= 1.0.2)
50
- i18n (>= 0.7, < 2)
51
- minitest (~> 5.1)
52
- tzinfo (~> 1.1)
53
- addressable (2.8.0)
54
- public_suffix (>= 2.0.2, < 5.0)
55
- appraisal (2.4.1)
56
- bundler
57
- rake
58
- thor (>= 0.14.0)
59
- arel (9.0.0)
60
- builder (3.2.4)
61
- byebug (11.1.3)
62
- capybara (3.35.3)
63
- addressable
64
- mini_mime (>= 0.1.3)
65
- nokogiri (~> 1.8)
66
- rack (>= 1.6.0)
67
- rack-test (>= 0.6.3)
68
- regexp_parser (>= 1.5, < 3.0)
69
- xpath (~> 3.2)
70
- cliver (0.3.2)
71
- concurrent-ruby (1.1.9)
72
- crass (1.0.6)
73
- cucumber (7.1.0)
74
- builder (~> 3.2, >= 3.2.4)
75
- cucumber-core (~> 10.1, >= 10.1.0)
76
- cucumber-create-meta (~> 6.0, >= 6.0.1)
77
- cucumber-cucumber-expressions (~> 14.0, >= 14.0.0)
78
- cucumber-gherkin (~> 22.0, >= 22.0.0)
79
- cucumber-html-formatter (~> 17.0, >= 17.0.0)
80
- cucumber-messages (~> 17.1, >= 17.1.1)
81
- cucumber-wire (~> 6.2, >= 6.2.0)
82
- diff-lcs (~> 1.4, >= 1.4.4)
83
- mime-types (~> 3.3, >= 3.3.1)
84
- multi_test (~> 0.1, >= 0.1.2)
85
- sys-uname (~> 1.2, >= 1.2.2)
86
- cucumber-core (10.1.0)
87
- cucumber-gherkin (~> 22.0, >= 22.0.0)
88
- cucumber-messages (~> 17.1, >= 17.1.1)
89
- cucumber-tag-expressions (~> 4.0, >= 4.0.2)
90
- cucumber-create-meta (6.0.4)
91
- cucumber-messages (~> 17.1, >= 17.1.1)
92
- sys-uname (~> 1.2, >= 1.2.2)
93
- cucumber-cucumber-expressions (14.0.0)
94
- cucumber-gherkin (22.0.0)
95
- cucumber-messages (~> 17.1, >= 17.1.1)
96
- cucumber-html-formatter (17.0.0)
97
- cucumber-messages (~> 17.1, >= 17.1.0)
98
- cucumber-messages (17.1.1)
99
- cucumber-tag-expressions (4.1.0)
100
- cucumber-wire (6.2.0)
101
- cucumber-core (~> 10.1, >= 10.1.0)
102
- cucumber-cucumber-expressions (~> 14.0, >= 14.0.0)
103
- cucumber-messages (~> 17.1, >= 17.1.1)
104
- cuprite (0.13)
105
- capybara (>= 2.1, < 4)
106
- ferrum (~> 0.11.0)
107
- diff-lcs (1.5.0)
108
- erubi (1.10.0)
109
- ferrum (0.11)
110
- addressable (~> 2.5)
111
- cliver (~> 0.3)
112
- concurrent-ruby (~> 1.1)
113
- websocket-driver (>= 0.6, < 0.8)
114
- ffi (1.15.4)
115
- globalid (1.0.0)
116
- activesupport (>= 5.0)
117
- i18n (1.8.11)
118
- concurrent-ruby (~> 1.0)
119
- loofah (2.13.0)
120
- crass (~> 1.0.2)
121
- nokogiri (>= 1.5.9)
122
- mail (2.7.1)
123
- mini_mime (>= 0.1.1)
124
- marcel (1.0.2)
125
- method_source (1.0.0)
126
- mime-types (3.4.1)
127
- mime-types-data (~> 3.2015)
128
- mime-types-data (3.2021.1115)
129
- mini_mime (1.1.2)
130
- mini_portile2 (2.6.1)
131
- minitest (5.15.0)
132
- multi_test (0.1.2)
133
- nio4r (2.5.8)
134
- nokogiri (1.12.5)
135
- mini_portile2 (~> 2.6.1)
136
- racc (~> 1.4)
137
- public_suffix (4.0.6)
138
- racc (1.6.0)
139
- rack (2.2.3)
140
- rack-test (1.1.0)
141
- rack (>= 1.0, < 3)
142
- rails (5.2.6)
143
- actioncable (= 5.2.6)
144
- actionmailer (= 5.2.6)
145
- actionpack (= 5.2.6)
146
- actionview (= 5.2.6)
147
- activejob (= 5.2.6)
148
- activemodel (= 5.2.6)
149
- activerecord (= 5.2.6)
150
- activestorage (= 5.2.6)
151
- activesupport (= 5.2.6)
152
- bundler (>= 1.3.0)
153
- railties (= 5.2.6)
154
- sprockets-rails (>= 2.0.0)
155
- rails-dom-testing (2.0.3)
156
- activesupport (>= 4.2.0)
157
- nokogiri (>= 1.6)
158
- rails-html-sanitizer (1.4.2)
159
- loofah (~> 2.3)
160
- railties (5.2.6)
161
- actionpack (= 5.2.6)
162
- activesupport (= 5.2.6)
163
- method_source
164
- rake (>= 0.8.7)
165
- thor (>= 0.19.0, < 2.0)
166
- rake (13.0.6)
167
- regexp_parser (2.2.0)
168
- rspec (3.10.0)
169
- rspec-core (~> 3.10.0)
170
- rspec-expectations (~> 3.10.0)
171
- rspec-mocks (~> 3.10.0)
172
- rspec-core (3.10.1)
173
- rspec-support (~> 3.10.0)
174
- rspec-expectations (3.10.1)
175
- diff-lcs (>= 1.2.0, < 2.0)
176
- rspec-support (~> 3.10.0)
177
- rspec-mocks (3.10.2)
178
- diff-lcs (>= 1.2.0, < 2.0)
179
- rspec-support (~> 3.10.0)
180
- rspec-support (3.10.3)
181
- slim (4.1.0)
182
- temple (>= 0.7.6, < 0.9)
183
- tilt (>= 2.0.6, < 2.1)
184
- sprockets (4.0.2)
185
- concurrent-ruby (~> 1.0)
186
- rack (> 1, < 3)
187
- sprockets-rails (3.4.2)
188
- actionpack (>= 5.2)
189
- activesupport (>= 5.2)
190
- sprockets (>= 3.0.0)
191
- sys-uname (1.2.2)
192
- ffi (~> 1.1)
193
- temple (0.8.2)
194
- thor (1.1.0)
195
- thread_safe (0.3.6)
196
- tilt (2.0.10)
197
- tzinfo (1.2.9)
198
- thread_safe (~> 0.1)
199
- webrick (1.7.0)
200
- websocket-driver (0.7.5)
201
- websocket-extensions (>= 0.1.0)
202
- websocket-extensions (0.1.5)
203
- xpath (3.2.0)
204
- nokogiri (~> 1.8)
205
-
206
- PLATFORMS
207
- ruby
208
-
209
- DEPENDENCIES
210
- appraisal
211
- byebug
212
- capybara (~> 3.35.0)
213
- chop!
214
- cuprite
215
- rails (~> 5.2.0)
216
- rake
217
- rspec
218
- slim
219
- webrick
220
-
221
- BUNDLED WITH
222
- 2.2.32