dm-yaml-adapter 1.1.0 → 1.2.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -5,25 +5,25 @@ 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'
8
+ DM_VERSION = '~> 1.2.0.rc1'
9
9
 
10
10
  gem 'dm-core', DM_VERSION, SOURCE => "#{DATAMAPPER}/dm-core#{REPO_POSTFIX}"
11
11
 
12
12
  group :development do
13
13
 
14
14
  gem 'dm-migrations', DM_VERSION, SOURCE => "#{DATAMAPPER}/dm-migrations#{REPO_POSTFIX}"
15
- gem 'jeweler', '~> 1.5.2'
16
- gem 'rake', '~> 0.8.7'
17
- gem 'rspec', '~> 1.3.1'
15
+ gem 'jeweler', '~> 1.6.4'
16
+ gem 'rake', '~> 0.9.2'
17
+ gem 'rspec', '~> 1.3.2'
18
18
 
19
19
  end
20
20
 
21
21
  platforms :mri_18 do
22
22
  group :quality do
23
23
 
24
- gem 'rcov', '~> 0.9.9'
25
- gem 'yard', '~> 0.6'
26
- gem 'yardstick', '~> 0.2'
24
+ gem 'rcov', '~> 0.9.10'
25
+ gem 'yard', '~> 0.7.2'
26
+ gem 'yardstick', '~> 0.4'
27
27
 
28
28
  end
29
29
  end
data/Rakefile CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
  require 'rake'
3
3
 
4
4
  begin
5
- gem 'jeweler', '~> 1.5.2'
5
+ gem 'jeweler', '~> 1.6.4'
6
6
  require 'jeweler'
7
7
 
8
8
  Jeweler::Tasks.new do |gem|
@@ -12,7 +12,6 @@ begin
12
12
  gem.email = 'dan.kubb@gmail.com'
13
13
  gem.homepage = 'http://github.com/datamapper/%s' % gem.name
14
14
  gem.authors = [ 'Dan Kubb' ]
15
- gem.has_rdoc = 'yard'
16
15
 
17
16
  gem.rubyforge_project = 'datamapper'
18
17
  end
@@ -21,5 +20,5 @@ begin
21
20
 
22
21
  FileList['tasks/**/*.rake'].each { |task| import task }
23
22
  rescue LoadError
24
- puts 'Jeweler (or a dependency) not available. Install it with: gem install jeweler -v 1.5.2'
23
+ puts 'Jeweler (or a dependency) not available. Install it with: gem install jeweler -v 1.6.4'
25
24
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.0
1
+ 1.2.0.rc1
@@ -4,14 +4,14 @@
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
- s.name = %q{dm-yaml-adapter}
8
- s.version = "1.1.0"
7
+ s.name = "dm-yaml-adapter"
8
+ s.version = "1.2.0.rc1"
9
9
 
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
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-16}
13
- s.description = %q{YAML Adapter for DataMapper}
14
- s.email = %q{dan.kubb@gmail.com}
12
+ s.date = "2011-09-09"
13
+ s.description = "YAML Adapter for DataMapper"
14
+ s.email = "dan.kubb@gmail.com"
15
15
  s.extra_rdoc_files = [
16
16
  "LICENSE"
17
17
  ]
@@ -33,38 +33,34 @@ Gem::Specification.new do |s|
33
33
  "tasks/yard.rake",
34
34
  "tasks/yardstick.rake"
35
35
  ]
