piggybak 0.1.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. data/Gemfile +2 -0
  2. data/Gemfile.lock +5 -0
  3. data/README.md +117 -0
  4. data/Rakefile +2 -1
  5. data/VERSION +1 -1
  6. data/app/assets/javascripts/piggybak.js +62 -2
  7. data/app/controllers/piggybak/orders_controller.rb +26 -5
  8. data/{lib/application_helper.rb → app/helpers/piggybak_helper.rb} +6 -1
  9. data/app/models/piggybak/address.rb +14 -1
  10. data/app/models/piggybak/cart.rb +19 -12
  11. data/app/models/piggybak/country.rb +5 -0
  12. data/app/models/piggybak/credit.rb +8 -0
  13. data/app/models/piggybak/line_item.rb +13 -6
  14. data/app/models/piggybak/order.rb +12 -6
  15. data/app/models/piggybak/payment.rb +5 -3
  16. data/app/models/piggybak/payment_calculator/authorize_net.rb +4 -0
  17. data/app/models/piggybak/payment_calculator/fake.rb +4 -0
  18. data/app/models/piggybak/payment_method.rb +8 -3
  19. data/app/models/piggybak/shipping_calculator/free.rb +13 -0
  20. data/app/models/piggybak/shipping_calculator/pickup.rb +1 -1
  21. data/app/models/piggybak/shipping_method.rb +9 -7
  22. data/app/models/piggybak/state.rb +1 -0
  23. data/app/models/piggybak/tax_calculator/{flat_rate.rb → percent.rb} +1 -1
  24. data/app/models/piggybak/tax_method.rb +8 -2
  25. data/app/models/piggybak/{product.rb → variant.rb} +5 -4
  26. data/app/views/piggybak/cart/_form.html.erb +7 -7
  27. data/app/views/piggybak/cart/_items.html.erb +9 -9
  28. data/app/views/piggybak/cart/show.html.erb +2 -0
  29. data/app/views/piggybak/notifier/order_notification.text.erb +1 -1
  30. data/app/views/piggybak/orders/_address_form.html.erb +18 -14
  31. data/app/views/piggybak/orders/_details.html.erb +48 -0
  32. data/app/views/piggybak/orders/download.text.erb +19 -0
  33. data/app/views/piggybak/orders/list.html.erb +12 -12
  34. data/app/views/piggybak/orders/no_access.text.erb +1 -0
  35. data/app/views/piggybak/orders/receipt.html.erb +1 -49
  36. data/app/views/piggybak/orders/show.html.erb +36 -31
  37. data/app/views/rails_admin/main/_actions.html.erb +9 -2
  38. data/config/routes.rb +12 -3
  39. data/db/migrate/20111227150106_create_orders.rb +4 -3
  40. data/db/migrate/20111227150322_create_addresses.rb +2 -1
  41. data/db/migrate/20111227150432_create_line_items.rb +2 -2
  42. data/db/migrate/{20111227213558_create_products.rb → 20111227213558_create_variants.rb} +3 -3
  43. data/db/migrate/20111228231829_create_payments.rb +3 -1
  44. data/db/migrate/20111228231838_create_shipments.rb +1 -1
  45. data/db/migrate/20120102162414_create_countries.rb +10 -0
  46. data/db/migrate/20120102162415_create_states.rb +1 -0
  47. data/db/migrate/20120104020930_populate_countries_and_states.rb +18 -0
  48. data/db/migrate/20120106010412_create_credits.rb +14 -0
  49. data/lib/{acts_as_product → acts_as_variant}/base.rb +6 -6
  50. data/lib/piggybak.rb +59 -23
  51. data/piggybak.gemspec +26 -11
  52. metadata +64 -62
  53. data/README.rdoc +0 -19
@@ -5,29 +5,32 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "piggybak"
8
- s.version = "0.1.1"
8
+ s.version = "0.2.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Steph Skardal"]
12
- s.date = "2012-01-03"
11
+ s.authors = ["Steph Skardal", "Brian Buchalter"]
12
+ s.date = "2012-01-06"
13
13
  s.description = "Mountable ecommerce"
14
14
  s.email = "steph@endpoint.com"
15
15
  s.extra_rdoc_files = [
16
- "README.rdoc"
16
+ "README.md"
17
17
  ]
