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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 775327ea4bdbd83afc7f6b957027d11e9e04449b
4
- data.tar.gz: d8d444a0ba3d009b0709e82ad4223b9af80fe1dd
3
+ metadata.gz: b4ab63e12bbe6fedde391615954611fef5dac174
4
+ data.tar.gz: b17a668dcdd30c125802698edf43718cb820f993
5
5
  SHA512:
6
- metadata.gz: 9722d16cd6a1f67e1ce58332043d604fd77dbbb2f37014084a0a132274ddfc0fca202be7bbecda778ecc02936193a7b1508072329e3cbb91a70910a6662e1ea4
7
- data.tar.gz: 01d0e893e9f70607be1c540bd075224aa6f489aa383fa0059012b08215d9ef12a549d7b9b5b8a804d394c0ad639b27e3f672b1f499e717b388093b01981e00fd
6
+ metadata.gz: 1c7610a228ff8038288e525ff54115181e236653449e19111712885aca08495858f02dcdab481c8cd18ba8f99c49878b78031f10aa24a39b2276238c02c89549
7
+ data.tar.gz: c36e08516f6aef380fb090a004a94531f24eeeac7fae12e9c3609021890caad08b2df671e3a10de32c35e083507ae587914fd3b7db7c62495d74c08f164b50c4
@@ -0,0 +1,4 @@
1
+ ## 0.3.0
2
+
3
+ * Fixed incompatibility with Hanami 1.0.1+ leading to `RuntimeError: can't modify frozen Hash` error upon deletion
4
+ * Drop support for Hanami versions less than 1.0
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
- * working with Hanami version 0.7.x
12
- * working with Hanami version 0.8.x without validations (which have been extracted to separate gem)
13
- * does not work work with Hanami 0.9.x (work in progress, see [#1](https://github.com/katafrakt/hanami-shrine/issues/1))
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
 
@@ -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.7'
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"
@@ -1,5 +1,5 @@
1
1
  module Hanami
2
2
  module Shrine
3
- VERSION = "0.2.1"
3
+ VERSION = "0.3.0"
4
4
  end
5
5
  end
@@ -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
- entity = original_entity.class.new(original_entity_attributes.merge(:"#{name}_data" => attacher.read))
104
+ original_entity.class.new(original_entity_attributes.merge(:"#{name}_data" => attacher.read))
105
105
  else
106
- entity = original_entity
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.2.1
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-01-20 00:00:00.000000000 Z
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.7'
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.7'
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