old_sql 0.15.0 → 0.16.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/generators/old_sql/install_generator.rb +9 -18
- metadata +2 -2
@@ -14,11 +14,7 @@ Old SQL works with devise. Checking for a current installation of devise!
|
|
14
14
|
app_path.delete_at(-1)
|
15
15
|
app_path = app_path.join("/")
|
16
16
|
|
17
|
-
|
18
|
-
puts "User model exists"
|
19
|
-
end
|
20
|
-
|
21
|
-
puts "User model at #{app_path+'/app/models/user.rb'} exists? #{File.exists?(app_path+'/app/models/user.rb')}"
|
17
|
+
puts "User model exists" unless open(app_path+'/db/schema.rb').grep(/users/).count<=0
|
22
18
|
|
23
19
|
if defined?(Devise)
|
24
20
|
check_for_devise_models
|
@@ -61,28 +57,23 @@ Old SQL works with devise. Checking for a current installation of devise!
|
|
61
57
|
app_path.delete_at(-1)
|
62
58
|
app_path = app_path.join("/")
|
63
59
|
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
user_found = true
|
60
|
+
if open(app_path+'/db/schema.rb').grep(/users/).count<=0
|
61
|
+
return true
|
62
|
+
else
|
63
|
+
return false
|
69
64
|
end
|
70
|
-
|
71
|
-
user_found
|
72
65
|
end
|
73
66
|
|
74
67
|
def user_model_has_devise?
|
75
|
-
devise_found = false
|
76
|
-
|
77
68
|
app_path = Rails.public_path.split("/")
|
78
69
|
app_path.delete_at(-1)
|
79
70
|
app_path = app_path.join("/")
|
80
71
|
|
81
|
-
|
82
|
-
|
83
|
-
|
72
|
+
if open(app_path+'/app/models/user.rb').grep(/devise/).count<=0
|
73
|
+
return true
|
74
|
+
else
|
75
|
+
return false
|
84
76
|
end
|
85
|
-
devise_found
|
86
77
|
end
|
87
78
|
|
88
79
|
def parse_route_files
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: old_sql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.
|
5
|
+
version: 0.16.0
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Eddie Gonzales
|
@@ -191,7 +191,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
191
191
|
requirements:
|
192
192
|
- - ">="
|
193
193
|
- !ruby/object:Gem::Version
|
194
|
-
hash: -
|
194
|
+
hash: -235958455247447896
|
195
195
|
segments:
|
196
196
|
- 0
|
197
197
|
version: "0"
|