materialize 0.4.4 → 0.4.5
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 +4 -4
- data/lib/materialize/entity.rb +8 -0
- data/lib/materialize/version.rb +1 -1
- metadata +2 -3
- data/materialize-0.4.3.gem +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4614df62a4649ce1c53837a9d66a5592cc703458
|
|
4
|
+
data.tar.gz: 6700185929eb5ef546ed0702e4410d2ccbc9f22d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d8579771a06deb6d6c8ac276ed9c4b208cdcab561616860f7fd6b442c33e085eb5d808f4ac8d05df888d0eac780f72b6a0f66eb528fe8d5f12d62f44309c9773
|
|
7
|
+
data.tar.gz: db44e73dd3841423f377371ce57e7d5d8c14b1dda904c969da4cda5d87bfb91741d7c379697a5e890a70351960f6b7cb1fec854ddf07fa66448222ebba525d21
|
data/lib/materialize/entity.rb
CHANGED
|
@@ -4,6 +4,8 @@ module Materialize
|
|
|
4
4
|
class Entity
|
|
5
5
|
include Utils
|
|
6
6
|
|
|
7
|
+
attr_reader :source
|
|
8
|
+
|
|
7
9
|
class << self
|
|
8
10
|
|
|
9
11
|
def wrap(entities_data)
|
|
@@ -15,6 +17,8 @@ module Materialize
|
|
|
15
17
|
end
|
|
16
18
|
|
|
17
19
|
def initialize(attributes)
|
|
20
|
+
@source = attributes
|
|
21
|
+
|
|
18
22
|
raise "Attributes must be a hash" unless attributes.is_a?(Hash)
|
|
19
23
|
|
|
20
24
|
attributes.each_pair do |key, value|
|
|
@@ -26,6 +30,10 @@ module Materialize
|
|
|
26
30
|
end
|
|
27
31
|
end
|
|
28
32
|
|
|
33
|
+
def empty?
|
|
34
|
+
source.empty?
|
|
35
|
+
end
|
|
36
|
+
|
|
29
37
|
private
|
|
30
38
|
|
|
31
39
|
def attempt_entity_conversion(key, value)
|
data/lib/materialize/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: materialize
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.4.
|
|
4
|
+
version: 0.4.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Stephen Fiser
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2018-01-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|
|
@@ -106,7 +106,6 @@ files:
|
|
|
106
106
|
- lib/materialize/response.rb
|
|
107
107
|
- lib/materialize/utils.rb
|
|
108
108
|
- lib/materialize/version.rb
|
|
109
|
-
- materialize-0.4.3.gem
|
|
110
109
|
- materialize.gemspec
|
|
111
110
|
homepage: http://bluebear.io
|
|
112
111
|
licenses:
|
data/materialize-0.4.3.gem
DELETED
|
Binary file
|