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/lib/spree/initializer.rb
CHANGED
@@ -42,7 +42,7 @@ module Spree
|
|
42
42
|
end
|
43
43
|
|
44
44
|
# Provide the load paths for the Spree installation
|
45
|
-
def
|
45
|
+
def default_autoload_paths
|
46
46
|
paths = ["#{SPREE_ROOT}/test/mocks/#{environment}"]
|
47
47
|
|
48
48
|
# Add the app's controller directory
|
@@ -129,7 +129,7 @@ module Spree
|
|
129
129
|
|
130
130
|
|
131
131
|
def initialize_framework_views
|
132
|
-
view_paths =
|
132
|
+
view_paths = [].tap do |arr|
|
133
133
|
# Add the singular view path if it's not in the list
|
134
134
|
arr << configuration.view_path if !configuration.view_paths.include?(configuration.view_path)
|
135
135
|
# Add the default view paths
|
@@ -158,6 +158,7 @@ module Spree
|
|
158
158
|
extension_loader.add_controller_paths
|
159
159
|
super
|
160
160
|
end
|
161
|
+
|
161
162
|
|
162
163
|
def initialize_metal
|
163
164
|
Rails::Rack::Metal.metal_paths += ["#{SPREE_ROOT}/app/metal"]
|
data/lib/validation_group.rb
CHANGED
@@ -14,7 +14,7 @@ module ValidationGroup
|
|
14
14
|
def self.validation_groups(all_classes = false)
|
15
15
|
return (self.validation_group_classes[self] || {}) unless all_classes
|
16
16
|
klasses = ValidationGroup::Util.current_and_ancestors(self).reverse
|
17
|
-
|
17
|
+
Hash.new.tap do |hash|
|
18
18
|
klasses.each do |klass|
|
19
19
|
hash.merge! self.validation_group_classes[klass]
|
20
20
|
end
|
@@ -129,7 +129,7 @@ end
|
|
129
129
|
# Return array consisting of current and its superclasses down to and
|
130
130
|
# including base_class.
|
131
131
|
def self.current_and_ancestors(current)
|
132
|
-
|
132
|
+
[].tap do |klasses|
|
133
133
|
klasses << current
|
134
134
|
root = current.base_class
|
135
135
|
until current == root
|
@@ -1,8 +1,14 @@
|
|
1
1
|
class Gateway::AuthorizeNet < Gateway
|
2
2
|
preference :login, :string
|
3
3
|
preference :password, :string
|
4
|
-
|
4
|
+
|
5
5
|
def provider_class
|
6
6
|
ActiveMerchant::Billing::AuthorizeNetGateway
|
7
|
-
end
|
7
|
+
end
|
8
|
+
|
9
|
+
def options
|
10
|
+
# add :test key in the options hash, as that is what the ActiveMerchant::Billing::AuthorizeNetGateway expects
|
11
|
+
self.class.default_preferences[:test] = true if self.prefers? :test_mode
|
12
|
+
super
|
13
|
+
end
|
8
14
|
end
|
@@ -12,6 +12,12 @@ class Gateway::AuthorizeNetCim < Gateway
|
|
12
12
|
self.class
|
13
13
|
end
|
14
14
|
|
15
|
+
def options
|
16
|
+
# add :test key in the options hash, as that is what the ActiveMerchant::Billing::AuthorizeNetGateway expects
|
17
|
+
self.class.default_preferences[:test] = true if self.prefers? :test_mode
|
18
|
+
super
|
19
|
+
end
|
20
|
+
|
15
21
|
def authorize(amount, creditcard, gateway_options)
|
16
22
|
create_transaction(amount, creditcard, :auth_only)
|
17
23
|
end
|
@@ -1,6 +1,3 @@
|
|
1
|
-
<%= hidden_field :adjustment, :adjustment_source_id, :value => @order.id %>
|
2
|
-
<%= hidden_field :adjustment, :adjustment_source_type, :value => @order.class %>
|
3
|
-
|
4
1
|
<% f.field_container :amount do %>
|
5
2
|
<%= f.label :amount, t("amount")%> <span class="required">*</span><br />
|
6
3
|
<%= text_field :adjustment, :amount, {:style => "width:80px;"} %>
|
@@ -4,6 +4,9 @@
|
|
4
4
|
|
5
5
|
<%=error_messages_for :adjustment %>
|
6
6
|
<% form_for @adjustment, :url => collection_url do |f| %>
|
7
|
+
<%= hidden_field :adjustment, :adjustment_source_id, :value => @order.id %>
|
8
|
+
<%= hidden_field :adjustment, :adjustment_source_type, :value => @order.class %>
|
9
|
+
|
7
10
|
<%= render :partial => "form", :locals => {:f => f} %>
|
8
11
|
|
9
12
|
<p class="form-buttons">
|
@@ -28,6 +28,14 @@
|
|
28
28
|
</label>
|
29
29
|
</p>
|
30
30
|
|
31
|
+
<p>
|
32
|
+
<label>
|
33
|
+
<input name="preferences[check_for_spree_alerts]" type="hidden" value="0" />
|
34
|
+
<%= check_box_tag('preferences[check_for_spree_alerts]', "1", Spree::Config[:check_for_spree_alerts]) %>
|
35
|
+
<%= t('spree_alert_checking') %>
|
36
|
+
</label>
|
37
|
+
</p>
|
38
|
+
|
31
39
|
<p class="form-buttons">
|
32
40
|
<%= button t('update') %>
|
33
41
|
<%= t("or") %> <%= link_to t("cancel"), admin_general_settings_url %>
|
@@ -21,6 +21,11 @@
|
|
21
21
|
<%= (Spree::Config[:allow_ssl_in_development_and_test] ? t("ssl_will_be_used_in_development_and_test_modes") : t("ssl_will_not_be_used_in_development_and_test_modes")) %>
|
22
22
|
</td>
|
23
23
|
</tr>
|
24
|
+
<tr>
|
25
|
+
<td colspan="2">
|
26
|
+
<%= (Spree::Config[:check_for_spree_alerts] ? t("spree_alert_checking") : t("spree_alert_not_checking")) %>
|
27
|
+
</td>
|
28
|
+
</tr>
|
24
29
|
</table>
|
25
30
|
|
26
31
|
<p><%= link_to_with_icon 'edit', t("edit"), edit_admin_general_settings_path %></p>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<div class="alert <%= alert.severity.downcase %>">
|
2
|
+
<%= alert.message %> <%= link_to alert.url_name, alert.url if alert.url %>
|
3
|
+
<%= link_to_remote 'X',{ :url => { :controller=>"admin/general_settings",
|
4
|
+
:action=>"dismiss_alert",
|
5
|
+
:alert_id => alert.id,
|
6
|
+
:method => :post } },
|
7
|
+
:class => "dismiss" %>
|
8
|
+
</div>
|
9
|
+
|
10
|
+
|
11
|
+
|
@@ -42,7 +42,6 @@
|
|
42
42
|
|
43
43
|
<div class="<%= 'with-sidebar ' unless @content_for_sidebar.blank? %> clear tile_bg" id="content">
|
44
44
|
|
45
|
-
|
46
45
|
<% if flash[:error] %>
|
47
46
|
<div class="flash error"><%= flash[:error] %></div>
|
48
47
|
<% end %>
|
@@ -50,6 +49,7 @@
|
|
50
49
|
<div class="flash notice"><%= self.notice %></div>
|
51
50
|
<% end %>
|
52
51
|
|
52
|
+
<%= render :partial => 'admin/shared/alert', :collection => session[:alerts] %>
|
53
53
|
|
54
54
|
<%= yield %>
|
55
55
|
|
@@ -573,4 +573,33 @@ table#product_scopes tr td table tr td {
|
|
573
573
|
#new_product_group_form p {
|
574
574
|
text-align: right;
|
575
575
|
margin: 0;
|
576
|
-
}
|
576
|
+
}
|
577
|
+
|
578
|
+
.alert {
|
579
|
+
-moz-border-radius: 5px;
|
580
|
+
-webkit-border-radius: 5px;
|
581
|
+
border-radius: 5px;
|
582
|
+
font-size: 1.3em;
|
583
|
+
margin-bottom: 1em;
|
584
|
+
padding: 0.8em;
|
585
|
+
}
|
586
|
+
.alert a.dismiss {
|
587
|
+
float:right;
|
588
|
+
font-size: 0.8em;
|
589
|
+
}
|
590
|
+
.alert.release {
|
591
|
+
background: #ccddff url(../images/shadow_top.png) 0px -50px repeat-x;
|
592
|
+
color: #556699;
|
593
|
+
border: 1px solid #99aacc;
|
594
|
+
}
|
595
|
+
.alert.security {
|
596
|
+
background: #f4b4b4 url(../images/shadow_top.png) 0px -50px repeat-x;
|
597
|
+
color: #000000;
|
598
|
+
border: 1px solid #e75b5b;
|
599
|
+
}
|
600
|
+
.alert.news {
|
601
|
+
background: #ccffd4 url(../images/shadow_top.png) 0px -50px repeat-x;
|
602
|
+
color: #000000;
|
603
|
+
border: 1px solid #66ff7e;
|
604
|
+
}
|
605
|
+
|
@@ -60,9 +60,9 @@ module CollectiveIdea #:nodoc:
|
|
60
60
|
extend Columns
|
61
61
|
extend ClassMethods
|
62
62
|
|
63
|
-
belongs_to :parent, :class_name => self.base_class.
|
63
|
+
belongs_to :parent, :class_name => self.base_class.model_name,
|
64
64
|
:foreign_key => parent_column_name
|
65
|
-
has_many :children, :class_name => self.base_class.
|
65
|
+
has_many :children, :class_name => self.base_class.model_name,
|
66
66
|
:foreign_key => parent_column_name, :order => quoted_left_column_name
|
67
67
|
|
68
68
|
attr_accessor :skip_before_destroy
|
@@ -149,7 +149,7 @@ module CollectiveIdea #:nodoc:
|
|
149
149
|
def each_root_valid?(roots_to_validate)
|
150
150
|
left = right = 0
|
151
151
|
roots_to_validate.all? do |root|
|
152
|
-
|
152
|
+
(root.left > left && root.right > right).tap do
|
153
153
|
left = root.left
|
154
154
|
right = root.right
|
155
155
|
end
|
@@ -28,7 +28,7 @@ module ResourceController
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def dup
|
31
|
-
|
31
|
+
self.class.new.tap do |duplicate|
|
32
32
|
duplicate.instance_variable_set(:@collector, wants.dup)
|
33
33
|
duplicate.instance_variable_set(:@before, before.dup) unless before.nil?
|
34
34
|
duplicate.instance_variable_set(:@after, after.dup) unless after.nil?
|
@@ -15,7 +15,7 @@ module ResourceController
|
|
15
15
|
delegate :flash, :flash_now, :after, :response, :wants, :to => :success
|
16
16
|
|
17
17
|
def dup
|
18
|
-
|
18
|
+
self.class.new.tap do |duplicate|
|
19
19
|
duplicate.instance_variable_set(:@success, success.dup)
|
20
20
|
duplicate.instance_variable_set(:@fails, fails.dup)
|
21
21
|
duplicate.instance_variable_set(:@before, before.dup) unless before.nil?
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# Filters added to this controller apply to all controllers in the application.
|
2
|
+
# Likewise, all the methods added will be available for all controllers.
|
3
|
+
|
4
|
+
class ApplicationController < ActionController::Base
|
5
|
+
# Pick a unique cookie name to distinguish our session data from others'
|
6
|
+
session :session_key => '_myapp_session'
|
7
|
+
end
|