spreewald 4.6.2 → 4.6.4

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.
Files changed (83) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/test.yml +3 -1
  3. data/CHANGELOG.md +6 -0
  4. data/Gemfile.ruby266.lock +8 -8
  5. data/Gemfile.ruby320.lock +10 -10
  6. data/README.md +27 -1
  7. data/lib/spreewald/web_steps.rb +16 -0
  8. data/lib/spreewald_support/mail_finder.rb +10 -2
  9. data/lib/spreewald_support/version.rb +1 -1
  10. data/media/logo.dark.shapes.svg +137 -0
  11. data/media/logo.dark.text.svg +107 -0
  12. data/media/logo.light.shapes.svg +136 -0
  13. data/media/logo.light.text.svg +106 -0
  14. data/media/makandra-with-bottom-margin.dark.svg +180 -0
  15. data/media/makandra-with-bottom-margin.light.svg +180 -0
  16. data/spec/steps/show_me_the_mails_spec.rb +22 -0
  17. data/tests/rails-7_capybara-3/Gemfile.lock +2 -2
  18. data/tests/rails-8_capybara-3/.ruby-version +1 -0
  19. data/tests/rails-8_capybara-3/Gemfile +27 -0
  20. data/tests/rails-8_capybara-3/Gemfile.lock +326 -0
  21. data/tests/rails-8_capybara-3/README.md +24 -0
  22. data/tests/rails-8_capybara-3/Rakefile +6 -0
  23. data/tests/rails-8_capybara-3/app/controllers +1 -0
  24. data/tests/rails-8_capybara-3/app/mailers/application_mailer.rb +4 -0
  25. data/tests/rails-8_capybara-3/app/mailers/spreewald_mailer.rb +66 -0
  26. data/tests/rails-8_capybara-3/app/models/application_record.rb +3 -0
  27. data/tests/rails-8_capybara-3/app/views +1 -0
  28. data/tests/rails-8_capybara-3/bin/bundle +114 -0
  29. data/tests/rails-8_capybara-3/bin/rails +4 -0
  30. data/tests/rails-8_capybara-3/bin/rake +4 -0
  31. data/tests/rails-8_capybara-3/bin/setup +33 -0
  32. data/tests/rails-8_capybara-3/config/application.rb +35 -0
  33. data/tests/rails-8_capybara-3/config/boot.rb +3 -0
  34. data/tests/rails-8_capybara-3/config/cucumber.yml +9 -0
  35. data/tests/rails-8_capybara-3/config/database.yml +25 -0
  36. data/tests/rails-8_capybara-3/config/environment.rb +5 -0
  37. data/tests/rails-8_capybara-3/config/environments/development.rb +66 -0
  38. data/tests/rails-8_capybara-3/config/environments/test.rb +56 -0
  39. data/tests/rails-8_capybara-3/config/initializers/application_controller_renderer.rb +8 -0
  40. data/tests/rails-8_capybara-3/config/initializers/backtrace_silencers.rb +8 -0
  41. data/tests/rails-8_capybara-3/config/initializers/content_security_policy.rb +28 -0
  42. data/tests/rails-8_capybara-3/config/initializers/cookies_serializer.rb +5 -0
  43. data/tests/rails-8_capybara-3/config/initializers/filter_parameter_logging.rb +6 -0
  44. data/tests/rails-8_capybara-3/config/initializers/inflections.rb +16 -0
  45. data/tests/rails-8_capybara-3/config/initializers/mime_types.rb +4 -0
  46. data/tests/rails-8_capybara-3/config/initializers/new_framework_defaults_6_1.rb +67 -0
  47. data/tests/rails-8_capybara-3/config/initializers/permissions_policy.rb +11 -0
  48. data/tests/rails-8_capybara-3/config/initializers/wrap_parameters.rb +14 -0
  49. data/tests/rails-8_capybara-3/config/locales/en.yml +33 -0
  50. data/tests/rails-8_capybara-3/config/routes.rb +1 -0
  51. data/tests/rails-8_capybara-3/config.ru +6 -0
  52. data/tests/rails-8_capybara-3/db +1 -0
  53. data/tests/rails-8_capybara-3/features/browser_tab_steps.feature +1 -0
  54. data/tests/rails-8_capybara-3/features/development_steps.feature +1 -0
  55. data/tests/rails-8_capybara-3/features/email_steps.feature +1 -0
  56. data/tests/rails-8_capybara-3/features/iframe_steps.feature +1 -0
  57. data/tests/rails-8_capybara-3/features/overriding.feature +1 -0
  58. data/tests/rails-8_capybara-3/features/session_steps.feature +1 -0
  59. data/tests/rails-8_capybara-3/features/step_definitions/.gitkeep +0 -0
  60. data/tests/rails-8_capybara-3/features/step_definitions/field_error_steps.rb +12 -0
  61. data/tests/rails-8_capybara-3/features/step_definitions/overriding_steps.rb +1 -0
  62. data/tests/rails-8_capybara-3/features/step_definitions/test_steps.rb +1 -0
  63. data/tests/rails-8_capybara-3/features/support/env.rb +66 -0
  64. data/tests/rails-8_capybara-3/features/support/paths.rb +1 -0
  65. data/tests/rails-8_capybara-3/features/support/selectors.rb +1 -0
  66. data/tests/rails-8_capybara-3/features/support/selenium.rb +1 -0
  67. data/tests/rails-8_capybara-3/features/table_steps.feature +1 -0
  68. data/tests/rails-8_capybara-3/features/time_steps.feature +1 -0
  69. data/tests/rails-8_capybara-3/features/web_steps.feature +1 -0
  70. data/tests/rails-8_capybara-3/lib/tasks/.keep +0 -0
  71. data/tests/rails-8_capybara-3/lib/tasks/cucumber.rake +76 -0
  72. data/tests/rails-8_capybara-3/log/.keep +0 -0
  73. data/tests/rails-8_capybara-3/public/404.html +67 -0
  74. data/tests/rails-8_capybara-3/public/422.html +67 -0
  75. data/tests/rails-8_capybara-3/public/500.html +66 -0
  76. data/tests/rails-8_capybara-3/public/favicon.ico +0 -0
  77. data/tests/rails-8_capybara-3/public/fixture_files +1 -0
  78. data/tests/rails-8_capybara-3/script/cucumber +11 -0
  79. data/tests/shared/app/controllers/emails_controller.rb +1 -8
  80. data/tests/shared/app/models/mailer.rb +43 -96
  81. data/tests/shared/features/shared/email_steps.feature +18 -0
  82. data/tests/shared/features/support/selenium.rb +2 -2
  83. metadata +134 -6
