suspenders 1.54.1 → 1.55.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/NEWS.md +6 -0
- data/Rakefile +6 -5
- data/lib/suspenders/adapters/heroku.rb +16 -16
- data/lib/suspenders/app_builder.rb +40 -40
- data/lib/suspenders/generators/advisories_generator.rb +1 -1
- data/lib/suspenders/generators/analytics_generator.rb +1 -1
- data/lib/suspenders/generators/app_generator.rb +25 -25
- data/lib/suspenders/generators/base.rb +2 -2
- data/lib/suspenders/generators/db_optimizations_generator.rb +2 -2
- data/lib/suspenders/generators/factories_generator.rb +1 -1
- data/lib/suspenders/generators/jobs_generator.rb +3 -3
- data/lib/suspenders/generators/js_driver_generator.rb +1 -1
- data/lib/suspenders/generators/lint_generator.rb +5 -0
- data/lib/suspenders/generators/preloader_generator.rb +4 -4
- data/lib/suspenders/generators/production/compression_generator.rb +1 -1
- data/lib/suspenders/generators/production/email_generator.rb +6 -6
- data/lib/suspenders/generators/production/manifest_generator.rb +8 -8
- data/lib/suspenders/generators/production/single_redirect.rb +1 -1
- data/lib/suspenders/generators/production/timeout_generator.rb +2 -2
- data/lib/suspenders/generators/profiler_generator.rb +4 -4
- data/lib/suspenders/generators/runner_generator.rb +4 -4
- data/lib/suspenders/generators/staging/pull_requests_generator.rb +2 -2
- data/lib/suspenders/generators/stylelint_generator.rb +2 -1
- data/lib/suspenders/generators/stylesheet_base_generator.rb +1 -1
- data/lib/suspenders/generators/testing_generator.rb +2 -2
- data/lib/suspenders/version.rb +5 -5
- data/spec/adapters/heroku_spec.rb +16 -16
- data/spec/expand_json_spec.rb +9 -9
- data/spec/fakes/bin/heroku +1 -1
- data/spec/fakes/bin/hub +1 -1
- data/spec/features/cli_help_spec.rb +4 -4
- data/spec/features/heroku_spec.rb +3 -3
- data/spec/features/lint_spec.rb +26 -0
- data/spec/features/new_project_spec.rb +33 -33
- data/spec/features/production/compression_spec.rb +2 -2
- data/spec/features/production/email_spec.rb +10 -10
- data/spec/features/production/manifest_spec.rb +16 -16
- data/spec/features/production/single_redirect_spec.rb +2 -2
- data/spec/features/profiler_spec.rb +2 -2
- data/spec/features/stylelint_spec.rb +7 -7
- data/spec/spec_helper.rb +3 -3
- data/spec/support/fake_github.rb +3 -3
- data/spec/support/fake_heroku.rb +8 -8
- data/spec/support/project_files.rb +1 -1
- data/spec/support/suspenders.rb +3 -4
- data/suspenders.gemspec +20 -20
- data/templates/capybara_silence_puma.rb +1 -1
- data/templates/errors.rb +3 -3
- data/templates/hound.yml +1 -2
- data/templates/partials/ci_simplecov.rb +0 -2
- data/templates/partials/db_optimizations_configuration.rb +5 -7
- data/templates/partials/email_smtp.rb +2 -3
- data/templates/partials/pull_requests_config.rb +0 -1
- data/templates/partials/runner_setup.rb +1 -2
- data/templates/spec_helper.rb +1 -1
- data/templates/spring.rb +1 -1
- metadata +18 -2
data/spec/support/fake_github.rb
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
class FakeGithub
|
2
|
-
RECORDER = File.expand_path(File.join(
|
2
|
+
RECORDER = File.expand_path(File.join("..", "..", "tmp", "hub_commands"), File.dirname(__FILE__))
|
3
3
|
|
4
4
|
def initialize(args)
|
5
5
|
@args = args
|
6
6
|
end
|
7
7
|
|
8
8
|
def run!
|
9
|
-
File.open(RECORDER,
|
10
|
-
file.write @args.join(
|
9
|
+
File.open(RECORDER, "a") do |file|
|
10
|
+
file.write @args.join(" ")
|
11
11
|
end
|
12
12
|
end
|
13
13
|
|
data/spec/support/fake_heroku.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
class FakeHeroku
|
2
|
-
RECORDER = File.expand_path(File.join(
|
2
|
+
RECORDER = File.expand_path(File.join("..", "..", "tmp", "heroku_commands"), File.dirname(__FILE__))
|
3
3
|
|
4
4
|
def initialize(args)
|
5
5
|
@args = args
|
@@ -9,8 +9,8 @@ class FakeHeroku
|
|
9
9
|
if @args.first == "help"
|
10
10
|
puts "pipelines # manage collections of apps in pipelines"
|
11
11
|
end
|
12
|
-
File.open(RECORDER,
|
13
|
-
file.puts @args.join(
|
12
|
+
File.open(RECORDER, "a") do |file|
|
13
|
+
file.puts @args.join(" ")
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
@@ -19,7 +19,7 @@ class FakeHeroku
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def self.has_gem_included?(project_path, gem_name)
|
22
|
-
gemfile = File.open(File.join(project_path,
|
22
|
+
gemfile = File.open(File.join(project_path, "Gemfile"), "a")
|
23
23
|
|
24
24
|
File.foreach(gemfile).any? do |line|
|
25
25
|
line.match(/#{Regexp.quote(gem_name)}/)
|
@@ -30,10 +30,10 @@ class FakeHeroku
|
|
30
30
|
app_name = "#{SuspendersTestHelpers::APP_NAME.dasherize}-#{environment}"
|
31
31
|
|
32
32
|
command = if flags
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
33
|
+
"create #{app_name} #{flags} --remote #{environment}\n"
|
34
|
+
else
|
35
|
+
"create #{app_name} --remote #{environment}\n"
|
36
|
+
end
|
37
37
|
|
38
38
|
File.foreach(RECORDER).any? { |line| line == command }
|
39
39
|
end
|
data/spec/support/suspenders.rb
CHANGED
@@ -88,7 +88,7 @@ module SuspendersTestHelpers
|
|
88
88
|
end
|
89
89
|
|
90
90
|
def add_fakes_to_path
|
91
|
-
ENV["PATH"] = "#{support_bin}:#{ENV[
|
91
|
+
ENV["PATH"] = "#{support_bin}:#{ENV["PATH"]}"
|
92
92
|
end
|
93
93
|
|
94
94
|
def project_path
|
@@ -106,7 +106,7 @@ module SuspendersTestHelpers
|
|
106
106
|
end
|
107
107
|
|
108
108
|
def suspenders_bin
|
109
|
-
File.join(root_path,
|
109
|
+
File.join(root_path, "bin", "suspenders")
|
110
110
|
end
|
111
111
|
|
112
112
|
def system_rails_bin
|
@@ -122,7 +122,7 @@ module SuspendersTestHelpers
|
|
122
122
|
end
|
123
123
|
|
124
124
|
def root_path
|
125
|
-
File.expand_path(
|
125
|
+
File.expand_path("../../../", __FILE__)
|
126
126
|
end
|
127
127
|
|
128
128
|
def rails_template_path
|
@@ -144,7 +144,6 @@ module SuspendersTestHelpers
|
|
144
144
|
ENV[name] = new_value.to_s
|
145
145
|
|
146
146
|
yield
|
147
|
-
|
148
147
|
ensure
|
149
148
|
ENV.delete(name)
|
150
149
|
|
data/suspenders.gemspec
CHANGED
@@ -1,35 +1,35 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
require
|
4
|
-
require 'date'
|
1
|
+
$:.push File.expand_path("../lib", __FILE__)
|
2
|
+
require "suspenders/version"
|
3
|
+
require "date"
|
5
4
|
|
6
5
|
Gem::Specification.new do |s|
|
7
6
|
s.required_ruby_version = ">= #{Suspenders::RUBY_VERSION}"
|
8
7
|
s.required_rubygems_version = ">= 2.7.4"
|
9
|
-
s.authors = [
|
10
|
-
s.date = Date.today.strftime(
|
8
|
+
s.authors = ["thoughtbot"]
|
9
|
+
s.date = Date.today.strftime("%Y-%m-%d")
|
11
10
|
|
12
|
-
s.description =
|
13
|
-
Suspenders is a base Rails project that you can upgrade. It is used by
|
14
|
-
thoughtbot to get a jump start on a working app. Use Suspenders if you're in a
|
15
|
-
rush to build something amazing; don't use it if you like missing deadlines.
|
11
|
+
s.description = <<~HERE
|
12
|
+
Suspenders is a base Rails project that you can upgrade. It is used by
|
13
|
+
thoughtbot to get a jump start on a working app. Use Suspenders if you're in a
|
14
|
+
rush to build something amazing; don't use it if you like missing deadlines.
|
16
15
|
HERE
|
17
16
|
|
18
|
-
s.email =
|
19
|
-
s.executables = [
|
17
|
+
s.email = "support@thoughtbot.com"
|
18
|
+
s.executables = ["suspenders"]
|
20
19
|
s.extra_rdoc_files = %w[README.md LICENSE]
|
21
20
|
s.files = `git ls-files`.split("\n")
|
22
|
-
s.homepage =
|
23
|
-
s.license =
|
24
|
-
s.name =
|
25
|
-
s.rdoc_options = [
|
26
|
-
s.require_paths = [
|
21
|
+
s.homepage = "http://github.com/thoughtbot/suspenders"
|
22
|
+
s.license = "MIT"
|
23
|
+
s.name = "suspenders"
|
24
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
25
|
+
s.require_paths = ["lib"]
|
27
26
|
s.summary = "Generate a Rails app using thoughtbot's best practices."
|
28
27
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
29
28
|
s.version = Suspenders::VERSION
|
30
29
|
|
31
|
-
s.add_dependency
|
32
|
-
s.add_dependency
|
30
|
+
s.add_dependency "bitters", ">= 2.0.4"
|
31
|
+
s.add_dependency "rails", Suspenders::RAILS_VERSION
|
33
32
|
|
34
|
-
s.add_development_dependency
|
33
|
+
s.add_development_dependency "rspec", "~> 3.2"
|
34
|
+
s.add_development_dependency "standard"
|
35
35
|
end
|
@@ -1 +1 @@
|
|
1
|
-
Capybara.server = :puma, {
|
1
|
+
Capybara.server = :puma, {Silent: true}
|
data/templates/errors.rb
CHANGED
@@ -15,7 +15,7 @@ HTTP_ERRORS = [
|
|
15
15
|
Net::HTTPBadResponse,
|
16
16
|
Net::HTTPHeaderSyntaxError,
|
17
17
|
Net::ProtocolError,
|
18
|
-
Timeout::Error
|
18
|
+
Timeout::Error
|
19
19
|
]
|
20
20
|
|
21
21
|
SMTP_SERVER_ERRORS = [
|
@@ -23,12 +23,12 @@ SMTP_SERVER_ERRORS = [
|
|
23
23
|
Net::SMTPAuthenticationError,
|
24
24
|
Net::SMTPServerBusy,
|
25
25
|
Net::SMTPUnknownError,
|
26
|
-
Timeout::Error
|
26
|
+
Timeout::Error
|
27
27
|
]
|
28
28
|
|
29
29
|
SMTP_CLIENT_ERRORS = [
|
30
30
|
Net::SMTPFatalError,
|
31
|
-
Net::SMTPSyntaxError
|
31
|
+
Net::SMTPSyntaxError
|
32
32
|
]
|
33
33
|
|
34
34
|
SMTP_ERRORS = SMTP_SERVER_ERRORS + SMTP_CLIENT_ERRORS
|
data/templates/hound.yml
CHANGED
@@ -1,3 +1,2 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
config.action_mailer.smtp_settings = SMTP_SETTINGS
|
1
|
+
config.action_mailer.delivery_method = :smtp
|
2
|
+
config.action_mailer.smtp_settings = SMTP_SETTINGS
|
data/templates/spec_helper.rb
CHANGED
data/templates/spring.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: suspenders
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.55.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- thoughtbot
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-07-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bitters
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '3.2'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: standard
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
55
69
|
description: |
|
56
70
|
Suspenders is a base Rails project that you can upgrade. It is used by
|
57
71
|
thoughtbot to get a jump start on a working app. Use Suspenders if you're in a
|
@@ -128,6 +142,7 @@ files:
|
|
128
142
|
- spec/features/heroku_spec.rb
|
129
143
|
- spec/features/inline_svg_spec.rb
|
130
144
|
- spec/features/json_spec.rb
|
145
|
+
- spec/features/lint_spec.rb
|
131
146
|
- spec/features/new_project_spec.rb
|
132
147
|
- spec/features/preloader_spec.rb
|
133
148
|
- spec/features/production/compression_spec.rb
|
@@ -266,6 +281,7 @@ test_files:
|
|
266
281
|
- spec/features/heroku_spec.rb
|
267
282
|
- spec/features/inline_svg_spec.rb
|
268
283
|
- spec/features/json_spec.rb
|
284
|
+
- spec/features/lint_spec.rb
|
269
285
|
- spec/features/new_project_spec.rb
|
270
286
|
- spec/features/preloader_spec.rb
|
271
287
|
- spec/features/production/compression_spec.rb
|