hanami-shrine 0.2.1 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +8 -3
- data/hanami-shrine.gemspec +2 -2
- data/lib/hanami/shrine/version.rb +1 -1
- data/lib/shrine/plugins/hanami.rb +3 -3
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b4ab63e12bbe6fedde391615954611fef5dac174
|
4
|
+
data.tar.gz: b17a668dcdd30c125802698edf43718cb820f993
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c7610a228ff8038288e525ff54115181e236653449e19111712885aca08495858f02dcdab481c8cd18ba8f99c49878b78031f10aa24a39b2276238c02c89549
|
7
|
+
data.tar.gz: c36e08516f6aef380fb090a004a94531f24eeeac7fae12e9c3609021890caad08b2df671e3a10de32c35e083507ae587914fd3b7db7c62495d74c08f164b50c4
|
data/CHANGELOG.md
ADDED
data/README.md
CHANGED
@@ -8,9 +8,14 @@ This gem aims at providing support for [Shrine](https://github.com/janko-m/shrin
|
|
8
8
|
|
9
9
|
### Current compatibility status
|
10
10
|
|
11
|
-
|
12
|
-
*
|
13
|
-
*
|
11
|
+
#### **0.1.x**
|
12
|
+
* works with Hanami 0.7.x
|
13
|
+
* works with Hanami 0.8.x without validations (which have been extracted to separate gem)
|
14
|
+
|
15
|
+
#### **0.2.x**
|
16
|
+
* works with Hanami 0.9.x and 1.0.
|
17
|
+
|
18
|
+
Future compatibility will only be provided with Hanami 1.0 and later (which will propably be compatible with 0.9 too).
|
14
19
|
|
15
20
|
## Installation
|
16
21
|
|
data/hanami-shrine.gemspec
CHANGED
@@ -20,8 +20,8 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.require_paths = ["lib"]
|
21
21
|
|
22
22
|
spec.add_dependency 'shrine'
|
23
|
-
spec.add_dependency 'hanami-model', '>= 0
|
24
|
-
spec.add_dependency "hanami-utils"
|
23
|
+
spec.add_dependency 'hanami-model', '>= 1.0'
|
24
|
+
spec.add_dependency "hanami-utils", '>= 1.0'
|
25
25
|
|
26
26
|
spec.add_development_dependency "bundler", "~> 1.10"
|
27
27
|
spec.add_development_dependency "rake", "~> 10.0"
|
@@ -98,12 +98,12 @@ class Shrine
|
|
98
98
|
attacher.assign(file)
|
99
99
|
attacher.finalize
|
100
100
|
|
101
|
-
original_entity_attributes = original_entity.attributes
|
101
|
+
original_entity_attributes = original_entity.attributes.dup
|
102
102
|
original_entity_attributes.delete(name)
|
103
103
|
|
104
|
-
|
104
|
+
original_entity.class.new(original_entity_attributes.merge(:"#{name}_data" => attacher.read))
|
105
105
|
else
|
106
|
-
|
106
|
+
original_entity
|
107
107
|
end
|
108
108
|
end
|
109
109
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hanami-shrine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paweł Świątkowski
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-08-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: shrine
|
@@ -30,28 +30,28 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0
|
33
|
+
version: '1.0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '0
|
40
|
+
version: '1.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: hanami-utils
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
47
|
+
version: '1.0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
54
|
+
version: '1.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: bundler
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -118,6 +118,7 @@ files:
|
|
118
118
|
- ".gitignore"
|
119
119
|
- ".rspec"
|
120
120
|
- ".travis.yml"
|
121
|
+
- CHANGELOG.md
|
121
122
|
- Gemfile
|
122
123
|
- LICENSE.txt
|
123
124
|
- README.md
|