spree_suppliers 0.60.3 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (147) hide show
  1. metadata +41 -215
  2. data/README +0 -46
  3. data/Rakefile +0 -137
  4. data/app/controllers/admin/pickup_locations_controller.rb +0 -52
  5. data/app/controllers/admin/pickups_controller.rb +0 -84
  6. data/app/controllers/admin/shipping_options_controller.rb +0 -32
  7. data/app/controllers/admin/supplier_taxons_controller.rb +0 -65
  8. data/app/controllers/admin/suppliers_controller.rb +0 -203
  9. data/app/controllers/admin/vendor_overview_controller.rb +0 -18
  10. data/app/controllers/dash/base_controller.rb +0 -10
  11. data/app/controllers/dash/overview_controller.rb +0 -6
  12. data/app/controllers/dash/pickup_locations_controller.rb +0 -27
  13. data/app/controllers/dash/pickups_controller.rb +0 -40
  14. data/app/controllers/dash/products_controller.rb +0 -15
  15. data/app/controllers/messages_controller.rb +0 -17
  16. data/app/controllers/suppliers_controller.rb +0 -19
  17. data/app/controllers/user_sessions_decorator.rb +0 -39
  18. data/app/helpers/admin/suppliers_helper.rb +0 -21
  19. data/app/helpers/cities_helper.rb +0 -2
  20. data/app/helpers/dragonfly_helper.rb +0 -16
  21. data/app/helpers/messages_helper.rb +0 -2
  22. data/app/helpers/suppliers_helper.rb +0 -16
  23. data/app/mailers/supplier_mailer.rb +0 -11
  24. data/app/models/ability_decorator.rb +0 -19
  25. data/app/models/delivery.rb +0 -6
  26. data/app/models/hour.rb +0 -4
  27. data/app/models/item.rb +0 -5
  28. data/app/models/message.rb +0 -3
  29. data/app/models/pickup.rb +0 -10
  30. data/app/models/pickup_date.rb +0 -3
  31. data/app/models/pickup_location.rb +0 -7
  32. data/app/models/supplier.rb +0 -33
  33. data/app/models/supplier_invoice.rb +0 -5
  34. data/app/views/admin/orders/index.html.erb +0 -107
  35. data/app/views/admin/orders/show.html.erb +0 -35
  36. data/app/views/admin/orders/user.html.erb +0 -19
  37. data/app/views/admin/pickup_locations/_pickup_location.html.erb +0 -10
  38. data/app/views/admin/pickup_locations/edit.html.erb +0 -44
  39. data/app/views/admin/pickup_locations/new.html.erb +0 -48
  40. data/app/views/admin/pickup_locations/show.html.erb +0 -1
  41. data/app/views/admin/pickups/_pickup.erb +0 -0
  42. data/app/views/admin/pickups/index.html.erb +0 -44
  43. data/app/views/admin/pickups/new.html.erb +0 -33
  44. data/app/views/admin/pickups/show.html.erb +0 -42
  45. data/app/views/admin/products/_suppliers_form.html.erb +0 -5
  46. data/app/views/admin/shared/_order_tabs_decide.html.erb +0 -5
  47. data/app/views/admin/shared/_vendor_order_tabs.html.erb +0 -39
  48. data/app/views/admin/shipping_options/edit.html.erb +0 -38
  49. data/app/views/admin/supplier_taxons/_form.html.erb +0 -23
  50. data/app/views/admin/supplier_taxons/_taxon_table.html.erb +0 -23
  51. data/app/views/admin/supplier_taxons/available.js.erb +0 -33
  52. data/app/views/admin/supplier_taxons/edit.html.erb +0 -11
  53. data/app/views/admin/supplier_taxons/remove.html.erb +0 -1
  54. data/app/views/admin/supplier_taxons/select.js.erb +0 -2
  55. data/app/views/admin/supplier_taxons/selected.html.erb +0 -51
  56. data/app/views/admin/suppliers/_edit_form.html.erb +0 -75
  57. data/app/views/admin/suppliers/_edit_hours_form.html.erb +0 -18
  58. data/app/views/admin/suppliers/_form.html.erb +0 -72
  59. data/app/views/admin/suppliers/_hours_form.html.erb +0 -11
  60. data/app/views/admin/suppliers/_image_form.html.erb +0 -40
  61. data/app/views/admin/suppliers/_supplier.html.erb +0 -37
  62. data/app/views/admin/suppliers/_supplier_tabs.html.erb +0 -18
  63. data/app/views/admin/suppliers/_suppliers_table.html.erb +0 -25
  64. data/app/views/admin/suppliers/_upload_image.html.erb +0 -14
  65. data/app/views/admin/suppliers/available.js.erb +0 -34
  66. data/app/views/admin/suppliers/edit.html.erb +0 -20
  67. data/app/views/admin/suppliers/index.html.erb +0 -102
  68. data/app/views/admin/suppliers/line_items.html.erb +0 -20
  69. data/app/views/admin/suppliers/new.html.erb +0 -22
  70. data/app/views/admin/suppliers/remove.html.erb +0 -1
  71. data/app/views/admin/suppliers/select.html.erb +0 -1
  72. data/app/views/admin/suppliers/selected.html.erb +0 -40
  73. data/app/views/admin/suppliers/show.html.erb +0 -2
  74. data/app/views/admin/users/_form.html.erb +0 -40
  75. data/app/views/admin/vendor_overview/index.html.erb +0 -1
  76. data/app/views/checkout/_delivery.html.erb +0 -5
  77. data/app/views/dash/overview/index.html.erb +0 -58
  78. data/app/views/dash/pickup_locations/_pickup_location.html.erb +0 -3
  79. data/app/views/dash/pickup_locations/new.html.erb +0 -47
  80. data/app/views/dash/pickups/_pickup.erb +0 -3
  81. data/app/views/dash/pickups/new.html.erb +0 -24
  82. data/app/views/dash/products/new.html.erb +0 -38
  83. data/app/views/layouts/admin.html.erb +0 -81
  84. data/app/views/messages/_message_form.html.erb +0 -17
  85. data/app/views/messages/create.html.erb +0 -2
  86. data/app/views/messages/destroy.html.erb +0 -2
  87. data/app/views/messages/new.html.erb +0 -2
  88. data/app/views/shared/_deliveries.html.erb +0 -113
  89. data/app/views/shared/_hours.html.erb +0 -21
  90. data/app/views/shared/_products_vendor.html.erb +0 -49
  91. data/app/views/shared/_supplier_invoices.html.erb +0 -67
  92. data/app/views/supplier_mailer/invoice_email.html.erb +0 -72
  93. data/app/views/suppliers/_supplier.html.erb +0 -7
  94. data/app/views/suppliers/_supplier_list.erb +0 -20
  95. data/app/views/suppliers/index.html.erb +0 -17
  96. data/app/views/suppliers/show.html.erb +0 -106
  97. data/app/views/suppliers/supplier_list.erb +0 -14
  98. data/config/initializers/dragonfly.rb +0 -8
  99. data/config/initializers/supplier_invoice_mailer.rb +0 -10
  100. data/config/locales/en-US.yml +0 -13
  101. data/config/routes.rb +0 -48
  102. data/db/migrate/20091209201716_supplier_setup.rb +0 -36
  103. data/db/migrate/20110922213437_create_messages.rb +0 -18
  104. data/db/migrate/20110928203155_create_hours.rb +0 -21
  105. data/db/migrate/20111006185052_create_pickups.rb +0 -17
  106. data/db/migrate/20111010191125_add_location_to_addresses.rb +0 -9
  107. data/db/migrate/20111010214313_create_pickup_dates.rb +0 -14
  108. data/db/migrate/20111011180211_add_supplier_id_to_user.rb +0 -9
  109. data/db/migrate/20111012211422_create_pickup_locations.rb +0 -21
  110. data/db/migrate/20111013155257_create_supplier_invoices.rb +0 -16
  111. data/db/migrate/20111013161225_create_items.rb +0 -18
  112. data/db/migrate/20111018133543_add_attributes_to_products.rb +0 -17
  113. data/db/migrate/20111028190454_add_attributes_to_assets.rb +0 -11
  114. data/db/migrate/20111029230805_create_suppliers_taxons.rb +0 -16
  115. data/db/migrate/20111101165933_create_deliveries.rb +0 -17
  116. data/db/migrate/20111108213108_create_shipping_methods_suppliers.rb +0 -16
  117. data/db/seeds.rb +0 -14
  118. data/lib/spree_suppliers.rb +0 -411
  119. data/lib/spree_suppliers_hooks.rb +0 -40
  120. data/lib/tasks/spree_suppliers.rake +0 -27
  121. data/public/javascripts/jquery-ui.js +0 -312
  122. data/public/javascripts/jquery-ui.multidatespicker.js +0 -398
  123. data/public/javascripts/jquery.ui.datepicker.js +0 -1791
  124. data/public/stylesheets/suppliers.css +0 -676
  125. data/spec/controllers/cities_controller_spec.rb +0 -157
  126. data/spec/controllers/shipping_options_controller_spec.rb +0 -12
  127. data/spec/helpers/cities_helper_spec.rb +0 -15
  128. data/spec/models/city_spec.rb +0 -5
  129. data/spec/models/comment_spec.rb +0 -64
  130. data/spec/models/item_spec.rb +0 -5
  131. data/spec/models/message_spec.rb +0 -5
  132. data/spec/models/pickup_date_spec.rb +0 -5
  133. data/spec/models/pickup_location_spec.rb +0 -5
  134. data/spec/models/pickup_spec.rb +0 -5
  135. data/spec/models/rating_spec.rb +0 -24
  136. data/spec/models/supplier_invoice_spec.rb +0 -5
  137. data/spec/models/supplier_spec.rb +0 -11
  138. data/spec/requests/cities_spec.rb +0 -11
  139. data/spec/routing/cities_routing_spec.rb +0 -35
  140. data/spec/spec.opts +0 -6
  141. data/spec/spec_helper.rb +0 -37
  142. data/spec/views/cities/edit.html.erb_spec.rb +0 -22
  143. data/spec/views/cities/index.html.erb_spec.rb +0 -28
  144. data/spec/views/cities/new.html.erb_spec.rb +0 -22
  145. data/spec/views/cities/show.html.erb_spec.rb +0 -21
  146. data/spec/views/shipping_options/edit.html.erb_spec.rb +0 -5
  147. data/spree_suppliers.gemspec +0 -24
