voyage 1.0 → 1.44.0.1
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/.travis.yml +1 -1
- data/NEWS.md +40 -1
- data/README.md +3 -10
- data/RELEASING.md +1 -1
- data/bin/voyage +25 -14
- data/lib/suspenders.rb +1 -0
- data/lib/suspenders/adapters/heroku.rb +11 -20
- data/lib/suspenders/app_builder.rb +27 -27
- data/lib/suspenders/generators/app_generator.rb +7 -33
- data/lib/suspenders/generators/static_generator.rb +1 -0
- data/lib/suspenders/generators/stylesheet_base_generator.rb +37 -0
- data/lib/suspenders/version.rb +2 -2
- data/lib/voyage.rb +2 -0
- data/lib/voyage/README.md +22 -0
- data/lib/voyage/app_builder.rb +61 -62
- data/lib/voyage/generators/app_generator.rb +11 -6
- data/lib/voyage/templates/Gemfile.erb +17 -15
- data/lib/voyage/templates/rails_helper.rb.erb +1 -1
- data/lib/voyage/version.rb +7 -6
- data/spec/features/github_spec.rb +1 -1
- data/spec/features/heroku_spec.rb +3 -3
- data/spec/features/new_project_spec.rb +65 -39
- data/spec/support/fake_heroku.rb +2 -2
- data/suspenders.gemspec +1 -1
- data/templates/Gemfile.erb +2 -7
- data/templates/app.json.erb +0 -3
- data/templates/bin_setup_review_app.erb +8 -8
- metadata +10 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ffbb065bd31fb43879ca2cf48aef345dcd64f5c6
|
4
|
+
data.tar.gz: 76125833cc10fc3a49f2272caf765c13edd60796
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2dc5b63b2a953254ce32367bd3c9bf45976f8ea9184fa43aeb8c72bc820a6b485f6d6102699dda7f44c374c9c223cbfc5a613397e50a3051662986b5afd829dc
|
7
|
+
data.tar.gz: ca0aa81041d38481db639bbea81c42484802019561dd953e2c3bb00867a052c944ec97f92b32700b066108d879328d5eae5ef4e8e93e189b113e025453087bfa
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.4.0
|
data/.travis.yml
CHANGED
data/NEWS.md
CHANGED
@@ -1,4 +1,43 @@
|
|
1
|
-
|
1
|
+
1.44.0 (January 25, 2017)
|
2
|
+
|
3
|
+
* Improve readability of `bin/setup-review-app` (#819)
|
4
|
+
* Update scripts to be `sh`-compatible (#820)
|
5
|
+
* Remove `rails_stdout_logging` gem (#818)
|
6
|
+
* Remove `12factor` gem (#817)
|
7
|
+
* Update Ruby to 2.4.0 (#814)
|
8
|
+
|
9
|
+
1.43.0 (November 8, 2016)
|
10
|
+
|
11
|
+
* Update Bourbon to 5.0.0.beta.7
|
12
|
+
* Update Neat to 2.0.0.beta.1
|
13
|
+
* Update Bitters to 1.5.0
|
14
|
+
* Drop sprockets-es6
|
15
|
+
* Bugfix: doesn’t generate unused `test/` directory
|
16
|
+
|
17
|
+
1.42.0 (July 23, 2016)
|
18
|
+
|
19
|
+
* [#784] Require refills once
|
20
|
+
* [#790] Ensure stylesheet_base generator runs with a clean bundle
|
21
|
+
* [#791] Use Rails' 5 syntax for `public_file_server.headers`
|
22
|
+
* [#792] Remove turbolinks from application.js file
|
23
|
+
|
24
|
+
1.41.0 (July 1, 2016)
|
25
|
+
|
26
|
+
* Update to Rails 5
|
27
|
+
* Drop quiet_assets
|
28
|
+
* Drop unneeded `suspenders` aliases: `--skip-test-unit`, `--skip-turbolinks`,
|
29
|
+
`--skip-bundle`. Drops `-G` that clashes with Rails’ `--skip-git` alias.
|
30
|
+
|
31
|
+
1.40.0 (June 25, 2016)
|
32
|
+
|
33
|
+
* Upgrade bourbon to 5.0.0.beta.6
|
34
|
+
* Update Neat to 1.8.0
|
35
|
+
* `APPLICATION_HOST` bug fix in production environment (was used before it was
|
36
|
+
defined)
|
37
|
+
* Update comment around Pipelines: it is now a Heroku core plugin
|
38
|
+
* Drop unneeded `WEB_CONCURRENCY` from `app.json` file
|
39
|
+
* Introduce a `suspenders:stylesheet_base` generator. The `application.scss`
|
40
|
+
must list the imports in a specific order. This removes the `application.css`.
|
2
41
|
|
3
42
|
1.39.0 (May 25, 2016)
|
4
43
|
|
data/README.md
CHANGED
@@ -74,13 +74,11 @@ And development gems like:
|
|
74
74
|
pre-loading
|
75
75
|
* [Web Console](https://github.com/rails/web-console) for better debugging via
|
76
76
|
in-browser IRB consoles.
|
77
|
-
* [Quiet Assets](https://github.com/evrone/quiet_assets) for muting assets
|
78
|
-
pipeline log messages
|
79
77
|
|
80
78
|
And testing gems like:
|
81
79
|
|
82
80
|
* [Capybara](https://github.com/jnicklas/capybara) and
|
83
|
-
[Capybara
|
81
|
+
[Capybara WebKit](https://github.com/thoughtbot/capybara-webkit) for
|
84
82
|
integration testing
|
85
83
|
* [Factory Girl](https://github.com/thoughtbot/factory_girl) for test data
|
86
84
|
* [Formulaic](https://github.com/thoughtbot/formulaic) for integration testing
|
@@ -131,13 +129,8 @@ This:
|
|
131
129
|
* Sets them as `staging` and `production` Git remotes
|
132
130
|
* Configures staging with `RACK_ENV` environment variable set
|
133
131
|
to `staging`
|
134
|
-
* Adds the [Rails Stdout Logging][logging-gem] gem
|
135
|
-
to configure the app to log to standard out,
|
136
|
-
which is how [Heroku's logging][heroku-logging] works.
|
137
132
|
* Creates a [Heroku Pipeline] for review apps
|
138
133
|
|
139
|
-
[logging-gem]: https://github.com/heroku/rails_stdout_logging
|
140
|
-
[heroku-logging]: https://devcenter.heroku.com/articles/logging#writing-to-your-log
|
141
134
|
[Heroku Pipeline]: https://devcenter.heroku.com/articles/pipelines
|
142
135
|
|
143
136
|
You can optionally specify alternate Heroku flags:
|
@@ -187,10 +180,10 @@ installed on your machine before generating an app with Suspenders.
|
|
187
180
|
Use [OS X GCC Installer](https://github.com/kennethreitz/osx-gcc-installer/) for
|
188
181
|
Snow Leopard (OS X 10.6).
|
189
182
|
|
190
|
-
Use [Command Line Tools for
|
183
|
+
Use [Command Line Tools for Xcode](https://developer.apple.com/downloads/index.action)
|
191
184
|
for Lion (OS X 10.7) or Mountain Lion (OS X 10.8).
|
192
185
|
|
193
|
-
We use [Capybara
|
186
|
+
We use [Capybara WebKit](https://github.com/thoughtbot/capybara-webkit) for
|
194
187
|
full-stack JavaScript integration testing. It requires QT. Instructions for
|
195
188
|
installing QT are
|
196
189
|
[here](https://github.com/thoughtbot/capybara-webkit/wiki/Installing-Qt-and-compiling-capybara-webkit).
|
data/RELEASING.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
2. Update `NEWS.md` to reflect the changes since last release.
|
5
5
|
3. Commit changes. There shouldn't be code changes, and thus CI doesn't need to
|
6
6
|
run, you can then add `[ci skip]` to the commit message.
|
7
|
-
4. Tag the release: `git tag vVERSION -a`. The tag message should contain the
|
7
|
+
4. Tag the release: `git tag vVERSION -a -s`. The tag message should contain the
|
8
8
|
appropriate `NEWS.md` subsection.
|
9
9
|
5. Push changes: `git push --tags`
|
10
10
|
6. Build and publish to rubygems:
|
data/bin/voyage
CHANGED
@@ -1,20 +1,31 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
require 'pathname'
|
3
2
|
|
4
|
-
|
5
|
-
$LOAD_PATH << source_path
|
3
|
+
rails_installed=`gem query --name-matches '^rails$' --installed`
|
6
4
|
|
7
|
-
|
8
|
-
require '
|
5
|
+
if rails_installed.chomp == 'true'
|
6
|
+
require 'pathname'
|
9
7
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
8
|
+
source_path = (Pathname.new(__FILE__).dirname + '../lib').expand_path
|
9
|
+
$LOAD_PATH << source_path
|
10
|
+
|
11
|
+
require 'voyage'
|
14
12
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
13
|
+
if ARGV.empty?
|
14
|
+
puts "Please provide a path for the new application"
|
15
|
+
puts
|
16
|
+
puts "See --help for more info"
|
17
|
+
exit 0
|
18
|
+
elsif ['-v', '--version'].include? ARGV[0]
|
19
|
+
puts Voyage::VERSION
|
20
|
+
exit 0
|
21
|
+
end
|
19
22
|
|
20
|
-
|
23
|
+
templates_root = File.expand_path(File.join("..", "templates"), File.dirname(__FILE__))
|
24
|
+
template_additions = File.expand_path(File.join("..", "lib/voyage/templates"), File.dirname(__FILE__))
|
25
|
+
Suspenders::AppGenerator.source_root templates_root
|
26
|
+
Suspenders::AppGenerator.source_paths << Rails::Generators::AppGenerator.source_root << template_additions << templates_root
|
27
|
+
|
28
|
+
Suspenders::AppGenerator.start
|
29
|
+
else
|
30
|
+
puts "Please install Rails in the desired gemset before continuing..."
|
31
|
+
end
|
data/lib/suspenders.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'suspenders/version'
|
2
2
|
require 'suspenders/generators/app_generator'
|
3
3
|
require 'suspenders/generators/static_generator'
|
4
|
+
require 'suspenders/generators/stylesheet_base_generator'
|
4
5
|
require 'suspenders/actions'
|
5
6
|
require "suspenders/adapters/heroku"
|
6
7
|
require 'suspenders/app_builder'
|
@@ -6,7 +6,7 @@ module Suspenders
|
|
6
6
|
end
|
7
7
|
|
8
8
|
def set_heroku_remotes
|
9
|
-
remotes =
|
9
|
+
remotes = <<~SHELL
|
10
10
|
#{command_to_join_heroku_app('staging')}
|
11
11
|
#{command_to_join_heroku_app('production')}
|
12
12
|
|
@@ -51,9 +51,9 @@ module Suspenders
|
|
51
51
|
end
|
52
52
|
|
53
53
|
def create_heroku_pipeline
|
54
|
-
pipelines_plugin = `heroku
|
54
|
+
pipelines_plugin = `heroku help | grep pipelines`
|
55
55
|
if pipelines_plugin.empty?
|
56
|
-
puts "You need heroku pipelines plugin. Run:
|
56
|
+
puts "You need heroku pipelines plugin. Run: brew upgrade heroku-toolbelt"
|
57
57
|
exit 1
|
58
58
|
end
|
59
59
|
|
@@ -70,15 +70,6 @@ module Suspenders
|
|
70
70
|
)
|
71
71
|
end
|
72
72
|
|
73
|
-
def set_heroku_serve_static_files
|
74
|
-
%w(staging production).each do |environment|
|
75
|
-
run_toolbelt_command(
|
76
|
-
"config:add RAILS_SERVE_STATIC_FILES=true",
|
77
|
-
environment,
|
78
|
-
)
|
79
|
-
end
|
80
|
-
end
|
81
|
-
|
82
73
|
def set_heroku_application_host
|
83
74
|
%w(staging production).each do |environment|
|
84
75
|
run_toolbelt_command(
|
@@ -94,14 +85,14 @@ module Suspenders
|
|
94
85
|
|
95
86
|
def command_to_join_heroku_app(environment)
|
96
87
|
heroku_app_name = heroku_app_name_for(environment)
|
97
|
-
|
98
|
-
|
99
|
-
if heroku join --app #{heroku_app_name}
|
100
|
-
|
101
|
-
|
102
|
-
else
|
103
|
-
|
104
|
-
fi
|
88
|
+
<<~SHELL
|
89
|
+
|
90
|
+
if heroku join --app #{heroku_app_name} > /dev/null 2>&1; then
|
91
|
+
git remote add #{environment} git@heroku.com:#{heroku_app_name}.git || true
|
92
|
+
printf 'You are a collaborator on the "#{heroku_app_name}" Heroku app\n'
|
93
|
+
else
|
94
|
+
printf 'Ask for access to the "#{heroku_app_name}" Heroku app\n'
|
95
|
+
fi
|
105
96
|
SHELL
|
106
97
|
end
|
107
98
|
|
@@ -13,8 +13,7 @@ module Suspenders
|
|
13
13
|
:create_review_apps_setup_script,
|
14
14
|
:set_heroku_rails_secrets,
|
15
15
|
:set_heroku_remotes,
|
16
|
-
:set_heroku_application_host
|
17
|
-
:set_heroku_serve_static_files
|
16
|
+
:set_heroku_application_host
|
18
17
|
|
19
18
|
def readme
|
20
19
|
template 'README.md.erb', 'README.md'
|
@@ -44,6 +43,14 @@ module Suspenders
|
|
44
43
|
'raise_delivery_errors = false', 'raise_delivery_errors = true'
|
45
44
|
end
|
46
45
|
|
46
|
+
def remove_turbolinks
|
47
|
+
replace_in_file(
|
48
|
+
"app/assets/javascripts/application.js",
|
49
|
+
"//= require turbolinks",
|
50
|
+
""
|
51
|
+
)
|
52
|
+
end
|
53
|
+
|
47
54
|
def set_test_delivery_method
|
48
55
|
inject_into_file(
|
49
56
|
"config/environments/development.rb",
|
@@ -79,7 +86,7 @@ module Suspenders
|
|
79
86
|
|
80
87
|
def configure_quiet_assets
|
81
88
|
config = <<-RUBY
|
82
|
-
config.
|
89
|
+
config.assets.quiet = true
|
83
90
|
RUBY
|
84
91
|
|
85
92
|
inject_into_class "config/application.rb", "Application", config
|
@@ -99,7 +106,7 @@ module Suspenders
|
|
99
106
|
|
100
107
|
config.generators do |generate|
|
101
108
|
generate.helper false
|
102
|
-
generate.
|
109
|
+
generate.javascripts false
|
103
110
|
generate.request_specs false
|
104
111
|
generate.routing_specs false
|
105
112
|
generate.stylesheets false
|
@@ -142,14 +149,19 @@ module Suspenders
|
|
142
149
|
|
143
150
|
def enable_rack_canonical_host
|
144
151
|
config = <<-RUBY
|
145
|
-
|
152
|
+
|
153
|
+
if ENV.fetch("HEROKU_APP_NAME", "").include?("staging-pr-")
|
146
154
|
ENV["APPLICATION_HOST"] = ENV["HEROKU_APP_NAME"] + ".herokuapp.com"
|
147
155
|
end
|
148
156
|
|
149
157
|
config.middleware.use Rack::CanonicalHost, ENV.fetch("APPLICATION_HOST")
|
150
158
|
RUBY
|
151
159
|
|
152
|
-
|
160
|
+
inject_into_file(
|
161
|
+
"config/environments/production.rb",
|
162
|
+
config,
|
163
|
+
after: "Rails.application.configure do",
|
164
|
+
)
|
153
165
|
end
|
154
166
|
|
155
167
|
def enable_rack_deflater
|
@@ -165,10 +177,13 @@ if ENV.fetch("HEROKU_APP_NAME", "").include?("staging-pr-")
|
|
165
177
|
"config.assets.version = '1.0'",
|
166
178
|
'config.assets.version = (ENV["ASSETS_VERSION"] || "1.0")'
|
167
179
|
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
180
|
+
config = <<-EOD
|
181
|
+
config.public_file_server.headers = {
|
182
|
+
"Cache-Control" => "public, max-age=31557600",
|
183
|
+
}
|
184
|
+
EOD
|
185
|
+
|
186
|
+
configure_environment("production", config)
|
172
187
|
end
|
173
188
|
|
174
189
|
def setup_secret_token
|
@@ -310,29 +325,14 @@ Rack::Timeout.timeout = (ENV["RACK_TIMEOUT"] || 10).to_i
|
|
310
325
|
generate 'rspec:install'
|
311
326
|
end
|
312
327
|
|
313
|
-
def
|
314
|
-
copy_file "puma.rb", "config/puma.rb"
|
328
|
+
def replace_default_puma_configuration
|
329
|
+
copy_file "puma.rb", "config/puma.rb", force: true
|
315
330
|
end
|
316
331
|
|
317
332
|
def set_up_forego
|
318
333
|
copy_file "Procfile", "Procfile"
|
319
334
|
end
|
320
335
|
|
321
|
-
def setup_stylesheets
|
322
|
-
remove_file "app/assets/stylesheets/application.css"
|
323
|
-
copy_file "application.scss",
|
324
|
-
"app/assets/stylesheets/application.scss"
|
325
|
-
end
|
326
|
-
|
327
|
-
def install_refills
|
328
|
-
generate "refills:import", "flashes"
|
329
|
-
remove_dir "app/views/refills"
|
330
|
-
end
|
331
|
-
|
332
|
-
def install_bitters
|
333
|
-
run "bitters install --path app/assets/stylesheets"
|
334
|
-
end
|
335
|
-
|
336
336
|
def setup_default_directories
|
337
337
|
[
|
338
338
|
'app/views/pages',
|
@@ -14,18 +14,9 @@ module Suspenders
|
|
14
14
|
class_option :heroku_flags, type: :string, default: "",
|
15
15
|
desc: "Set extra Heroku flags"
|
16
16
|
|
17
|
-
class_option :github, type: :string,
|
17
|
+
class_option :github, type: :string, default: nil,
|
18
18
|
desc: "Create Github repository and add remote origin pointed to repo"
|
19
19
|
|
20
|
-
class_option :skip_test_unit, type: :boolean, aliases: "-T", default: true,
|
21
|
-
desc: "Skip Test::Unit files"
|
22
|
-
|
23
|
-
class_option :skip_turbolinks, type: :boolean, default: true,
|
24
|
-
desc: "Skip turbolinks gem"
|
25
|
-
|
26
|
-
class_option :skip_bundle, type: :boolean, aliases: "-B", default: true,
|
27
|
-
desc: "Don't run bundle install"
|
28
|
-
|
29
20
|
class_option :version, type: :boolean, aliases: "-v", group: :suspenders,
|
30
21
|
desc: "Show Suspenders version number and quit"
|
31
22
|
|
@@ -35,6 +26,9 @@ module Suspenders
|
|
35
26
|
class_option :path, type: :string, default: nil,
|
36
27
|
desc: "Path to the gem"
|
37
28
|
|
29
|
+
class_option :skip_test, type: :boolean, default: true,
|
30
|
+
desc: "Skip Test Unit"
|
31
|
+
|
38
32
|
def finish_template
|
39
33
|
invoke :suspenders_customization
|
40
34
|
super
|
@@ -48,9 +42,6 @@ module Suspenders
|
|
48
42
|
invoke :setup_secret_token
|
49
43
|
invoke :create_suspenders_views
|
50
44
|
invoke :configure_app
|
51
|
-
invoke :setup_stylesheets
|
52
|
-
invoke :install_bitters
|
53
|
-
invoke :install_refills
|
54
45
|
invoke :copy_miscellaneous_files
|
55
46
|
invoke :customize_error_pages
|
56
47
|
invoke :remove_config_comment_lines
|
@@ -89,6 +80,7 @@ module Suspenders
|
|
89
80
|
say 'Setting up the development environment'
|
90
81
|
build :raise_on_missing_assets_in_test
|
91
82
|
build :raise_on_delivery_errors
|
83
|
+
build :remove_turbolinks
|
92
84
|
build :set_test_delivery_method
|
93
85
|
build :add_bullet_gem_configuration
|
94
86
|
build :raise_on_unpermitted_parameters
|
@@ -145,26 +137,11 @@ module Suspenders
|
|
145
137
|
build :configure_active_job
|
146
138
|
build :configure_time_formats
|
147
139
|
build :setup_default_rake_task
|
148
|
-
build :
|
140
|
+
build :replace_default_puma_configuration
|
149
141
|
build :set_up_forego
|
150
142
|
build :setup_rack_mini_profiler
|
151
143
|
end
|
152
144
|
|
153
|
-
def setup_stylesheets
|
154
|
-
say 'Set up stylesheets'
|
155
|
-
build :setup_stylesheets
|
156
|
-
end
|
157
|
-
|
158
|
-
def install_bitters
|
159
|
-
say 'Install Bitters'
|
160
|
-
build :install_bitters
|
161
|
-
end
|
162
|
-
|
163
|
-
def install_refills
|
164
|
-
say "Install Refills"
|
165
|
-
build :install_refills
|
166
|
-
end
|
167
|
-
|
168
145
|
def setup_git
|
169
146
|
if !options[:skip_git]
|
170
147
|
say "Initializing git"
|
@@ -184,7 +161,6 @@ module Suspenders
|
|
184
161
|
if options[:heroku]
|
185
162
|
say "Creating Heroku apps"
|
186
163
|
build :create_heroku_apps, options[:heroku_flags]
|
187
|
-
build :set_heroku_serve_static_files
|
188
164
|
build :set_heroku_remotes
|
189
165
|
build :set_heroku_rails_secrets
|
190
166
|
build :set_heroku_application_host
|
@@ -247,10 +223,8 @@ module Suspenders
|
|
247
223
|
|
248
224
|
def generate_default
|
249
225
|
run("spring stop")
|
250
|
-
|
251
226
|
generate("suspenders:static")
|
252
|
-
|
253
|
-
bundle_command "install"
|
227
|
+
generate("suspenders:stylesheet_base")
|
254
228
|
end
|
255
229
|
|
256
230
|
def outro
|