sequel_migration_builder 0.0.2 → 0.0.3

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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.2
1
+ 0.0.3
@@ -82,7 +82,7 @@ module Sequel
82
82
 
83
83
  def extract_size(column)
84
84
  match = column.last[:db_type].match(/\((\d+)\)/)
85
- match[1].to_i if match[1]
85
+ match[1].to_i if match && match[1]
86
86
  end
87
87
 
88
88
  def extract_enum_elements(column)
@@ -0,0 +1,67 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{sequel_migration_builder}
8
+ s.version = "0.0.3"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Roland Swingler"]
12
+ s.date = %q{2010-06-22}
13
+ s.description = %q{Build Sequel Migrations based on the differences between two schemas}
14
+ s.email = %q{roland.swingler@gmail.com}
15
+ s.extra_rdoc_files = [
16
+ "LICENSE",
17
+ "README.rdoc"
18
+ ]
19
+ s.files = [
20
+ ".document",
21
+ ".gitignore",
22
+ "LICENSE",
23
+ "README.rdoc",
24
+ "Rakefile",
25
+ "VERSION",
26
+ "lib/sequel/migration_builder.rb",
27
+ "lib/sequel/schema/alter_table_operations.rb",
28
+ "lib/sequel/schema/db_column.rb",
29
+ "lib/sequel/schema/db_schema_parser.rb",
30
+ "sequel_migration_builder.gemspec",
31
+ "spec/alter_table_operations_spec.rb",
32
+ "spec/db_column_spec.rb",
33
+ "spec/db_schema_parser_spec.rb",
34
+ "spec/migration_builder_spec.rb",
35
+ "spec/spec.opts",
36
+ "spec/spec_helper.rb"
37
+ ]
38
+ s.homepage = %q{http://github.com/knaveofdiamonds/sequel_migration_builder}
39
+ s.rdoc_options = ["--charset=UTF-8"]
40
+ s.require_paths = ["lib"]
41
+ s.rubygems_version = %q{1.3.6}
42
+ s.summary = %q{Build Sequel Migrations based on the differences between two schemas}
43
+ s.test_files = [
44
+ "spec/alter_table_operations_spec.rb",
45
+ "spec/db_column_spec.rb",
46
+ "spec/db_schema_parser_spec.rb",
47
+ "spec/migration_builder_spec.rb",
48
+ "spec/spec_helper.rb"
49
+ ]
50
+
51
+ if s.respond_to? :specification_version then
52
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
53
+ s.specification_version = 3
54
+
55
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
56
+ s.add_runtime_dependency(%q<sequel>, [">= 3.12.0"])
57
+ s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
58
+ else
59
+ s.add_dependency(%q<sequel>, [">= 3.12.0"])
60
+ s.add_dependency(%q<rspec>, [">= 1.2.9"])
61
+ end
62
+ else
63
+ s.add_dependency(%q<sequel>, [">= 3.12.0"])
64
+ s.add_dependency(%q<rspec>, [">= 1.2.9"])
65
+ end
66
+ end
67
+
@@ -97,3 +97,20 @@ describe "Sequel::Schema::DbSchemaParser#parse_db_schema" do
97
97
  @parser.parse_db_schema.keys.should == [:table1]
98
98
  end
99
99
  end
100
+
101
+ ### Regression tests
102
+
103
+ describe "Parsing a text column" do
104
+ it "should not raise an error because it does not have a size" do
105
+ parser = Sequel::Schema::DbSchemaParser.for_db(stub(:database))
106
+ schema = [[:example_column,
107
+ { :type => :string,
108
+ :default => nil,
109
+ :ruby_default => nil,
110
+ :primary_key => false,
111
+ :db_type => "text",
112
+ :allow_null => true }]]
113
+
114
+ lambda { parser.parse_table_schema(schema) }.should_not raise_error
115
+ end
116
+ end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 2
9
- version: 0.0.2
8
+ - 3
9
+ version: 0.0.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Roland Swingler
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-06-15 00:00:00 +01:00
17
+ date: 2010-06-22 00:00:00 +01:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -65,6 +65,7 @@ files:
65
65
  - lib/sequel/schema/alter_table_operations.rb
66
66
  - lib/sequel/schema/db_column.rb
67
67
  - lib/sequel/schema/db_schema_parser.rb
68
+ - sequel_migration_builder.gemspec
68
69
  - spec/alter_table_operations_spec.rb
69
70
  - spec/db_column_spec.rb
70
71
  - spec/db_schema_parser_spec.rb