underlay 1.50.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +5 -0
  3. data/.rubocop.yml +87 -0
  4. data/.ruby-version +1 -0
  5. data/CONTRIBUTING.md +46 -0
  6. data/Gemfile +5 -0
  7. data/LICENSE +21 -0
  8. data/README.md +218 -0
  9. data/RELEASING.md +16 -0
  10. data/Rakefile +10 -0
  11. data/USAGE +13 -0
  12. data/bin/rake +18 -0
  13. data/bin/rspec +18 -0
  14. data/bin/setup +13 -0
  15. data/bin/underlay +29 -0
  16. data/circle.yml +3 -0
  17. data/lib/underlay/actions.rb +41 -0
  18. data/lib/underlay/adapters/heroku.rb +133 -0
  19. data/lib/underlay/app_builder.rb +556 -0
  20. data/lib/underlay/generators/app_generator.rb +280 -0
  21. data/lib/underlay/generators/enforce_ssl_generator.rb +14 -0
  22. data/lib/underlay/generators/initialize_active_job_generator.rb +21 -0
  23. data/lib/underlay/generators/static_generator.rb +12 -0
  24. data/lib/underlay/generators/stylesheet_base_generator.rb +36 -0
  25. data/lib/underlay/version.rb +10 -0
  26. data/lib/underlay.rb +11 -0
  27. data/spec/adapters/heroku_spec.rb +78 -0
  28. data/spec/fakes/bin/heroku +9 -0
  29. data/spec/fakes/bin/hub +9 -0
  30. data/spec/features/cli_help_spec.rb +38 -0
  31. data/spec/features/github_spec.rb +18 -0
  32. data/spec/features/heroku_spec.rb +72 -0
  33. data/spec/features/new_project_spec.rb +308 -0
  34. data/spec/spec_helper.rb +22 -0
  35. data/spec/support/fake_github.rb +26 -0
  36. data/spec/support/fake_heroku.rb +58 -0
  37. data/spec/support/underlay.rb +100 -0
  38. data/templates/Gemfile.erb +81 -0
  39. data/templates/Procfile +2 -0
  40. data/templates/README.md.erb +21 -0
  41. data/templates/_analytics.html.slim +10 -0
  42. data/templates/_css_overrides.html.slim +5 -0
  43. data/templates/_flashes.html.slim +8 -0
  44. data/templates/_flashes.scss +21 -0
  45. data/templates/_javascript.html.slim +10 -0
  46. data/templates/action_mailer.rb +7 -0
  47. data/templates/active_job.rb +15 -0
  48. data/templates/app.json.erb +45 -0
  49. data/templates/application.example.yml +19 -0
  50. data/templates/application.scss +5 -0
  51. data/templates/bin_deploy +12 -0
  52. data/templates/bin_rake +12 -0
  53. data/templates/bin_setup +31 -0
  54. data/templates/bin_setup_review_app.erb +22 -0
  55. data/templates/bin_update +26 -0
  56. data/templates/browserslist +3 -0
  57. data/templates/bundler_audit.rake +6 -0
  58. data/templates/capybara.rb +22 -0
  59. data/templates/circle.yml.erb +38 -0
  60. data/templates/config_locales_en.yml.erb +19 -0
  61. data/templates/database_cleaner_rspec.rb +23 -0
  62. data/templates/dev.rake +14 -0
  63. data/templates/dvelp_gitignore +18 -0
  64. data/templates/dvelp_layout.html.slim +17 -0
  65. data/templates/errors.rb +36 -0
  66. data/templates/factories.rb +4 -0
  67. data/templates/factory_bot_rspec.rb +5 -0
  68. data/templates/flashes_helper.rb +7 -0
  69. data/templates/i18n.rb +5 -0
  70. data/templates/json_encoding.rb +3 -0
  71. data/templates/lograge.rb +11 -0
  72. data/templates/postgresql_database.yml.erb +19 -0
  73. data/templates/puma.rb +14 -0
  74. data/templates/rack_mini_profiler.rb +7 -0
  75. data/templates/rails_helper.rb +27 -0
  76. data/templates/rubocop.yml.erb +85 -0
  77. data/templates/scss-lint.yml.erb +167 -0
  78. data/templates/secrets.yml +8 -0
  79. data/templates/sentry.rb +6 -0
  80. data/templates/shoulda_matchers_config_rspec.rb +8 -0
  81. data/templates/sidekiq.yml +3 -0
  82. data/templates/slim-lint.yml.erb +28 -0
  83. data/templates/smtp.rb +15 -0
  84. data/templates/spec_helper.rb +35 -0
  85. data/underlay.gemspec +33 -0
  86. metadata +187 -0