18
18
  s.files = [
19
19
  ".document",
20
20
  "Gemfile",
21
21
  "Gemfile.lock",
22
- "README.rdoc",
22
+ "README.md",
23
23
  "Rakefile",
24
24
  "VERSION",
25
25
  "app/assets/javascripts/piggybak.js",
26
26
  "app/controllers/piggybak/cart_controller.rb",
27
27
  "app/controllers/piggybak/orders_controller.rb",
28
+ "app/helpers/piggybak_helper.rb",
28
29
  "app/mailers/piggybak/notifier.rb",
29
30
  "app/models/piggybak/address.rb",
30
31
  "app/models/piggybak/cart.rb",
32
+ "app/models/piggybak/country.rb",
33
+ "app/models/piggybak/credit.rb",
31
34
  "app/models/piggybak/line_item.rb",
32
35
  "app/models/piggybak/order.rb",
33
36
  "app/models/piggybak/payment.rb",
@@ -36,25 +39,29 @@ Gem::Specification.new do |s|
36
39
  "app/models/piggybak/payment_calculator/fake.rb",
37
40
  "app/models/piggybak/payment_method.rb",
38
41
  "app/models/piggybak/payment_method_value.rb",
39
- "app/models/piggybak/product.rb",
40
42
  "app/models/piggybak/shipment.rb",
41
43
  "app/models/piggybak/shipping_calculator.rb",
42
44
  "app/models/piggybak/shipping_calculator/flat_rate.rb",
45
+ "app/models/piggybak/shipping_calculator/free.rb",
43
46
  "app/models/piggybak/shipping_calculator/pickup.rb",
44
47
  "app/models/piggybak/shipping_calculator/range.rb",
45
48
  "app/models/piggybak/shipping_method.rb",
46
49
  "app/models/piggybak/shipping_method_value.rb",
47
50
  "app/models/piggybak/state.rb",
48
51
  "app/models/piggybak/tax_calculator.rb",
49
- "app/models/piggybak/tax_calculator/flat_rate.rb",
52
+ "app/models/piggybak/tax_calculator/percent.rb",
50
53
  "app/models/piggybak/tax_method.rb",
51
54
  "app/models/piggybak/tax_method_value.rb",
55
+ "app/models/piggybak/variant.rb",
52
56
  "app/views/piggybak/cart/_form.html.erb",
53
57
  "app/views/piggybak/cart/_items.html.erb",
54
58
  "app/views/piggybak/cart/show.html.erb",
55
59
  "app/views/piggybak/notifier/order_notification.text.erb",
56
60
  "app/views/piggybak/orders/_address_form.html.erb",
61
+ "app/views/piggybak/orders/_details.html.erb",
62
+ "app/views/piggybak/orders/download.text.erb",
57
63
  "app/views/piggybak/orders/list.html.erb",
64
+ "app/views/piggybak/orders/no_access.text.erb",
58
65
  "app/views/piggybak/orders/receipt.html.erb",
59
66
  "app/views/piggybak/orders/show.html.erb",
60
67
  "app/views/rails_admin/main/_actions.html.erb",
@@ -62,7 +69,7 @@ Gem::Specification.new do |s|
62
69
  "db/migrate/20111227150106_create_orders.rb",
63
70
  "db/migrate/20111227150322_create_addresses.rb",
64
71
  "db/migrate/20111227150432_create_line_items.rb",
65
- "db/migrate/20111227213558_create_products.rb",
72
+ "db/migrate/20111227213558_create_variants.rb",
66
73
  "db/migrate/20111228231756_create_shipping_methods.rb",
67
74
  "db/migrate/20111228231806_create_payment_methods.rb",
68
75
  "db/migrate/20111228231829_create_payments.rb",
@@ -70,11 +77,13 @@ Gem::Specification.new do |s|
70
77
  "db/migrate/20111228235852_create_shipping_method_values.rb",
71
78
  "db/migrate/20111228235853_create_payment_method_values.rb",
72
79
  "db/migrate/20120102154050_create_tax_methods.rb",
80
+ "db/migrate/20120102162414_create_countries.rb",
73
81
  "db/migrate/20120102162415_create_states.rb",
74
82
  "db/migrate/20120102162703_create_tax_method_values.rb",
83
+ "db/migrate/20120104020930_populate_countries_and_states.rb",
84
+ "db/migrate/20120106010412_create_credits.rb",
75
85
  "lib/acts_as_orderer/base.rb",
76
- "lib/acts_as_product/base.rb",
77
- "lib/application_helper.rb",
86
+ "lib/acts_as_variant/base.rb",
78
87
  "lib/currency.rb",
79
88
  "lib/piggybak.rb",
80
89
  "piggybak.gemspec"
@@ -82,34 +91,40 @@ Gem::Specification.new do |s|
82
91
  s.homepage = "http://github.com/stephskardal/piggybak"
83
92
  s.licenses = ["MIT"]
84
93
  s.require_paths = ["lib"]
85
- s.rubygems_version = "1.8.13"
94
+ s.rubygems_version = "1.8.11"
86
95
  s.summary = "Mountable ecommerce"
87
96
 
88
97
  if s.respond_to? :specification_version then
89
98
  s.specification_version = 3
90
99
 
91
100
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
101
+ s.add_runtime_dependency(%q<countries>, [">= 0"])
92
102
  s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
93
103
  s.add_development_dependency(%q<jeweler>, ["~> 1.6.4"])
94
104
  s.add_development_dependency(%q<rcov>, [">= 0"])
95
105
  s.add_runtime_dependency(%q<rails_admin>, [">= 0"])
96
106
  s.add_runtime_dependency(%q<devise>, [">= 0"])
97
107
  s.add_runtime_dependency(%q<activemerchant>, [">= 0"])
108
+ s.add_runtime_dependency(%q<countries>, [">= 0"])
98
109
  else
110
+ s.add_dependency(%q<countries>, [">= 0"])
99
111
  s.add_dependency(%q<bundler>, ["~> 1.0.0"])
100
112
  s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
101
113
  s.add_dependency(%q<rcov>, [">= 0"])
102
114
  s.add_dependency(%q<rails_admin>, [">= 0"])
103
115
  s.add_dependency(%q<devise>, [">= 0"])
104
116
  s.add_dependency(%q<activemerchant>, [">= 0"])
117
+ s.add_dependency(%q<countries>, [">= 0"])
105
118
  end
106
119
  else
120
+ s.add_dependency(%q<countries>, [">= 0"])
107
121
  s.add_dependency(%q<bundler>, ["~> 1.0.0"])
108
122
  s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
109
123
  s.add_dependency(%q<rcov>, [">= 0"])
110
124
  s.add_dependency(%q<rails_admin>, [">= 0"])
111
125
  s.add_dependency(%q<devise>, [">= 0"])
112
126
  s.add_dependency(%q<activemerchant>, [">= 0"])
127
+ s.add_dependency(%q<countries>, [">= 0"])
113
128
  end
114
129
  end
115
130
 
metadata CHANGED
@@ -1,110 +1,106 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: piggybak
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
5
4
  prerelease:
6
- segments:
7
- - 0
8
- - 1
9
- - 1
10
- version: 0.1.1
5
+ version: 0.2.0
11
6
  platform: ruby
12
7
  authors:
13
8
  - Steph Skardal
9
+ - Brian Buchalter
14
10
  autorequire:
15
11
  bindir: bin
16
12
  cert_chain: []
17
13
 
18
- date: 2012-01-03 00:00:00 Z
14
+ date: 2012-01-06 00:00:00 Z
19
15
  dependencies:
20
16
  - !ruby/object:Gem::Dependency
21
- type: :development
17
+ name: countries
22
18
  requirement: &id001 !ruby/object:Gem::Requirement
23
19
  none: false
24
20
  requirements:
25
- - - ~>
21
+ - - ">="
26
22
  - !ruby/object:Gem::Version
27
- hash: 23
28
- segments:
29
- - 1
30
- - 0
31
- - 0
32
- version: 1.0.0
33
- version_requirements: *id001
34
- name: bundler
23
+ version: "0"
24
+ type: :runtime
35
25
  prerelease: false
26
+ version_requirements: *id001
36
27
  - !ruby/object:Gem::Dependency
37
- type: :development
28
+ name: bundler
38
29
  requirement: &id002 !ruby/object:Gem::Requirement
39
30
  none: false
40
31
  requirements:
41
32
  - - ~>
42
33
  - !ruby/object:Gem::Version
43
- hash: 7
44
- segments:
45
- - 1
46
- - 6
47
- - 4
48
- version: 1.6.4
49
- version_requirements: *id002
50
- name: jeweler
34
+ version: 1.0.0
35
+ type: :development
51
36
  prerelease: false
37
+ version_requirements: *id002
52
38
  - !ruby/object:Gem::Dependency
53
- type: :development
39
+ name: jeweler
54
40
  requirement: &id003 !ruby/object:Gem::Requirement
55
41
  none: false
56
42
  requirements:
57
- - - ">="
43
+ - - ~>
58
44
  - !ruby/object:Gem::Version
59
- hash: 3
60
- segments:
61
- - 0
62
- version: "0"
63
- version_requirements: *id003
64
- name: rcov
45
+ version: 1.6.4
46
+ type: :development
65
47
  prerelease: false
48
+ version_requirements: *id003
66
49
  - !ruby/object:Gem::Dependency
67
- type: :runtime
50
+ name: rcov
68
51
  requirement: &id004 !ruby/object:Gem::Requirement
69
52
  none: false
70
53
  requirements:
71
54
  - - ">="
72
55
  - !ruby/object:Gem::Version
73
- hash: 3
74
- segments:
75
- - 0
76
56
  version: "0"
77
- version_requirements: *id004
78
- name: rails_admin
57
+ type: :development
79
58
  prerelease: false
59
+ version_requirements: *id004
80
60
  - !ruby/object:Gem::Dependency
81
- type: :runtime
61
+ name: rails_admin
82
62
  requirement: &id005 !ruby/object:Gem::Requirement
83
63
  none: false
84
64
  requirements:
85
65
  - - ">="
86
66
  - !ruby/object:Gem::Version
87
- hash: 3
88
- segments:
89
- - 0
90
67
  version: "0"
91
- version_requirements: *id005
92
- name: devise
68
+ type: :runtime
93
69
  prerelease: false
70
+ version_requirements: *id005
94
71
  - !ruby/object:Gem::Dependency
95
- type: :runtime
72
+ name: devise
96
73
  requirement: &id006 !ruby/object:Gem::Requirement
97
74
  none: false
98
75
  requirements:
99
76
  - - ">="
100
77
  - !ruby/object:Gem::Version
101
- hash: 3
102
- segments:
103
- - 0
104
78
  version: "0"
79
+ type: :runtime
80
+ prerelease: false
105
81
  version_requirements: *id006
82
+ - !ruby/object:Gem::Dependency
106
83
  name: activemerchant
84
+ requirement: &id007 !ruby/object:Gem::Requirement
85
+ none: false
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: "0"
90
+ type: :runtime
107
91
  prerelease: false
92
+ version_requirements: *id007
93
+ - !ruby/object:Gem::Dependency
94
+ name: countries
95
+ requirement: &id008 !ruby/object:Gem::Requirement
96
+ none: false
97
+ requirements:
98
+ - - ">="
99
+ - !ruby/object:Gem::Version
100
+ version: "0"
101
+ type: :runtime
102
+ prerelease: false
103
+ version_requirements: *id008
108
104
  description: Mountable ecommerce
109
105
  email: steph@endpoint.com
110
106
  executables: []
@@ -112,20 +108,23 @@ executables: []
112
108
  extensions: []
113
109
 
114
110
  extra_rdoc_files:
115
- - README.rdoc
111
+ - README.md
116
112
  files:
117
113
  - .document
118
114
  - Gemfile
119
115
  - Gemfile.lock
120
- - README.rdoc
116
+ - README.md
121
117
  - Rakefile
122
118
  - VERSION
123
119
  - app/assets/javascripts/piggybak.js
124
120
  - app/controllers/piggybak/cart_controller.rb
125
121
  - app/controllers/piggybak/orders_controller.rb
122
+ - app/helpers/piggybak_helper.rb
126
123
  - app/mailers/piggybak/notifier.rb
127
124
  - app/models/piggybak/address.rb
128
125
  - app/models/piggybak/cart.rb
126
+ - app/models/piggybak/country.rb
127
+ - app/models/piggybak/credit.rb
129
128
  - app/models/piggybak/line_item.rb
130
129
  - app/models/piggybak/order.rb
131
130
  - app/models/piggybak/payment.rb
@@ -134,25 +133,29 @@ files:
134
133
  - app/models/piggybak/payment_calculator/fake.rb
135
134
  - app/models/piggybak/payment_method.rb
136
135
  - app/models/piggybak/payment_method_value.rb
137
- - app/models/piggybak/product.rb
138
136
  - app/models/piggybak/shipment.rb
139
137
  - app/models/piggybak/shipping_calculator.rb
140
138
  - app/models/piggybak/shipping_calculator/flat_rate.rb
139
+ - app/models/piggybak/shipping_calculator/free.rb
141
140
  - app/models/piggybak/shipping_calculator/pickup.rb
142
141
  - app/models/piggybak/shipping_calculator/range.rb
143
142
  - app/models/piggybak/shipping_method.rb
144
143
  - app/models/piggybak/shipping_method_value.rb
145
144
  - app/models/piggybak/state.rb
146
145
  - app/models/piggybak/tax_calculator.rb
147
- - app/models/piggybak/tax_calculator/flat_rate.rb
146
+ - app/models/piggybak/tax_calculator/percent.rb
148
147
  - app/models/piggybak/tax_method.rb
149
148
  - app/models/piggybak/tax_method_value.rb
149
+ - app/models/piggybak/variant.rb
150
150
  - app/views/piggybak/cart/_form.html.erb
151
151
  - app/views/piggybak/cart/_items.html.erb
152
152
  - app/views/piggybak/cart/show.html.erb
153
153
  - app/views/piggybak/notifier/order_notification.text.erb
154
154
  - app/views/piggybak/orders/_address_form.html.erb
155
+ - app/views/piggybak/orders/_details.html.erb
156
+ - app/views/piggybak/orders/download.text.erb
155
157
  - app/views/piggybak/orders/list.html.erb
158
+ - app/views/piggybak/orders/no_access.text.erb
156
159
  - app/views/piggybak/orders/receipt.html.erb
157
160
  - app/views/piggybak/orders/show.html.erb
158
161
  - app/views/rails_admin/main/_actions.html.erb
@@ -160,7 +163,7 @@ files:
160
163
  - db/migrate/20111227150106_create_orders.rb
161
164
  - db/migrate/20111227150322_create_addresses.rb
162
165
  - db/migrate/20111227150432_create_line_items.rb
163
- - db/migrate/20111227213558_create_products.rb
166
+ - db/migrate/20111227213558_create_variants.rb
164
167
  - db/migrate/20111228231756_create_shipping_methods.rb
165
168
  - db/migrate/20111228231806_create_payment_methods.rb
166
169
  - db/migrate/20111228231829_create_payments.rb
@@ -168,11 +171,13 @@ files:
168
171
  - db/migrate/20111228235852_create_shipping_method_values.rb
169
172
  - db/migrate/20111228235853_create_payment_method_values.rb
170
173
  - db/migrate/20120102154050_create_tax_methods.rb
174
+ - db/migrate/20120102162414_create_countries.rb
171
175
  - db/migrate/20120102162415_create_states.rb
172
176
  - db/migrate/20120102162703_create_tax_method_values.rb
177
+ - db/migrate/20120104020930_populate_countries_and_states.rb
178
+ - db/migrate/20120106010412_create_credits.rb
173
179
  - lib/acts_as_orderer/base.rb
174
- - lib/acts_as_product/base.rb
175
- - lib/application_helper.rb
180
+ - lib/acts_as_variant/base.rb
176
181
  - lib/currency.rb
177
182
  - lib/piggybak.rb
178
183
  - piggybak.gemspec
@@ -189,7 +194,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
189
194
  requirements:
190
195
  - - ">="
191
196
  - !ruby/object:Gem::Version
192
- hash: 3
197
+ hash: -4394646372034307498
193
198
  segments:
194
199
  - 0
195
200
  version: "0"
@@ -198,14 +203,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
198
203
  requirements:
199
204
  - - ">="
200
205
  - !ruby/object:Gem::Version
201
- hash: 3
202
- segments:
203
- - 0
204
206
  version: "0"
205
207
  requirements: []
206
208
 
207
209
  rubyforge_project:
208
- rubygems_version: 1.8.13
210
+ rubygems_version: 1.8.11
209
211
  signing_key:
210
212
  specification_version: 3
211
213
  summary: Mountable ecommerce
@@ -1,19 +0,0 @@
1
- = piggybak
2
-
3
- Description goes here.
4
-
5
- == Contributing to piggybak
6
-
7
- * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
8
- * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
9
- * Fork the project
10
- * Start a feature/bugfix branch
11
- * Commit and push until you are happy with your contribution
12
- * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
13
- * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
14
-
15
- == Copyright
16
-
17
- Copyright (c) 2011 Steph Skardal. See LICENSE.txt for
18
- further details.
19
-