bigcartel 0.1.7 → 0.1.8
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 +7 -3
- metadata +35 -58
data/lib/bigcartel/version.rb
CHANGED
data/lib/bigcartel.rb
CHANGED
@@ -30,7 +30,7 @@ module BigCartel
|
|
30
30
|
|
31
31
|
class Store < Base
|
32
32
|
|
33
|
-
attr_reader :id, :description, :categories, :website, :products_count, :pages, :name, :url, :currency, :country
|
33
|
+
attr_reader :id, :description, :categories, :website, :products_count, :pages, :name, :url, :currency, :country, :artists
|
34
34
|
|
35
35
|
def initialize(id, data={})
|
36
36
|
@id = id
|
@@ -43,6 +43,7 @@ module BigCartel
|
|
43
43
|
@currency = data['currency']['code']
|
44
44
|
@country = data['country']['name']
|
45
45
|
@categories = data['categories'].map{|cat| Category.new(data['url'], cat)} unless data['categories'].blank?
|
46
|
+
@artists = data['artists'].map{|cat| Artist.new(data['url'], cat)} unless data['artists'].blank?
|
46
47
|
end
|
47
48
|
|
48
49
|
def self.find(id)
|
@@ -99,7 +100,7 @@ module BigCartel
|
|
99
100
|
end
|
100
101
|
|
101
102
|
class Product < Base
|
102
|
-
attr_reader :name, :permalink, :url, :description, :artists, :on_sale, :status, :categories, :price, :position, :url, :id, :tax, :images, :shipping, :options
|
103
|
+
attr_reader :name, :permalink, :url, :description, :artists, :on_sale, :status, :categories, :price, :position, :url, :id, :tax, :images, :shipping, :options,:default_price
|
103
104
|
def initialize(store_url, data={})
|
104
105
|
@name = data['name']
|
105
106
|
@description = data['description']
|
@@ -108,6 +109,7 @@ module BigCartel
|
|
108
109
|
@status = data['status']
|
109
110
|
@categories = data['categories'].map{|cat| Category.new(data['url'], cat)} unless data['categories'].blank?
|
110
111
|
@price = data['price']
|
112
|
+
@default_price = data['default_price']
|
111
113
|
@position = data['position']
|
112
114
|
@url = "#{store_url}#{data['url']}"
|
113
115
|
@id = data['id']
|
@@ -134,10 +136,12 @@ module BigCartel
|
|
134
136
|
|
135
137
|
|
136
138
|
class ProductOption < Base
|
137
|
-
attr_reader :name, :id
|
139
|
+
attr_reader :name, :id,:has_custom_price, :price
|
138
140
|
def initialize(data={})
|
139
141
|
@name = data['name']
|
140
142
|
@id = data['id']
|
143
|
+
@has_custom_price = data['has_custom_price']
|
144
|
+
@price = data['price']
|
141
145
|
end
|
142
146
|
end
|
143
147
|
|
metadata
CHANGED
@@ -1,61 +1,46 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: bigcartel
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
6
|
-
- 0
|
7
|
-
- 1
|
8
|
-
- 7
|
9
|
-
version: 0.1.7
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.8
|
5
|
+
prerelease:
|
10
6
|
platform: ruby
|
11
|
-
authors:
|
7
|
+
authors:
|
12
8
|
- Matt Anderson
|
13
9
|
autorequire:
|
14
10
|
bindir: bin
|
15
11
|
cert_chain: []
|
16
|
-
|
17
|
-
date: 2011-03-15 00:00:00 -05:00
|
12
|
+
date: 2011-07-22 00:00:00.000000000 -05:00
|
18
13
|
default_executable:
|
19
|
-
dependencies:
|
20
|
-
- !ruby/object:Gem::Dependency
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
21
16
|
name: rspec
|
22
|
-
|
23
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
17
|
+
requirement: &10848552 !ruby/object:Gem::Requirement
|
24
18
|
none: false
|
25
|
-
requirements:
|
19
|
+
requirements:
|
26
20
|
- - ~>
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
|
29
|
-
- 2
|
30
|
-
- 3
|
31
|
-
version: "2.3"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '2.3'
|
32
23
|
type: :development
|
33
|
-
version_requirements: *id001
|
34
|
-
- !ruby/object:Gem::Dependency
|
35
|
-
name: httparty
|
36
24
|
prerelease: false
|
37
|
-
|
25
|
+
version_requirements: *10848552
|
26
|
+
- !ruby/object:Gem::Dependency
|
27
|
+
name: httparty
|
28
|
+
requirement: &10848240 !ruby/object:Gem::Requirement
|
38
29
|
none: false
|
39
|
-
requirements:
|
30
|
+
requirements:
|
40
31
|
- - ~>
|
41
|
-
- !ruby/object:Gem::Version
|
42
|
-
segments:
|
43
|
-
- 0
|
44
|
-
- 7
|
45
|
-
- 3
|
32
|
+
- !ruby/object:Gem::Version
|
46
33
|
version: 0.7.3
|
47
34
|
type: :runtime
|
48
|
-
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: *10848240
|
49
37
|
description: A Ruby wrapper for the Big Cartel External REST API
|
50
|
-
email:
|
38
|
+
email:
|
51
39
|
- matt@tonkapark.com
|
52
40
|
executables: []
|
53
|
-
|
54
41
|
extensions: []
|
55
|
-
|
56
42
|
extra_rdoc_files: []
|
57
|
-
|
58
|
-
files:
|
43
|
+
files:
|
59
44
|
- .gitignore
|
60
45
|
- Gemfile
|
61
46
|
- README.mkd
|
@@ -66,36 +51,28 @@ files:
|
|
66
51
|
- spec/bigcartel_spec.rb
|
67
52
|
- spec/helper.rb
|
68
53
|
has_rdoc: true
|
69
|
-
homepage:
|
54
|
+
homepage: ''
|
70
55
|
licenses: []
|
71
|
-
|
72
56
|
post_install_message:
|
73
57
|
rdoc_options: []
|
74
|
-
|
75
|
-
require_paths:
|
58
|
+
require_paths:
|
76
59
|
- lib
|
77
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
60
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
78
61
|
none: false
|
79
|
-
requirements:
|
80
|
-
- -
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
|
83
|
-
|
84
|
-
version: "0"
|
85
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
62
|
+
requirements:
|
63
|
+
- - ! '>='
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: '0'
|
66
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
86
67
|
none: false
|
87
|
-
requirements:
|
88
|
-
- -
|
89
|
-
- !ruby/object:Gem::Version
|
90
|
-
|
91
|
-
- 0
|
92
|
-
version: "0"
|
68
|
+
requirements:
|
69
|
+
- - ! '>='
|
70
|
+
- !ruby/object:Gem::Version
|
71
|
+
version: '0'
|
93
72
|
requirements: []
|
94
|
-
|
95
73
|
rubyforge_project: bigcartel
|
96
|
-
rubygems_version: 1.
|
74
|
+
rubygems_version: 1.5.2
|
97
75
|
signing_key:
|
98
76
|
specification_version: 3
|
99
77
|
summary: Ruby wrapper for the Big Cartel API
|
100
78
|
test_files: []
|
101
|
-
|