metadata CHANGED
@@ -1,242 +1,68 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: spree_suppliers
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
4
5
  prerelease:
5
- version: 0.60.3
6
6
  platform: ruby
7
- authors:
8
- - JD Warren and Han Dao (Isotope11.com)
7
+ authors:
8
+ - JD Warren and Han Dao
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2011-12-02 00:00:00 Z
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
12
+ date: 2012-02-06 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
16
15
  name: spree_core
17
- prerelease: false
18
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: &10209160 !ruby/object:Gem::Requirement
19
17
  none: false
20
- requirements:
21
- - - ">="
22
- - !ruby/object:Gem::Version
23
- version: 0.60.3
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: 0.70.3
24
22
  type: :runtime
25
- version_requirements: *id001
26
- - !ruby/object:Gem::Dependency
27
- name: gmaps4rails
28
23
  prerelease: false
29
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: *10209160
25
+ - !ruby/object:Gem::Dependency
26
+ name: rspec-rails
27
+ requirement: &10539600 !ruby/object:Gem::Requirement
30
28
  none: false
31
- requirements:
32
- - - ">="
33
- - !ruby/object:Gem::Version
34
- version: 1.3.2
35
- type: :runtime
36
- version_requirements: *id002
37
- - !ruby/object:Gem::Dependency
38
- name: dragonfly
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ type: :development
39
34
  prerelease: false
40
- requirement: &id003 !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - ">="
44
- - !ruby/object:Gem::Version
45
- version: 0.9.4
46
- type: :runtime
47
- version_requirements: *id003
48
- - !ruby/object:Gem::Dependency
49
- name: rack-cache
50
- prerelease: false
51
- requirement: &id004 !ruby/object:Gem::Requirement
52
- none: false
53
- requirements:
54
- - - ">="
55
- - !ruby/object:Gem::Version
56
- version: "0"
57
- type: :runtime
58
- version_requirements: *id004
59
- description: This gem adds multiple supplier/vendor support to spree by allowing mutliple vendors to be created and managed in the admin panel, so that each vendor can have a mini-store listing only their products. The default spree feel and operation of a combined products index showing all available products in the store is left intact, so customers can buy items from different vendors with a single checkout process. This extension can be used to simply add multiple supplier support to show off your vendors, or it can be used as a 3rd party gateway to link customers directly to suppliers.
35
+ version_requirements: *10539600
36
+ description: Add (optional) gem description here
60
37
  email: jd@isotope11.com
61
38
  executables: []
62
-
63
39
  extensions: []
64
-
65
40
  extra_rdoc_files: []
66
-
67
- files:
68
- - README
69
- - Rakefile
70
- - app/controllers/admin/pickup_locations_controller.rb
71
- - app/controllers/admin/pickups_controller.rb
72
- - app/controllers/admin/shipping_options_controller.rb
73
- - app/controllers/admin/supplier_taxons_controller.rb
74
- - app/controllers/admin/suppliers_controller.rb
75
- - app/controllers/admin/vendor_overview_controller.rb
76
- - app/controllers/dash/base_controller.rb
77
- - app/controllers/dash/overview_controller.rb
78
- - app/controllers/dash/pickup_locations_controller.rb
79
- - app/controllers/dash/pickups_controller.rb
80
- - app/controllers/dash/products_controller.rb
81
- - app/controllers/messages_controller.rb
82
- - app/controllers/suppliers_controller.rb
83
- - app/controllers/user_sessions_decorator.rb
84
- - app/helpers/admin/suppliers_helper.rb
85
- - app/helpers/cities_helper.rb
86
- - app/helpers/dragonfly_helper.rb
87
- - app/helpers/messages_helper.rb
88
- - app/helpers/suppliers_helper.rb
89
- - app/mailers/supplier_mailer.rb
90
- - app/models/ability_decorator.rb
91
- - app/models/delivery.rb
92
- - app/models/hour.rb
93
- - app/models/item.rb
94
- - app/models/message.rb
95
- - app/models/pickup.rb
96
- - app/models/pickup_date.rb
97
- - app/models/pickup_location.rb
98
- - app/models/supplier.rb
99
- - app/models/supplier_invoice.rb
100
- - app/views/admin/orders/index.html.erb
101
- - app/views/admin/orders/show.html.erb
102
- - app/views/admin/orders/user.html.erb
103
- - app/views/admin/pickup_locations/_pickup_location.html.erb
104
- - app/views/admin/pickup_locations/edit.html.erb
105
- - app/views/admin/pickup_locations/new.html.erb
106
- - app/views/admin/pickup_locations/show.html.erb
107
- - app/views/admin/pickups/_pickup.erb
108
- - app/views/admin/pickups/index.html.erb
109
- - app/views/admin/pickups/new.html.erb
110
- - app/views/admin/pickups/show.html.erb
111
- - app/views/admin/products/_suppliers_form.html.erb
112
- - app/views/admin/shared/_order_tabs_decide.html.erb
113
- - app/views/admin/shared/_vendor_order_tabs.html.erb
114
- - app/views/admin/shipping_options/edit.html.erb
115
- - app/views/admin/supplier_taxons/_form.html.erb
116
- - app/views/admin/supplier_taxons/_taxon_table.html.erb
117
- - app/views/admin/supplier_taxons/available.js.erb
118
- - app/views/admin/supplier_taxons/edit.html.erb
119
- - app/views/admin/supplier_taxons/remove.html.erb
120
- - app/views/admin/supplier_taxons/select.js.erb
121
- - app/views/admin/supplier_taxons/selected.html.erb
122
- - app/views/admin/suppliers/_edit_form.html.erb
123
- - app/views/admin/suppliers/_edit_hours_form.html.erb
124
- - app/views/admin/suppliers/_form.html.erb
125
- - app/views/admin/suppliers/_hours_form.html.erb
126
- - app/views/admin/suppliers/_image_form.html.erb
127
- - app/views/admin/suppliers/_supplier.html.erb
128
- - app/views/admin/suppliers/_supplier_tabs.html.erb
129
- - app/views/admin/suppliers/_suppliers_table.html.erb
130
- - app/views/admin/suppliers/_upload_image.html.erb
131
- - app/views/admin/suppliers/available.js.erb
132
- - app/views/admin/suppliers/edit.html.erb
133
- - app/views/admin/suppliers/index.html.erb
134
- - app/views/admin/suppliers/line_items.html.erb
135
- - app/views/admin/suppliers/new.html.erb
136
- - app/views/admin/suppliers/remove.html.erb
137
- - app/views/admin/suppliers/select.html.erb
138
- - app/views/admin/suppliers/selected.html.erb
139
- - app/views/admin/suppliers/show.html.erb
140
- - app/views/admin/users/_form.html.erb
141
- - app/views/admin/vendor_overview/index.html.erb
142
- - app/views/checkout/_delivery.html.erb
143
- - app/views/dash/overview/index.html.erb
144
- - app/views/dash/pickup_locations/_pickup_location.html.erb
145
- - app/views/dash/pickup_locations/new.html.erb
146
- - app/views/dash/pickups/_pickup.erb
147
- - app/views/dash/pickups/new.html.erb
148
- - app/views/dash/products/new.html.erb
149
- - app/views/layouts/admin.html.erb
150
- - app/views/messages/_message_form.html.erb
151
- - app/views/messages/create.html.erb
152
- - app/views/messages/destroy.html.erb
153
- - app/views/messages/new.html.erb
154
- - app/views/shared/_deliveries.html.erb
155
- - app/views/shared/_hours.html.erb
156
- - app/views/shared/_products_vendor.html.erb
157
- - app/views/shared/_supplier_invoices.html.erb
158
- - app/views/supplier_mailer/invoice_email.html.erb
159
- - app/views/suppliers/_supplier.html.erb
160
- - app/views/suppliers/_supplier_list.erb
161
- - app/views/suppliers/index.html.erb
162
- - app/views/suppliers/show.html.erb
163
- - app/views/suppliers/supplier_list.erb
164
- - config/initializers/dragonfly.rb
165
- - config/initializers/supplier_invoice_mailer.rb
166
- - config/locales/en-US.yml
167
- - config/routes.rb
168
- - db/migrate/20091209201716_supplier_setup.rb
169
- - db/migrate/20110922213437_create_messages.rb
170
- - db/migrate/20110928203155_create_hours.rb
171
- - db/migrate/20111006185052_create_pickups.rb
172
- - db/migrate/20111010191125_add_location_to_addresses.rb
173
- - db/migrate/20111010214313_create_pickup_dates.rb
174
- - db/migrate/20111011180211_add_supplier_id_to_user.rb
175
- - db/migrate/20111012211422_create_pickup_locations.rb
176
- - db/migrate/20111013155257_create_supplier_invoices.rb
177
- - db/migrate/20111013161225_create_items.rb
178
- - db/migrate/20111018133543_add_attributes_to_products.rb
179
- - db/migrate/20111028190454_add_attributes_to_assets.rb
180
- - db/migrate/20111029230805_create_suppliers_taxons.rb
181
- - db/migrate/20111101165933_create_deliveries.rb
182
- - db/migrate/20111108213108_create_shipping_methods_suppliers.rb
183
- - db/seeds.rb
184
- - lib/spree_suppliers.rb
185
- - lib/spree_suppliers_hooks.rb
186
- - lib/tasks/spree_suppliers.rake
187
- - public/javascripts/jquery-ui.js
188
- - public/javascripts/jquery-ui.multidatespicker.js
189
- - public/javascripts/jquery.ui.datepicker.js
190
- - public/stylesheets/suppliers.css
191
- - spec/controllers/cities_controller_spec.rb
192
- - spec/controllers/shipping_options_controller_spec.rb
193
- - spec/helpers/cities_helper_spec.rb
194
- - spec/models/city_spec.rb
195
- - spec/models/comment_spec.rb
196
- - spec/models/item_spec.rb
197
- - spec/models/message_spec.rb
198
- - spec/models/pickup_date_spec.rb
199
- - spec/models/pickup_location_spec.rb
200
- - spec/models/pickup_spec.rb
201
- - spec/models/rating_spec.rb
202
- - spec/models/supplier_invoice_spec.rb
203
- - spec/models/supplier_spec.rb
204
- - spec/requests/cities_spec.rb
205
- - spec/routing/cities_routing_spec.rb
206
- - spec/spec.opts
207
- - spec/spec_helper.rb
208
- - spec/views/cities/edit.html.erb_spec.rb
209
- - spec/views/cities/index.html.erb_spec.rb
210
- - spec/views/cities/new.html.erb_spec.rb
211
- - spec/views/cities/show.html.erb_spec.rb
212
- - spec/views/shipping_options/edit.html.erb_spec.rb
213
- - spree_suppliers.gemspec
214
- homepage: http://www.isotope11.com
41
+ files: []
42
+ homepage: http://github.com/johndavid400/spree_suppliers
215
43
  licenses: []
216
-
217
44
  post_install_message:
218
45
  rdoc_options: []
219
-
220
- require_paths:
46
+ require_paths:
221
47
  - lib
222
- required_ruby_version: !ruby/object:Gem::Requirement
48
+ required_ruby_version: !ruby/object:Gem::Requirement
223
49
  none: false
224
- requirements:
225
- - - ">="
226
- - !ruby/object:Gem::Version
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
227
53
  version: 1.9.2
228
- required_rubygems_version: !ruby/object:Gem::Requirement
54
+ required_rubygems_version: !ruby/object:Gem::Requirement
229
55
  none: false
230
- requirements:
231
- - - ">="
232
- - !ruby/object:Gem::Version
233
- version: "0"
234
- requirements:
56
+ requirements:
57
+ - - ! '>='
58
+ - !ruby/object:Gem::Version
59
+ version: '0'
60
+ requirements:
235
61
  - none
236
- rubyforge_project: spreecommerce
237
- rubygems_version: 1.8.12
62
+ rubyforge_project: spree_suppliers
63
+ rubygems_version: 1.8.15
238
64
  signing_key:
239
65
  specification_version: 3
240
- summary: Add suppliers to products.
66
+ summary: This gem adds multiple suppliers to spree, with the ability to associate
67
+ products with suppliers. Suppliers can be managed from the Admin interface.
241
68
  test_files: []
242
-
data/README DELETED
@@ -1,46 +0,0 @@
1
- This is an extension to run on top of spree 0.60.3 rails ecommerce engine.
2
-
3
- This extension provides functionality to use multiple suppliers/vendors, each selling their own products, but using a unified listing view so the customer is not affected by this and only makes one transaction. On the backend, smaller sub-orders called supplier invoices are created by grouping the products in an order by each product's supplier_id. A subtotal is generated for each supplier invoice, so the spree administrator can send out invoices to each supplier.
4
-
5
- To install:
6
-
7
- you must first have a running rails app:
8
- rails new spree_suppliers_test
9
- cd spree_suppliers_test
10
-
11
- You must also have a running Spree store:
12
- Add to Gemfile:
13
- gem 'rails', '3.0.9'
14
- gem 'spree', '0.60.3'
15
-
16
- then run:
17
- bundle install
18
- rake spree:install
19
- rake db:migrate
20
- rake db:seed
21
- rake db:admin:create
22
-
23
- To install the spree_suppliers extension:
24
- Add to Gemfile:
25
- gem 'spree_suppliers', :git => 'git://github.com/johndavid400/spree_suppliers.git'
26
-
27
- run the following:
28
- bundle install
29
- rake spree_suppliers:install
30
- rake db:migrate
31
-
32
- _---------------------------
33
-
34
- Before being able to check out, go to /admin and do the following things:
35
- 1. create a vendor (with valid address)
36
- 2. create a shipping method
37
- 3. create a payment method (use check as test)
38
- 4. edit vendor - add shipping option
39
- 5. add pickup and pickup location for vendor
40
- 6. add product for vendor - then edit to assign new product to the vendor
41
-
42
- Go through checkout process normally, then check orders page on the admin panel to view the details of an order and all supplier invoices that are created.
43
-
44
- There is a mailer in place that will send each individual supplier an email anytime a purchase is made from them. It will not show them the entire order, only the products purchased from them. The mailer is disabled (commented out) as there is no email smtp information yet. Once you fill this in, you can re-enable the mailer to send out emails.
45
-
46
-
data/Rakefile DELETED
@@ -1,137 +0,0 @@
1
- # I think this is the one that should be moved to the extension Rakefile template
2
-
3
- # In rails 1.2, plugins aren't available in the path until they're loaded.
4
- # Check to see if the rspec plugin is installed first and require
5
- # it if it is. If not, use the gem version.
6
-
7
- # Determine where the RSpec plugin is by loading the boot
8
- unless defined? SPREE_ROOT
9
- ENV["RAILS_ENV"] = "test"
10
- case
11
- when ENV["SPREE_ENV_FILE"]
12
- require File.dirname(ENV["SPREE_ENV_FILE"]) + "/boot"
13
- when File.dirname(__FILE__) =~ %r{vendor/SPREE/vendor/extensions}
14
- require "#{File.expand_path(File.dirname(__FILE__) + "/../../../../../")}/config/boot"
15
- else
16
- require "#{File.expand_path(File.dirname(__FILE__) + "/../../../")}/config/boot"
17
- end
18
- end
19
-
20
- require 'rake'
21
- require 'rake/rdoctask'
22
- require 'rake/testtask'
23
-
24
- rspec_base = File.expand_path(SPREE_ROOT + '/vendor/plugins/rspec/lib')
25
- $LOAD_PATH.unshift(rspec_base) if File.exist?(rspec_base)
26
- require 'spec/rake/spectask'
27
- # require 'spec/translator'
28
-
29
- # Cleanup the SPREE_ROOT constant so specs will load the environment
30
- Object.send(:remove_const, :SPREE_ROOT)
31
-
32
- extension_root = File.expand_path(File.dirname(__FILE__))
33
-
34
- task :default => :spec
35
- task :stats => "spec:statsetup"
36
-
37
- desc "Run all specs in spec directory"
38
- Spec::Rake::SpecTask.new(:spec) do |t|
39
- t.spec_opts = ['--options', "\"#{extension_root}/spec/spec.opts\""]
40
- t.spec_files = FileList["#{extension_root}/spec/**/*_spec.rb"]
41
- end
42
-
43
- namespace :spec do
44
- desc "Run all specs in spec directory with RCov"
45
- Spec::Rake::SpecTask.new(:rcov) do |t|
46
- t.spec_opts = ['--options', "\"#{extension_root}/spec/spec.opts\""]
47
- t.spec_files = FileList['spec/**/*_spec.rb']
48
- t.rcov = true
49
- t.rcov_opts = ['--exclude', 'spec', '--rails']
50
- end
51
-
52
- desc "Print Specdoc for all specs"
53
- Spec::Rake::SpecTask.new(:doc) do |t|
54
- t.spec_opts = ["--format", "specdoc", "--dry-run"]
55
- t.spec_files = FileList['spec/**/*_spec.rb']
56
- end
57
-
58
- [:models, :controllers, :views, :helpers].each do |sub|
59
- desc "Run the specs under spec/#{sub}"
60
- Spec::Rake::SpecTask.new(sub) do |t|
61
- t.spec_opts = ['--options', "\"#{extension_root}/spec/spec.opts\""]
62
- t.spec_files = FileList["spec/#{sub}/**/*_spec.rb"]
63
- end
64
- end
65
-
66
- # Hopefully no one has written their extensions in pre-0.9 style
67
- # desc "Translate specs from pre-0.9 to 0.9 style"
68
- # task :translate do
69
- # translator = ::Spec::Translator.new
70
- # dir = RAILS_ROOT + '/spec'
71
- # translator.translate(dir, dir)
72
- # end
73
-
74
- # Setup specs for stats
75
- task :statsetup do
76
- require 'code_statistics'
77
- ::STATS_DIRECTORIES << %w(Model\ specs spec/models)
78
- ::STATS_DIRECTORIES << %w(View\ specs spec/views)
79
- ::STATS_DIRECTORIES << %w(Controller\ specs spec/controllers)
80
- ::STATS_DIRECTORIES << %w(Helper\ specs spec/views)
81
- ::CodeStatistics::TEST_TYPES << "Model specs"
82
- ::CodeStatistics::TEST_TYPES << "View specs"
83
- ::CodeStatistics::TEST_TYPES << "Controller specs"
84
- ::CodeStatistics::TEST_TYPES << "Helper specs"
85
- ::STATS_DIRECTORIES.delete_if {|a| a[0] =~ /test/}
86
- end
87
-
88
- namespace :db do
89
- namespace :fixtures do
90
- desc "Load fixtures (from spec/fixtures) into the current environment's database. Load specific fixtures using FIXTURES=x,y"
91
- task :load => :environment do
92
- require 'active_record/fixtures'
93
- ActiveRecord::Base.establish_connection(RAILS_ENV.to_sym)
94
- (ENV['FIXTURES'] ? ENV['FIXTURES'].split(/,/) : Dir.glob(File.join(RAILS_ROOT, 'spec', 'fixtures', '*.{yml,csv}'))).each do |fixture_file|
95
- Fixtures.create_fixtures('spec/fixtures', File.basename(fixture_file, '.*'))
96
- end
97
- end
98
- end
99
- end
100
- end
101
-
102
- desc 'Generate documentation for the supplier extension.'
103
- Rake::RDocTask.new(:rdoc) do |rdoc|
104
- rdoc.rdoc_dir = 'rdoc'
105
- rdoc.title = 'SupplierExtension'
106
- rdoc.options << '--line-numbers' << '--inline-source'
107
- rdoc.rdoc_files.include('README')
108
- rdoc.rdoc_files.include('lib/**/*.rb')
109
- end
110
-
111
- # For extensions that are in transition
112
- desc 'Test the supplier extension.'
113
- Rake::TestTask.new(:test) do |t|
114
- t.libs << 'lib'
115
- t.pattern = 'test/**/*_test.rb'
116
- t.verbose = true
117
- end
118
-
119
- namespace :test do
120
- desc 'Functional test the supplier extension.'
121
- Rake::TestTask.new(:functionals) do |t|
122
- t.libs << 'lib'
123
- t.pattern = 'test/functional/*_test.rb'
124
- t.verbose = true
125
- end
126
-
127
- desc 'Unit test the supplier extension.'
128
- Rake::TestTask.new(:units) do |t|
129
- t.libs << 'lib'
130
- t.pattern = 'test/unit/*_test.rb'
131
- t.verbose = true
132
- end
133
- end
134
-
135
-
136
- # Load any custom rakefiles for extension
137
- Dir[File.dirname(__FILE__) + '/tasks/*.rake'].sort.each { |f| require f }