underlay 1.52.1 → 2.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: 9dde78cb7d8ba8f2c8c7f93250425fb19b24ebb44907faacf37453e5d293a109
4
- data.tar.gz: 1a5a24be479c3750e32430ffa8e08fe2eb595e7a4c6657d06cd9661c76dfa247
3
+ metadata.gz: 2f96efbeb8d838ada0d330aed5225e7ef1a6ea054b8a429c0628e405e4e1a189
4
+ data.tar.gz: 03d684f4ebb12de9aaea53800d1eeee3ffa6e268617c516a984f86dd730ee4b7
5
5
  SHA512:
6
- metadata.gz: fbd4a1c9931e083852d4d11af6b644a735ee9ea4f83b5ec956d38de51e2360f7e1bcd1799b58e6bf15c0740c78246797b31d21b25375d5c042a16b0819f20608
7
- data.tar.gz: cba387c279816491b9ea3fac214480750b48391842baf47d26e8bc2bd34cfde93700f50dc5278d6400d74d229cee1c6c997137ddb81439b8abb48ec2798b6c81
6
+ metadata.gz: f5781b045cff4ee4988d5e17087b1adadbee4a6ae307fecf4dbe427aaa4be8020951c8a4fa7e99bcb515d64daa8bbf01c6c2d2968315b8473e377a048ebb6639
7
+ data.tar.gz: 7cbe4d65d07e1f2ce078cc08fb2902717e0a2267fd6ab159976a415dea6a4ce139f78476a7a5fb8d85d20b9101fc4ac38e86b7ebb1c29133e225be3af4fea4b1
@@ -1 +1 @@
1
- 2.5.1
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 depencies
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
- - [ ] Publish gem
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/front_man. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.
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
@@ -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
- config_files = [
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
- config_files.each do |config_file|
463
- path = File.join(destination_root, "config/#{config_file}")
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
@@ -1,10 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Underlay
4
- RAILS_VERSION = '~> 5.1.3'
4
+ RAILS_VERSION = '~> 6.0.3'
5
5
  RUBY_VERSION = IO
6
6
  .read("#{File.dirname(__FILE__)}/../../.ruby-version")
7
7
  .strip
8
8
  .freeze
9
- VERSION = '1.52.1'
9
+ VERSION = '2.0'
10
10
  end
@@ -19,6 +19,7 @@ ruby '<%= Underlay::RUBY_VERSION %>'
19
19
  gem 'sprockets', '>= 3.0.0'
20
20
  gem 'uglifier'
21
21
  <% end -%>
22
+ gem 'bootsnap', require: false
22
23
  gem 'figaro'
23
24
  gem 'lograge'
24
25
  gem 'pg'
@@ -1,9 +1,10 @@
1
1
  #!/usr/bin/env ruby
2
- include FileUtils
3
2
 
4
3
  require 'pathname'
5
4
  require 'fileutils'
6
5
 
6
+ include FileUtils
7
+
7
8
  APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
8
9
 
9
10
  def system!(*args)
@@ -9,11 +9,8 @@ Metrics/LineLength:
9
9
 
10
10
  Metrics/MethodLength:
11
11
  Enabled: false
12
-
13
- Rails:
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
- Style/IndentArray:
57
+ Layout/FirstArrayElementIndentation:
61
58
  EnforcedStyle: consistent
62
59
 
63
60
  Style/MultilineMethodCallIndentation:
@@ -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.3'
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: 1.52.1
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: 2019-04-10 00:00:00.000000000 Z
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.3'
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.3'
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: 5.1.3
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: 5.1.3
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.5.1
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
- rubyforge_project:
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.