@@ -0,0 +1,326 @@
1
+ PATH
2
+ remote: ../..
3
+ specs:
4
+ spreewald (4.6.4)
5
+ capybara
6
+ cucumber
7
+ cucumber_priority (>= 0.3.0)
8
+ rspec (>= 2.13.0)
9
+ xpath
10
+
11
+ GEM
12
+ remote: https://rubygems.org/
13
+ specs:
14
+ actioncable (8.0.0.1)
15
+ actionpack (= 8.0.0.1)
16
+ activesupport (= 8.0.0.1)
17
+ nio4r (~> 2.0)
18
+ websocket-driver (>= 0.6.1)
19
+ zeitwerk (~> 2.6)
20
+ actionmailbox (8.0.0.1)
21
+ actionpack (= 8.0.0.1)
22
+ activejob (= 8.0.0.1)
23
+ activerecord (= 8.0.0.1)
24
+ activestorage (= 8.0.0.1)
25
+ activesupport (= 8.0.0.1)
26
+ mail (>= 2.8.0)
27
+ actionmailer (8.0.0.1)
28
+ actionpack (= 8.0.0.1)
29
+ actionview (= 8.0.0.1)
30
+ activejob (= 8.0.0.1)
31
+ activesupport (= 8.0.0.1)
32
+ mail (>= 2.8.0)
33
+ rails-dom-testing (~> 2.2)
34
+ actionpack (8.0.0.1)
35
+ actionview (= 8.0.0.1)
36
+ activesupport (= 8.0.0.1)
37
+ nokogiri (>= 1.8.5)
38
+ rack (>= 2.2.4)
39
+ rack-session (>= 1.0.1)
40
+ rack-test (>= 0.6.3)
41
+ rails-dom-testing (~> 2.2)
42
+ rails-html-sanitizer (~> 1.6)
43
+ useragent (~> 0.16)
44
+ actiontext (8.0.0.1)
45
+ actionpack (= 8.0.0.1)
46
+ activerecord (= 8.0.0.1)
47
+ activestorage (= 8.0.0.1)
48
+ activesupport (= 8.0.0.1)
49
+ globalid (>= 0.6.0)
50
+ nokogiri (>= 1.8.5)
51
+ actionview (8.0.0.1)
52
+ activesupport (= 8.0.0.1)
53
+ builder (~> 3.1)
54
+ erubi (~> 1.11)
55
+ rails-dom-testing (~> 2.2)
56
+ rails-html-sanitizer (~> 1.6)
57
+ activejob (8.0.0.1)
58
+ activesupport (= 8.0.0.1)
59
+ globalid (>= 0.3.6)
60
+ activemodel (8.0.0.1)
61
+ activesupport (= 8.0.0.1)
62
+ activerecord (8.0.0.1)
63
+ activemodel (= 8.0.0.1)
64
+ activesupport (= 8.0.0.1)
65
+ timeout (>= 0.4.0)
66
+ activestorage (8.0.0.1)
67
+ actionpack (= 8.0.0.1)
68
+ activejob (= 8.0.0.1)
69
+ activerecord (= 8.0.0.1)
70
+ activesupport (= 8.0.0.1)
71
+ marcel (~> 1.0)
72
+ activesupport (8.0.0.1)
73
+ base64
74
+ benchmark (>= 0.3)
75
+ bigdecimal
76
+ concurrent-ruby (~> 1.0, >= 1.3.1)
77
+ connection_pool (>= 2.2.5)
78
+ drb
79
+ i18n (>= 1.6, < 2)
80
+ logger (>= 1.4.2)
81
+ minitest (>= 5.1)
82
+ securerandom (>= 0.3)
83
+ tzinfo (~> 2.0, >= 2.0.5)
84
+ uri (>= 0.13.1)
85
+ addressable (2.8.7)
86
+ public_suffix (>= 2.0.2, < 7.0)
87
+ base64 (0.2.0)
88
+ benchmark (0.4.0)
89
+ bigdecimal (3.1.8)
90
+ builder (3.3.0)
91
+ byebug (11.1.3)
92
+ capybara (3.40.0)
93
+ addressable
94
+ matrix
95
+ mini_mime (>= 0.1.3)
96
+ nokogiri (~> 1.11)
97
+ rack (>= 1.6.0)
98
+ rack-test (>= 0.6.3)
99
+ regexp_parser (>= 1.5, < 3.0)
100
+ xpath (~> 3.2)
101
+ capybara-screenshot (1.0.26)
102
+ capybara (>= 1.0, < 4)
103
+ launchy
104
+ childprocess (5.1.0)
105
+ logger (~> 1.5)
106
+ coderay (1.1.3)
107
+ concurrent-ruby (1.3.4)
108
+ connection_pool (2.4.1)
109
+ crass (1.0.6)
110
+ cucumber (9.2.0)
111
+ builder (~> 3.2)
112
+ cucumber-ci-environment (> 9, < 11)
113
+ cucumber-core (> 13, < 14)
114
+ cucumber-cucumber-expressions (~> 17.0)
115
+ cucumber-gherkin (> 24, < 28)
116
+ cucumber-html-formatter (> 20.3, < 22)
117
+ cucumber-messages (> 19, < 25)
118
+ diff-lcs (~> 1.5)
119
+ mini_mime (~> 1.1)
120
+ multi_test (~> 1.1)
121
+ sys-uname (~> 1.2)
122
+ cucumber-ci-environment (10.0.1)
123
+ cucumber-core (13.0.3)
124
+ cucumber-gherkin (>= 27, < 28)
125
+ cucumber-messages (>= 20, < 23)
126
+ cucumber-tag-expressions (> 5, < 7)
127
+ cucumber-cucumber-expressions (17.1.0)
128
+ bigdecimal
129
+ cucumber-gherkin (27.0.0)
130
+ cucumber-messages (>= 19.1.4, < 23)
131
+ cucumber-html-formatter (21.7.0)
132
+ cucumber-messages (> 19, < 27)
133
+ cucumber-messages (22.0.0)
134
+ cucumber-rails (3.1.0)
135
+ capybara (>= 3.11, < 4)
136
+ cucumber (>= 5, < 10)
137
+ railties (>= 5.2, < 9)
138
+ cucumber-tag-expressions (6.1.1)
139
+ cucumber_priority (1.0.0)
140
+ cucumber
141
+ database_cleaner (2.1.0)
142
+ database_cleaner-active_record (>= 2, < 3)
143
+ database_cleaner-active_record (2.2.0)
144
+ activerecord (>= 5.a)
145
+ database_cleaner-core (~> 2.0.0)
146
+ database_cleaner-core (2.0.1)
147
+ date (3.4.1)
148
+ diff-lcs (1.5.1)
149
+ drb (2.2.1)
150
+ erubi (1.13.0)
151
+ ffi (1.17.0-x86_64-linux-gnu)
152
+ gemika (0.8.3)
153
+ globalid (1.2.1)
154
+ activesupport (>= 6.1)
155
+ haml (6.3.0)
156
+ temple (>= 0.8.2)
157
+ thor
158
+ tilt
159
+ haml-rails (2.1.0)
160
+ actionpack (>= 5.1)
161
+ activesupport (>= 5.1)
162
+ haml (>= 4.0.6)
163
+ railties (>= 5.1)
164
+ i18n (1.14.6)
165
+ concurrent-ruby (~> 1.0)
166
+ io-console (0.8.0)
167
+ irb (1.14.2)
168
+ rdoc (>= 4.0.0)
169
+ reline (>= 0.4.2)
170
+ launchy (3.0.1)
171
+ addressable (~> 2.8)
172
+ childprocess (~> 5.0)
173
+ logger (1.6.3)
174
+ loofah (2.23.1)
175
+ crass (~> 1.0.2)
176
+ nokogiri (>= 1.12.0)
177
+ mail (2.8.1)
178
+ mini_mime (>= 0.1.1)
179
+ net-imap
180
+ net-pop
181
+ net-smtp
182
+ marcel (1.0.4)
183
+ matrix (0.4.2)
184
+ method_source (1.1.0)
185
+ mini_mime (1.1.5)
186
+ minitest (5.25.4)
187
+ multi_test (1.1.0)
188
+ net-imap (0.5.1)
189
+ date
190
+ net-protocol
191
+ net-pop (0.1.2)
192
+ net-protocol
193
+ net-protocol (0.2.2)
194
+ timeout
195
+ net-smtp (0.5.0)
196
+ net-protocol
197
+ nio4r (2.7.4)
198
+ nokogiri (1.17.2-x86_64-linux)
199
+ racc (~> 1.4)
200
+ pry (0.15.0)
201
+ coderay (~> 1.1)
202
+ method_source (~> 1.0)
203
+ psych (5.2.1)
204
+ date
205
+ stringio
206
+ public_suffix (6.0.1)
207
+ racc (1.8.1)
208
+ rack (3.1.8)
209
+ rack-session (2.0.0)
210
+ rack (>= 3.0.0)
211
+ rack-test (2.1.0)
212
+ rack (>= 1.3)
213
+ rackup (2.2.1)
214
+ rack (>= 3)
215
+ rails (8.0.0.1)
216
+ actioncable (= 8.0.0.1)
217
+ actionmailbox (= 8.0.0.1)
218
+ actionmailer (= 8.0.0.1)
219
+ actionpack (= 8.0.0.1)
220
+ actiontext (= 8.0.0.1)
221
+ actionview (= 8.0.0.1)
222
+ activejob (= 8.0.0.1)
223
+ activemodel (= 8.0.0.1)
224
+ activerecord (= 8.0.0.1)
225
+ activestorage (= 8.0.0.1)
226
+ activesupport (= 8.0.0.1)
227
+ bundler (>= 1.15.0)
228
+ railties (= 8.0.0.1)
229
+ rails-dom-testing (2.2.0)
230
+ activesupport (>= 5.0.0)
231
+ minitest
232
+ nokogiri (>= 1.6)
233
+ rails-html-sanitizer (1.6.2)
234
+ loofah (~> 2.21)
235
+ nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
236
+ railties (8.0.0.1)
237
+ actionpack (= 8.0.0.1)
238
+ activesupport (= 8.0.0.1)
239
+ irb (~> 1.13)
240
+ rackup (>= 1.0.0)
241
+ rake (>= 12.2)
242
+ thor (~> 1.0, >= 1.2.2)
243
+ zeitwerk (~> 2.6)
244
+ rake (13.2.1)
245
+ rdoc (6.8.1)
246
+ psych (>= 4.0.0)
247
+ regexp_parser (2.9.3)
248
+ reline (0.5.12)
249
+ io-console (~> 0.5)
250
+ rexml (3.3.9)
251
+ rspec (3.13.1)
252
+ rspec-core (~> 3.13.0)
253
+ rspec-expectations (~> 3.13.0)
254
+ rspec-mocks (~> 3.13.0)
255
+ rspec-core (3.13.2)
256
+ rspec-support (~> 3.13.0)
257
+ rspec-expectations (3.13.3)
258
+ diff-lcs (>= 1.2.0, < 2.0)
259
+ rspec-support (~> 3.13.0)
260
+ rspec-mocks (3.13.2)
261
+ diff-lcs (>= 1.2.0, < 2.0)
262
+ rspec-support (~> 3.13.0)
263
+ rspec-rails (7.1.0)
264
+ actionpack (>= 7.0)
265
+ activesupport (>= 7.0)
266
+ railties (>= 7.0)
267
+ rspec-core (~> 3.13)
268
+ rspec-expectations (~> 3.13)
269
+ rspec-mocks (~> 3.13)
270
+ rspec-support (~> 3.13)
271
+ rspec-support (3.13.2)
272
+ rubyzip (2.3.2)
273
+ securerandom (0.4.0)
274
+ selenium-webdriver (4.27.0)
275
+ base64 (~> 0.2)
276
+ logger (~> 1.4)
277
+ rexml (~> 3.2, >= 3.2.5)
278
+ rubyzip (>= 1.2.2, < 3.0)
279
+ websocket (~> 1.0)
280
+ sqlite3 (2.4.1-x86_64-linux-gnu)
281
+ stringio (3.1.2)
282
+ sys-uname (1.3.1)
283
+ ffi (~> 1.1)
284
+ temple (0.10.3)
285
+ thor (1.3.2)
286
+ tilt (2.4.0)
287
+ timeout (0.4.2)
288
+ tzinfo (2.0.6)
289
+ concurrent-ruby (~> 1.0)
290
+ uri (1.0.2)
291
+ useragent (0.16.11)
292
+ webrick (1.9.1)
293
+ websocket (1.2.11)
294
+ websocket-driver (0.7.6)
295
+ websocket-extensions (>= 0.1.0)
296
+ websocket-extensions (0.1.5)
297
+ xpath (3.2.0)
298
+ nokogiri (~> 1.8)
299
+ zeitwerk (2.7.1)
300
+
301
+ PLATFORMS
302
+ x86_64-linux
303
+
304
+ DEPENDENCIES
305
+ byebug
306
+ capybara (~> 3)
307
+ capybara-screenshot
308
+ cucumber
309
+ cucumber-rails
310
+ database_cleaner
311
+ gemika
312
+ haml-rails
313
+ pry
314
+ rails (~> 8)
315
+ rexml
316
+ rspec-rails
317
+ selenium-webdriver
318
+ spreewald!
319
+ sqlite3
320
+ webrick
321
+
322
+ RUBY VERSION
323
+ ruby 3.3.6p108
324
+
325
+ BUNDLED WITH
326
+ 2.2.24
@@ -0,0 +1,24 @@
1
+ # README
2
+
3
+ This README would normally document whatever steps are necessary to get the
4
+ application up and running.
5
+
6
+ Things you may want to cover:
7
+
8
+ * Ruby version
9
+
10
+ * System dependencies
11
+
12
+ * Configuration
13
+
14
+ * Database creation
15
+
16
+ * Database initialization
17
+
18
+ * How to run the test suite
19
+
20
+ * Services (job queues, cache servers, search engines, etc.)
21
+
22
+ * Deployment instructions
23
+
24
+ * ...
@@ -0,0 +1,6 @@
1
+ # Add your own tasks in files placed in lib/tasks ending in .rake,
2
+ # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
+
4
+ require_relative 'config/application'
5
+
6
+ Rails.application.load_tasks
@@ -0,0 +1 @@
1
+ ../../shared/app/controllers/
@@ -0,0 +1,4 @@
1
+ class ApplicationMailer < ActionMailer::Base
2
+ default from: 'from@example.com'
3
+
4
+ end
@@ -0,0 +1,66 @@
1
+ class SpreewaldMailer < ApplicationMailer
2
+ REPLY_TO = "reply-to@example.com"
3
+ TO = "to@example.com"
4
+ CC = "cc@example.com"
5
+ BCC = "bcc@example.com"
6
+ FROM = "from@example.com"
7
+ SUBJECT = "SUBJECT"
8
+
9
+ def email
10
+ attachments['attached_file.pdf'] = File.open("#{Rails.root}/public/fixture_files/attachment.pdf", "w") {}
11
+ mail(
12
+ :from => FROM,
13
+ :reply_to => REPLY_TO,
14
+ :to => TO,
15
+ :cc => CC,
16
+ :bcc => BCC,
17
+ :subject => SUBJECT
18
+ )
19
+ end
20
+
21
+ def email_crlf
22
+ email
23
+ end
24
+
25
+ def email_with_umlauts
26
+ email
27
+ end
28
+
29
+ def html_email_with_links
30
+ email
31
+ end
32
+
33
+ def text_email_with_links
34
+ email
35
+ end
36
+
37
+ def html_email_with_linebreaks
38
+ email
39
+ end
40
+
41
+ def html_email_with_specific_line
42
+ email
43
+ end
44
+
45
+ def text_email_with_specific_line
46
+ email
47
+ end
48
+
49
+ def html_email_for_successful_test_without_header
50
+ email
51
+ end
52
+
53
+ def text_email_for_successful_test_without_header
54
+ email
55
+ end
56
+
57
+ def html_email_for_failed_test_without_header
58
+ email
59
+ end
60
+
61
+ def text_email_for_failed_test_without_header
62
+ email
63
+ end
64
+
65
+ end
66
+
@@ -0,0 +1,3 @@
1
+ class ApplicationRecord < ActiveRecord::Base
2
+ self.abstract_class = true
3
+ end
@@ -0,0 +1 @@
1
+ ../../shared/app/views/
@@ -0,0 +1,114 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # This file was generated by Bundler.
6
+ #
7
+ # The application 'bundle' is installed as part of a gem, and
8
+ # this file is here to facilitate running it.
9
+ #
10
+
11
+ require "rubygems"
12
+
13
+ m = Module.new do
14
+ module_function
15
+
16
+ def invoked_as_script?
17
+ File.expand_path($0) == File.expand_path(__FILE__)
18
+ end
19
+
20
+ def env_var_version
21
+ ENV["BUNDLER_VERSION"]
22
+ end
23
+
24
+ def cli_arg_version
25
+ return unless invoked_as_script? # don't want to hijack other binstubs
26
+ return unless "update".start_with?(ARGV.first || " ") # must be running `bundle update`
27
+ bundler_version = nil
28
+ update_index = nil
29
+ ARGV.each_with_index do |a, i|
30
+ if update_index && update_index.succ == i && a =~ Gem::Version::ANCHORED_VERSION_PATTERN
31
+ bundler_version = a
32
+ end
33
+ next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/
34
+ bundler_version = $1
35
+ update_index = i
36
+ end
37
+ bundler_version
38
+ end
39
+
40
+ def gemfile
41
+ gemfile = ENV["BUNDLE_GEMFILE"]
42
+ return gemfile if gemfile && !gemfile.empty?
43
+
44
+ File.expand_path("../../Gemfile", __FILE__)
45
+ end
46
+
47
+ def lockfile
48
+ lockfile =
49
+ case File.basename(gemfile)
50
+ when "gems.rb" then gemfile.sub(/\.rb$/, gemfile)
51
+ else "#{gemfile}.lock"
52
+ end
53
+ File.expand_path(lockfile)
54
+ end
55
+
56
+ def lockfile_version
57
+ return unless File.file?(lockfile)
58
+ lockfile_contents = File.read(lockfile)
59
+ return unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/
60
+ Regexp.last_match(1)
61
+ end
62
+
63
+ def bundler_version
64
+ @bundler_version ||=
65
+ env_var_version || cli_arg_version ||
66
+ lockfile_version
67
+ end
68
+
69
+ def bundler_requirement
70
+ return "#{Gem::Requirement.default}.a" unless bundler_version
71
+
72
+ bundler_gem_version = Gem::Version.new(bundler_version)
73
+
74
+ requirement = bundler_gem_version.approximate_recommendation
75
+
76
+ return requirement unless Gem::Version.new(Gem::VERSION) < Gem::Version.new("2.7.0")
77
+
78
+ requirement += ".a" if bundler_gem_version.prerelease?
79
+
80
+ requirement
81
+ end
82
+
83
+ def load_bundler!
84
+ ENV["BUNDLE_GEMFILE"] ||= gemfile
85
+
86
+ activate_bundler
87
+ end
88
+
89
+ def activate_bundler
90
+ gem_error = activation_error_handling do
91
+ gem "bundler", bundler_requirement
92
+ end
93
+ return if gem_error.nil?
94
+ require_error = activation_error_handling do
95
+ require "bundler/version"
96
+ end
97
+ return if require_error.nil? && Gem::Requirement.new(bundler_requirement).satisfied_by?(Gem::Version.new(Bundler::VERSION))
98
+ warn "Activating bundler (#{bundler_requirement}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_requirement}'`"
99
+ exit 42
100
+ end
101
+
102
+ def activation_error_handling
103
+ yield
104
+ nil
105
+ rescue StandardError, LoadError => e
106
+ e
107
+ end
108
+ end
109
+
110
+ m.load_bundler!
111
+
112
+ if m.invoked_as_script?
113
+ load Gem.bin_path("bundler", "bundle")
114
+ end
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ APP_PATH = File.expand_path('../config/application', __dir__)
3
+ require_relative '../config/boot'
4
+ require 'rails/commands'
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ require_relative '../config/boot'
3
+ require 'rake'
4
+ Rake.application.run
@@ -0,0 +1,33 @@
1
+ #!/usr/bin/env ruby
2
+ require 'fileutils'
3
+
4
+ # path to your application root.
5
+ APP_ROOT = File.expand_path('..', __dir__)
6
+
7
+ def system!(*args)
8
+ system(*args) || abort("\n== Command #{args} failed ==")
9
+ end
10
+
11
+ FileUtils.chdir APP_ROOT do
12
+ # This script is a way to setup or update your development environment automatically.
13
+ # This script is idempotent, so that you can run it at anytime and get an expectable outcome.
14
+ # Add necessary setup steps to this file.
15
+
16
+ puts '== Installing dependencies =='
17
+ system! 'gem install bundler --conservative'
18
+ system('bundle check') || system!('bundle install')
19
+
20
+ # puts "\n== Copying sample files =="
21
+ # unless File.exist?('config/database.yml')
22
+ # FileUtils.cp 'config/database.yml.sample', 'config/database.yml'
23
+ # end
24
+
25
+ puts "\n== Preparing database =="
26
+ system! 'bin/rails db:prepare'
27
+
28
+ puts "\n== Removing old logs and tempfiles =="
29
+ system! 'bin/rails log:clear tmp:clear'
30
+
31
+ puts "\n== Restarting application server =="
32
+ system! 'bin/rails restart'
33
+ end
@@ -0,0 +1,35 @@
1
+ require_relative 'boot'
2
+
3
+ require "rails"
4
+ # Pick the frameworks you want:
5
+ require "active_model/railtie"
6
+ require "active_job/railtie"
7
+ require "active_record/railtie"
8
+ # require "active_storage/engine"
9
+ require "action_controller/railtie"
10
+ require "action_mailer/railtie"
11
+ # require "action_mailbox/engine"
12
+ # require "action_text/engine"
13
+ require "action_view/railtie"
14
+ # require "action_cable/engine"
15
+ # require "sprockets/railtie"
16
+ require "rails/test_unit/railtie"
17
+
18
+ # Require the gems listed in Gemfile, including any gems
19
+ # you've limited to :test, :development, or :production.
20
+ Bundler.require(*Rails.groups)
21
+
22
+ module Rails6Capybara3
23
+ class Application < Rails::Application
24
+ # Initialize configuration defaults for originally generated Rails version.
25
+ config.load_defaults 7.0
26
+
27
+ # Settings in config/environments/* take precedence over those specified here.
28
+ # Application configuration can go into files in config/initializers
29
+ # -- all .rb files in that directory are automatically loaded after loading
30
+ # the framework and any gems in your application.
31
+
32
+ # Don't generate system test files.
33
+ config.generators.system_tests = nil
34
+ end
35
+ end
@@ -0,0 +1,3 @@
1
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
2
+
3
+ require 'bundler/setup' # Set up gems listed in the Gemfile.
@@ -0,0 +1,9 @@
1
+ <%
2
+ rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : ""
3
+ rerun = rerun.strip.gsub /\s/, ' '
4
+ rerun_opts = rerun.empty? ? "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} features" : "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} #{rerun}"
5
+ std_opts = "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} --strict --tags 'not @wip'"
6
+ %>
7
+ default: <%= std_opts %> features --publish-quiet
8
+ wip: --tags @wip:3 --wip features
9
+ rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags 'not @wip'
@@ -0,0 +1,25 @@
1
+ # SQLite. Versions 3.8.0 and up are supported.
2
+ # gem install sqlite3
3
+ #
4
+ # Ensure the SQLite 3 gem is defined in your Gemfile
5
+ # gem 'sqlite3'
6
+ #
7
+ default: &default
8
+ adapter: sqlite3
9
+ pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
10
+ timeout: 5000
11
+
12
+ development:
13
+ <<: *default
14
+ database: db/development.sqlite3
15
+
16
+ # Warning: The database defined as "test" will be erased and
17
+ # re-generated from your development database when you run "rake".
18
+ # Do not set this db to the same as development or production.
19
+ test:
20
+ <<: *default
21
+ database: db/test.sqlite3
22
+
23
+ production:
24
+ <<: *default
25
+ database: db/production.sqlite3
@@ -0,0 +1,5 @@
1
+ # Load the Rails application.
2
+ require_relative 'application'
3
+
4
+ # Initialize the Rails application.
5
+ Rails.application.initialize!