engine_cart 0.5.1 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3aac774bd350fd12806d5cb3f4e9b25071bb2cdc
4
- data.tar.gz: dc9794c0864bdfc4b1d38483aea6a52dd879e759
3
+ metadata.gz: 761fe334e7ab2a2b346ae57fb6e67ac6de0f6293
4
+ data.tar.gz: dccb0dfd7c3e931751848d33d1248970549c249a
5
5
  SHA512:
6
- metadata.gz: 2e31a23a24bb7465a7e23554965a7588551112963f264162620fec6c5475e9f367a7e8d1b1d325eefb4b852113c441c843dc9f43eb373813f22f643d90affb30
7
- data.tar.gz: ae9b8d8e16fc318211b8c07c65c8e98b35c33ed0ba7240991c1824a98fc9a05cd9b1a64f6c3e6fe4396b69f7c05a77937714170f03dcce13a2457135d26cbd96
6
+ metadata.gz: eaed33db29668484b7b8a7c290670ed32e7eed04ed00f87ce264fc4db88f1e8da32c4ed07372680ca294c0d1418770f3bbb9a751187f7aafadd4133ed74bcdb5
7
+ data.tar.gz: e02135843a8dc4d4cebdf66f3a5a70e8f4710082a865e39795a77ad5e4759c68f23b96f305b80f29b760f4ede46fa169a13b2f98a8610fe9d258da9d2fef1fb2
@@ -61,7 +61,8 @@ EOF
61
61
 
62
62
  desc "Create the test rails app"
63
63
  task :generate, [:fingerprint] => [:setup] do |t, args|
64
- args.with_defaults(:fingerprint => EngineCart.fingerprint) unless args[:fingerprint]
64
+ original_fingerprint = args[:fingerprint]
65
+ args.with_defaults(:fingerprint => EngineCart.fingerprint) unless original_fingerprint
65
66
 
66
67
  f = File.expand_path('.generated_engine_cart', EngineCart.destination)
67
68
  unless File.exists? f and File.read(f) == args[:fingerprint]
@@ -84,7 +85,9 @@ EOF
84
85
  system "rake db:migrate db:test:prepare"
85
86
  end
86
87
 
87
- File.open(File.expand_path('.generated_engine_cart', EngineCart.destination), 'w') { |f| f.write args[:fingerprint] }
88
+ system "bundle install"
89
+
90
+ File.open(File.expand_path('.generated_engine_cart', EngineCart.destination), 'w') { |f| f.write(original_fingerprint || EngineCart.fingerprint) }
88
91
 
89
92
  puts "Done generating test app"
90
93
  end
@@ -1,3 +1,3 @@
1
1
  module EngineCart
2
- VERSION = "0.5.1"
2
+ VERSION = "0.6.0"
3
3
  end
data/lib/engine_cart.rb CHANGED
@@ -63,6 +63,12 @@ module EngineCart
63
63
  @fingerprint_proc = fingerprint_proc
64
64
  end
65
65
 
66
+ def self.rails_fingerprint_proc extra_files = []
67
+ lambda do
68
+ (Dir.glob("./*.gemspec") + Dir.glob("./Gemfile*") + Dir.glob("./db/migrate/*") + Dir.glob("./lib/generators/**/**") + Dir.glob("./spec/test_app_templates/**/**") + extra_files).map {|f| File.mtime(f) }.max.to_s
69
+ end
70
+ end
71
+
66
72
  def self.default_fingerprint
67
73
  ""
68
74
  end
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.5.1
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Beer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-11 00:00:00.000000000 Z
11
+ date: 2015-02-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails