redox 1.0.0 → 1.0.1

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
  SHA256:
3
- metadata.gz: 63503f81ebcb62da585b095cbe53721f14fd4924b6b7f292db34dc28a1fb58a0
4
- data.tar.gz: d79801d7d642ada1dd96952fb00882c858a06b6b3a165e9aa634624cd8580872
3
+ metadata.gz: 64ed984d8f77ebf8b4d713e14e86eb09065449ab0d970ab3994c876acc765216
4
+ data.tar.gz: 8661675122be3a20a6b0f1168dc898f99d128e43864769161cf5c3c1511f830f
5
5
  SHA512:
6
- metadata.gz: cc2504239a0515d8d951a7d0d181a260ca7719130fd0fffc40d309cf8938c46ebce2d1c402a1864e019d689836f5988857608d6e19c18326f7d00dcc180985a5
7
- data.tar.gz: cf26db2a8ee7d9379c01f2af44aa9b25c2b67a6d6b5fc8d09faa5d449dcfb89b6d8ef32e22cebb2f0dda1b68238f0982103a08e4d5d8accbb5635682f73532bd
6
+ metadata.gz: 51f8612124e1ada3e96eea2b3b4a8c885c356a74db04620121cb95eacffecd2502ba5bb1189c641de2e7ccce3bab04e4446c67aedd524287a649260f08126a81
7
+ data.tar.gz: 822abcdb744b627ef21138e65efa19101706a234639fc70fee2a9052098b9a0e550974640acda4ec1e6cab1d7114d2d670939843de5a742c26f4766f2dd24b40
@@ -4,7 +4,11 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
5
5
  and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
6
6
 
7
- ## [1.0.0] - Unreleased
7
+ ## [1.0.1] - Unreleased
8
+ ### Changed
9
+ - Check for high-level key as symbol
10
+
11
+ ## [1.0.0] - 2019-05-01
8
12
  ### Changed
9
13
  - How it works
10
14
 
@@ -70,7 +74,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
70
74
  ### Added
71
75
  - Initial Release
72
76
 
73
- [Unreleased]: https://github.com/WeInfuse/redox/compare/v0.1.6...HEAD
77
+ [Unreleased]: https://github.com/WeInfuse/redox/compare/v1.0.0...HEAD
78
+ [1.0.0]: https://github.com/WeInfuse/redox/compare/v0.1.6...v1.0.0
74
79
  [0.1.6]: https://github.com/WeInfuse/redox/compare/v0.1.5...v0.1.6
75
80
  [0.1.5]: https://github.com/WeInfuse/redox/compare/v0.1.4...v0.1.5
76
81
  [0.1.4]: https://github.com/WeInfuse/redox/compare/0.1.3...v0.1.4
@@ -12,15 +12,19 @@ module Redox
12
12
  alias_method :meta, :Meta
13
13
 
14
14
  def initialize(data = {})
15
- if (data.is_a?(Hash) && data.include?(key))
16
- data = data[key]
15
+ if data.is_a?(Hash)
16
+ if data.include?(key)
17
+ data = data[key]
18
+ elsif data.include?(key.to_sym)
19
+ data = data[key.to_sym]
20
+ end
17
21
  end
18
22
 
19
23
  super(data)
20
24
  end
21
25
 
22
26
  def to_h
23
- return {"#{key}" => super.to_h}
27
+ return { key => super.to_h }
24
28
  end
25
29
 
26
30
  def to_json
@@ -46,7 +50,7 @@ module Redox
46
50
  private
47
51
 
48
52
  def key
49
- return self.class.to_s.split('::').last
53
+ return self.class.to_s.split('::').last.to_s
50
54
  end
51
55
  end
52
56
  end
@@ -1,3 +1,3 @@
1
1
  module Redox
2
- VERSION = '1.0.0'.freeze
2
+ VERSION = '1.0.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redox
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
  - Alexander Clark
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-05-01 00:00:00.000000000 Z
11
+ date: 2019-05-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty