datamapa 1.0.0 → 1.0.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e7cce387f3abe430cd8e4ee35617732e25e92e39
4
- data.tar.gz: 0d6378a3d032543f8d498e25fb403ed3107b36be
3
+ metadata.gz: 75b5c6f148def5270cd9d0c419aea373c6adcdf7
4
+ data.tar.gz: 375e0436814188812af10fc872d71940b07a76c6
5
5
  SHA512:
6
- metadata.gz: abbc9b71aeb881fd50b48db2ff7de09d45426f4f65d968c34ab1e7cd9955c2515cbbd86125a0352161b4be6fab791b8cb65666a74f5575da7595f1b8258f0498
7
- data.tar.gz: f352af17f79fb6bc50571ad3ce023c8e7d76b968b4961bac62972f8799e0cbb66ea9bead7396a6b4ac20b4a7e738e4d0d21a3d9acb446d2b1108c00e714e5d5d
6
+ metadata.gz: e62617c40aa2526d284ed4669ff36cda673c330b0022a1acaee43646a700fe4443b407e514e1f9dc7cd456cdfd8bbfb90935c2d69fddcaec3431be04f723f961
7
+ data.tar.gz: 9756baa220e9dca6051f468dd6785377ec4e29c26747bff06617be8421060c5e4dbed6246066075653ce659b62c008066219331219696abd9470aef6ca5cf0d5
@@ -1,3 +1,3 @@
1
1
  module DataMapa
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
data/lib/datamapa.rb CHANGED
@@ -70,6 +70,7 @@ module DataMapa
70
70
  @composed_of.each do |parts, mapper|
71
71
  mapper.create_parts!(model.send(parts), model.id)
72
72
  end if @composed_of
73
+ model
73
74
  rescue ActiveRecord::StatementInvalid => e
74
75
  raise DataMapa::PersistenceError, e.message
75
76
  end
@@ -93,9 +93,10 @@ describe DataMapa do
93
93
  ar = ar_class.new(id)
94
94
  ar_class.expects(:create!).with(attribute: model.attribute).returns(ar)
95
95
 
96
- mapper.create!(model)
96
+ returned_model = mapper.create!(model)
97
97
 
98
98
  model.id.must_equal id
99
+ returned_model.id.must_equal id
99
100
  end
100
101
 
101
102
  it "updates object" do
metadata CHANGED
@@ -1,97 +1,97 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: datamapa
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yosuke Doi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-14 00:00:00.000000000 Z
11
+ date: 2014-03-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: 4.0.2
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: 4.0.2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: 10.1.1
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: 10.1.1
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: minitest
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '4.2'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '4.2'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: mocha
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: 0.14.0
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ~>
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: 0.14.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: bourne
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ~>
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
75
  version: 1.5.0
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ~>
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: 1.5.0
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: byebug
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ~>
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
89
  version: 2.6.0
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ~>
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: 2.6.0
97
97
  description: A minimalistic Data Mapper for removing model dependency on Active Record
@@ -101,7 +101,7 @@ executables: []
101
101
  extensions: []
102
102
  extra_rdoc_files: []
103
103
  files:
104
- - .gitignore
104
+ - ".gitignore"
105
105
  - Gemfile
106
106
  - LICENSE.txt
107
107
  - README.md
@@ -120,17 +120,17 @@ require_paths:
120
120
  - lib
121
121
  required_ruby_version: !ruby/object:Gem::Requirement
122
122
  requirements:
123
- - - '>='
123
+ - - ">="
124
124
  - !ruby/object:Gem::Version
125
125
  version: '0'
126
126
  required_rubygems_version: !ruby/object:Gem::Requirement
127
127
  requirements:
128
- - - '>='
128
+ - - ">="
129
129
  - !ruby/object:Gem::Version
130
130
  version: '0'
131
131
  requirements: []
132
132
  rubyforge_project:
133
- rubygems_version: 2.0.6
133
+ rubygems_version: 2.2.2
134
134
  signing_key:
135
135
  specification_version: 4
136
136
  summary: Data Mapper using Active Record