shoestring 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/shoestring/bundler.rb +1 -0
- data/lib/shoestring/migration.rb +5 -1
- data/lib/shoestring/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 949f2b79060b65c943945085af1980871b57a4d4
|
4
|
+
data.tar.gz: b9aa3a18e812180ea7e5092e38cf2c3b1f9b81a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 55d15870a984daea28801ee67843cb9fb17a8209fcd2842e3db56ed65d80e0592575cd4c26650fcb8249a3ca1893d8f47b884eeb7e520c1d1c22a07fdf98ecca
|
7
|
+
data.tar.gz: 27e59e7bd96d312c1825c17e0e9d17dcd4128846b735d8f473849193e193a2fc4ce573f9bbc7f1877cc0f85f31c49165ce721d4abb6890e8d2d0fc8e908d544c
|
data/lib/shoestring/bundler.rb
CHANGED
@@ -22,6 +22,7 @@ module Shoestring
|
|
22
22
|
Shoestring::Cache.check(:bundle) do |old_version|
|
23
23
|
version = File.read('Gemfile') + File.read('Gemfile.lock')
|
24
24
|
if old_version != version
|
25
|
+
puts "Bundle out of date. Updating..."
|
25
26
|
system('bundle install --quiet') || abort('Failed to bundle install')
|
26
27
|
end
|
27
28
|
version
|
data/lib/shoestring/migration.rb
CHANGED
@@ -20,7 +20,11 @@ module Shoestring
|
|
20
20
|
|
21
21
|
def check_schema
|
22
22
|
Shoestring::Cache.check(:schema) do |old_version|
|
23
|
-
|
23
|
+
if File.exist?("db/schema.rb")
|
24
|
+
version = File.readlines("db/schema.rb").find { |line| line.include?("define(:version") }
|
25
|
+
else
|
26
|
+
version = File.readlines("db/structure.sql").last
|
27
|
+
end
|
24
28
|
if old_version != version
|
25
29
|
system("bundle exec rake db:migrate") || abort("bundle exec rake db:migrate failed")
|
26
30
|
end
|
data/lib/shoestring/version.rb
CHANGED