bigcartel 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module BigCartel
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
data/lib/bigcartel.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  require 'httparty'
2
+ require 'uri'
2
3
 
3
4
  module BigCartel
4
5
 
@@ -155,12 +156,13 @@ module BigCartel
155
156
  end
156
157
 
157
158
  def self.add(id, store_url, page)
158
- Page.new(store_url, self.fetch(id, page['permalink']))
159
+ page_permalink = page['permalink']
160
+ Page.new(store_url, self.fetch(id, page_permalink))
159
161
  end
160
162
 
161
163
  protected
162
164
  def self.fetch(id, page)
163
- get("/#{id}/page/#{page}.js", :headers => {'Accept' => 'application/json'})
165
+ get(URI.encode("/#{id}/page/#{page}.js"), :headers => {'Accept' => 'application/json'})
164
166
  end
165
167
  end
166
168
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bigcartel
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 0
10
- version: 0.2.0
9
+ - 1
10
+ version: 0.2.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Matt Anderson
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-07-28 00:00:00 -05:00
18
+ date: 2011-07-29 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency