katapult 0.4.0 → 0.4.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/bin/katapult +6 -3
- data/features/binary.feature +1 -1
- data/features/step_definitions/katapult_steps.rb +6 -0
- data/features/step_definitions/rails_steps.rb +3 -1
- data/features/step_definitions/version_steps.rb +0 -4
- data/lib/generators/katapult/basics/basics_generator.rb +2 -7
- data/lib/generators/katapult/basics/templates/Gemfile +1 -2
- data/lib/katapult/support/generator_goodies.rb +1 -1
- data/lib/katapult/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e300dbf1f253287be637c885c6d9c42ee23272c4e1259c1608194c744433c6d
|
4
|
+
data.tar.gz: 92e3a0218852ab314dee4de60e3e753140795031310eaa2bc90700a2b5113666
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99f96cfcd585edc21231c1d3c0d2778bbc2def2f60facdb4ffdf56f64d8498ee34eb3b6c6f751a00768a1bdc0fc690bbca3a871cf373c499c53e4a21d968171d
|
7
|
+
data.tar.gz: 48655800af8a0439cc7738c6e455e03589e6d071fe25177b652b342fdea0ce1268e1c9f88974fa21f284f64961985d8706e6888c8438740e277e27bf85a20456
|
data/bin/katapult
CHANGED
@@ -60,15 +60,18 @@ when 'new'
|
|
60
60
|
|
61
61
|
util.pink 'Installing katapult ...'
|
62
62
|
File.open('Gemfile', 'a') do |file|
|
63
|
-
file.puts "gem 'katapult'#{
|
63
|
+
file.puts "gem 'katapult', '#{ Katapult::VERSION }', group: :development #{ ENV['KATAPULT_GEMFILE_OPTIONS'] }"
|
64
64
|
end
|
65
|
-
|
65
|
+
# "update rails" ensures the application uses the Rails version that katapult
|
66
|
+
# requires (the default Gemfile lists Rails with ~>, meaning the patch level
|
67
|
+
# may mismatch). It also installs katapult.
|
68
|
+
util.run 'bundle update rails --quiet'
|
66
69
|
util.run 'bundle exec rails generate katapult:app_model'
|
67
70
|
util.git_commit 'rails generate katapult:app_model', '--quiet'
|
68
71
|
|
69
72
|
util.pink 'Generating katapult basics ...'
|
70
73
|
util.run basics_command
|
71
|
-
# Do not use `basics_command` as commit message,
|
74
|
+
# Do not use `basics_command` as commit message, it contains the db password!
|
72
75
|
util.git_commit 'rails generate katapult:basics', '--quiet'
|
73
76
|
|
74
77
|
util.pink <<-INSTRUCTIONS
|
data/features/binary.feature
CHANGED
@@ -43,7 +43,6 @@ Feature: Katapult binary `katapult`
|
|
43
43
|
Then the output should contain "Creating new Rails application"
|
44
44
|
And the output should contain "Installing katapult"
|
45
45
|
And the output should contain "Generating katapult basics"
|
46
|
-
And the output should contain the configured Rails version
|
47
46
|
|
48
47
|
And the output should contain "Application initialization done."
|
49
48
|
And the output should contain "Model your application in lib/katapult/application_model.rb"
|
@@ -52,6 +51,7 @@ Feature: Katapult binary `katapult`
|
|
52
51
|
|
53
52
|
When I cd to "binary_test"
|
54
53
|
Then the file "Gemfile" should contain "gem 'katapult'"
|
54
|
+
And the configured Rails version should be listed in the Gemfile.lock
|
55
55
|
And a file named "lib/katapult/application_model.rb" should exist
|
56
56
|
|
57
57
|
And the file "config/database.yml" should contain "username: katapult"
|
@@ -3,6 +3,12 @@
|
|
3
3
|
When 'I install katapult' do
|
4
4
|
next if @no_clobber
|
5
5
|
append_to_file 'Gemfile', "gem 'katapult', path: '../../..'"
|
6
|
+
|
7
|
+
# Make sure katapult's version of Rails is used
|
8
|
+
# Cannot use #run_simple because it already expects a working Bundler setup
|
9
|
+
Dir.chdir expand_path('.') do
|
10
|
+
Katapult::BinaryUtil.run 'bundle update rails --quiet'
|
11
|
+
end
|
6
12
|
end
|
7
13
|
|
8
14
|
When 'I generate the application model' do
|
@@ -86,8 +86,10 @@ Given 'a new Rails application with Katapult basics installed' do
|
|
86
86
|
create_app(RailsHelper::APP_WITH_BASICS)
|
87
87
|
|
88
88
|
Dir.chdir(RailsHelper::APP_WITH_BASICS) do
|
89
|
-
# :path
|
89
|
+
# :path is correct within the TEST_APP path
|
90
90
|
Katapult::BinaryUtil.run %(echo "gem 'katapult', path: '../../..'" >> Gemfile)
|
91
|
+
# Make sure katapult's version of Rails is used
|
92
|
+
Katapult::BinaryUtil.run 'bundle update rails --quiet'
|
91
93
|
Katapult::BinaryUtil.run 'bin/rails generate katapult:basics --db-user katapult --db-password secret'
|
92
94
|
# Spring running in the cache dir is of no further use, but would
|
93
95
|
# break things when the cache dir is removed
|
@@ -8,10 +8,6 @@ Then 'the configured Rails version should be listed in the Gemfile.lock' do
|
|
8
8
|
step %(the file "Gemfile.lock" should contain " rails (#{rails_version})")
|
9
9
|
end
|
10
10
|
|
11
|
-
Then 'the output should contain the configured Rails version' do
|
12
|
-
step %(the output should contain "Using rails #{Katapult::RAILS_VERSION}")
|
13
|
-
end
|
14
|
-
|
15
11
|
Then 'Capistrano should be locked to the installed version' do
|
16
12
|
cd '.' do
|
17
13
|
gemfile = File.read('Gemfile.lock')
|
@@ -43,7 +43,7 @@ module Katapult
|
|
43
43
|
end
|
44
44
|
|
45
45
|
def bundle_install
|
46
|
-
run 'bundle install'
|
46
|
+
run 'bundle install --quiet'
|
47
47
|
|
48
48
|
# Fix Bundler for parallel_tests
|
49
49
|
run 'bundle config --local disable_exec_load true'
|
@@ -180,7 +180,7 @@ config.time_zone = 'Berlin'
|
|
180
180
|
# Configure 3rd party ####################################################
|
181
181
|
|
182
182
|
def setup_spring
|
183
|
-
run 'spring binstub --all'
|
183
|
+
run 'bundle exec spring binstub --all'
|
184
184
|
|
185
185
|
# Enhance Spring config
|
186
186
|
config = 'config/spring.rb'
|
@@ -294,11 +294,6 @@ config.autoload_paths << "#{Rails.root}/app/controllers/shared"
|
|
294
294
|
template '.browserslistrc'
|
295
295
|
end
|
296
296
|
|
297
|
-
# Bundler prefers installed gems, but we want the newest versions possible
|
298
|
-
def update_gems
|
299
|
-
run 'bundle install'
|
300
|
-
end
|
301
|
-
|
302
297
|
private
|
303
298
|
|
304
299
|
def merge_rails_helper_into_spec_helper
|
@@ -8,7 +8,6 @@ gem 'webpacker'
|
|
8
8
|
|
9
9
|
# Internals and security
|
10
10
|
gem 'exception_notification'
|
11
|
-
# gem 'admin_cleaner', git: 'git@code.makandra.de:makandra/admin_cleaner.git'
|
12
11
|
|
13
12
|
# Models
|
14
13
|
gem 'active_type'
|
@@ -27,7 +26,7 @@ gem 'whenever'
|
|
27
26
|
group :development do
|
28
27
|
gem 'query_diet'
|
29
28
|
gem 'better_errors'
|
30
|
-
gem 'binding_of_caller'
|
29
|
+
gem 'binding_of_caller', '>= 0.8.0' # Fixes a bug with Ruby 2.5.0
|
31
30
|
|
32
31
|
gem 'web-console'
|
33
32
|
gem 'listen', '< 3.2'
|
data/lib/katapult/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: katapult
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dominik Schöler
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-02-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|