@@ -0,0 +1,167 @@
1
+ scss_files: 'app/assets/stylesheets/**/*.scss'
2
+
3
+ linters:
4
+ Comment:
5
+ enabled: false
6
+ ImportPath:
7
+ enabled: false
8
+ LeadingZero:
9
+ style: exclude_zero
10
+ MergeableSelector:
11
+ enabled: false
12
+ NameFormat:
13
+ enabled: true
14
+ convention: hyphenated_lowercase
15
+ variable_convention: '^[a-z][a-zA-Z0-9]*(?:\-[a-z0-9][a-zA-Z0-9]*)?(?:\-\-[a-z0-9][a-zA-Z0-9]*)?$'
16
+ NestingDepth:
17
+ max_depth: 1
18
+ SelectorFormat:
19
+ enabled: true
20
+ convention: hyphenated_lowercase
21
+ class_convention: '^(?:is)\-[a-z][a-zA-Z0-9]*$|^(?!is)[a-z][a-zA-Z0-9]*(?:\-[a-z][a-zA-Z0-9]*)?(?:\-\-[a-z0-9][a-zA-Z0-9]*)?$'
22
+ EmptyLineBetweenBlocks:
23
+ enabled: false
24
+ QualifyingElement:
25
+ allow_element_with_attribute: true
26
+ PropertySortOrder:
27
+ order:
28
+ - content
29
+ # Box
30
+ - position
31
+ - top
32
+ - right
33
+ - bottom
34
+ - left
35
+ - display
36
+ - vertical-align
37
+ - overflow
38
+ - clip
39
+ - float
40
+ - clear
41
+ - flex
42
+ - flex-basis
43
+ - flex-direction
44
+ - flex-flow
45
+ - flex-grow
46
+ - flex-shrink
47
+ - flex-wrap
48
+ - align-content
49
+ - align-items
50
+ - align-self
51
+ - justify-content
52
+ - order
53
+ - width
54
+ - min-width
55
+ - max-width
56
+ - height
57
+ - min-height
58
+ - max-height
59
+ - padding
60
+ - padding-top
61
+ - padding-right
62
+ - padding-bottom
63
+ - padding-left
64
+ - margin
65
+ - margin-top
66
+ - margin-right
67
+ - margin-bottom
68
+ - margin-left
69
+ - columns
70
+ - column-gap
71
+ - column-fill
72
+ - column-rule
73
+ - column-span
74
+ - column-count
75
+ - column-width
76
+ # Border
77
+ - border
78
+ - border-top
79
+ - border-right
80
+ - border-bottom
81
+ - border-left
82
+ - border-width
83
+ - border-top-width
84
+ - border-right-width
85
+ - border-bottom-width
86
+ - border-left-width
87
+ - border-style
88
+ - border-top-style
89
+ - border-right-style
90
+ - border-bottom-style
91
+ - border-left-style
92
+ - border-radius
93
+ - border-top-left-radius
94
+ - border-top-right-radius
95
+ - border-bottom-left-radius
96
+ - border-bottom-right-radius
97
+ - border-color
98
+ - border-top-color
99
+ - border-right-color
100
+ - border-bottom-color
101
+ - border-left-color
102
+ - border-collapse
103
+ - border-spacing
104
+ - outline
105
+ - outline-color
106
+ - outline-offset
107
+ - outline-style
108
+ - outline-width
109
+ - box-shadow
110
+ # Background
111
+ - background
112
+ - background-attachment
113
+ - background-clip
114
+ - background-color
115
+ - background-image
116
+ - background-repeat
117
+ - background-position
118
+ - background-size
119
+ # Text
120
+ - color
121
+ - font
122
+ - font-size
123
+ - line-height
124
+ - font-weight
125
+ - font-family
126
+ - font-style
127
+ - font-smoothing
128
+ - font-variant
129
+ - letter-spacing
130
+ - list-style
131
+ - text-align
132
+ - text-decoration
133
+ - text-indent
134
+ - text-overflow
135
+ - text-rendering
136
+ - text-shadow
137
+ - text-transform
138
+ - text-wrap
139
+ - white-space
140
+ - word-spacing
141
+ # Transform & Animation
142
+ - transform
143
+ - transform-box
144
+ - transform-origin
145
+ - transform-style
146
+ - transition
147
+ - transition-delay
148
+ - transition-duration
149
+ - transition-property
150
+ - transition-timing-function
151
+ - animation
152
+ - animation-name
153
+ - animation-duration
154
+ - animation-timing-function
155
+ - animation-delay
156
+ - animation-iteration-count
157
+ - animation-direction
158
+ - animation-fill-mode
159
+ - animation-play-state
160
+ # Other
161
+ - table-layout
162
+ - caption-side
163
+ - empty-cells
164
+ - cursor
165
+ - opacity
166
+ - visibility
167
+ - z-index
@@ -0,0 +1,8 @@
1
+ shared:
2
+ secret_key_base: <%%= ENV["SECRET_KEY_BASE"] %>
3
+
4
+ development:
5
+
6
+ test:
7
+
8
+ production:
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ Raven.configure do |config|
4
+ config.sanitize_fields =
5
+ Rails.application.config.filter_parameters.map(&:to_s)
6
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ Shoulda::Matchers.configure do |config|
4
+ config.integrate do |with|
5
+ with.test_framework :rspec
6
+ with.library :rails
7
+ end
8
+ end
@@ -0,0 +1,3 @@
1
+ :concurrency: 5
2
+ :queues:
3
+ - default
@@ -0,0 +1,28 @@
1
+ skip_frontmatter: false
2
+
3
+ linters:
4
+ CommentControlStatement:
5
+ enabled: true
6
+
7
+ ConsecutiveControlStatements:
8
+ enabled: true
9
+ max_consecutive: 2
10
+
11
+ EmptyControlStatement:
12
+ enabled: true
13
+
14
+ RedundantDiv:
15
+ enabled: true
16
+
17
+ LineLength:
18
+ enabled: true
19
+ max: 80
20
+
21
+ RuboCop:
22
+ enabled: true
23
+
24
+ TagCase:
25
+ enabled: true
26
+
27
+ TrailingWhitespace:
28
+ enabled: true
data/templates/smtp.rb ADDED
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ SMTP_SETTINGS = {
4
+ address: ENV.fetch('SMTP_ADDRESS'),
5
+ authentication: :plain,
6
+ domain: ENV.fetch('SMTP_DOMAIN'),
7
+ enable_starttls_auto: true,
8
+ password: ENV.fetch('SMTP_PASSWORD'),
9
+ port: '587',
10
+ user_name: ENV.fetch('SMTP_USERNAME')
11
+ }.freeze
12
+
13
+ if ENV['EMAIL_RECIPIENTS'].present?
14
+ Mail.register_interceptor RecipientInterceptor.new(ENV['EMAIL_RECIPIENTS'])
15
+ end
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+
3
+ if ENV.fetch('COVERAGE', false)
4
+ require 'simplecov'
5
+
6
+ if ENV['CIRCLE_ARTIFACTS']
7
+ dir = File.join(ENV['CIRCLE_ARTIFACTS'], 'coverage')
8
+ SimpleCov.coverage_dir(dir)
9
+ end
10
+
11
+ SimpleCov.start 'rails'
12
+ end
13
+
14
+ require 'webmock/rspec'
15
+ require 'timecop'
16
+
17
+ # http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
18
+ RSpec.configure do |config|
19
+ config.expect_with :rspec do |expectations|
20
+ expectations.syntax = :expect
21
+ end
22
+
23
+ config.mock_with :rspec do |mocks|
24
+ mocks.syntax = :expect
25
+ mocks.verify_partial_doubles = true
26
+ end
27
+
28
+ config.example_status_persistence_file_path = 'tmp/rspec_examples.txt'
29
+ config.order = :random
30
+ end
31
+
32
+ WebMock.disable_net_connect!(allow_localhost: true)
33
+
34
+ # Only allow Timecop with block syntax
35
+ Timecop.safe_mode = true
data/underlay.gemspec ADDED
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ $LOAD_PATH.push File.expand_path('lib', __dir__)
4
+ require 'underlay/version'
5
+ require 'date'
6
+
7
+ Gem::Specification.new do |s|
8
+ s.required_ruby_version = ">= #{Underlay::RUBY_VERSION}"
9
+ s.authors = ['dvelp']
10
+ s.date = Date.today.strftime('%Y-%m-%d')
11
+
12
+ s.description = <<~HERE
13
+ Underlay removes the monotony of your setup, so you can spend your time focusing above the value line.
14
+ HERE
15
+
16
+ s.email = 'engage@dvelp.co.uk'
17
+ s.executables = ['underlay']
18
+ s.extra_rdoc_files = %w[README.md LICENSE]
19
+ s.files = `git ls-files`.split("\n")
20
+ s.homepage = 'http://github.com/DVELP/underlay'
21
+ s.license = 'MIT'
22
+ s.name = 'underlay'
23
+ s.rdoc_options = ['--charset=UTF-8']
24
+ s.require_paths = ['lib']
25
+ s.summary = "Generate a Rails app using DVELP's best practices."
26
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
27
+ s.version = Underlay::VERSION
28
+
29
+ s.add_dependency 'bundler', '~> 1.3'
30
+ s.add_dependency 'rails', Underlay::RAILS_VERSION
31
+
32
+ s.add_development_dependency 'rspec', '~> 3.2'
33
+ end
metadata ADDED
@@ -0,0 +1,187 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: underlay
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.50.1
5
+ platform: ruby
6
+ authors:
7
+ - dvelp
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2019-01-03 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.3'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.3'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rails
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 5.1.3
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 5.1.3
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.2'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.2'
55
+ description: 'Underlay removes the monotony of your setup, so you can spend your time
56
+ focusing above the value line.
57
+
58
+ '
59
+ email: engage@dvelp.co.uk
60
+ executables:
61
+ - underlay
62
+ extensions: []
63
+ extra_rdoc_files:
64
+ - README.md
65
+ - LICENSE
66
+ files:
67
+ - ".gitignore"
68
+ - ".rubocop.yml"
69
+ - ".ruby-version"
70
+ - CONTRIBUTING.md
71
+ - Gemfile
72
+ - LICENSE
73
+ - README.md
74
+ - RELEASING.md
75
+ - Rakefile
76
+ - USAGE
77
+ - bin/rake
78
+ - bin/rspec
79
+ - bin/setup
80
+ - bin/underlay
81
+ - circle.yml
82
+ - lib/underlay.rb
83
+ - lib/underlay/actions.rb
84
+ - lib/underlay/adapters/heroku.rb
85
+ - lib/underlay/app_builder.rb
86
+ - lib/underlay/generators/app_generator.rb
87
+ - lib/underlay/generators/enforce_ssl_generator.rb
88
+ - lib/underlay/generators/initialize_active_job_generator.rb
89
+ - lib/underlay/generators/static_generator.rb
90
+ - lib/underlay/generators/stylesheet_base_generator.rb
91
+ - lib/underlay/version.rb
92
+ - spec/adapters/heroku_spec.rb
93
+ - spec/fakes/bin/heroku
94
+ - spec/fakes/bin/hub
95
+ - spec/features/cli_help_spec.rb
96
+ - spec/features/github_spec.rb
97
+ - spec/features/heroku_spec.rb
98
+ - spec/features/new_project_spec.rb
99
+ - spec/spec_helper.rb
100
+ - spec/support/fake_github.rb
101
+ - spec/support/fake_heroku.rb
102
+ - spec/support/underlay.rb
103
+ - templates/Gemfile.erb
104
+ - templates/Procfile
105
+ - templates/README.md.erb
106
+ - templates/_analytics.html.slim
107
+ - templates/_css_overrides.html.slim
108
+ - templates/_flashes.html.slim
109
+ - templates/_flashes.scss
110
+ - templates/_javascript.html.slim
111
+ - templates/action_mailer.rb
112
+ - templates/active_job.rb
113
+ - templates/app.json.erb
114
+ - templates/application.example.yml
115
+ - templates/application.scss
116
+ - templates/bin_deploy
117
+ - templates/bin_rake
118
+ - templates/bin_setup
119
+ - templates/bin_setup_review_app.erb
120
+ - templates/bin_update
121
+ - templates/browserslist
122
+ - templates/bundler_audit.rake
123
+ - templates/capybara.rb
124
+ - templates/circle.yml.erb
125
+ - templates/config_locales_en.yml.erb
126
+ - templates/database_cleaner_rspec.rb
127
+ - templates/dev.rake
128
+ - templates/dvelp_gitignore
129
+ - templates/dvelp_layout.html.slim
130
+ - templates/errors.rb
131
+ - templates/factories.rb
132
+ - templates/factory_bot_rspec.rb
133
+ - templates/flashes_helper.rb
134
+ - templates/i18n.rb
135
+ - templates/json_encoding.rb
136
+ - templates/lograge.rb
137
+ - templates/postgresql_database.yml.erb
138
+ - templates/puma.rb
139
+ - templates/rack_mini_profiler.rb
140
+ - templates/rails_helper.rb
141
+ - templates/rubocop.yml.erb
142
+ - templates/scss-lint.yml.erb
143
+ - templates/secrets.yml
144
+ - templates/sentry.rb
145
+ - templates/shoulda_matchers_config_rspec.rb
146
+ - templates/sidekiq.yml
147
+ - templates/slim-lint.yml.erb
148
+ - templates/smtp.rb
149
+ - templates/spec_helper.rb
150
+ - underlay.gemspec
151
+ homepage: http://github.com/DVELP/underlay
152
+ licenses:
153
+ - MIT
154
+ metadata: {}
155
+ post_install_message:
156
+ rdoc_options:
157
+ - "--charset=UTF-8"
158
+ require_paths:
159
+ - lib
160
+ required_ruby_version: !ruby/object:Gem::Requirement
161
+ requirements:
162
+ - - ">="
163
+ - !ruby/object:Gem::Version
164
+ version: 2.5.1
165
+ required_rubygems_version: !ruby/object:Gem::Requirement
166
+ requirements:
167
+ - - ">="
168
+ - !ruby/object:Gem::Version
169
+ version: '0'
170
+ requirements: []
171
+ rubyforge_project:
172
+ rubygems_version: 2.7.6
173
+ signing_key:
174
+ specification_version: 4
175
+ summary: Generate a Rails app using DVELP's best practices.
176
+ test_files:
177
+ - spec/adapters/heroku_spec.rb
178
+ - spec/fakes/bin/heroku
179
+ - spec/fakes/bin/hub
180
+ - spec/features/cli_help_spec.rb
181
+ - spec/features/github_spec.rb
182
+ - spec/features/heroku_spec.rb
183
+ - spec/features/new_project_spec.rb
184
+ - spec/spec_helper.rb
185
+ - spec/support/fake_github.rb
186
+ - spec/support/fake_heroku.rb
187
+ - spec/support/underlay.rb