ez 1.9.7 → 1.9.8

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 888c9584bdd08b681a8300e69baa9b7166e7f1bc
4
- data.tar.gz: e7ff33d0474abed6031cf8327c9b956ea9a1306b
3
+ metadata.gz: 10e01d20bdfd9bbe6abf45a8359897b8ebb174f3
4
+ data.tar.gz: 96e040a4cf677bbb9465e42ec9191eda378e05b6
5
5
  SHA512:
6
- metadata.gz: 18273ba4de10cf95e7ae545a7cbf31b02f82da4ade014dbc36aec547674808141c904aa0609954f4bed68ff8fc8188b1d7457d430cc657aad95cb55da62d6236
7
- data.tar.gz: e8975482ea978cf42e13175121c6e3c0e61a4caf02a46c9f4dd6c4c52fa0cd1adcab205a04310ebc8f2ef1f8ed065ece3db1182b01101246e27793eea4889713
6
+ metadata.gz: 56687ce37e1d22e957a492425ceaaa441e18791d094bd607fd67fe597e9e5a4d4052984eb2e31d689f841003688598fc23c54a56abc1bc5e2ab0e4f6f012277d
7
+ data.tar.gz: 89b96b092e5727a5d775bb4dbe86760cef24a06f96fa63f2922702d77e73130839995ac6299268a89efb7024d46b9239ef7f1af8bb073bb49c406978dada02fb
@@ -21,11 +21,15 @@ module EZ
21
21
  tables.map { |t| t.classify }
22
22
  end
23
23
 
24
- def self.should_migrate?(models_yml)
24
+ def self.should_migrate?(models_yml = nil)
25
+ models_yml ||= File.join(Rails.root, 'db', 'models.yml')
26
+ return false unless File.exist?(models_yml)
27
+
25
28
  schema_rb = File.join(Rails.root, 'db', 'schema.rb')
29
+ sqlite_db = File.join(Rails.root, 'db', "#{Rails.env}.sqlite3")
26
30
  !(Rails.env.development? || Rails.env.test?) ||
27
- (!File.exist?(schema_rb)) ||
28
- (File.mtime(schema_rb) < File.mtime(models_yml))
31
+ (!File.exist?(schema_rb) || (File.mtime(schema_rb) < File.mtime(models_yml))) ||
32
+ (!File.exist?(sqlite_db) || (File.mtime(sqlite_db) < File.mtime(models_yml)))
29
33
  end
30
34
 
31
35
  def self.automigrate
@@ -1,3 +1,3 @@
1
1
  module EZ
2
- VERSION = "1.9.7"
2
+ VERSION = "1.9.8"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ez
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.7
4
+ version: 1.9.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff Cohen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-29 00:00:00.000000000 Z
11
+ date: 2018-02-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: awesome_print