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 +4 -4
- data/CHANGELOG.md +7 -2
- data/lib/redox/models/model.rb +8 -4
- data/lib/redox/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 64ed984d8f77ebf8b4d713e14e86eb09065449ab0d970ab3994c876acc765216
|
4
|
+
data.tar.gz: 8661675122be3a20a6b0f1168dc898f99d128e43864769161cf5c3c1511f830f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 51f8612124e1ada3e96eea2b3b4a8c885c356a74db04620121cb95eacffecd2502ba5bb1189c641de2e7ccce3bab04e4446c67aedd524287a649260f08126a81
|
7
|
+
data.tar.gz: 822abcdb744b627ef21138e65efa19101706a234639fc70fee2a9052098b9a0e550974640acda4ec1e6cab1d7114d2d670939843de5a742c26f4766f2dd24b40
|
data/CHANGELOG.md
CHANGED
@@ -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.
|
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/
|
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
|
data/lib/redox/models/model.rb
CHANGED
@@ -12,15 +12,19 @@ module Redox
|
|
12
12
|
alias_method :meta, :Meta
|
13
13
|
|
14
14
|
def initialize(data = {})
|
15
|
-
if
|
16
|
-
|
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 {
|
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
|
data/lib/redox/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2019-05-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|