Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'release-1.2'

Conflicts:
	lib/dm-migrations/adapters/dm-do-adapter.rb
  • Loading branch information...
commit 0c7cf6495427db05bd6d5c40c2fbbd7f4ab0e51a 2 parents 4713f67 + b2fee8c
@solnic solnic authored
View
21 Gemfile
@@ -5,11 +5,14 @@ source 'http://rubygems.org'
SOURCE = ENV.fetch('SOURCE', :git).to_sym
REPO_POSTFIX = SOURCE == :path ? '' : '.git'
DATAMAPPER = SOURCE == :path ? Pathname(__FILE__).dirname.parent : 'http://github.com/datamapper'
-DM_VERSION = '~> 1.2.0.rc1'
+DM_VERSION = '~> 1.2.0'
DO_VERSION = '~> 0.10.6'
DM_DO_ADAPTERS = %w[ sqlite postgres mysql oracle sqlserver ]
+CURRENT_BRANCH = ENV.fetch('GIT_BRANCH', 'master')
-gem 'dm-core', DM_VERSION, SOURCE => "#{DATAMAPPER}/dm-core#{REPO_POSTFIX}"
+gem 'dm-core', DM_VERSION,
+ SOURCE => "#{DATAMAPPER}/dm-core#{REPO_POSTFIX}",
+ :branch => CURRENT_BRANCH
group :development do
@@ -45,18 +48,24 @@ group :datamapper do
gem "do_#{adapter}", DO_VERSION, do_options.dup
end
- gem 'dm-do-adapter', DM_VERSION, SOURCE => "#{DATAMAPPER}/dm-do-adapter#{REPO_POSTFIX}"
+ gem 'dm-do-adapter', DM_VERSION,
+ SOURCE => "#{DATAMAPPER}/dm-do-adapter#{REPO_POSTFIX}",
+ :branch => CURRENT_BRANCH
end
adapters.each do |adapter|
- gem "dm-#{adapter}-adapter", DM_VERSION, SOURCE => "#{DATAMAPPER}/dm-#{adapter}-adapter#{REPO_POSTFIX}"
+ gem "dm-#{adapter}-adapter", DM_VERSION,
+ SOURCE => "#{DATAMAPPER}/dm-#{adapter}-adapter#{REPO_POSTFIX}",
+ :branch => CURRENT_BRANCH
end
plugins = ENV['PLUGINS'] || ENV['PLUGIN']
- plugins = plugins.to_s.tr(',', ' ').split.uniq
+ plugins = plugins.to_s.tr(',', ' ').split.push('dm-migrations').uniq
plugins.each do |plugin|
- gem plugin, DM_VERSION, SOURCE => "#{DATAMAPPER}/#{plugin}#{REPO_POSTFIX}"
+ gem plugin, DM_VERSION,
+ SOURCE => "#{DATAMAPPER}/#{plugin}#{REPO_POSTFIX}",
+ :branch => CURRENT_BRANCH
end
end
View
2  VERSION
@@ -1 +1 @@
-1.2.0.rc1
+1.2.0
View
14 dm-migrations.gemspec
@@ -5,11 +5,11 @@
Gem::Specification.new do |s|
s.name = "dm-migrations"
- s.version = "1.2.0.rc1"
+ s.version = "1.2.0"
- s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Paul Sadauskas"]
- s.date = "2011-09-09"
+ s.date = "2011-10-09"
s.description = "DataMapper plugin for writing and speccing migrations"
s.email = "psadauskas [a] gmail [d] com"
s.extra_rdoc_files = [
@@ -77,25 +77,25 @@ Gem::Specification.new do |s|
s.homepage = "http://github.com/datamapper/dm-migrations"
s.require_paths = ["lib"]
s.rubyforge_project = "datamapper"
- s.rubygems_version = "1.8.10"
+ s.rubygems_version = "1.8.11"
s.summary = "DataMapper plugin for writing and speccing migrations"
if s.respond_to? :specification_version then
s.specification_version = 3
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
- s.add_runtime_dependency(%q<dm-core>, ["~> 1.2.0.rc1"])
+ s.add_runtime_dependency(%q<dm-core>, ["~> 1.2.0"])
s.add_development_dependency(%q<jeweler>, ["~> 1.6.4"])
s.add_development_dependency(%q<rake>, ["~> 0.9.2"])
s.add_development_dependency(%q<rspec>, ["~> 1.3.2"])
else
- s.add_dependency(%q<dm-core>, ["~> 1.2.0.rc1"])
+ s.add_dependency(%q<dm-core>, ["~> 1.2.0"])
s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
s.add_dependency(%q<rake>, ["~> 0.9.2"])
s.add_dependency(%q<rspec>, ["~> 1.3.2"])
end
else
- s.add_dependency(%q<dm-core>, ["~> 1.2.0.rc1"])
+ s.add_dependency(%q<dm-core>, ["~> 1.2.0"])
s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
s.add_dependency(%q<rake>, ["~> 0.9.2"])
s.add_dependency(%q<rspec>, ["~> 1.3.2"])
View
8 lib/dm-migrations/adapters/dm-do-adapter.rb
@@ -195,10 +195,10 @@ def create_unique_index_statements(model)
# @api private
def property_schema_hash(property)
- dump_class = property.dump_class
- type_map = self.class.type_map
- schema = type_map[property.class] || type_map[property.class.superclass] || type_map[dump_class]
- schema.merge!(:name => property.field)
+ primitive = property.primitive
+ type_map = self.class.type_map
+
+ schema = (type_map[property.class] || type_map[primitive]).merge(:name => property.field)
schema_primitive = schema[:primitive]
Please sign in to comment.
Something went wrong with that request. Please try again.