metahash-rb 1.0.1 → 1.0.2

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: 4017650f154dc99effbfb8b354353dc193088eed
4
- data.tar.gz: 49824be43db47b292c7326284b2aff91257e021f
3
+ metadata.gz: 1dd0495140177117ee39d5dfab630bd2b2883b81
4
+ data.tar.gz: cece44198668cd884390321748306ca80b9e4764
5
5
  SHA512:
6
- metadata.gz: ccdc5d25310105884c35fbbe09c07c7814ccc83953ba33e954abc3403faa862376543f9b17ecd0f3a517b9548dc5f406afcee6d9305a277fed8ceba737e5a36a
7
- data.tar.gz: 9fa68441c4516a83050f90efc62b4369d3c5a97c959eb2b5b0b9e37f04cede5dfa014bdecc82c74e629888aead1827bdd4fd3a8238efe68961bb986d8b828c36
6
+ metadata.gz: 19fdb4d1e1ca9ee1a2201bf8ca810f34268217ce5502053aa14958225299911c16855296b5641fdd96025b41e880d624044c223dd584c4c381f7e6e51dd5267a
7
+ data.tar.gz: 68bd91fbb923d0af5d4374cefab6b046b6db2d0e2168d3ef4fe9c8e6c3694061c56fd2655652926e10d74d6fd29972e4be174a67eea74566d1d6735c754ddec7
data/README.md CHANGED
@@ -1,9 +1,12 @@
1
1
  MetaHash
2
2
  ========
3
3
 
4
+ [![Gem Version](https://badge.fury.io/rb/metahash-rb.svg)](http://badge.fury.io/rb/metahash-rb)
4
5
  [![](https://ci.solanolabs.com:443/TinderBox/MetaHash/badges/110842.png?badge_token=a5097ea0ff487d291e94285ed9e4c8fabeca5fd1)](https://ci.solanolabs.com:443/TinderBox/MetaHash/suites/110842)
5
6
  [![Code Climate](https://codeclimate.com/github/NullVoxPopuli/MetaHash/badges/gpa.svg)](https://codeclimate.com/github/NullVoxPopuli/MetaHash)
6
7
  [![Dependency Status](https://gemnasium.com/NullVoxPopuli/MetaHash.svg)](https://gemnasium.com/NullVoxPopuli/MetaHash)
8
+ [![Test Coverage](https://codeclimate.com/github/NullVoxPopuli/MetaHash/badges/coverage.svg)](https://codeclimate.com/github/NullVoxPopuli/MetaHash)
9
+
7
10
 
8
11
 
9
12
  Provides a subclass of Hash and a wrapper around Rails' serialize attribute for object-like access to hashes without validating existence of nested hashes
@@ -9,10 +9,10 @@ module MetaHash
9
9
  # the hash by creating class Metadata < Hash; end
10
10
  #
11
11
  # @param [Symbol] serialized_field name of the field to convert to Metadata
12
- def has_metadata(serialized_field = "metadata")
12
+ def has_metadata(serialized_field = "metadata", serializer: JSON)
13
13
  # tell Active Record that the field is going to be JSON
14
14
  # serialized, because JSON > YAML
15
- serialize serialized_field, JSON
15
+ serialize serialized_field, serializer
16
16
 
17
17
  after_initialize do |record|
18
18
  # first check the type of the field
@@ -1,3 +1,3 @@
1
1
  module MetaHash
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metahash-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - L. Preston Sego III
@@ -141,7 +141,7 @@ rubyforge_project:
141
141
  rubygems_version: 2.4.1
142
142
  signing_key:
143
143
  specification_version: 4
144
- summary: MetaHash-1.0.1
144
+ summary: MetaHash-1.0.2
145
145
  test_files:
146
146
  - spec/metadata_spec.rb
147
147
  - spec/metahash_spec.rb