spree 0.10.0.beta → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of spree might be problematic. Click here for more details.

Files changed (65) hide show
  1. data/README.markdown +36 -30
  2. data/app/controllers/admin/option_types_controller.rb +1 -1
  3. data/app/controllers/admin/payments_controller.rb +1 -1
  4. data/app/controllers/admin/products_controller.rb +4 -4
  5. data/app/controllers/admin/variants_controller.rb +2 -2
  6. data/app/controllers/checkouts_controller.rb +5 -11
  7. data/app/controllers/orders_controller.rb +10 -0
  8. data/app/controllers/user_sessions_controller.rb +16 -0
  9. data/app/models/product.rb +2 -1
  10. data/app/models/variant.rb +1 -1
  11. data/config/boot.rb +6 -6
  12. data/config/environment.rb +1 -1
  13. data/config/locales/cs-CZ.yml +12 -2
  14. data/config/locales/da.yml +12 -2
  15. data/config/locales/de-CH.yml +12 -2
  16. data/config/locales/de.yml +12 -2
  17. data/config/locales/en-AU.yml +12 -2
  18. data/config/locales/en-GB.yml +12 -2
  19. data/config/locales/en-US.yml +12 -2
  20. data/config/locales/es.yml +12 -2
  21. data/config/locales/fi.yml +12 -2
  22. data/config/locales/fr-FR.yml +12 -2
  23. data/config/locales/il.yml +12 -2
  24. data/config/locales/it.yml +12 -2
  25. data/config/locales/jp.yml +12 -2
  26. data/config/locales/mx.yml +12 -2
  27. data/config/locales/nb-NO.yml +12 -2
  28. data/config/locales/nl-BE.yml +12 -2
  29. data/config/locales/nl-NL.yml +12 -2
  30. data/config/locales/pl.yml +12 -2
  31. data/config/locales/pt-BR.yml +12 -2
  32. data/config/locales/pt-PT.yml +12 -2
  33. data/config/locales/ru-RU.yml +12 -2
  34. data/config/locales/th.yml +12 -2
  35. data/config/locales/vn.yml +12 -2
  36. data/db/migrate/20091021133257_charge_refactoring.rb +2 -2
  37. data/db/migrate/20100105132138_shipment_id_for_inventory_units.rb +4 -0
  38. data/db/schema.rb +1 -1
  39. data/lib/spree.rb +1 -1
  40. data/test/functional/admin/payments_controller_test.rb +7 -1
  41. data/test/integration/checkout_test.rb +59 -0
  42. data/test/test_helper.rb +1 -0
  43. data/test/unit/creditcard_test.rb +6 -0
  44. data/vendor/extensions/localization/app/controllers/locale_controller.rb +4 -1
  45. data/vendor/extensions/payment_gateway/lib/spree/payment_gateway.rb +1 -0
  46. data/vendor/extensions/theme_default/app/views/admin/option_types/selected.html.erb +1 -1
  47. data/vendor/extensions/theme_default/app/views/admin/orders/edit.html.erb +1 -0
  48. data/vendor/extensions/theme_default/app/views/admin/orders/new.html.erb +1 -0
  49. data/vendor/extensions/theme_default/app/views/admin/payments/_form.html.erb +1 -1
  50. data/vendor/extensions/theme_default/app/views/admin/payments/source_forms/_gateway.html.erb +2 -2
  51. data/vendor/extensions/theme_default/app/views/admin/products/_option_types.html.erb +1 -1
  52. data/vendor/extensions/theme_default/app/views/admin/shipments/edit.html.erb +1 -1
  53. data/vendor/extensions/theme_default/app/views/admin/shipments/index.html.erb +1 -1
  54. data/vendor/extensions/theme_default/app/views/admin/states/_state_list.html.erb +1 -1
  55. data/vendor/extensions/theme_default/app/views/admin/tax_categories/index.html.erb +1 -1
  56. data/vendor/extensions/theme_default/app/views/admin/zones/index.html.erb +1 -1
  57. data/vendor/extensions/theme_default/app/views/checkouts/_payment.html.erb +7 -11
  58. data/vendor/extensions/theme_default/app/views/checkouts/_summary.html.erb +9 -6
  59. data/vendor/extensions/theme_default/app/views/layouts/spree_application.html.erb +1 -1
  60. data/vendor/extensions/theme_default/app/views/shared/_login.html.erb +0 -1
  61. data/vendor/extensions/theme_default/app/views/users/_openid_identifier.html.erb +0 -1
  62. data/vendor/extensions/theme_default/public/javascripts/admin/orders/edit.js +1 -1
  63. data/vendor/extensions/theme_default/theme_default_extension.rb +0 -16
  64. data/vendor/plugins/resource_controller/lib/resource_controller/controller.rb +3 -3
  65. metadata +8 -9
@@ -21,7 +21,7 @@
21
21
  </tr>
22
22
  <% end %>
23
23
  <% if @option_types.empty? %>
24
- <tr><td colspan="3">None.</td></tr>
24
+ <tr><td colspan="3"><%= t(:none) %></td></tr>
25
25
  <% end %>
26
26
  </table>
27
27
 
@@ -20,6 +20,7 @@
20
20
  <% end %>
21
21
 
22
22
  <% content_for :head do %>
23
+ <%= javascript_tag "var expand_variants = true;" %>
23
24
  <%= javascript_include_tag 'admin/orders/edit.js' %>
24
25
  <%= stylesheet_link_tag 'admin/edit_orders.css' %>
25
26
  <% end %>
@@ -14,6 +14,7 @@
14
14
  <% end %>
15
15
 
16
16
  <% content_for :head do %>
17
+ <%= javascript_tag "var expand_variants = true;" %>
17
18
  <%= javascript_include_tag 'admin/orders/edit.js' %>
18
19
  <%= stylesheet_link_tag 'admin/edit_orders.css' %>
19
20
  <% end %>
@@ -7,7 +7,7 @@
7
7
 
8
8
  <label>
9
9
  <%= radio_button_tag "payment[payment_method_id]", method.id, method == @payment_method %>
10
- <%= method.name %>
10
+ <%= t(method.name, :scope => :payment_methods, :default => method.name) %>
11
11
  </label>
12
12
 
13
13
  <%= render "admin/payments/source_forms/#{method.method_type}", :payment_method => method %>
@@ -4,7 +4,7 @@
4
4
  <% for card in @previous_cards %>
5
5
  <label><%= radio_button_tag :card, card.id, card == @previous_cards.first %> <%= card.display_number %><br /></label>
6
6
  <% end %>
7
- <label><%= radio_button_tag :card, 'new', @previous_cards.none? %> Use a new card</label>
7
+ <label><%= radio_button_tag :card, 'new', @previous_cards.none? %> <%= t(:use_new_cc) %></label>
8
8
  </p>
9
9
 
10
10
  <div id="card_form">
@@ -40,4 +40,4 @@
40
40
 
41
41
  </div>
42
42
 
43
- </fieldset>
43
+ </fieldset>
@@ -23,7 +23,7 @@
23
23
  <% end %>
24
24
  <% if @product.selected_options.empty? %>
25
25
  <tr>
26
- <td colspan="3">None Selected.</td>
26
+ <td colspan="3"><%= t(:none) %></td>
27
27
  </tr>
28
28
  <% end %>
29
29
  </tbody>
@@ -14,7 +14,7 @@
14
14
  <%= render :partial => 'admin/shared/order_tabs', :locals => {:current => "Shipments"} %>
15
15
 
16
16
  <% hook :admin_shipment_edit_header do %>
17
- <h2><%= t('shipment') %> #<%= @shipment.number%> (<%= @shipment.state.to_s.humanize %>)</h2>
17
+ <h2><%= t('shipment') %> #<%= @shipment.number%> (<%= t(@shipment.state.to_sym, :scope => :state_names, :default => @shipment.state.to_s.humanize) %>)</h2>
18
18
  <% if @shipment.shipping_charge %>
19
19
  <h3><%= t('charges') %> <%= number_to_currency @shipment.shipping_charge.amount %></h3>
20
20
  <% end %>
@@ -29,7 +29,7 @@
29
29
  <td><%= shipment.shipping_method.name if shipment.shipping_method %></td>
30
30
  <td><%= number_to_currency shipment.cost %></td>
31
31
  <td><%= shipment.tracking %></td>
32
- <td><%= shipment.state.to_s.humanize %></td>
32
+ <td><%= t(shipment.state.to_sym, :scope => :state_names, :default => shipment.state.to_s.humanize) %></td>
33
33
  <td><%= shipment.shipped_at.to_s(:date_time24) if shipment.shipped_at %></td>
34
34
  <% end %>
35
35
  <td class="actions">
@@ -18,7 +18,7 @@
18
18
  </tr>
19
19
  <% end %>
20
20
  <% if @states.empty? %>
21
- <tr><td colspan="3">None.</td></tr>
21
+ <tr><td colspan="3"><%= t(:none) %></td></tr>
22
22
  <% end %>
23
23
  </tbody>
24
24
  </table>
@@ -30,7 +30,7 @@
30
30
  </tr>
31
31
  <% end %>
32
32
  <% if @tax_categories.empty? %>
33
- <tr><td colspan="3">None.</td></tr>
33
+ <tr><td colspan="3"><%= t(:none) %></td></tr>
34
34
  <% end %>
35
35
  </tbody>
36
36
  </table>
@@ -31,7 +31,7 @@
31
31
  </tr>
32
32
  <% end %>
33
33
  <% if @collection.empty? %>
34
- <tr><td colspan="2">None.</td></tr>
34
+ <tr><td colspan="2"><%= t(:none) %></td></tr>
35
35
  <% end %>
36
36
  </tbody>
37
37
  </table>
@@ -1,17 +1,13 @@
1
1
  <fieldset id="payment">
2
2
  <legend><%= t("payment_information") %></legend>
3
3
 
4
- <% if @payment_methods.many? %>
5
- <% @payment_methods.each do |method| %>
6
- <p>
7
- <label>
8
- <%= radio_button_tag "checkout[payments_attributes][][payment_method_id]", method.id, method == @payment_method %>
9
- <%= method.name %>
10
- </label>
11
- </p>
12
- <% end %>
13
- <% else %>
14
- <%= hidden_field_tag "checkout[payments_attributes][][payment_method_id]", @payment_method.id %>
4
+ <% @payment_methods.each do |method| %>
5
+ <p>
6
+ <label>
7
+ <%= radio_button_tag "checkout[payments_attributes][][payment_method_id]", method.id, method == @payment_method %>
8
+ <%= t(method.name, :scope => :payment_methods, :default => method.name) %>
9
+ </label>
10
+ </p>
15
11
  <% end %>
16
12
 
17
13
  <ul id="payment-methods">
@@ -27,10 +27,13 @@
27
27
  </tr>
28
28
  </tbody>
29
29
  </table>
30
- <% form_for @checkout, :url => object_url, :html => { :id => 'checkout-summary-form'} do |summary_form| %>
31
- <label><%= t(:coupon_code) %></label>
32
- <%= summary_form.text_field :coupon_code, :id => 'coupon-code', :size => 14 %>
33
- <input id="post-summary" type="submit" style="display:none"/>
34
- <%= image_tag "spinner.gif", :plugin=>"spree", :style => "display:none", :id => 'coupon_busy_indicator' %>
35
- <% end %>
30
+ <% unless @prev_state.blank? %>
31
+ <% form_for @checkout, :url => object_url, :html => { :id => 'checkout-summary-form'} do |summary_form| %>
32
+ <label><%= t(:coupon_code) %></label>
33
+ <%= summary_form.text_field :coupon_code, :id => 'coupon-code', :size => 14 %>
34
+ <input id="post-summary" type="submit" style="display:none"/>
35
+ <input type="hidden" name="step" value="<%= @prev_state %>"/>
36
+ <%= image_tag "spinner.gif", :plugin=>"spree", :style => "display:none", :id => 'coupon_busy_indicator' %>
37
+ <% end -%>
38
+ <% end -%>
36
39
  <div id="coupon-error"></div>
@@ -1,4 +1,4 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" [<!ATTLIST input autocomplete CDATA #IMPLIED>]>
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
2
  <html xmlns="http://www.w3.org/1999/xhtml">
3
3
  <head>
4
4
  <% hook :inside_head do %>
@@ -1,4 +1,3 @@
1
- <%= stylesheet_link_tag "open_id.css" %>
2
1
  <% form_tag user_session_path do %>
3
2
  <div id='password-credentials'>
4
3
  <p>
@@ -1,5 +1,4 @@
1
1
  <% if Spree::Config[:allow_openid] %>
2
- <%= stylesheet_link_tag "open_id.css" %>
3
2
  <% unless params[:user] && params[:user][:openid_identifier] %>
4
3
  <p><%= t(:or) %></p>
