schemad 1.0.4 → 1.1.0

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: c11280c8f5037b191b4d313265c0ccb2ed009302
4
- data.tar.gz: 8cbcf77cd846be30909701a0e1cecb307370fbe7
3
+ metadata.gz: 22dcfa91d419a8bdb46c62d976fe058d56d570ad
4
+ data.tar.gz: a7f0d85297f614c3e8c36e979cea5f3b76fb3739
5
5
  SHA512:
6
- metadata.gz: 228f64747f5f15fc7f9b307aa4554948d0249c0fa01775201a92c02018b5fef3ba226110fe23d41c78546861da0dab550eb03833c23270b2fbb2dd0bd7967655
7
- data.tar.gz: 998f51721618db194450536817ad59f453c4ce89dff59995b0197b29dc3eaadb4d61b332ccfa68899e4a0fea8196c12a8f8d463b23a602fd9e579c82d41c5a69
6
+ metadata.gz: 8cfd1025e821061912028591b4fb83fe0927f0ddbf1344c31b346abc5e35ae822f251e12f319ddab64c6b291966f75b91ff9ec7c70b5ee07af457eacf2f040e9
7
+ data.tar.gz: 5c0bbfcabf696977922b6aafaac7ac663acda55635191093c4de6b83f844b35664d47252853e367158af73e154c8c72964aae775fc2ad948e03c7270151be8a2
@@ -13,7 +13,7 @@ module Schemad
13
13
  subclass.instance_variable_set(:@allowed_attributes, [])
14
14
  end
15
15
 
16
- def self.include_fields(fields)
16
+ def self.include_fields(*fields)
17
17
  @allowed_attributes.concat fields
18
18
  end
19
19
 
@@ -90,4 +90,4 @@ module Schemad
90
90
  self.class.normalizer_method_name(field)
91
91
  end
92
92
  end
93
- end
93
+ end
@@ -1,3 +1,3 @@
1
1
  module Schemad
2
- VERSION = "1.0.4"
2
+ VERSION = "1.1.0"
3
3
  end
@@ -35,7 +35,7 @@ describe Schemad::Normalizer do
35
35
  end
36
36
 
37
37
  context "additional fields" do
38
- Given { normalizer.class.include_fields [:beasts, :cool] }
38
+ Given { normalizer.class.include_fields :beasts, :cool }
39
39
  When(:normalized) { normalizer.normalize(data) }
40
40
 
41
41
  context "can be specified" do
@@ -100,11 +100,11 @@ describe Schemad::Normalizer do
100
100
  end
101
101
 
102
102
  context "can allow fields from nested data" do
103
- Given { BucketNormalizer.include_fields ["author/user/display_name"] }
103
+ Given { BucketNormalizer.include_fields "author/user/display_name" }
104
104
  Given(:normalizer) { BucketNormalizer.new }
105
105
  When(:results) { normalizer.normalize(data) }
106
106
  Then { results[:display_name].should == "Joseph Walton" }
107
107
  end
108
108
 
109
109
  end
110
- end
110
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: schemad
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luke van der Hoeven