bigcartel 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/bigcartel/version.rb +1 -1
- data/lib/bigcartel.rb +4 -2
- metadata +4 -4
data/lib/bigcartel/version.rb
CHANGED
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
|
-
|
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:
|
4
|
+
hash: 21
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
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-
|
18
|
+
date: 2011-07-29 00:00:00 -05:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|