underlay 1.52.1 → 2.0
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 +4 -4
- data/.ruby-version +1 -1
- data/README.md +4 -3
- data/lib/underlay/app_builder.rb +19 -15
- data/lib/underlay/generators/app_generator.rb +5 -0
- data/lib/underlay/version.rb +2 -2
- data/templates/Gemfile.erb +1 -0
- data/templates/bin_setup +2 -1
- data/templates/rubocop.yml.erb +3 -6
- data/underlay.gemspec +1 -1
- metadata +9 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2f96efbeb8d838ada0d330aed5225e7ef1a6ea054b8a429c0628e405e4e1a189
|
4
|
+
data.tar.gz: 03d684f4ebb12de9aaea53800d1eeee3ffa6e268617c516a984f86dd730ee4b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f5781b045cff4ee4988d5e17087b1adadbee4a6ae307fecf4dbe427aaa4be8020951c8a4fa7e99bcb515d64daa8bbf01c6c2d2968315b8473e377a048ebb6639
|
7
|
+
data.tar.gz: 7cbe4d65d07e1f2ce078cc08fb2902717e0a2267fd6ab159976a415dea6a4ce139f78476a7a5fb8d85d20b9101fc4ac38e86b7ebb1c29133e225be3af4fea4b1
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.7.1
|
data/README.md
CHANGED
@@ -171,6 +171,7 @@ PostgreSQL needs to be installed and running for the `db:create` rake task.
|
|
171
171
|
|
172
172
|
## TODO
|
173
173
|
|
174
|
+
- [] Set `config.cache_classes` to false for test environment, Otherwise it doesn't allow us to stub classes properly
|
174
175
|
- [X] Install TwilioBase gem (if the option is set)
|
175
176
|
- [x] Remove duplicate application.html.erb layout
|
176
177
|
- [X] Fix issue with flashes.scss partial not being added to assets
|
@@ -179,7 +180,7 @@ PostgreSQL needs to be installed and running for the `db:create` rake task.
|
|
179
180
|
- [X] Configure Redis on heroku (with config vars + initializer)
|
180
181
|
- [X] Update rake (in generated project) to run lints
|
181
182
|
- [X] Prevent views and static sites from generating in API mode
|
182
|
-
- [ ] Setup default front-end libraries and
|
183
|
+
- [ ] Setup default front-end libraries and dependencies
|
183
184
|
- [X] Setup .gitignore
|
184
185
|
- [X] Fix lograge Installation
|
185
186
|
- [X] Setup circle ci
|
@@ -187,7 +188,7 @@ PostgreSQL needs to be installed and running for the `db:create` rake task.
|
|
187
188
|
- [X] Use factory_bot_rails instead of factory_bot
|
188
189
|
- [X] Create github repo
|
189
190
|
- [X] Fix rubocop and other linters offenses
|
190
|
-
- [
|
191
|
+
- [X] Publish gem
|
191
192
|
|
192
193
|
## Kudos
|
193
194
|
|
@@ -203,7 +204,7 @@ To install this gem onto your local machine, run `bundle exec rake install`.
|
|
203
204
|
|
204
205
|
## Contributing
|
205
206
|
|
206
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/DVELP/
|
207
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/DVELP/underlay. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org/) code of conduct.
|
207
208
|
|
208
209
|
|
209
210
|
## License
|
data/lib/underlay/app_builder.rb
CHANGED
@@ -446,8 +446,14 @@ module Underlay
|
|
446
446
|
end
|
447
447
|
end
|
448
448
|
|
449
|
+
def remove_app_comment_lines
|
450
|
+
files = ['jobs/application_job.rb']
|
451
|
+
|
452
|
+
remove_comment_lines(files: files, path_key: 'app')
|
453
|
+
end
|
454
|
+
|
449
455
|
def remove_config_comment_lines
|
450
|
-
|
456
|
+
files = [
|
451
457
|
'application.rb',
|
452
458
|
'initializers/backtrace_silencers.rb',
|
453
459
|
'initializers/wrap_parameters.rb',
|
@@ -459,8 +465,18 @@ module Underlay
|
|
459
465
|
'../Rakefile'
|
460
466
|
] + mode_dependent_files
|
461
467
|
|
462
|
-
|
463
|
-
|
468
|
+
remove_comment_lines(files: files, path_key: 'config')
|
469
|
+
end
|
470
|
+
|
471
|
+
def remove_routes_comment_lines
|
472
|
+
replace_in_file 'config/routes.rb',
|
473
|
+
/Rails\.application\.routes\.draw do.*end/m,
|
474
|
+
"Rails.application.routes.draw do\nend"
|
475
|
+
end
|
476
|
+
|
477
|
+
def remove_comment_lines(files:, path_key:)
|
478
|
+
files.each do |config_file|
|
479
|
+
path = File.join(destination_root, "#{path_key}/#{config_file}")
|
464
480
|
|
465
481
|
accepted_content = File.readlines(path).reject do |line|
|
466
482
|
line =~ /^.*#.*$/ || line =~ /^$\n/
|
@@ -472,12 +488,6 @@ module Underlay
|
|
472
488
|
end
|
473
489
|
end
|
474
490
|
|
475
|
-
def remove_routes_comment_lines
|
476
|
-
replace_in_file 'config/routes.rb',
|
477
|
-
/Rails\.application\.routes\.draw do.*end/m,
|
478
|
-
"Rails.application.routes.draw do\nend"
|
479
|
-
end
|
480
|
-
|
481
491
|
def setup_default_rake_task
|
482
492
|
append_file 'Rakefile' do
|
483
493
|
<<~HERE
|
@@ -499,12 +509,6 @@ module Underlay
|
|
499
509
|
end
|
500
510
|
|
501
511
|
def manual_code_correct
|
502
|
-
replace_in_file(
|
503
|
-
'config/environments/development.rb',
|
504
|
-
"if Rails.root.join('tmp/caching-dev.txt').exist?",
|
505
|
-
"if Rails.root.join('tmp', 'caching-dev.txt').exist?"
|
506
|
-
)
|
507
|
-
|
508
512
|
simple_form_corrections unless api_mode?
|
509
513
|
end
|
510
514
|
|
@@ -78,6 +78,7 @@ module Underlay
|
|
78
78
|
invoke :configure_app
|
79
79
|
invoke :copy_miscellaneous_files
|
80
80
|
invoke :customize_error_pages
|
81
|
+
invoke :remove_app_comment_lines
|
81
82
|
invoke :remove_config_comment_lines
|
82
83
|
invoke :remove_routes_comment_lines
|
83
84
|
invoke :setup_figaro
|
@@ -245,6 +246,10 @@ module Underlay
|
|
245
246
|
build_for_non_api :customize_error_pages
|
246
247
|
end
|
247
248
|
|
249
|
+
def remove_app_comment_lines
|
250
|
+
build :remove_app_comment_lines
|
251
|
+
end
|
252
|
+
|
248
253
|
def remove_config_comment_lines
|
249
254
|
build :remove_config_comment_lines
|
250
255
|
end
|
data/lib/underlay/version.rb
CHANGED
data/templates/Gemfile.erb
CHANGED
data/templates/bin_setup
CHANGED
data/templates/rubocop.yml.erb
CHANGED
@@ -9,11 +9,8 @@ Metrics/LineLength:
|
|
9
9
|
|
10
10
|
Metrics/MethodLength:
|
11
11
|
Enabled: false
|
12
|
-
|
13
|
-
|
14
|
-
Enabled: true
|
15
|
-
|
16
|
-
Style/AlignParameters:
|
12
|
+
|
13
|
+
Layout/ParameterAlignment:
|
17
14
|
EnforcedStyle: with_fixed_indentation
|
18
15
|
|
19
16
|
Style/BlockComments:
|
@@ -57,7 +54,7 @@ Style/HashSyntax:
|
|
57
54
|
Style/IfUnlessModifier:
|
58
55
|
Enabled: false
|
59
56
|
|
60
|
-
|
57
|
+
Layout/FirstArrayElementIndentation:
|
61
58
|
EnforcedStyle: consistent
|
62
59
|
|
63
60
|
Style/MultilineMethodCallIndentation:
|
data/underlay.gemspec
CHANGED
@@ -26,7 +26,7 @@ Gem::Specification.new do |s|
|
|
26
26
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
27
27
|
s.version = Underlay::VERSION
|
28
28
|
|
29
|
-
s.add_dependency 'bundler', '~> 1
|
29
|
+
s.add_dependency 'bundler', '~> 2.1'
|
30
30
|
s.add_dependency 'rails', Underlay::RAILS_VERSION
|
31
31
|
|
32
32
|
s.add_development_dependency 'rspec', '~> 3.2'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: underlay
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: '2.0'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- dvelp
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-05-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1
|
19
|
+
version: '2.1'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '1
|
26
|
+
version: '2.1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rails
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 6.0.3
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 6.0.3
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -55,7 +55,7 @@ dependencies:
|
|
55
55
|
description: 'Underlay removes the monotony of your setup, so you can spend your time
|
56
56
|
focusing above the value line.
|
57
57
|
|
58
|
-
'
|
58
|
+
'
|
59
59
|
email: engage@dvelp.co.uk
|
60
60
|
executables:
|
61
61
|
- underlay
|
@@ -162,15 +162,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
162
162
|
requirements:
|
163
163
|
- - ">="
|
164
164
|
- !ruby/object:Gem::Version
|
165
|
-
version: 2.
|
165
|
+
version: 2.7.1
|
166
166
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
167
167
|
requirements:
|
168
168
|
- - ">="
|
169
169
|
- !ruby/object:Gem::Version
|
170
170
|
version: '0'
|
171
171
|
requirements: []
|
172
|
-
|
173
|
-
rubygems_version: 2.7.6
|
172
|
+
rubygems_version: 3.1.2
|
174
173
|
signing_key:
|
175
174
|
specification_version: 4
|
176
175
|
summary: Generate a Rails app using DVELP's best practices.
|