radiant-shop-extension 0.94.7 → 0.94.8
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/db/migrate/20110330042956_add_company_to_address.rb +8 -0
- data/lib/shop/tags/address.rb +1 -1
- data/radiant-shop-extension.gemspec +4 -3
- data/spec/datasets/shop_addresses.rb +2 -0
- data/spec/lib/shop/tags/address_spec.rb +12 -1
- data/spec/models/shop_address_spec.rb +7 -1
- metadata +42 -41
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.94.
|
1
|
+
0.94.8
|
data/lib/shop/tags/address.rb
CHANGED
@@ -28,7 +28,7 @@ module Shop
|
|
28
28
|
tag.expand unless tag.locals.send(of_type).present?
|
29
29
|
end
|
30
30
|
|
31
|
-
[:id, :name, :phone, :email, :unit, :street_1, :street_2, :city, :state, :country, :postcode].each do |method|
|
31
|
+
[:id, :name, :phone, :business, :email, :unit, :street_1, :street_2, :city, :state, :country, :postcode].each do |method|
|
32
32
|
tag "shop:cart:#{of_type}:#{method}" do |tag|
|
33
33
|
# Rescue is so we can have null inputs if no address exists
|
34
34
|
result = (tag.locals.send(of_type).send(method) rescue nil)
|
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{radiant-shop-extension}
|
8
|
-
s.version = "0.94.
|
8
|
+
s.version = "0.94.8"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Dirk Kelly", "John Barker", "Darcy Laycock"]
|
12
|
-
s.date = %q{2011-
|
12
|
+
s.date = %q{2011-03-30}
|
13
13
|
s.description = %q{Radiant Shop is an attempt at a simple but complete store. It includes Products, Categories, Orders and Credit Card Payments}
|
14
14
|
s.email = %q{dk@dirkkelly.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -143,6 +143,7 @@ Gem::Specification.new do |s|
|
|
143
143
|
"db/migrate/20101208121105_move_to_page_attachments.rb",
|
144
144
|
"db/migrate/20101214023052_fix_addressable_column_type.rb",
|
145
145
|
"db/migrate/20110119095350_add_position_to_shop_category.rb",
|
146
|
+
"db/migrate/20110330042956_add_company_to_address.rb",
|
146
147
|
"db/seed.rb",
|
147
148
|
"db/seeds/forms.rb",
|
148
149
|
"db/seeds/layouts.rb",
|
@@ -228,7 +229,7 @@ Gem::Specification.new do |s|
|
|
228
229
|
]
|
229
230
|
s.homepage = %q{http://github.com/squaretalent/radiant-shop-extension}
|
230
231
|
s.require_paths = ["lib"]
|
231
|
-
s.rubygems_version = %q{1.
|
232
|
+
s.rubygems_version = %q{1.5.3}
|
232
233
|
s.summary = %q{Shop Extension for Radiant CMS}
|
233
234
|
s.test_files = [
|
234
235
|
"spec/controllers/admin/shop/categories_controller_spec.rb",
|
@@ -6,6 +6,7 @@ class ShopAddressesDataset < Dataset::Base
|
|
6
6
|
create_record :shop_billing, :order_billing,
|
7
7
|
:name => 'Billing Address',
|
8
8
|
:phone => '1800 000 000',
|
9
|
+
:business => 'The Business',
|
9
10
|
:email => 'billing@billing.com',
|
10
11
|
:unit => 'a',
|
11
12
|
:street_1 => '1 Bill Street',
|
@@ -22,6 +23,7 @@ class ShopAddressesDataset < Dataset::Base
|
|
22
23
|
:name => 'Shipping Address',
|
23
24
|
:phone => '1800 000 000',
|
24
25
|
:email => 'shipping@shipping.com',
|
26
|
+
:business => 'The Business',
|
25
27
|
:unit => 'b',
|
26
28
|
:street_1 => '2 Ship Street',
|
27
29
|
:street_2 => 'Street Ship 2',
|
@@ -16,6 +16,7 @@ describe Shop::Tags::Address do
|
|
16
16
|
'shop:cart:billing:name',
|
17
17
|
'shop:cart:billing:phone',
|
18
18
|
'shop:cart:billing:email',
|
19
|
+
'shop:cart:billing:business',
|
19
20
|
'shop:cart:billing:unit',
|
20
21
|
'shop:cart:billing:street_1',
|
21
22
|
'shop:cart:billing:street_2',
|
@@ -29,6 +30,7 @@ describe Shop::Tags::Address do
|
|
29
30
|
'shop:cart:shipping:id',
|
30
31
|
'shop:cart:shipping:name',
|
31
32
|
'shop:cart:shipping:phone',
|
33
|
+
'shop:cart:shipping:business',
|
32
34
|
'shop:cart:shipping:email',
|
33
35
|
'shop:cart:shipping:unit',
|
34
36
|
'shop:cart:shipping:street_1',
|
@@ -186,6 +188,15 @@ describe Shop::Tags::Address do
|
|
186
188
|
@page.should render(tag).as(exp)
|
187
189
|
end
|
188
190
|
end
|
191
|
+
context 'shop:cart:billing:business' do
|
192
|
+
it 'should return the email' do
|
193
|
+
tag = %{<r:shop:cart:billing><r:business /></r:shop:cart:billing>}
|
194
|
+
exp = @billing.business
|
195
|
+
|
196
|
+
@page.should render(tag).as(exp)
|
197
|
+
end
|
198
|
+
end
|
199
|
+
|
189
200
|
context 'shop:cart:billing:email' do
|
190
201
|
it 'should return the email' do
|
191
202
|
tag = %{<r:shop:cart:billing><r:email /></r:shop:cart:billing>}
|
@@ -253,4 +264,4 @@ describe Shop::Tags::Address do
|
|
253
264
|
end
|
254
265
|
end
|
255
266
|
|
256
|
-
end
|
267
|
+
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: radiant-shop-extension
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 375
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 94
|
9
|
-
-
|
10
|
-
version: 0.94.
|
9
|
+
- 8
|
10
|
+
version: 0.94.8
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Dirk Kelly
|
@@ -17,12 +17,12 @@ autorequire:
|
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
19
|
|
20
|
-
date: 2011-
|
20
|
+
date: 2011-03-30 00:00:00 +08:00
|
21
21
|
default_executable:
|
22
22
|
dependencies:
|
23
23
|
- !ruby/object:Gem::Dependency
|
24
|
-
|
25
|
-
|
24
|
+
name: radiant
|
25
|
+
version_requirements: &id001 !ruby/object:Gem::Requirement
|
26
26
|
none: false
|
27
27
|
requirements:
|
28
28
|
- - ">="
|
@@ -33,12 +33,12 @@ dependencies:
|
|
33
33
|
- 9
|
34
34
|
- 1
|
35
35
|
version: 0.9.1
|
36
|
+
prerelease: false
|
36
37
|
type: :runtime
|
37
|
-
|
38
|
-
version_requirements: *id001
|
38
|
+
requirement: *id001
|
39
39
|
- !ruby/object:Gem::Dependency
|
40
|
-
|
41
|
-
|
40
|
+
name: activemerchant
|
41
|
+
version_requirements: &id002 !ruby/object:Gem::Requirement
|
42
42
|
none: false
|
43
43
|
requirements:
|
44
44
|
- - ">="
|
@@ -49,12 +49,12 @@ dependencies:
|
|
49
49
|
- 8
|
50
50
|
- 0
|
51
51
|
version: 1.8.0
|
52
|
+
prerelease: false
|
52
53
|
type: :runtime
|
53
|
-
|
54
|
-
version_requirements: *id002
|
54
|
+
requirement: *id002
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
|
57
|
-
|
56
|
+
name: fastercsv
|
57
|
+
version_requirements: &id003 !ruby/object:Gem::Requirement
|
58
58
|
none: false
|
59
59
|
requirements:
|
60
60
|
- - ">="
|
@@ -65,12 +65,12 @@ dependencies:
|
|
65
65
|
- 5
|
66
66
|
- 3
|
67
67
|
version: 1.5.3
|
68
|
+
prerelease: false
|
68
69
|
type: :runtime
|
69
|
-
|
70
|
-
version_requirements: *id003
|
70
|
+
requirement: *id003
|
71
71
|
- !ruby/object:Gem::Dependency
|
72
|
-
|
73
|
-
|
72
|
+
name: acts_as_list
|
73
|
+
version_requirements: &id004 !ruby/object:Gem::Requirement
|
74
74
|
none: false
|
75
75
|
requirements:
|
76
76
|
- - ">="
|
@@ -81,12 +81,12 @@ dependencies:
|
|
81
81
|
- 1
|
82
82
|
- 2
|
83
83
|
version: 0.1.2
|
84
|
+
prerelease: false
|
84
85
|
type: :runtime
|
85
|
-
|
86
|
-
version_requirements: *id004
|
86
|
+
requirement: *id004
|
87
87
|
- !ruby/object:Gem::Dependency
|
88
|
-
|
89
|
-
|
88
|
+
name: radiant-settings-extension
|
89
|
+
version_requirements: &id005 !ruby/object:Gem::Requirement
|
90
90
|
none: false
|
91
91
|
requirements:
|
92
92
|
- - ">="
|
@@ -97,12 +97,12 @@ dependencies:
|
|
97
97
|
- 1
|
98
98
|
- 1
|
99
99
|
version: 1.1.1
|
100
|
+
prerelease: false
|
100
101
|
type: :runtime
|
101
|
-
|
102
|
-
version_requirements: *id005
|
102
|
+
requirement: *id005
|
103
103
|
- !ruby/object:Gem::Dependency
|
104
|
-
|
105
|
-
|
104
|
+
name: radiant-images-extension
|
105
|
+
version_requirements: &id006 !ruby/object:Gem::Requirement
|
106
106
|
none: false
|
107
107
|
requirements:
|
108
108
|
- - ">="
|
@@ -113,12 +113,12 @@ dependencies:
|
|
113
113
|
- 5
|
114
114
|
- 0
|
115
115
|
version: 0.5.0
|
116
|
+
prerelease: false
|
116
117
|
type: :runtime
|
117
|
-
|
118
|
-
version_requirements: *id006
|
118
|
+
requirement: *id006
|
119
119
|
- !ruby/object:Gem::Dependency
|
120
|
-
|
121
|
-
|
120
|
+
name: radiant-forms-extension
|
121
|
+
version_requirements: &id007 !ruby/object:Gem::Requirement
|
122
122
|
none: false
|
123
123
|
requirements:
|
124
124
|
- - ">="
|
@@ -129,12 +129,12 @@ dependencies:
|
|
129
129
|
- 2
|
130
130
|
- 6
|
131
131
|
version: 3.2.6
|
132
|
+
prerelease: false
|
132
133
|
type: :runtime
|
133
|
-
|
134
|
-
version_requirements: *id007
|
134
|
+
requirement: *id007
|
135
135
|
- !ruby/object:Gem::Dependency
|
136
|
-
|
137
|
-
|
136
|
+
name: radiant-users-extension
|
137
|
+
version_requirements: &id008 !ruby/object:Gem::Requirement
|
138
138
|
none: false
|
139
139
|
requirements:
|
140
140
|
- - ">="
|
@@ -145,12 +145,12 @@ dependencies:
|
|
145
145
|
- 0
|
146
146
|
- 2
|
147
147
|
version: 0.0.2
|
148
|
+
prerelease: false
|
148
149
|
type: :runtime
|
149
|
-
|
150
|
-
version_requirements: *id008
|
150
|
+
requirement: *id008
|
151
151
|
- !ruby/object:Gem::Dependency
|
152
|
-
|
153
|
-
|
152
|
+
name: radiant-drag_order-extension
|
153
|
+
version_requirements: &id009 !ruby/object:Gem::Requirement
|
154
154
|
none: false
|
155
155
|
requirements:
|
156
156
|
- - ">="
|
@@ -161,9 +161,9 @@ dependencies:
|
|
161
161
|
- 3
|
162
162
|
- 9
|
163
163
|
version: 0.3.9
|
164
|
+
prerelease: false
|
164
165
|
type: :runtime
|
165
|
-
|
166
|
-
version_requirements: *id009
|
166
|
+
requirement: *id009
|
167
167
|
description: Radiant Shop is an attempt at a simple but complete store. It includes Products, Categories, Orders and Credit Card Payments
|
168
168
|
email: dk@dirkkelly.com
|
169
169
|
executables: []
|
@@ -300,6 +300,7 @@ files:
|
|
300
300
|
- db/migrate/20101208121105_move_to_page_attachments.rb
|
301
301
|
- db/migrate/20101214023052_fix_addressable_column_type.rb
|
302
302
|
- db/migrate/20110119095350_add_position_to_shop_category.rb
|
303
|
+
- db/migrate/20110330042956_add_company_to_address.rb
|
303
304
|
- db/seed.rb
|
304
305
|
- db/seeds/forms.rb
|
305
306
|
- db/seeds/layouts.rb
|
@@ -412,7 +413,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
412
413
|
requirements: []
|
413
414
|
|
414
415
|
rubyforge_project:
|
415
|
-
rubygems_version: 1.
|
416
|
+
rubygems_version: 1.5.3
|
416
417
|
signing_key:
|
417
418
|
specification_version: 3
|
418
419
|
summary: Shop Extension for Radiant CMS
|