spree 0.11.2 → 0.11.3
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of spree might be problematic. Click here for more details.
- data/Rakefile +9 -8
- data/app/controllers/admin/base_controller.rb +31 -0
- data/app/controllers/admin/general_settings_controller.rb +9 -0
- data/app/controllers/admin/orders_controller.rb +8 -3
- data/app/controllers/admin/payments_controller.rb +8 -3
- data/app/controllers/admin/shipments_controller.rb +7 -2
- data/app/models/address.rb +42 -25
- data/app/models/app_configuration.rb +3 -0
- data/app/models/billing_integration.rb +1 -1
- data/app/models/line_item.rb +1 -1
- data/app/models/payment.rb +1 -1
- data/app/models/product_group.rb +8 -4
- data/app/models/spree/alert.rb +13 -0
- data/config/boot.rb +1 -1
- data/config/environment.rb +3 -3
- data/config/environments/test.rb +1 -1
- data/config/locales/en_spree.yml +3 -0
- data/config/routes.rb +2 -1
- data/lib/generators/extension/templates/Rakefile +1 -1
- data/lib/plugins/option_tags_with_disable/Rakefile +1 -1
- data/lib/spree.rb +2 -2
- data/lib/spree/checkout/action_options.rb +2 -2
- data/lib/spree/extension_loader.rb +1 -1
- data/lib/spree/initializer.rb +3 -2
- data/lib/validation_group.rb +2 -2
- data/vendor/extensions/api/Rakefile +1 -1
- data/vendor/extensions/overview_dashboard/Rakefile +1 -1
- data/vendor/extensions/payment_gateway/Rakefile +1 -1
- data/vendor/extensions/payment_gateway/app/models/gateway/authorize_net.rb +8 -2
- data/vendor/extensions/payment_gateway/app/models/gateway/authorize_net_cim.rb +6 -0
- data/vendor/extensions/theme_default/Rakefile +1 -1
- data/vendor/extensions/theme_default/app/views/admin/adjustments/_form.html.erb +0 -3
- data/vendor/extensions/theme_default/app/views/admin/adjustments/new.html.erb +3 -0
- data/vendor/extensions/theme_default/app/views/admin/general_settings/edit.html.erb +8 -0
- data/vendor/extensions/theme_default/app/views/admin/general_settings/show.html.erb +5 -0
- data/vendor/extensions/theme_default/app/views/admin/shared/_alert.html.erb +11 -0
- data/vendor/extensions/theme_default/app/views/layouts/admin.html.erb +1 -1
- data/vendor/extensions/theme_default/public/stylesheets/admin/admin.css +30 -1
- data/vendor/plugins/acts_as_tree/Rakefile +1 -1
- data/vendor/plugins/attribute_fu/Rakefile +1 -1
- data/vendor/plugins/auto_complete/Rakefile +1 -1
- data/vendor/plugins/awesome_nested_set/Rakefile +1 -1
- data/vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb +3 -3
- data/vendor/plugins/delegate_belongs_to/Rakefile +1 -1
- data/vendor/plugins/enumerable_constants/Rakefile +1 -1
- data/vendor/plugins/find_by_param/Rakefile +1 -1
- data/vendor/plugins/in_place_editing/Rakefile +1 -1
- data/vendor/plugins/jrails_auto_complete/Rakefile +1 -1
- data/vendor/plugins/mail_queue/Rakefile +1 -1
- data/vendor/plugins/open_id_authentication/Rakefile +1 -1
- data/vendor/plugins/resource_controller/lib/resource_controller/action_options.rb +1 -1
- data/vendor/plugins/resource_controller/lib/resource_controller/failable_action_options.rb +1 -1
- data/vendor/plugins/resource_controller/test/app/controllers/accounts_controller.rb +6 -0
- data/vendor/plugins/resource_controller/test/app/controllers/application.rb +7 -0
- data/vendor/plugins/resource_controller/test/app/controllers/cms/options_controller.rb +3 -0
- data/vendor/plugins/resource_controller/test/app/controllers/cms/personnel_controller.rb +2 -0
- data/vendor/plugins/resource_controller/test/app/controllers/cms/photos_controller.rb +6 -0
- data/vendor/plugins/resource_controller/test/app/controllers/cms/products_controller.rb +3 -0
- data/vendor/plugins/resource_controller/test/app/controllers/comments_controller.rb +3 -0
- data/vendor/plugins/resource_controller/test/app/controllers/images_controller.rb +4 -0
- data/vendor/plugins/resource_controller/test/app/controllers/options_controller.rb +8 -0
- data/vendor/plugins/resource_controller/test/app/controllers/people_controller.rb +9 -0
- data/vendor/plugins/resource_controller/test/app/controllers/photos_controller.rb +11 -0
- data/vendor/plugins/resource_controller/test/app/controllers/posts_controller.rb +10 -0
- data/vendor/plugins/resource_controller/test/app/controllers/projects_controller.rb +3 -0
- data/vendor/plugins/resource_controller/test/app/controllers/somethings_controller.rb +3 -0
- data/vendor/plugins/resource_controller/test/app/controllers/tags_controller.rb +13 -0
- data/vendor/plugins/resource_controller/test/app/controllers/users_controller.rb +12 -0
- data/vendor/plugins/resource_controller/test/app/helpers/accounts_helper.rb +2 -0
- data/vendor/plugins/resource_controller/test/app/helpers/application_helper.rb +3 -0
- data/vendor/plugins/resource_controller/test/app/helpers/cms/products_helper.rb +2 -0
- data/vendor/plugins/resource_controller/test/app/helpers/comments_helper.rb +2 -0
- data/vendor/plugins/resource_controller/test/app/helpers/images_helper.rb +2 -0
- data/vendor/plugins/resource_controller/test/app/helpers/options_helper.rb +2 -0
- data/vendor/plugins/resource_controller/test/app/helpers/people_helper.rb +2 -0
- data/vendor/plugins/resource_controller/test/app/helpers/photos_helper.rb +2 -0
- data/vendor/plugins/resource_controller/test/app/helpers/posts_helper.rb +2 -0
- data/vendor/plugins/resource_controller/test/app/helpers/projects_helper.rb +2 -0
- data/vendor/plugins/resource_controller/test/app/helpers/somethings_helper.rb +2 -0
- data/vendor/plugins/resource_controller/test/app/helpers/tags_helper.rb +2 -0
- data/vendor/plugins/resource_controller/test/app/helpers/users_helper.rb +2 -0
- data/vendor/plugins/resource_controller/test/app/models/account.rb +4 -0
- data/vendor/plugins/resource_controller/test/app/models/comment.rb +3 -0
- data/vendor/plugins/resource_controller/test/app/models/image.rb +3 -0
- data/vendor/plugins/resource_controller/test/app/models/option.rb +3 -0
- data/vendor/plugins/resource_controller/test/app/models/personnel.rb +3 -0
- data/vendor/plugins/resource_controller/test/app/models/photo.rb +5 -0
- data/vendor/plugins/resource_controller/test/app/models/post.rb +3 -0
- data/vendor/plugins/resource_controller/test/app/models/product.rb +3 -0
- data/vendor/plugins/resource_controller/test/app/models/project.rb +2 -0
- data/vendor/plugins/resource_controller/test/app/models/something.rb +2 -0
- data/vendor/plugins/resource_controller/test/app/models/tag.rb +3 -0
- data/vendor/plugins/resource_controller/test/app/models/user.rb +3 -0
- data/vendor/plugins/resource_controller/test/app/views/accounts/_form.html.erb +4 -0
- data/vendor/plugins/resource_controller/test/app/views/accounts/edit.html.erb +14 -0
- data/vendor/plugins/resource_controller/test/app/views/accounts/new.html.erb +12 -0
- data/vendor/plugins/resource_controller/test/app/views/accounts/show.html.erb +5 -0
- data/vendor/plugins/resource_controller/test/app/views/cms/options/edit.rhtml +17 -0
- data/vendor/plugins/resource_controller/test/app/views/cms/options/index.rhtml +20 -0
- data/vendor/plugins/resource_controller/test/app/views/cms/options/new.rhtml +16 -0
- data/vendor/plugins/resource_controller/test/app/views/cms/options/show.rhtml +8 -0
- data/vendor/plugins/resource_controller/test/app/views/cms/photos/edit.rhtml +17 -0
- data/vendor/plugins/resource_controller/test/app/views/cms/photos/index.rhtml +20 -0
- data/vendor/plugins/resource_controller/test/app/views/cms/photos/new.rhtml +16 -0
- data/vendor/plugins/resource_controller/test/app/views/cms/photos/show.rhtml +8 -0
- data/vendor/plugins/resource_controller/test/app/views/cms/products/edit.rhtml +17 -0
- data/vendor/plugins/resource_controller/test/app/views/cms/products/index.rhtml +20 -0
- data/vendor/plugins/resource_controller/test/app/views/cms/products/new.rhtml +16 -0
- data/vendor/plugins/resource_controller/test/app/views/cms/products/show.rhtml +8 -0
- data/vendor/plugins/resource_controller/test/app/views/comments/edit.rhtml +27 -0
- data/vendor/plugins/resource_controller/test/app/views/comments/index.rhtml +24 -0
- data/vendor/plugins/resource_controller/test/app/views/comments/new.rhtml +26 -0
- data/vendor/plugins/resource_controller/test/app/views/comments/show.rhtml +18 -0
- data/vendor/plugins/resource_controller/test/app/views/images/_form.html.erb +4 -0
- data/vendor/plugins/resource_controller/test/app/views/images/edit.html.erb +14 -0
- data/vendor/plugins/resource_controller/test/app/views/images/new.html.erb +12 -0
- data/vendor/plugins/resource_controller/test/app/views/layouts/application.rhtml +17 -0
- data/vendor/plugins/resource_controller/test/app/views/layouts/comments.rhtml +17 -0
- data/vendor/plugins/resource_controller/test/app/views/layouts/options.rhtml +17 -0
- data/vendor/plugins/resource_controller/test/app/views/layouts/people.rhtml +17 -0
- data/vendor/plugins/resource_controller/test/app/views/layouts/photos.rhtml +17 -0
- data/vendor/plugins/resource_controller/test/app/views/layouts/projects.rhtml +17 -0
- data/vendor/plugins/resource_controller/test/app/views/layouts/somethings.rhtml +17 -0
- data/vendor/plugins/resource_controller/test/app/views/layouts/tags.rhtml +17 -0
- data/vendor/plugins/resource_controller/test/app/views/options/_form.html.erb +8 -0
- data/vendor/plugins/resource_controller/test/app/views/options/edit.html.erb +16 -0
- data/vendor/plugins/resource_controller/test/app/views/options/index.html.erb +21 -0
- data/vendor/plugins/resource_controller/test/app/views/options/new.html.erb +12 -0
- data/vendor/plugins/resource_controller/test/app/views/options/show.html.erb +10 -0
- data/vendor/plugins/resource_controller/test/app/views/people/edit.rhtml +17 -0
- data/vendor/plugins/resource_controller/test/app/views/people/index.rhtml +20 -0
- data/vendor/plugins/resource_controller/test/app/views/people/new.rhtml +16 -0
- data/vendor/plugins/resource_controller/test/app/views/people/show.rhtml +8 -0
- data/vendor/plugins/resource_controller/test/app/views/photos/edit.rhtml +17 -0
- data/vendor/plugins/resource_controller/test/app/views/photos/index.rhtml +20 -0
- data/vendor/plugins/resource_controller/test/app/views/photos/new.rhtml +16 -0
- data/vendor/plugins/resource_controller/test/app/views/photos/show.rhtml +8 -0
- data/vendor/plugins/resource_controller/test/app/views/posts/edit.rhtml +22 -0
- data/vendor/plugins/resource_controller/test/app/views/posts/index.rhtml +22 -0
- data/vendor/plugins/resource_controller/test/app/views/posts/new.rhtml +21 -0
- data/vendor/plugins/resource_controller/test/app/views/posts/show.rhtml +13 -0
- data/vendor/plugins/resource_controller/test/app/views/projects/edit.rhtml +17 -0
- data/vendor/plugins/resource_controller/test/app/views/projects/index.rhtml +20 -0
- data/vendor/plugins/resource_controller/test/app/views/projects/new.rhtml +16 -0
- data/vendor/plugins/resource_controller/test/app/views/projects/show.rhtml +8 -0
- data/vendor/plugins/resource_controller/test/app/views/somethings/edit.rhtml +17 -0
- data/vendor/plugins/resource_controller/test/app/views/somethings/index.rhtml +20 -0
- data/vendor/plugins/resource_controller/test/app/views/somethings/new.rhtml +16 -0
- data/vendor/plugins/resource_controller/test/app/views/somethings/show.rhtml +8 -0
- data/vendor/plugins/resource_controller/test/app/views/tags/edit.rhtml +17 -0
- data/vendor/plugins/resource_controller/test/app/views/tags/index.rhtml +20 -0
- data/vendor/plugins/resource_controller/test/app/views/tags/index.rjs +0 -0
- data/vendor/plugins/resource_controller/test/app/views/tags/new.rhtml +16 -0
- data/vendor/plugins/resource_controller/test/app/views/tags/show.rhtml +8 -0
- data/vendor/plugins/resource_controller/test/app/views/users/edit.rhtml +17 -0
- data/vendor/plugins/resource_controller/test/app/views/users/index.rhtml +20 -0
- data/vendor/plugins/resource_controller/test/app/views/users/new.rhtml +16 -0
- data/vendor/plugins/resource_controller/test/app/views/users/show.rhtml +8 -0
- data/vendor/plugins/resource_controller/test/config/boot.rb +109 -0
- data/vendor/plugins/resource_controller/test/config/database.yml +9 -0
- data/vendor/plugins/resource_controller/test/config/environment.rb +47 -0
- data/vendor/plugins/resource_controller/test/config/environments/development.rb +21 -0
- data/vendor/plugins/resource_controller/test/config/environments/test.rb +19 -0
- data/vendor/plugins/resource_controller/test/config/initializers/inflections.rb +14 -0
- data/vendor/plugins/resource_controller/test/config/routes.rb +61 -0
- data/vendor/plugins/resource_controller/test/db/migrate/001_create_posts.rb +12 -0
- data/vendor/plugins/resource_controller/test/db/migrate/002_create_products.rb +11 -0
- data/vendor/plugins/resource_controller/test/db/migrate/003_create_comments.rb +13 -0
- data/vendor/plugins/resource_controller/test/db/migrate/004_create_options.rb +13 -0
- data/vendor/plugins/resource_controller/test/db/migrate/005_create_photos.rb +11 -0
- data/vendor/plugins/resource_controller/test/db/migrate/006_create_tags.rb +17 -0
- data/vendor/plugins/resource_controller/test/db/migrate/007_create_somethings.rb +11 -0
- data/vendor/plugins/resource_controller/test/db/migrate/008_create_accounts.rb +11 -0
- data/vendor/plugins/resource_controller/test/db/migrate/009_add_account_id_to_photos.rb +9 -0
- data/vendor/plugins/resource_controller/test/db/migrate/010_create_projects.rb +11 -0
- data/vendor/plugins/resource_controller/test/db/migrate/011_create_images.rb +12 -0
- data/vendor/plugins/resource_controller/test/db/migrate/012_create_users.rb +11 -0
- data/vendor/plugins/resource_controller/test/db/migrate/013_create_personnel.rb +11 -0
- data/vendor/plugins/resource_controller/test/db/migrate/014_add_personnel_id_to_photos.rb +9 -0
- data/vendor/plugins/resource_controller/test/db/schema.rb +78 -0
- data/vendor/plugins/resource_controller/test/script/console +3 -0
- data/vendor/plugins/resource_controller/test/script/destroy +3 -0
- data/vendor/plugins/resource_controller/test/script/generate +3 -0
- data/vendor/plugins/resource_controller/test/script/server +3 -0
- data/vendor/plugins/resource_controller/test/test/fixtures/accounts.yml +7 -0
- data/vendor/plugins/resource_controller/test/test/fixtures/comments.yml +11 -0
- data/vendor/plugins/resource_controller/test/test/fixtures/images.yml +6 -0
- data/vendor/plugins/resource_controller/test/test/fixtures/options.yml +9 -0
- data/vendor/plugins/resource_controller/test/test/fixtures/personnel.yml +5 -0
- data/vendor/plugins/resource_controller/test/test/fixtures/photos.yml +9 -0
- data/vendor/plugins/resource_controller/test/test/fixtures/photos_tags.yml +3 -0
- data/vendor/plugins/resource_controller/test/test/fixtures/posts.yml +9 -0
- data/vendor/plugins/resource_controller/test/test/fixtures/products.yml +7 -0
- data/vendor/plugins/resource_controller/test/test/fixtures/projects.yml +7 -0
- data/vendor/plugins/resource_controller/test/test/fixtures/somethings.yml +7 -0
- data/vendor/plugins/resource_controller/test/test/fixtures/tags.yml +7 -0
- data/vendor/plugins/resource_controller/test/test/fixtures/users.yml +5 -0
- data/vendor/plugins/resource_controller/test/test/functional/cms/options_controller_test.rb +23 -0
- data/vendor/plugins/resource_controller/test/test/functional/cms/photos_controller_test.rb +43 -0
- data/vendor/plugins/resource_controller/test/test/functional/cms/products_controller_test.rb +23 -0
- data/vendor/plugins/resource_controller/test/test/functional/comments_controller_test.rb +26 -0
- data/vendor/plugins/resource_controller/test/test/functional/images_controller_test.rb +37 -0
- data/vendor/plugins/resource_controller/test/test/functional/people_controller_test.rb +34 -0
- data/vendor/plugins/resource_controller/test/test/functional/photos_controller_test.rb +130 -0
- data/vendor/plugins/resource_controller/test/test/functional/posts_controller_test.rb +34 -0
- data/vendor/plugins/resource_controller/test/test/functional/projects_controller_test.rb +18 -0
- data/vendor/plugins/resource_controller/test/test/functional/somethings_controller_test.rb +28 -0
- data/vendor/plugins/resource_controller/test/test/functional/tags_controller_test.rb +64 -0
- data/vendor/plugins/resource_controller/test/test/functional/users_controller_test.rb +24 -0
- data/vendor/plugins/resource_controller/test/test/test_helper.rb +12 -0
- data/vendor/plugins/resource_controller/test/test/unit/accessors_test.rb +110 -0
- data/vendor/plugins/resource_controller/test/test/unit/account_test.rb +7 -0
- data/vendor/plugins/resource_controller/test/test/unit/action_options_test.rb +109 -0
- data/vendor/plugins/resource_controller/test/test/unit/base_test.rb +11 -0
- data/vendor/plugins/resource_controller/test/test/unit/comment_test.rb +10 -0
- data/vendor/plugins/resource_controller/test/test/unit/failable_action_options_test.rb +77 -0
- data/vendor/plugins/resource_controller/test/test/unit/helpers/current_objects_test.rb +133 -0
- data/vendor/plugins/resource_controller/test/test/unit/helpers/internal_test.rb +106 -0
- data/vendor/plugins/resource_controller/test/test/unit/helpers/nested_test.rb +86 -0
- data/vendor/plugins/resource_controller/test/test/unit/helpers/singleton_current_objects_test.rb +68 -0
- data/vendor/plugins/resource_controller/test/test/unit/helpers/singleton_nested_test.rb +77 -0
- data/vendor/plugins/resource_controller/test/test/unit/helpers/singleton_urls_test.rb +67 -0
- data/vendor/plugins/resource_controller/test/test/unit/helpers/urls_test.rb +75 -0
- data/vendor/plugins/resource_controller/test/test/unit/helpers_test.rb +25 -0
- data/vendor/plugins/resource_controller/test/test/unit/image_test.rb +7 -0
- data/vendor/plugins/resource_controller/test/test/unit/option_test.rb +10 -0
- data/vendor/plugins/resource_controller/test/test/unit/photo_test.rb +10 -0
- data/vendor/plugins/resource_controller/test/test/unit/post_test.rb +10 -0
- data/vendor/plugins/resource_controller/test/test/unit/project_test.rb +10 -0
- data/vendor/plugins/resource_controller/test/test/unit/response_collector_test.rb +49 -0
- data/vendor/plugins/resource_controller/test/test/unit/something_test.rb +10 -0
- data/vendor/plugins/resource_controller/test/test/unit/tag_test.rb +10 -0
- data/vendor/plugins/resource_controller/test/test/unit/urligence_test.rb +203 -0
- data/vendor/plugins/resource_controller/test/vendor/plugins/shoulda/Rakefile +32 -0
- data/vendor/plugins/resource_controller/test/vendor/plugins/shoulda/bin/convert_to_should_syntax +40 -0
- data/vendor/plugins/resource_controller/test/vendor/plugins/shoulda/init.rb +3 -0
- data/vendor/plugins/resource_controller/test/vendor/plugins/shoulda/lib/shoulda.rb +43 -0
- data/vendor/plugins/resource_controller/test/vendor/plugins/shoulda/lib/shoulda/active_record_helpers.rb +580 -0
- data/vendor/plugins/resource_controller/test/vendor/plugins/shoulda/lib/shoulda/color.rb +77 -0
- data/vendor/plugins/resource_controller/test/vendor/plugins/shoulda/lib/shoulda/controller_tests/controller_tests.rb +467 -0
- data/vendor/plugins/resource_controller/test/vendor/plugins/shoulda/lib/shoulda/controller_tests/formats/html.rb +201 -0
- data/vendor/plugins/resource_controller/test/vendor/plugins/shoulda/lib/shoulda/controller_tests/formats/xml.rb +170 -0
- data/vendor/plugins/resource_controller/test/vendor/plugins/shoulda/lib/shoulda/gem/proc_extensions.rb +14 -0
- data/vendor/plugins/resource_controller/test/vendor/plugins/shoulda/lib/shoulda/gem/shoulda.rb +239 -0
- data/vendor/plugins/resource_controller/test/vendor/plugins/shoulda/lib/shoulda/general.rb +118 -0
- data/vendor/plugins/resource_controller/test/vendor/plugins/shoulda/lib/shoulda/private_helpers.rb +22 -0
- data/vendor/plugins/ssl_requirement/lib/ssl_requirement.rb +2 -2
- data/vendor/plugins/unobtrusive_date_picker/Rakefile +1 -1
- metadata +270 -145
data/Rakefile
CHANGED
@@ -2,7 +2,7 @@ require(File.join(File.dirname(__FILE__), 'config', 'boot'))
|
|
2
2
|
|
3
3
|
require 'rake'
|
4
4
|
require 'rake/testtask'
|
5
|
-
require '
|
5
|
+
require 'rdoc/task'
|
6
6
|
|
7
7
|
require 'tasks/rails'
|
8
8
|
|
@@ -23,30 +23,31 @@ begin
|
|
23
23
|
s.executables = ['spree']
|
24
24
|
s.rubyforge_project = 'spree'
|
25
25
|
s.version = Spree::Version
|
26
|
-
s.add_dependency 'rake', '>= 0.
|
27
|
-
s.add_dependency '
|
26
|
+
s.add_dependency 'rake', '>= 0.9.2'
|
27
|
+
s.add_dependency 'rdoc', '>= 3.9.4'
|
28
|
+
s.add_dependency 'rails', '= 2.3.12'
|
28
29
|
s.add_dependency 'rack', '>= 1.1.0'
|
29
30
|
s.add_dependency 'highline', '= 1.5.1'
|
30
31
|
s.add_dependency 'authlogic', '2.1.3'
|
31
32
|
s.add_dependency 'authlogic-oid', "1.0.4"
|
32
|
-
s.add_dependency 'activemerchant', '= 1.
|
33
|
+
s.add_dependency 'activemerchant', '= 1.7.0'
|
33
34
|
s.add_dependency 'activerecord-tableless', '= 0.1.0'
|
34
35
|
s.add_dependency 'less', "1.2.20"
|
35
36
|
s.add_dependency 'stringex', "1.0.3"
|
36
37
|
s.add_dependency 'chronic', '0.2.3'
|
37
38
|
s.add_dependency 'whenever', "0.3.7"
|
38
39
|
s.add_dependency 'searchlogic', "2.3.5"
|
39
|
-
s.add_dependency 'will_paginate', "2.3.
|
40
|
+
s.add_dependency 'will_paginate', "2.3.16"
|
40
41
|
s.add_dependency 'state_machine', "0.9.2"
|
41
42
|
s.add_dependency 'faker', "0.3.1"
|
42
|
-
s.add_dependency 'paperclip', "= 2.3.1.1"
|
43
|
+
s.add_dependency 'paperclip', "= 2.3.1.1"
|
43
44
|
s.add_dependency 'ruby-openid', '>= 2.0.4'
|
44
|
-
|
45
|
+
|
45
46
|
s.has_rdoc = true
|
46
47
|
rdoc_excludes = Dir["**"].reject { |f| !File.directory? f }
|
47
48
|
rdoc_excludes.each do |e|
|
48
49
|
s.rdoc_options << '--exclude' << e
|
49
|
-
end
|
50
|
+
end
|
50
51
|
files = FileList['**/*']
|
51
52
|
files.exclude '**/._*'
|
52
53
|
files.exclude '**/*.rej'
|
@@ -5,8 +5,39 @@ class Admin::BaseController < Spree::BaseController
|
|
5
5
|
|
6
6
|
before_filter :parse_date_params
|
7
7
|
|
8
|
+
before_filter :check_alerts if Rails.env.production?
|
9
|
+
|
8
10
|
protected
|
9
11
|
|
12
|
+
def check_alerts
|
13
|
+
return unless current_user and should_check_alerts?
|
14
|
+
|
15
|
+
unless session.has_key? :alerts
|
16
|
+
begin
|
17
|
+
session[:alerts] = Spree::Alert.current(request.host)
|
18
|
+
filter_dismissed_alerts
|
19
|
+
Spree::Config.set :last_check_for_spree_alerts => DateTime.now.to_s
|
20
|
+
rescue
|
21
|
+
session[:alerts] = nil
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
def should_check_alerts?
|
27
|
+
return false if not Spree::Config[:check_for_spree_alerts]
|
28
|
+
|
29
|
+
last_check = Spree::Config[:last_check_for_spree_alerts]
|
30
|
+
return true if last_check.blank?
|
31
|
+
|
32
|
+
DateTime.parse(last_check) < 12.hours.ago
|
33
|
+
end
|
34
|
+
|
35
|
+
def filter_dismissed_alerts
|
36
|
+
return unless session[:alerts]
|
37
|
+
dismissed = (Spree::Config[:dismissed_spree_alerts] || '').split(',')
|
38
|
+
session[:alerts].reject! { |a| dismissed.include? a.id.to_s }
|
39
|
+
end
|
40
|
+
|
10
41
|
def ssl_required?
|
11
42
|
ssl_supported?
|
12
43
|
end
|
@@ -10,4 +10,13 @@ class Admin::GeneralSettingsController < Admin::BaseController
|
|
10
10
|
end
|
11
11
|
end
|
12
12
|
|
13
|
+
def dismiss_alert
|
14
|
+
if request.xhr? and params[:alert_id]
|
15
|
+
dismissed = Spree::Config[:dismissed_spree_alerts] || ''
|
16
|
+
Spree::Config.set :dismissed_spree_alerts => dismissed.split(',').push(params[:alert_id]).join(',')
|
17
|
+
filter_dismissed_alerts
|
18
|
+
render :nothing => true
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
13
22
|
end
|
@@ -25,10 +25,15 @@ class Admin::OrdersController < Admin::BaseController
|
|
25
25
|
# TODO - possible security check here but right now any admin can before any transition (and the state machine
|
26
26
|
# itself will make sure transitions are not applied in the wrong state)
|
27
27
|
event = params[:e]
|
28
|
-
|
29
|
-
|
28
|
+
if @order.send("can_#{event}?")
|
29
|
+
Order.transaction do
|
30
|
+
@order.send("#{event}!")
|
31
|
+
end
|
32
|
+
|
33
|
+
self.notice = t('order_updated')
|
34
|
+
else
|
35
|
+
flash[:error] = t('cannot_perform_requested_transition')
|
30
36
|
end
|
31
|
-
self.notice = t('order_updated')
|
32
37
|
rescue Spree::GatewayError => ge
|
33
38
|
flash[:error] = "#{ge.message}"
|
34
39
|
ensure
|
@@ -40,10 +40,15 @@ class Admin::PaymentsController < Admin::BaseController
|
|
40
40
|
# TODO - possible security check here
|
41
41
|
load_object
|
42
42
|
return unless event = params[:e] and @payment.source
|
43
|
-
|
44
|
-
|
43
|
+
|
44
|
+
if @payment.source.send("can_#{event}?", @payment)
|
45
|
+
Payment.transaction do
|
46
|
+
@payment.source.send("#{event}", @payment)
|
47
|
+
end
|
48
|
+
self.notice = t('payment_updated')
|
49
|
+
else
|
50
|
+
flash[:error] = t('cannot_perform_requested_transition')
|
45
51
|
end
|
46
|
-
self.notice = t('payment_updated')
|
47
52
|
rescue Spree::GatewayError => ge
|
48
53
|
flash[:error] = "#{ge.message}"
|
49
54
|
ensure
|
@@ -28,8 +28,13 @@ class Admin::ShipmentsController < Admin::BaseController
|
|
28
28
|
destroy.success.wants.js { render_js_for_destroy }
|
29
29
|
|
30
30
|
def fire
|
31
|
-
|
32
|
-
|
31
|
+
event = params[:e]
|
32
|
+
if @shipment.send("can_#{event}?")
|
33
|
+
@shipment.send("#{event}!")
|
34
|
+
self.notice = t('shipment_updated')
|
35
|
+
else
|
36
|
+
flash[:error] = t('cannot_perform_requested_transition')
|
37
|
+
end
|
33
38
|
redirect_to :back
|
34
39
|
end
|
35
40
|
|
data/app/models/address.rb
CHANGED
@@ -15,32 +15,15 @@ class Address < ActiveRecord::Base
|
|
15
15
|
validates_presence_of :zipcode
|
16
16
|
validates_presence_of :country
|
17
17
|
validates_presence_of :phone
|
18
|
-
validate :
|
18
|
+
validate :state_in_country
|
19
19
|
|
20
|
-
|
20
|
+
before_validation :ensure_valid_single_state
|
21
|
+
before_save :ensure_valid_single_state
|
21
22
|
|
22
23
|
def checkouts
|
23
24
|
(billing_checkouts + shipping_checkouts).uniq
|
24
25
|
end
|
25
26
|
|
26
|
-
# disconnected since there's no code to display error messages yet OR matching client-side validation
|
27
|
-
def phone_validate
|
28
|
-
return if phone.blank?
|
29
|
-
n_digits = phone.scan(/[0-9]/).size
|
30
|
-
valid_chars = (phone =~ /^[-+()\/\s\d]+$/)
|
31
|
-
if !(n_digits > 5 && valid_chars)
|
32
|
-
errors.add(:phone, :invalid)
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
def state_name_validate
|
37
|
-
country = country_id ? Country.find(country_id) : nil
|
38
|
-
return if country.blank? || country.states.empty?
|
39
|
-
if state_name.blank? || country.states.name_or_abbr_equals(state_name).empty?
|
40
|
-
errors.add(:state, :invalid)
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
27
|
def self.default
|
45
28
|
new :country => Country.find(Spree::Config[:default_country_id])
|
46
29
|
end
|
@@ -51,7 +34,7 @@ class Address < ActiveRecord::Base
|
|
51
34
|
end
|
52
35
|
|
53
36
|
def full_name
|
54
|
-
self.firstname
|
37
|
+
"#{self.firstname} #{self.lastname}".strip
|
55
38
|
end
|
56
39
|
|
57
40
|
def state_text
|
@@ -95,9 +78,43 @@ class Address < ActiveRecord::Base
|
|
95
78
|
end
|
96
79
|
|
97
80
|
private
|
81
|
+
# disconnected since there's no code to display error messages yet OR matching client-side validation
|
82
|
+
def phone_validate
|
83
|
+
return if phone.blank?
|
84
|
+
n_digits = phone.scan(/[0-9]/).size
|
85
|
+
valid_chars = (phone =~ /^[-+()\/\s\d]+$/)
|
86
|
+
if !(n_digits > 5 && valid_chars)
|
87
|
+
errors.add(:phone, :invalid)
|
88
|
+
end
|
89
|
+
end
|
98
90
|
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
91
|
+
def state_in_country
|
92
|
+
country.reload if changes.include?("country_id")
|
93
|
+
|
94
|
+
if state.present? and state.country_id != country_id
|
95
|
+
errors.add(:state, :invalid)
|
96
|
+
elsif state_name.present? and country.states.present?
|
97
|
+
errors.add(:state, :invalid)
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
def ensure_valid_single_state
|
102
|
+
self.state_name = nil if self.changes.include?("state_id") && self.state_id.present? #clear state_name if state_id is being set
|
103
|
+
|
104
|
+
if self.changes.include?("state_name") && self.state_name.present?
|
105
|
+
#check is state_name free text matchs an actual state associated with the country
|
106
|
+
country = (country_id ? Country.find(country_id) : nil)
|
107
|
+
|
108
|
+
if country and state = country.states.find(:first, :conditions => ["lower(states.name) = ? or lower(states.abbr) = ?", self.state_name.downcase, self.state_name.downcase])
|
109
|
+
self.state = state #set state to actual associated state
|
110
|
+
self.state_name = nil #clear state_name as it's been matched successfully
|
111
|
+
else
|
112
|
+
self.state = nil #ensure state_id to nil as state_name is being set
|
113
|
+
end
|
114
|
+
end
|
115
|
+
|
116
|
+
#fall back to force single state.
|
117
|
+
self.state_name = nil if self.state_name.present? && self.state_id.present?
|
118
|
+
|
119
|
+
end
|
103
120
|
end
|
@@ -49,6 +49,9 @@ class AppConfiguration < Configuration
|
|
49
49
|
preference :checkout_zone, :string, :default => nil # replace with the name of a zone if you would like to limit the countries
|
50
50
|
preference :always_put_site_name_in_title, :boolean, :default => true
|
51
51
|
preference :cache_static_content, :boolean, :default => true
|
52
|
+
preference :check_for_spree_alerts, :boolean, :default => true
|
53
|
+
preference :last_check_for_spree_alerts, :string
|
54
|
+
preference :dismissed_spree_alerts, :string
|
52
55
|
|
53
56
|
validates_presence_of :name
|
54
57
|
validates_uniqueness_of :name
|
@@ -7,7 +7,7 @@ class BillingIntegration < PaymentMethod
|
|
7
7
|
|
8
8
|
def provider
|
9
9
|
integration_options = options
|
10
|
-
ActiveMerchant::Billing::Base.integration_mode = integration_options[:server]
|
10
|
+
ActiveMerchant::Billing::Base.integration_mode = integration_options[:server].to_sym
|
11
11
|
integration_options = options
|
12
12
|
integration_options[:test] = true if integration_options[:test_mode]
|
13
13
|
@provider ||= provider_class.new(integration_options)
|
data/app/models/line_item.rb
CHANGED
@@ -54,7 +54,7 @@ class LineItem < ActiveRecord::Base
|
|
54
54
|
|
55
55
|
private
|
56
56
|
def ensure_not_shipped
|
57
|
-
if shipped_count = order.shipped_units.nil? ? nil : order.shipped_units[variant]
|
57
|
+
if shipped_count = order.try(:shipped_units).nil? ? nil : order.shipped_units[variant]
|
58
58
|
errors.add_to_base I18n.t("cannot_destory_line_item_as_inventory_units_have_shipped")
|
59
59
|
return false
|
60
60
|
end
|
data/app/models/payment.rb
CHANGED
@@ -100,7 +100,7 @@ class Payment < ActiveRecord::Base
|
|
100
100
|
return unless payment_profiles_supported? and source.number and !source.has_payment_profile?
|
101
101
|
source.payment_gateway.create_profile(self)
|
102
102
|
rescue ActiveMerchant::ConnectionError => e
|
103
|
-
gateway_error I18n.t(:unable_to_connect_to_gateway)
|
103
|
+
source.gateway_error I18n.t(:unable_to_connect_to_gateway)
|
104
104
|
end
|
105
105
|
|
106
106
|
end
|
data/app/models/product_group.rb
CHANGED
@@ -90,10 +90,14 @@ class ProductGroup < ActiveRecord::Base
|
|
90
90
|
end
|
91
91
|
|
92
92
|
def add_scope(scope_name, arguments=[])
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
93
|
+
if scope_name.to_s !~ /eval|send|system|[^a-z0-9_!?]/
|
94
|
+
self.product_scopes << ProductScope.new({
|
95
|
+
:name => scope_name.to_s,
|
96
|
+
:arguments => [*arguments]
|
97
|
+
})
|
98
|
+
else
|
99
|
+
raise ArgumentError.new("'#{scope_name}` can't be used as scope")
|
100
|
+
end
|
97
101
|
self
|
98
102
|
end
|
99
103
|
|
@@ -0,0 +1,13 @@
|
|
1
|
+
class Spree::Alert < ActiveResource::Base
|
2
|
+
self.site = "http://alerts.spreecommerce.com/"
|
3
|
+
self.format = :json
|
4
|
+
|
5
|
+
def self.current(host)
|
6
|
+
find(:all, :params => { :version => SPREE_GEM_VERSION,
|
7
|
+
:name => Spree::Config[:site_name],
|
8
|
+
:host => host,
|
9
|
+
:rails_env => Rails.env,
|
10
|
+
:rails_version => Rails.version })
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
data/config/boot.rb
CHANGED
@@ -55,7 +55,7 @@ module Spree
|
|
55
55
|
class Boot
|
56
56
|
include Spree::RubyGemsLoader
|
57
57
|
def run
|
58
|
-
load_rails("2.3.
|
58
|
+
load_rails("2.3.12") # note: spree requires this specific version of rails (change at your own risk)
|
59
59
|
load_initializer
|
60
60
|
Spree::Initializer.run(:set_load_path)
|
61
61
|
end
|
data/config/environment.rb
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
# ENV['RAILS_ENV'] ||= 'production'
|
6
6
|
|
7
7
|
# Specifies gem version of Rails to use when vendor/rails is not present
|
8
|
-
SPREE_GEM_VERSION = '0.11.
|
8
|
+
SPREE_GEM_VERSION = '0.11.3' unless defined? SPREE_GEM_VERSION
|
9
9
|
|
10
10
|
# Bootstrap the Rails environment, frameworks, and default configuration
|
11
11
|
require File.join(File.dirname(__FILE__), 'boot')
|
@@ -27,7 +27,7 @@ Spree::Initializer.run do |config|
|
|
27
27
|
# config.gem "aws-s3", :lib => "aws/s3"
|
28
28
|
|
29
29
|
config.gem "highline", :version => '1.5.1'
|
30
|
-
config.gem 'authlogic', :version => '
|
30
|
+
config.gem 'authlogic', :version => '2.1.3'
|
31
31
|
config.gem 'authlogic-oid', :lib => "authlogic_openid", :version => '1.0.4'
|
32
32
|
config.gem "activemerchant", :lib => "active_merchant", :version => '1.7.0'
|
33
33
|
config.gem 'activerecord-tableless', :lib => 'tableless', :version => '0.1.0'
|
@@ -36,7 +36,7 @@ Spree::Initializer.run do |config|
|
|
36
36
|
config.gem 'chronic', :version => '0.2.3'
|
37
37
|
config.gem 'whenever', :lib => false, :version => '0.3.7'
|
38
38
|
config.gem 'searchlogic', :version => '2.3.5'
|
39
|
-
config.gem 'will_paginate', :lib => 'will_paginate', :version => '2.3.
|
39
|
+
config.gem 'will_paginate', :lib => 'will_paginate', :version => '2.3.16'
|
40
40
|
config.gem 'state_machine', :lib => 'state_machine', :version => '0.9.2'
|
41
41
|
config.gem "faker", :version => '0.3.1'
|
42
42
|
config.gem 'paperclip', :version => '>=2.3.1.1'
|
data/config/environments/test.rb
CHANGED
@@ -24,4 +24,4 @@ config.action_controller.allow_forgery_protection = false
|
|
24
24
|
config.gem "shoulda", :lib => "shoulda", :version => "2.10.2"
|
25
25
|
config.gem "factory_girl", :lib => "factory_girl", :version => "1.2.3"
|
26
26
|
config.gem 'test-unit', :lib => 'test/unit', :version => '~>2.0.9' if RUBY_VERSION.to_f >= 1.9
|
27
|
-
config.gem "rspec", :lib => 'spec'
|
27
|
+
config.gem "rspec", :lib => 'spec', :version => '1.3.2'
|
data/config/locales/en_spree.yml
CHANGED
@@ -232,6 +232,8 @@ en:
|
|
232
232
|
allow_ssl_to_be_used_when_in_developement_and_test_modes: Allow SSL to be used when in development and test modes
|
233
233
|
allow_ssl_to_be_used_when_in_production_mode: Allow SSL to be used in production mode
|
234
234
|
allowed_ssl_in_production_mode: "SSL will %{not} be used in production"
|
235
|
+
spree_alert_checking: "Check for Spree security and release alerts"
|
236
|
+
spree_alert_not_checking: "Not checking for Spree security and release alerts"
|
235
237
|
already_registered: Already Registered?
|
236
238
|
alternative_phone: Alternative Phone
|
237
239
|
amount: Amount
|
@@ -268,6 +270,7 @@ en:
|
|
268
270
|
canceled: Canceled
|
269
271
|
cannot_create_returns: Cannot create returns as this order has not shipped yet.
|
270
272
|
cannot_destory_line_item_as_inventory_units_have_shipped: Cannot destory line item as some inventory units have shipped.
|
273
|
+
cannot_perform_requested_transition: "Cannot perform requested transition"
|
271
274
|
capture: Capture
|
272
275
|
card_code: "Card Code"
|
273
276
|
card_details: "Card details"
|
data/config/routes.rb
CHANGED
@@ -93,7 +93,8 @@ ActionController::Routing::Routes.draw do |map|
|
|
93
93
|
admin.resources :orders do |order|
|
94
94
|
order.resources :payments, :member => {:fire => :put, :finalize => :put}
|
95
95
|
end
|
96
|
-
admin.resource :general_settings
|
96
|
+
admin.resource :general_settings, :collection => {:dismiss_alert => :post}
|
97
|
+
|
97
98
|
admin.resources :taxonomies, :member => { :get_children => :get } do |taxonomy|
|
98
99
|
taxonomy.resources :taxons
|
99
100
|
end
|
data/lib/spree.rb
CHANGED
@@ -4,7 +4,7 @@ module Spree::Checkout
|
|
4
4
|
block_accessor :edit_hook, :update_hook
|
5
5
|
|
6
6
|
def dup
|
7
|
-
|
7
|
+
self.class.new.tap do |duplicate|
|
8
8
|
duplicate.instance_variable_set(:@collector, wants.dup)
|
9
9
|
duplicate.instance_variable_set(:@before, before.dup) unless before.nil?
|
10
10
|
duplicate.instance_variable_set(:@after, after.dup) unless after.nil?
|
@@ -15,4 +15,4 @@ module Spree::Checkout
|
|
15
15
|
end
|
16
16
|
end
|
17
17
|
end
|
18
|
-
end
|
18
|
+
end
|