ensured_schema 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,11 +2,6 @@ module ActiveRecord
2
2
  module ConnectionAdapters
3
3
  class EnsuredTable < Table
4
4
 
5
- def column_exists?(column_name, type = nil, options = {})
6
- #debugger
7
- @base.column_exists?(@table_name, column_name, type, options)
8
- end
9
-
10
5
  %w( string text integer float decimal datetime timestamp time date binary boolean ).each do |column_type|
11
6
  class_eval <<-EOV
12
7
  def #{column_type}(*args) # def string(*args)
@@ -0,0 +1,10 @@
1
+ module ActiveRecord
2
+ module ConnectionAdapters
3
+ class Table
4
+
5
+ def column_exists?(column_name, type = nil, options = {})
6
+ @base.column_exists?(@table_name, column_name, type, options)
7
+ end
8
+ end
9
+ end
10
+ end
@@ -1,3 +1,3 @@
1
1
  module EnsuredSchema
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -1,5 +1,16 @@
1
1
  require 'ensured_schema/column'
2
2
  require 'ensured_schema/mysql_column'
3
3
  require 'ensured_schema/schema_statements'
4
+ require 'ensured_schema/table'
4
5
  require 'ensured_schema/ensured_table'
5
- require 'ensured_schema/schema'
6
+ require 'ensured_schema/schema'
7
+
8
+ # module ActiveRecord
9
+ # module ConnectionAdapters
10
+ # class AbstractAdapter
11
+ # def table_exists?(table_name)
12
+ # tables.map(&:downcase).include?(table_name.to_s.downcase)
13
+ # end
14
+ # end
15
+ # end
16
+ # end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ensured_schema
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 0
10
- version: 0.1.0
9
+ - 1
10
+ version: 0.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Chris Conley
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-12-08 00:00:00 -05:00
18
+ date: 2010-12-10 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -71,6 +71,7 @@ files:
71
71
  - lib/ensured_schema/mysql_column.rb
72
72
  - lib/ensured_schema/schema.rb
73
73
  - lib/ensured_schema/schema_statements.rb
74
+ - lib/ensured_schema/table.rb
74
75
  - lib/ensured_schema/version.rb
75
76
  - test/cases/ensured_schema_test.rb
76
77
  - test/cases/helper.rb