http_api_builder 0.2.0 → 0.2.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
  SHA1:
3
- metadata.gz: 8bb6287229132caf42b05f3b4fd2d7d0c0886979
4
- data.tar.gz: 8dc6d07fa9706a1d3dac2b8342c149e7ca12fc2a
3
+ metadata.gz: 7796e8b7a9fbd8fc64f84beae8ec2ad6236a24e8
4
+ data.tar.gz: bc5a8197c6efa397d9024edb66866fdef3585af0
5
5
  SHA512:
6
- metadata.gz: a96b2a7f66eea0ddc60bf6b66a240658a5ae483ae3958b4e64504dce81354cf8094b509428df12e3cc214cf6e59d462bcb9b648bbd14cd8ac8d142e8959159b8
7
- data.tar.gz: 8907e1793fc829b2d3a1cd097090b277e301e527c29c528367cc26260771e4cf25c84f06cb47e8499f4ddc2df7cb41f5b39e4eba34781582f3c3d1c144c1e57a
6
+ metadata.gz: 0ffbe2cc2866b2ed138fc96a01bf4865882d7b1f9865b06a1e1ba308dba1d7a63b2d5f5c8477ddb92e141b014193364e181b897d0646d49cc9bcbff9c8495654
7
+ data.tar.gz: abfa56a2491c0806f2067c498bc761c9b92c128de982508ccc293d552d0e18b6b96c379cd44a89c2ef106e316b4fe7573484cfd13b8f1dec4becdb1203978c79
@@ -35,7 +35,7 @@ module HttpApiBuilder
35
35
 
36
36
  VERBS.each do |v|
37
37
  define_method v do |path, **opts|
38
- consume path, using: v, **opts
38
+ endpoint path, using: v, **opts
39
39
  end
40
40
  end
41
41
 
@@ -57,8 +57,8 @@ module HttpApiBuilder
57
57
  # Raise an ArgumentError if not everything listed as required is not listed in supplied.
58
58
  #
59
59
  def validate_required_arguments(supplied, required)
60
- missing = supplied & required
61
- return if missing.sort == required.sort
60
+ missing = required - supplied
61
+ return if missing.empty?
62
62
 
63
63
  raise ArgumentError, "missing required arguments: #{missing.join(', ')}"
64
64
  end
@@ -1,3 +1,3 @@
1
1
  module HttpApiBuilder
2
- VERSION = '0.2.0'.freeze
2
+ VERSION = '0.2.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: http_api_builder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff Sandberg
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-04-05 00:00:00.000000000 Z
11
+ date: 2016-04-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler