old_sql 0.14.0 → 0.15.0

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.
@@ -9,12 +9,15 @@ module OldSql
9
9
  puts "Hello!
10
10
  Old SQL works with devise. Checking for a current installation of devise!
11
11
  "
12
-
13
12
 
14
13
  app_path = Rails.public_path.split("/")
15
14
  app_path.delete_at(-1)
16
15
  app_path = app_path.join("/")
17
16
 
17
+ gsub_file app_path+'/db/schema.rb', /users/, :green do |match|
18
+ puts "User model exists"
19
+ end
20
+
18
21
  puts "User model at #{app_path+'/app/models/user.rb'} exists? #{File.exists?(app_path+'/app/models/user.rb')}"
19
22
 
20
23
  if defined?(Devise)
@@ -58,7 +61,14 @@ Old SQL works with devise. Checking for a current installation of devise!
58
61
  app_path.delete_at(-1)
59
62
  app_path = app_path.join("/")
60
63
 
61
- File.exists?(app_path+'/app/models/user.rb')
64
+ user_found = false
65
+
66
+ gsub_file app_path+'/db/schema.rb', /users/, :green do |match|
67
+ puts "User model exists"
68
+ user_found = true
69
+ end
70
+
71
+ user_found
62
72
  end
63
73
 
64
74
  def user_model_has_devise?
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: old_sql
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.14.0
5
+ version: 0.15.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: 2199591958331863898
194
+ hash: -142209455033418591
195
195
  segments:
196
196
  - 0
197
197
  version: "0"