36
- s.homepage = %q{http://github.com/datamapper/dm-yaml-adapter}
36
+ s.homepage = "http://github.com/datamapper/dm-yaml-adapter"
37
37
  s.require_paths = ["lib"]
38
- s.rubyforge_project = %q{datamapper}
39
- s.rubygems_version = %q{1.6.2}
40
- s.summary = %q{YAML Adapter for DataMapper}
41
- s.test_files = [
42
- "spec/adapter_spec.rb",
43
- "spec/spec_helper.rb"
44
- ]
38
+ s.rubyforge_project = "datamapper"
39
+ s.rubygems_version = "1.8.10"
40
+ s.summary = "YAML Adapter for DataMapper"
45
41
 
46
42
  if s.respond_to? :specification_version then
47
43
  s.specification_version = 3
48
44
 
49
45
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
50
- s.add_runtime_dependency(%q<dm-core>, ["~> 1.1.0"])
51
- s.add_development_dependency(%q<dm-migrations>, ["~> 1.1.0"])
52
- s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
53
- s.add_development_dependency(%q<rake>, ["~> 0.8.7"])
54
- s.add_development_dependency(%q<rspec>, ["~> 1.3.1"])
46
+ s.add_runtime_dependency(%q<dm-core>, ["~> 1.2.0.rc1"])
47
+ s.add_development_dependency(%q<dm-migrations>, ["~> 1.2.0.rc1"])
48
+ s.add_development_dependency(%q<jeweler>, ["~> 1.6.4"])
49
+ s.add_development_dependency(%q<rake>, ["~> 0.9.2"])
50
+ s.add_development_dependency(%q<rspec>, ["~> 1.3.2"])
55
51
  else
56
- s.add_dependency(%q<dm-core>, ["~> 1.1.0"])
57
- s.add_dependency(%q<dm-migrations>, ["~> 1.1.0"])
58
- s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
59
- s.add_dependency(%q<rake>, ["~> 0.8.7"])
60
- s.add_dependency(%q<rspec>, ["~> 1.3.1"])
52
+ s.add_dependency(%q<dm-core>, ["~> 1.2.0.rc1"])
53
+ s.add_dependency(%q<dm-migrations>, ["~> 1.2.0.rc1"])
54
+ s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
55
+ s.add_dependency(%q<rake>, ["~> 0.9.2"])
56
+ s.add_dependency(%q<rspec>, ["~> 1.3.2"])
61
57
  end
62
58
  else
63
- s.add_dependency(%q<dm-core>, ["~> 1.1.0"])
64
- s.add_dependency(%q<dm-migrations>, ["~> 1.1.0"])
65
- s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
66
- s.add_dependency(%q<rake>, ["~> 0.8.7"])
67
- s.add_dependency(%q<rspec>, ["~> 1.3.1"])
59
+ s.add_dependency(%q<dm-core>, ["~> 1.2.0.rc1"])
60
+ s.add_dependency(%q<dm-migrations>, ["~> 1.2.0.rc1"])
61
+ s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
62
+ s.add_dependency(%q<rake>, ["~> 0.9.2"])
63
+ s.add_dependency(%q<rspec>, ["~> 1.3.2"])
68
64
  end
69
65
  end
70
66
 
@@ -38,6 +38,15 @@ module DataMapper
38
38
  end
39
39
  end
40
40
 
41
+ # @api semipublic
42
+ def attributes_as_fields(attributes)
43
+ pairs = attributes.map do |property, value|
44
+ dumped = value.kind_of?(Module) ? value.name : property.dump(value)
45
+ [ property.field, dumped ]
46
+ end
47
+ Hash[pairs]
48
+ end
49
+
41
50
  private
42
51
 
43
52
  # @api semipublic
metadata CHANGED
@@ -1,8 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dm-yaml-adapter
3
3
  version: !ruby/object:Gem::Version
4
- prerelease:
5
- version: 1.1.0
4
+ hash: 15424023
5
+ prerelease: 6
6
+ segments:
7
+ - 1
8
+ - 2
9
+ - 0
10
+ - rc
11
+ - 1
12
+ version: 1.2.0.rc1
6
13
  platform: ruby
7
14
  authors:
8
15
  - Dan Kubb
@@ -10,64 +17,92 @@ autorequire:
10
17
  bindir: bin
11
18
  cert_chain: []
12
19
 
13
- date: 2011-03-16 00:00:00 -07:00
14
- default_executable:
20
+ date: 2011-09-09 00:00:00 Z
15
21
  dependencies:
16
22
  - !ruby/object:Gem::Dependency
17
- name: dm-core
18
- requirement: &id001 !ruby/object:Gem::Requirement
23
+ type: :runtime
24
+ version_requirements: &id001 !ruby/object:Gem::Requirement
19
25
  none: false
20
26
  requirements:
21
27
  - - ~>
22
28
  - !ruby/object:Gem::Version
23
- version: 1.1.0
24
- type: :runtime
29
+ hash: 15424023
30
+ segments:
31
+ - 1
32
+ - 2
33
+ - 0
34
+ - rc
35
+ - 1
36
+ version: 1.2.0.rc1
25
37
  prerelease: false
26
- version_requirements: *id001
38
+ requirement: *id001
39
+ name: dm-core
27
40
  - !ruby/object:Gem::Dependency
28
- name: dm-migrations
29
- requirement: &id002 !ruby/object:Gem::Requirement
41
+ type: :development
42
+ version_requirements: &id002 !ruby/object:Gem::Requirement
30
43
  none: false
31
44
  requirements:
32
45
  - - ~>
33
46
  - !ruby/object:Gem::Version
34
- version: 1.1.0
35
- type: :development
47
+ hash: 15424023
48
+ segments:
49
+ - 1
50
+ - 2
51
+ - 0
52
+ - rc
53
+ - 1
54
+ version: 1.2.0.rc1
36
55
  prerelease: false
37
- version_requirements: *id002
56
+ requirement: *id002
57
+ name: dm-migrations
38
58
  - !ruby/object:Gem::Dependency
39
- name: jeweler
40
- requirement: &id003 !ruby/object:Gem::Requirement
59
+ type: :development
60
+ version_requirements: &id003 !ruby/object:Gem::Requirement
41
61
  none: false
42
62
  requirements:
43
63
  - - ~>
44
64
  - !ruby/object:Gem::Version
45
- version: 1.5.2
46
- type: :development
65
+ hash: 7
66
+ segments:
67
+ - 1
68
+ - 6
69
+ - 4
70
+ version: 1.6.4
47
71
  prerelease: false
48
- version_requirements: *id003
72
+ requirement: *id003
73
+ name: jeweler
49
74
  - !ruby/object:Gem::Dependency
50
- name: rake
51
- requirement: &id004 !ruby/object:Gem::Requirement
75
+ type: :development
76
+ version_requirements: &id004 !ruby/object:Gem::Requirement
52
77
  none: false
53
78
  requirements:
54
79
  - - ~>
55
80
  - !ruby/object:Gem::Version
56
- version: 0.8.7
57
- type: :development
81
+ hash: 63
82
+ segments:
83
+ - 0
84
+ - 9
85
+ - 2
86
+ version: 0.9.2
58
87
  prerelease: false
59
- version_requirements: *id004
88
+ requirement: *id004
89
+ name: rake
60
90
  - !ruby/object:Gem::Dependency
61
- name: rspec
62
- requirement: &id005 !ruby/object:Gem::Requirement
91
+ type: :development
92
+ version_requirements: &id005 !ruby/object:Gem::Requirement
63
93
  none: false
64
94
  requirements:
65
95
  - - ~>
66
96
  - !ruby/object:Gem::Version
67
- version: 1.3.1
68
- type: :development
97
+ hash: 31
98
+ segments:
99
+ - 1
100
+ - 3
101
+ - 2
102
+ version: 1.3.2
69
103
  prerelease: false
70
- version_requirements: *id005
104
+ requirement: *id005
105
+ name: rspec
71
106
  description: YAML Adapter for DataMapper
72
107
  email: dan.kubb@gmail.com
73
108
  executables: []
@@ -93,7 +128,6 @@ files:
93
128
  - tasks/spec.rake
94
129
  - tasks/yard.rake
95
130
  - tasks/yardstick.rake
96
- has_rdoc: true
97
131
  homepage: http://github.com/datamapper/dm-yaml-adapter
98
132
  licenses: []
99
133
 
@@ -107,20 +141,27 @@ required_ruby_version: !ruby/object:Gem::Requirement
107
141
  requirements:
108
142
  - - ">="
109
143
  - !ruby/object:Gem::Version
144
+ hash: 3
145
+ segments:
146
+ - 0
110
147
  version: "0"
111
148
  required_rubygems_version: !ruby/object:Gem::Requirement
112
149
  none: false
113
150
  requirements:
114
- - - ">="
151
+ - - ">"
115
152
  - !ruby/object:Gem::Version
116
- version: "0"
153
+ hash: 25
154
+ segments:
155
+ - 1
156
+ - 3
157
+ - 1
158
+ version: 1.3.1
117
159
  requirements: []
118
160
 
119
161
  rubyforge_project: datamapper
120
- rubygems_version: 1.6.2
162
+ rubygems_version: 1.8.10
121
163
  signing_key:
122
164
  specification_version: 3
123
165
  summary: YAML Adapter for DataMapper
124
- test_files:
125
- - spec/adapter_spec.rb
126
- - spec/spec_helper.rb
166
+ test_files: []
167
+