5
4
  <% end %>
@@ -50,7 +50,7 @@ jQuery(document).ready(function(){
50
50
 
51
51
  var product = row['product'];
52
52
 
53
- if(product['variants'].length>0){
53
+ if(product['variants'].length>0 && expand_variants){
54
54
  //variants
55
55
  return $.map(product['variants'], function(variant){
56
56
 
@@ -14,22 +14,6 @@ class ThemeDefaultExtension < Spree::Extension
14
14
 
15
15
  def activate
16
16
 
17
- # Add your extension tab to the admin.
18
- # Requires that you have defined an admin controller:
19
- # app/controllers/admin/yourextension_controller
20
- # and that you mapped your admin in config/routes
21
-
22
- #Admin::BaseController.class_eval do
23
- # before_filter :add_yourextension_tab
24
- #
25
- # def add_yourextension_tab
26
- # # add_extension_admin_tab takes an array containing the same arguments expected
27
- # # by the tab helper method:
28
- # # [ :extension_name, { :label => "Your Extension", :route => "/some/non/standard/route" } ]
29
- # add_extension_admin_tab [ :yourextension ]
30
- # end
31
- #end
32
-
33
17
  # make your helper avaliable in all views
34
18
  # Spree::BaseController.class_eval do
35
19
  # helper YourHelper
@@ -40,21 +40,21 @@ module ResourceController
40
40
  end
41
41
 
42
42
  create do
43
- flash I18n.t('resource_controller.successfully_created')
43
+ flash { I18n.t('resource_controller.successfully_created') }
44
44
  wants.html { redirect_to object_url }
45
45
 
46
46
  failure.wants.html { render :action => "new" }
47
47
  end
48
48
 
49
49
  update do
50
- flash I18n.t('resource_controller.successfully_updated')
50
+ flash { I18n.t('resource_controller.successfully_updated') }
51
51
  wants.html { redirect_to object_url }
52
52
 
53
53
  failure.wants.html { render :action => "edit" }
54
54
  end
55
55
 
56
56
  destroy do
57
- flash I18n.t('resource_controller.successfully_removed')
57
+ flash { I18n.t('resource_controller.successfully_removed') }
58
58
  wants.html { redirect_to collection_url }
59
59
  end
60
60
 
metadata CHANGED
@@ -1,13 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: true
4
+ prerelease: false
5
5
  segments:
6
6
  - 0
7
7
  - 10
8
8
  - 0
9
- - beta
10
- version: 0.10.0.beta
9
+ version: 0.10.0
11
10
  platform: ruby
12
11
  authors:
13
12
  - Sean Schofield
@@ -15,7 +14,7 @@ autorequire:
15
14
  bindir: bin
16
15
  cert_chain: []
17
16
 
18
- date: 2010-03-06 00:00:00 -05:00
17
+ date: 2010-03-13 00:00:00 -05:00
19
18
  default_executable: spree
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency
@@ -1495,6 +1494,7 @@ files:
1495
1494
  - test/functional/line_items_controller_test.rb
1496
1495
  - test/functional/products_controller_test.rb
1497
1496
  - test/functional/users_controller_test.rb
1497
+ - test/integration/checkout_test.rb
1498
1498
  - test/integration/searching_test.rb
1499
1499
  - test/shoulda_macros/should_redirect.rb
1500
1500
  - test/test_helper.rb
@@ -3004,13 +3004,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
3004
3004
  version: "0"
3005
3005
  required_rubygems_version: !ruby/object:Gem::Requirement
3006
3006
  requirements:
3007
- - - ">"
3007
+ - - ">="
3008
3008
  - !ruby/object:Gem::Version
3009
3009
  segments:
3010
- - 1
3011
- - 3
3012
- - 1
3013
- version: 1.3.1
3010
+ - 0
3011
+ version: "0"
3014
3012
  requirements: []
3015
3013
 
3016
3014
  rubyforge_project: spree
@@ -3091,6 +3089,7 @@ test_files:
3091
3089
  - test/functional/line_items_controller_test.rb
3092
3090
  - test/functional/products_controller_test.rb
3093
3091
  - test/functional/users_controller_test.rb
3092
+ - test/integration/checkout_test.rb
3094
3093
  - test/integration/searching_test.rb
3095
3094
  - test/shoulda_macros/should_redirect.rb
3096
3095
  - test/test_helper.rb