gun_broker 0.4.9 → 0.4.10

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: e8e5c66914d0acda30e5841d1d1b2cbfac9cebc5
4
- data.tar.gz: 305cb9ec886056f9cbf0321d3d8c837d330c0ae6
3
+ metadata.gz: c687115710d2b3b4ae4077e5ff299b1075f30497
4
+ data.tar.gz: 6e23ed43316ff7fa3def0dfd86e201ed848ccf86
5
5
  SHA512:
6
- metadata.gz: a72d9ed72d9159675b931ff61a1127af2fbdaa68628015640f200ab61e7d9907035d4b85a97140469ef2ab7962e447b4fa174c7d3678c655dc2ca1dd4becc345
7
- data.tar.gz: 7d78c5c27d520f39322a37b09c29644ea06dac976ee70b603efa83f1a66b1327fa1f36c3831730387b58c174422e26bf589663efc1b7c8eac23c731c1e55752f
6
+ metadata.gz: 77af880adb23a7faf6834691dcc0268b3f00b4dc3d8d9a69499d04ff43a7b45a27c26489562350bfefa0ae222c62c40db642636d83fe1280f9d36206c833af1b
7
+ data.tar.gz: c95de60b57c154dd59d26a9ed4cbd6732d637df86d460897c1f977f4a3013eb96c6feb502118a6cbd61a8e74c6de46def89cd8ee1394e08e52d8c41ca0fecc2c
@@ -52,6 +52,11 @@ module GunBroker
52
52
  @attrs['title']
53
53
  end
54
54
 
55
+ # @return [String] GunBroker.com URL for this Item.
56
+ def url
57
+ "http://www.gunbroker.com/Auction/ViewItem.aspx?Item=#{id}"
58
+ end
59
+
55
60
  # @param key [String] An Item attribute name (from the JSON response).
56
61
  # @return The value of the given `key` or `nil`.
57
62
  def [](key)
@@ -1,3 +1,3 @@
1
1
  module GunBroker
2
- VERSION = "0.4.9"
2
+ VERSION = "0.4.10"
3
3
  end
@@ -94,4 +94,14 @@ describe GunBroker::Item do
94
94
  end
95
95
  end
96
96
 
97
+ context '#url' do
98
+ it 'returns a fully qualified URL' do
99
+ id = '123'
100
+ item = GunBroker::Item.new({ 'itemID' => id })
101
+ url = "http://www.gunbroker.com/Auction/ViewItem.aspx?Item=#{id}"
102
+
103
+ expect(item.url).to eq(url)
104
+ end
105
+ end
106
+
97
107
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gun_broker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.9
4
+ version: 0.4.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dale Campbell
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-19 00:00:00.000000000 Z
11
+ date: 2015-02-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler