noun-project-api 2.0.0 → 2.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: 94eaa51b84658f3763af7b3fe27e9f3f2f3b2666be78a2e580f0b2b569fcc10c
4
- data.tar.gz: f5cc891b28b004f1680f4176725775a02d616d720423357d36d3c5105a49e0ce
3
+ metadata.gz: bbb311ca73f82163024bcb0df6be86691aa3a330a92633e1a4aa88d6f205f572
4
+ data.tar.gz: 5ca5acd613a7182f320cf4b70fd5f4d3a4a255ce5f3a8673df71a6cb39cc97c0
5
5
  SHA512:
6
- metadata.gz: fa6d50bafc00705171eec159e1290719299b5422ea956e1d8c8681365e6654fb444419e938de2ce00b80f50dc9142bc0fe4e0d146557bd89aa4ce728719886f2
7
- data.tar.gz: a3830940fe3886f39575ee050503ee8884062f23bc7c6ed34b43aa565d67d437fe320f3c4f3c1cb4bf4902b4b4a18a1ab3df52e87261d83271658044821bcab6
6
+ metadata.gz: c6c535dc993850089e01b5fd9e3bfa586d89844abd033f5f09ea29f2bf4626a39405d1506a64ee5e89de71ece597811bfa3e37a5b8ed3c64ca194e9e03298bb8
7
+ data.tar.gz: c312621d5e9be931e6634af8f9869754b67360bd53abdf4720f395c7ad2b13a54656db7f60414f893ce087dae7bf20ff37e99b26caab8f4dc714446d5bdf7fc4
@@ -24,7 +24,7 @@ module NounProjectApi
24
24
  args.each { |k, v| search += "&#{k}=#{v}" } if args.size > 0
25
25
 
26
26
  result = access_token.get("#{API_BASE}#{API_PATH}#{search}")
27
- raise ArgumentError.new("Bad request") unless %w(200 404).include? result.code
27
+ raise ServiceError.new(result.code, result.body) unless %w(200 404).include? result.code
28
28
 
29
29
  if result.code == "200"
30
30
  JSON.parse(result.body)["icons"].map { |icon| Icon.new(icon) }
@@ -51,7 +51,7 @@ module NounProjectApi
51
51
  end
52
52
 
53
53
  result = access_token.get("#{API_BASE}#{API_PATH}recent_uploads#{search}")
54
- raise ArgumentError.new("Bad request") unless result.code == "200"
54
+ raise ServiceError.new(result.code, result.body) unless result.code == "200"
55
55
 
56
56
  JSON.parse(result.body)["recent_uploads"].map { |icon| Icon.new(icon) }
57
57
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: noun-project-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nadav Shatz