effective_developer 0.2.14 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/effective_developer/version.rb +1 -1
- data/lib/generators/effective/helpers.rb +8 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bf305c231784d1c6bce30322420dc57cf142f28a
|
4
|
+
data.tar.gz: d65e5ccd3796a73b487cffd2d6b76e28fa028371
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f429b820f1e2efac22656c02cb4efee990c2df168d8d8a65621eb9cb4bb294aa14c6170e3cc16266b8efa8032d9ddbb68dc59db79e41cc2a47408739fe1f5f65
|
7
|
+
data.tar.gz: 11bb3454c678fb367542478eaa4d946a22f5d3f29f8d80201b1d4a011ea20d3afe0c44a6debedd9c6042a5fd834ea454a9a37231b0f3d937d49607d26e93f893
|
@@ -54,7 +54,14 @@ module Effective
|
|
54
54
|
klass_attributes = resource.klass_attributes(all: all)
|
55
55
|
|
56
56
|
if klass_attributes.blank?
|
57
|
-
|
57
|
+
|
58
|
+
if ActiveRecord::Migration.respond_to?(:check_pending!)
|
59
|
+
pending = (ActiveRecord::Migration.check_pending! rescue true)
|
60
|
+
else
|
61
|
+
pending = ActiveRecord::Migrator.new(:up, ActiveRecord::Migrator.migrations(ActiveRecord::Migrator.migrations_paths)).pending_migrations.present?
|
62
|
+
end
|
63
|
+
|
64
|
+
if pending
|
58
65
|
migrate = ask("Unable to read the attributes of #{resource.klass || resource.name}. There are pending migrations. Run db:migrate now? [y/n]")
|
59
66
|
system('bundle exec rake db:migrate') if migrate.to_s.include?('y')
|
60
67
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_developer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-07-
|
11
|
+
date: 2018-07-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|