engine_cart 0.8.2 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +8 -3
- data/Gemfile +5 -2
- data/README.md +1 -1
- data/Rakefile +4 -2
- data/lib/engine_cart/tasks/engine_cart.rake +16 -10
- data/lib/engine_cart/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f28b9c3f6915fc494c0dda7bfe3139d75dd716f1
|
4
|
+
data.tar.gz: ca16aac3634c2f2c30027d642e382424768481f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7e7b45bb1d0c0aca7730068d05fbb4641c8966414d83ae2ae5d02c128048892bcb6f0754e28485bbd5223237603f3254be114fd36c69b7f70e67267feb57839f
|
7
|
+
data.tar.gz: d0dc6729dff7a666a29c3c7b6fcdd547df12efaf8abb883003efa2047433ea2455666c769a30b4093664e4b3bafdfb73abe2cd51be028ac12286eb69bdb028f4
|
data/.travis.yml
CHANGED
@@ -1,9 +1,14 @@
|
|
1
1
|
language: ruby
|
2
2
|
sudo: false
|
3
3
|
rvm:
|
4
|
-
- 2.3.
|
4
|
+
- 2.3.1
|
5
5
|
|
6
6
|
matrix:
|
7
7
|
include:
|
8
|
-
- rvm: '2.2.
|
9
|
-
env: "RAILS_VERSION=4.1.
|
8
|
+
- rvm: '2.2.5'
|
9
|
+
env: "RAILS_VERSION=4.1.15"
|
10
|
+
- rvm: '2.2.5'
|
11
|
+
env: "RAILS_VERSION=4.2.6"
|
12
|
+
|
13
|
+
env:
|
14
|
+
- "RAILS_VERSION=5.0.0"
|
data/Gemfile
CHANGED
@@ -4,5 +4,8 @@ source 'https://rubygems.org'
|
|
4
4
|
gemspec
|
5
5
|
|
6
6
|
gem 'rails', ENV['RAILS_VERSION'] if ENV['RAILS_VERSION']
|
7
|
-
|
8
|
-
|
7
|
+
|
8
|
+
if ENV['RAILS_VERSION'] && ENV['RAILS_VERSION'] < '4.2'
|
9
|
+
gem 'sass', '~> 3.2.15'
|
10
|
+
gem 'sprockets', '~> 2.11.0'
|
11
|
+
end
|
data/README.md
CHANGED
@@ -48,7 +48,7 @@ In order for your Rails engine gem to use engine_cart, some configuration is req
|
|
48
48
|
$ rake engine_cart:prepare
|
49
49
|
```
|
50
50
|
|
51
|
-
This will create
|
51
|
+
This will create `./spec/test_app_templates/lib/generators` in your engine and it will also append some code to your engine's `Gemfile`.
|
52
52
|
|
53
53
|
You only need to run this rake task once.
|
54
54
|
|
data/Rakefile
CHANGED
@@ -45,8 +45,10 @@ task :generate_test_gem => ['engine_cart:setup'] do
|
|
45
45
|
end
|
46
46
|
|
47
47
|
system "echo '\ngem \"rspec-rails\"\n' >> Gemfile"
|
48
|
-
|
49
|
-
|
48
|
+
if Gem.loaded_specs["rails"].version.to_s < '4.2'
|
49
|
+
system %Q{echo '\ngem "sass", "~> 3.2.15"\n' >> Gemfile}
|
50
|
+
system %Q{echo '\ngem "sprockets", "~> 2.11.0"\n' >> Gemfile}
|
51
|
+
end
|
50
52
|
Bundler.clean_system "bundle update --quiet"
|
51
53
|
system "echo 'require \"engine_cart/rake_task\"\n' >> Rakefile"
|
52
54
|
|
@@ -28,19 +28,23 @@ namespace :engine_cart do
|
|
28
28
|
require 'tmpdir'
|
29
29
|
require 'fileutils'
|
30
30
|
Dir.mktmpdir do |dir|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
raise "Error generating new rails app. Aborting."
|
31
|
+
# Fork into a new process to avoid polluting the current one with the partial Rails environment ...
|
32
|
+
pid = fork do
|
33
|
+
Dir.chdir dir do
|
34
|
+
require 'rails/generators'
|
35
|
+
require 'rails/generators/rails/app/app_generator'
|
36
|
+
|
37
|
+
# Using the Rails generator directly, instead of shelling out, to
|
38
|
+
# ensure we use the right version of Rails.
|
39
|
+
Rails::Generators::AppGenerator.start(['internal', '--skip_spring', EngineCart.rails_options, ("-m #{EngineCart.template}" if EngineCart.template)].compact)
|
41
40
|
end
|
41
|
+
exit 0
|
42
42
|
end
|
43
43
|
|
44
|
+
# ... and then wait for it to catch up.
|
45
|
+
_, status = Process.waitpid2 pid
|
46
|
+
exit status.exitstatus unless status.success?
|
47
|
+
|
44
48
|
Rake::Task['engine_cart:clean'].invoke if File.exist? EngineCart.destination
|
45
49
|
FileUtils.move "#{dir}/internal", "#{EngineCart.destination}"
|
46
50
|
|
@@ -122,9 +126,11 @@ namespace :engine_cart do
|
|
122
126
|
end
|
123
127
|
|
124
128
|
def within_test_app
|
129
|
+
puts "travis_fold:start:enginecart-bundler-cleanenv\r" if ENV['TRAVIS'] == 'true'
|
125
130
|
Dir.chdir(EngineCart.destination) do
|
126
131
|
Bundler.with_clean_env do
|
127
132
|
yield
|
128
133
|
end
|
129
134
|
end
|
135
|
+
puts "travis_fold:end:enginecart-bundler-cleanenv\r" if ENV['TRAVIS'] == 'true'
|
130
136
|
end
|
data/lib/engine_cart/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: engine_cart
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Beer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-07-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -110,11 +110,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
110
110
|
version: '0'
|
111
111
|
requirements: []
|
112
112
|
rubyforge_project:
|
113
|
-
rubygems_version: 2.4
|
113
|
+
rubygems_version: 2.6.4
|
114
114
|
signing_key:
|
115
115
|
specification_version: 4
|
116
116
|
summary: Helper for testing Rails Engines sanely
|
117
117
|
test_files:
|
118
118
|
- spec/integration/engine_cart_spec.rb
|
119
119
|
- spec/spec_helper.rb
|
120
|
-
has_rdoc:
|