old_sql 0.31.0 → 0.32.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.
@@ -54,7 +54,9 @@ module OldSql
54
54
  app_path = app_path.join("/")
55
55
  schema_path = "#{app_path}/db/schema.rb"
56
56
 
57
- if File.exists?(schema_path) && open(schema_path).grep(/#{:model_name}/).count>0
57
+ puts "Checking #{schema_path} for pattern #{model_name}"
58
+
59
+ if File.exists?(schema_path) && open(schema_path).grep(model_name).count>0
58
60
  return true
59
61
  else
60
62
  return false
@@ -67,6 +69,8 @@ module OldSql
67
69
  app_path = app_path.join("/")
68
70
  schema_path = app_path+'/db/schema.rb'
69
71
 
72
+ puts "Checking #{schema_path} for pattern /database_authenticatable/"
73
+
70
74
  if File.exists?(schema_path) && open(schema_path).grep(/database_authenticatable/).count>0
71
75
  return true
72
76
  else
@@ -79,11 +83,11 @@ module OldSql
79
83
  app_path.delete_at(-1)
80
84
  app_path = app_path.join("/")
81
85
 
82
- File.exists?("#{app_path}/app/models/#{:model_name}.rb")
86
+ File.exists?("#{app_path}/app/models/#{model_name}.rb")
83
87
  end
84
88
 
85
89
  def create_model_class
86
- model_path = "#{app_path}/app/models/#{:model_name}.rb"
90
+ model_path = "#{app_path}/app/models/#{model_name}.rb"
87
91
 
88
92
  gem_path = __FILE__
89
93
  gem_path = gem_path.split("/")
@@ -94,7 +98,7 @@ module OldSql
94
98
  copy_file devise_template_path, model_path
95
99
 
96
100
  gsub_file model_path, /DeviseModel/, :green do |match|
97
- match << :model_name.capitalize
101
+ match << model_name.capitalize
98
102
  end
99
103
  end
100
104
 
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: old_sql
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.31.0
5
+ version: 0.32.0
6
6
  platform: ruby
7
7
  authors:
8
8
  - Eddie Gonzales
@@ -192,7 +192,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
192
192
  requirements:
193
193
  - - ">="
194
194
  - !ruby/object:Gem::Version
195
- hash: 412723378894680363
195
+ hash: 3548740248769912198
196
196
  segments:
197
197
  - 0
198
198
  version: "0"