dm-do-adapter 1.1.0.rc2 → 1.1.0.rc3

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -5,7 +5,7 @@ source 'http://rubygems.org'
5
5
  SOURCE = ENV.fetch('SOURCE', :git).to_sym
6
6
  REPO_POSTFIX = SOURCE == :path ? '' : '.git'
7
7
  DATAMAPPER = SOURCE == :path ? Pathname(__FILE__).dirname.parent : 'http://github.com/datamapper'
8
- DM_VERSION = '~> 1.1.0.rc2'
8
+ DM_VERSION = '~> 1.1.0.rc3'
9
9
  DO_VERSION = '~> 0.10.2'
10
10
 
11
11
  do_options = {}
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.0.rc2
1
+ 1.1.0.rc3
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{dm-do-adapter}
8
- s.version = "1.1.0.rc2"
8
+ s.version = "1.1.0.rc3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Dan Kubb"]
12
- s.date = %q{2011-03-01}
12
+ s.date = %q{2011-03-10}
13
13
  s.description = %q{DataObjects Adapter for DataMapper}
14
14
  s.email = %q{dan.kubb@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -32,7 +32,7 @@ Gem::Specification.new do |s|
32
32
  s.homepage = %q{http://github.com/datamapper/dm-do-adapter}
33
33
  s.require_paths = ["lib"]
34
34
  s.rubyforge_project = %q{datamapper}
35
- s.rubygems_version = %q{1.5.2}
35
+ s.rubygems_version = %q{1.6.2}
36
36
  s.summary = %q{DataObjects Adapter for DataMapper}
37
37
 
38
38
  if s.respond_to? :specification_version then
@@ -40,20 +40,20 @@ Gem::Specification.new do |s|
40
40
 
41
41
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
42
42
  s.add_runtime_dependency(%q<data_objects>, ["~> 0.10.2"])
43
- s.add_runtime_dependency(%q<dm-core>, ["~> 1.1.0.rc2"])
43
+ s.add_runtime_dependency(%q<dm-core>, ["~> 1.1.0.rc3"])
44
44
  s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
45
45
  s.add_development_dependency(%q<rake>, ["~> 0.8.7"])
46
46
  s.add_development_dependency(%q<rspec>, ["~> 1.3.1"])
47
47
  else
48
48
  s.add_dependency(%q<data_objects>, ["~> 0.10.2"])
49
- s.add_dependency(%q<dm-core>, ["~> 1.1.0.rc2"])
49
+ s.add_dependency(%q<dm-core>, ["~> 1.1.0.rc3"])
50
50
  s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
51
51
  s.add_dependency(%q<rake>, ["~> 0.8.7"])
52
52
  s.add_dependency(%q<rspec>, ["~> 1.3.1"])
53
53
  end
54
54
  else
55
55
  s.add_dependency(%q<data_objects>, ["~> 0.10.2"])
56
- s.add_dependency(%q<dm-core>, ["~> 1.1.0.rc2"])
56
+ s.add_dependency(%q<dm-core>, ["~> 1.1.0.rc3"])
57
57
  s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
58
58
  s.add_dependency(%q<rake>, ["~> 0.8.7"])
59
59
  s.add_dependency(%q<rspec>, ["~> 1.3.1"])
@@ -151,7 +151,7 @@ module DataMapper
151
151
 
152
152
  begin
153
153
  while reader.next!
154
- records << fields.zip(reader.values).to_hash
154
+ records << DataMapper::Ext::Array.to_hash(fields.zip(reader.values))
155
155
  end
156
156
  ensure
157
157
  reader.close
@@ -219,7 +219,10 @@ module DataMapper
219
219
  def normalized_uri
220
220
  @normalized_uri ||=
221
221
  begin
222
- query = @options.except(:adapter, :user, :password, :host, :port, :path, :fragment, :scheme, :query, :username, :database)
222
+ keys = [
223
+ :adapter, :user, :password, :host, :port, :path, :fragment,
224
+ :scheme, :query, :username, :database ]
225
+ query = DataMapper::Ext::Hash.except(@options, keys)
223
226
  query = nil if query.empty?
224
227
 
225
228
  # Better error message in case port is no Numeric value
@@ -358,7 +361,7 @@ module DataMapper
358
361
  statement = "SELECT #{columns_statement(fields, qualify)}"
359
362
  statement << " FROM #{quote_name(query.model.storage_name(name))}"
360
363
  statement << " #{join_statement(query, bind_values, qualify)}" if qualify
361
- statement << " WHERE #{conditions_statement}" unless conditions_statement.blank?
364
+ statement << " WHERE #{conditions_statement}" unless DataMapper::Ext.blank?(conditions_statement)
362
365
  statement << " GROUP BY #{columns_statement(group_by, qualify)}" if group_by && group_by.any?
363
366
  statement << " ORDER BY #{order_statement(order_by, qualify)}" if order_by && order_by.any?
364
367
 
@@ -392,7 +395,7 @@ module DataMapper
392
395
  if supports_default_values? && properties.empty?
393
396
  statement << default_values_clause
394
397
  else
395
- statement << <<-SQL.compress_lines
398
+ statement << DataMapper::Ext::String.compress_lines(<<-SQL)
396
399
  (#{properties.map { |property| quote_name(property.field) }.join(', ')})
397
400
  VALUES
398
401
  (#{(['?'] * properties.size).join(', ')})
@@ -436,7 +439,7 @@ module DataMapper
436
439
 
437
440
  statement = "UPDATE #{quote_name(model.storage_name(name))}"
438
441
  statement << " SET #{properties.map { |property| "#{quote_name(property.field)} = ?" }.join(', ')}"
439
- statement << " WHERE #{conditions_statement}" unless conditions_statement.blank?
442
+ statement << " WHERE #{conditions_statement}" unless DataMapper::Ext.blank?(conditions_statement)
440
443
 
441
444
  return statement, bind_values
442
445
  end
@@ -458,7 +461,7 @@ module DataMapper
458
461
  end
459
462
 
460
463
  statement = "DELETE FROM #{quote_name(model.storage_name(name))}"
461
- statement << " WHERE #{conditions_statement}" unless conditions_statement.blank?
464
+ statement << " WHERE #{conditions_statement}" unless DataMapper::Ext.blank?(conditions_statement)
462
465
 
463
466
  return statement, bind_values
464
467
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: dm-do-adapter
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease: 6
5
- version: 1.1.0.rc2
5
+ version: 1.1.0.rc3
6
6
  platform: ruby
7
7
  authors:
8
8
  - Dan Kubb
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-03-01 00:00:00 -08:00
13
+ date: 2011-03-10 00:00:00 -08:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -31,7 +31,7 @@ dependencies:
31
31
  requirements:
32
32
  - - ~>
33
33
  - !ruby/object:Gem::Version
34
- version: 1.1.0.rc2
34
+ version: 1.1.0.rc3
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: *id002
@@ -113,7 +113,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
113
113
  requirements: []
114
114
 
115
115
  rubyforge_project: datamapper
116
- rubygems_version: 1.5.2
116
+ rubygems_version: 1.6.2
117
117
  signing_key:
118
118
  specification_version: 3
119
119
  summary: DataObjects Adapter for DataMapper