spree_pay_cash_on_delivery 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +14 -0
  3. data/.rspec +1 -0
  4. data/Gemfile +7 -0
  5. data/LICENSE +26 -0
  6. data/README.md +31 -0
  7. data/Rakefile +21 -0
  8. data/app/assets/javascripts/spree/backend/spree_pay_cash_on_delivery.js +2 -0
  9. data/app/assets/javascripts/spree/frontend/spree_pay_cash_on_delivery.js +2 -0
  10. data/app/assets/stylesheets/spree/backend/spree_pay_cash_on_delivery.css +4 -0
  11. data/app/assets/stylesheets/spree/frontend/spree_pay_cash_on_delivery.css +4 -0
  12. data/app/controllers/spree/admin/cash_on_delivery_configs_controller.rb +19 -0
  13. data/app/models/spree/cash_on_delivery/payment_method.rb +80 -0
  14. data/app/models/spree/order_decorator.rb +18 -0
  15. data/app/models/spree/payment_decorator.rb +18 -0
  16. data/app/models/spree/payment_method_configuration.rb +3 -0
  17. data/app/overrides/add_cash_on_delivery_config_to_admin_configuration_side_bar.rb +5 -0
  18. data/app/views/spree/admin/cash_on_delivery_configs/edit.html.erb +38 -0
  19. data/app/views/spree/admin/payments/source_forms/_cash_on_delivery.html.erb +0 -0
  20. data/app/views/spree/admin/payments/source_views/_cash_on_delivery.html.erb +6 -0
  21. data/app/views/spree/admin/shared/_cash_on_delivery_config_settings.html.erb +1 -0
  22. data/app/views/spree/checkout/payment/_cash_on_delivery.html.erb +3 -0
  23. data/bin/rails +7 -0
  24. data/config/initializers/load_preferences.rb +5 -0
  25. data/config/locales/en.yml +5 -0
  26. data/config/routes.rb +5 -0
  27. data/lib/generators/spree_pay_cash_on_delivery/install/install_generator.rb +31 -0
  28. data/lib/spree_pay_cash_on_delivery.rb +2 -0
  29. data/lib/spree_pay_cash_on_delivery/engine.rb +25 -0
  30. data/lib/spree_pay_cash_on_delivery/factories.rb +6 -0
  31. data/spec/spec_helper.rb +87 -0
  32. data/spree_pay_cash_on_delivery.gemspec +21 -0
  33. metadata +89 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: d57538d652e1803ab90d194e4535920ce3c85466
4
+ data.tar.gz: 30d1f1c97989e4f7d75afacd65a05dd5649d2fbb
5
+ SHA512:
6
+ metadata.gz: dd8b03960a1142e3134dbe21c9c669921634145334a2d3384416f89b260971c4d99ac5f040dbc8506f1694cfceaa2665f35159741d32eb91a3005e44b9bf79cb
7
+ data.tar.gz: 32753a9c42666c722e7112b5721df1d0985c86026faa7bd4754378180ced67871da39eb5b4e925f6cad1a3f96c822f4f8fef6eddb788ebd65f55863963186a7d
@@ -0,0 +1,14 @@
1
+ \#*
2
+ *~
3
+ .#*
4
+ .DS_Store
5
+ .idea
6
+ .project
7
+ .sass-cache
8
+ coverage
9
+ Gemfile.lock
10
+ tmp
11
+ nbproject
12
+ pkg
13
+ *.swp
14
+ spec/dummy
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --color
data/Gemfile ADDED
@@ -0,0 +1,7 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'spree', github: 'spree/spree', branch: '2-4-stable'
4
+ # Provides basic authentication functionality for testing parts of your engine
5
+ gem 'spree_auth_devise', github: 'spree/spree_auth_devise', branch: '2-4-stable'
6
+
7
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,26 @@
1
+ Copyright (c) 2014 [name of plugin creator]
2
+ All rights reserved.
3
+
4
+ Redistribution and use in source and binary forms, with or without modification,
5
+ are permitted provided that the following conditions are met:
6
+
7
+ * Redistributions of source code must retain the above copyright notice,
8
+ this list of conditions and the following disclaimer.
9
+ * Redistributions in binary form must reproduce the above copyright notice,
10
+ this list of conditions and the following disclaimer in the documentation
11
+ and/or other materials provided with the distribution.
12
+ * Neither the name Spree nor the names of its contributors may be used to
13
+ endorse or promote products derived from this software without specific
14
+ prior written permission.
15
+
16
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
20
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
21
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
22
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
23
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
24
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
25
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,31 @@
1
+ SpreePayCashOnDelivery
2
+ ======================
3
+
4
+ Adds 'Cash on delivery' payment method to Spree Commerce with ability to set delivery fees in the admin panel.
5
+
6
+
7
+ Installation
8
+ ------------
9
+
10
+ Add spree_pay_cash_on_delivery to your Gemfile:
11
+
12
+ ```ruby
13
+ gem 'spree_pay_cash_on_delivery', github: 'sliaquat/spree_pay_cash_on_delivery'
14
+ ```
15
+
16
+ Then run:
17
+
18
+ ```ruby
19
+ bundle install
20
+ ```
21
+
22
+ Usage
23
+ -----
24
+
25
+ - For adding 'Cash on delivery' payment method, log in to the admin back end ("http://localhost:3000/admin") and go to "Configurations" > "Payment Methods". Click "New Payment Method" and select
26
+ "Spree::CashOnDelivery::PaymentMethod" form the provider drop down. Save.
27
+
28
+
29
+ - For setting the 'Cash on delivery' fee, log in to the admin back end ("http://localhost:3000/admin") and go to "Configurations" > "Cash on delivery config"
30
+
31
+ Copyright (c) 2014 Sanad Liaquat, released under the New BSD License
@@ -0,0 +1,21 @@
1
+ require 'bundler'
2
+ Bundler::GemHelper.install_tasks
3
+
4
+ require 'rspec/core/rake_task'
5
+ require 'spree/testing_support/extension_rake'
6
+
7
+ RSpec::Core::RakeTask.new
8
+
9
+ task :default do
10
+ if Dir["spec/dummy"].empty?
11
+ Rake::Task[:test_app].invoke
12
+ Dir.chdir("../../")
13
+ end
14
+ Rake::Task[:spec].invoke
15
+ end
16
+
17
+ desc 'Generates a dummy app for testing'
18
+ task :test_app do
19
+ ENV['LIB_NAME'] = 'spree_pay_cash_on_delivery'
20
+ Rake::Task['extension:test_app'].invoke
21
+ end
@@ -0,0 +1,2 @@
1
+ // Placeholder manifest file.
2
+ // the installer will append this file to the app vendored assets here: vendor/assets/javascripts/spree/backend/all.js'
@@ -0,0 +1,2 @@
1
+ // Placeholder manifest file.
2
+ // the installer will append this file to the app vendored assets here: vendor/assets/javascripts/spree/frontend/all.js'
@@ -0,0 +1,4 @@
1
+ /*
2
+ Placeholder manifest file.
3
+ the installer will append this file to the app vendored assets here: 'vendor/assets/stylesheets/spree/backend/all.css'
4
+ */
@@ -0,0 +1,4 @@
1
+ /*
2
+ Placeholder manifest file.
3
+ the installer will append this file to the app vendored assets here: 'vendor/assets/stylesheets/spree/frontend/all.css'
4
+ */
@@ -0,0 +1,19 @@
1
+
2
+
3
+ module Spree
4
+ module Admin
5
+ class CashOnDeliveryConfigsController < Spree::Admin::BaseController
6
+
7
+ def edit
8
+ @charge = Spree::CashOnDelivery::Config.charge
9
+ end
10
+
11
+ def update
12
+ Spree::CashOnDelivery::Config.charge = params[:cash_on_delivery_charge]
13
+ flash[:success] = "Cash on delivery charge has been updated"
14
+ redirect_to edit_admin_cash_on_delivery_configs_path
15
+ end
16
+
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,80 @@
1
+ module Spree
2
+
3
+ module CashOnDelivery
4
+
5
+
6
+ class PaymentMethod < Spree::PaymentMethod
7
+
8
+ def payment_profiles_supported?
9
+ false # we want to show the confirm step.
10
+ end
11
+
12
+
13
+ def create_adjustment(payment)
14
+ adjustment = Spree::Adjustment.create(
15
+ amount: Spree::CashOnDelivery::Config.charge.to_f,
16
+ order: payment.order,
17
+ adjustable: payment.order,
18
+ source: self,
19
+ :mandatory => true,
20
+ :included => true,
21
+ label: "Cash On Delivery Fee"
22
+ )
23
+
24
+ payment.order.adjustments << adjustment
25
+
26
+ payment.update_attribute(:amount, payment.amount + Spree::CashOnDelivery::Config.charge.to_f)
27
+ payment.order.updater.update_adjustment_total
28
+ payment.order.updater.update_order_total
29
+ payment.order.persist_totals
30
+ # end
31
+ end
32
+
33
+
34
+ def authorize(*args)
35
+ ActiveMerchant::Billing::Response.new(true, "", {}, {})
36
+ end
37
+
38
+ def capture(payment, source, gateway_options)
39
+ ActiveMerchant::Billing::Response.new(true, "", {}, {})
40
+ end
41
+
42
+ def void(*args)
43
+ ActiveMerchant::Billing::Response.new(true, "", {}, {})
44
+ end
45
+
46
+ def actions
47
+ %w{capture void}
48
+ end
49
+
50
+ def can_capture?(payment)
51
+ payment.state == 'pending' || payment.state == 'checkout'
52
+ end
53
+
54
+ def can_void?(payment)
55
+ payment.state != 'void'
56
+ end
57
+
58
+ def source_required?
59
+ false
60
+ end
61
+
62
+ #def provider_class
63
+ # self.class
64
+ #end
65
+
66
+ def payment_source_class
67
+ nil
68
+ end
69
+
70
+ def method_type
71
+ 'cash_on_delivery'
72
+ end
73
+
74
+ def auto_capture?
75
+ true
76
+ end
77
+
78
+ end
79
+ end
80
+ end
@@ -0,0 +1,18 @@
1
+ Spree::Order.class_eval do
2
+
3
+ state_machine do
4
+ before_transition :to => :complete, :do => :calcuate_order_adjustement
5
+ end
6
+
7
+ def calcuate_order_adjustement
8
+ updater.update_adjustment_total
9
+ updater.update_order_total
10
+ persist_totals
11
+ end
12
+
13
+
14
+ def cash_on_delivery_payment?
15
+ payments && payments.last.payment_method.is_a?(Spree::CashOnDelivery::PaymentMethod)
16
+ end
17
+
18
+ end
@@ -0,0 +1,18 @@
1
+ Spree::Payment.class_eval do
2
+
3
+ # for Cash on Delivery
4
+ #TODO: As it stands now, this method is copy from spree-core/app/models/spree/payment.rb Improve!
5
+ def build_source
6
+ return if source_attributes.nil? || !new_record?
7
+ if payment_method and payment_method.respond_to?(:create_adjustment)
8
+ payment_method.create_adjustment(self)
9
+ elsif source.blank? && payment_method.try(:payment_source_class)
10
+ self.source = payment_method.payment_source_class.new(source_attributes)
11
+ self.source.payment_method_id = payment_method.id
12
+ self.source.user_id = self.order.user_id if self.order
13
+ end
14
+
15
+ end
16
+
17
+ end
18
+
@@ -0,0 +1,3 @@
1
+ class Spree::PaymentMethodConfiguration < Spree::Preferences::Configuration
2
+ preference :charge, :string, :default => '5.0'
3
+ end
@@ -0,0 +1,5 @@
1
+ Deface::Override.new(virtual_path: "spree/admin/shared/_configuration_menu",
2
+ name: "cash_on_delivery_config_settings_added_to_configuration_menu",
3
+ insert_bottom: ".sidebar",
4
+ partial: "spree/admin/shared/cash_on_delivery_config_settings"
5
+ )
@@ -0,0 +1,38 @@
1
+ <%= render :partial => 'spree/admin/shared/configuration_menu' %>
2
+
3
+ <% content_for :page_title do %>
4
+ <%= Spree.t(:cash_on_delivery) %>
5
+ <% end %>
6
+
7
+ <%= form_tag admin_cash_on_delivery_configs_path, :method => :put do %>
8
+ <div id="preferences" data-hook>
9
+
10
+ <fieldset class="general no-border-top">
11
+
12
+ <fieldset class="security no-border-bottom">
13
+ <legend align="center"><%= Spree.t(:cash_on_delivery_config)%></legend>
14
+ <div class="field">
15
+ <%= label_tag(:cash_on_delivery_charge, 'Cash on delivery charge: ') + tag(:br) %>
16
+
17
+ <%= text_field_tag(:cash_on_delivery_charge, @charge, onkeypress: 'return ((event.charCode >= 48 && event.charCode <= 57) || event.charCode == 46)') %>
18
+ </div>
19
+
20
+ </fieldset>
21
+
22
+ <div class="form-buttons filter-actions actions" data-hook="buttons">
23
+ <%= button Spree.t('actions.update'), 'refresh' %>
24
+ <span class="or"><%= Spree.t(:or) %></span>
25
+ <%= link_to_with_icon 'remove', Spree.t('actions.cancel'), edit_admin_general_settings_url, :class => 'button' %>
26
+ </div>
27
+
28
+ </fieldset>
29
+
30
+ </div>
31
+
32
+
33
+ <% end %>
34
+
35
+ <script>
36
+ $('#store_default_currency').select2();
37
+ $('#currency').select2();
38
+ </script>
@@ -0,0 +1,6 @@
1
+ <label>Status</label>
2
+ <% if @payment.state? %>
3
+ <%= @payment.state.titleize %>
4
+ <% else %>
5
+ <%= @payment.source.state.titleize %>
6
+ <% end %>
@@ -0,0 +1 @@
1
+ <%= configurations_sidebar_menu_item Spree.t(:cash_on_delivery_config), edit_admin_cash_on_delivery_configs_path %>
@@ -0,0 +1,3 @@
1
+ <%= t('fee', :amount => number_to_currency(Spree::CashOnDelivery::Config.charge, currency: Spree::Config.preferred_currency, unit: "")) %> Rs.
2
+ <% @order.bill_address ||= Spree::Address.default %>
3
+ <%= hidden_field_tag "payment_source[#{payment_method.id}][amount]", @order.total %>
@@ -0,0 +1,7 @@
1
+ # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
2
+
3
+ ENGINE_ROOT = File.expand_path('../..', __FILE__)
4
+ ENGINE_PATH = File.expand_path('../../lib/spree_pay_cash_on_delivery/engine', __FILE__)
5
+
6
+ require 'rails/all'
7
+ require 'rails/engine/commands'
@@ -0,0 +1,5 @@
1
+ module Spree
2
+ module CashOnDelivery
3
+ Config = Spree::PaymentMethodConfiguration.new
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ # Sample localization file for English. Add more files in this directory for other locales.
2
+ # See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
3
+
4
+ en:
5
+ hello: "Hello world"
@@ -0,0 +1,5 @@
1
+ Spree::Core::Engine.add_routes do
2
+ namespace :admin do
3
+ resource :cash_on_delivery_configs
4
+ end
5
+ end
@@ -0,0 +1,31 @@
1
+ module SpreePayCashOnDelivery
2
+ module Generators
3
+ class InstallGenerator < Rails::Generators::Base
4
+
5
+ class_option :auto_run_migrations, :type => :boolean, :default => false
6
+
7
+ def add_javascripts
8
+ append_file 'vendor/assets/javascripts/spree/frontend/all.js', "//= require spree/frontend/spree_pay_cash_on_delivery\n"
9
+ append_file 'vendor/assets/javascripts/spree/backend/all.js', "//= require spree/backend/spree_pay_cash_on_delivery\n"
10
+ end
11
+
12
+ def add_stylesheets
13
+ inject_into_file 'vendor/assets/stylesheets/spree/frontend/all.css', " *= require spree/frontend/spree_pay_cash_on_delivery\n", :before => /\*\//, :verbose => true
14
+ inject_into_file 'vendor/assets/stylesheets/spree/backend/all.css', " *= require spree/backend/spree_pay_cash_on_delivery\n", :before => /\*\//, :verbose => true
15
+ end
16
+
17
+ # def add_migrations
18
+ # run 'bundle exec rake railties:install:migrations FROM=spree_pay_cash_on_delivery'
19
+ # end
20
+ #
21
+ # def run_migrations
22
+ # run_migrations = options[:auto_run_migrations] || ['', 'y', 'Y'].include?(ask 'Would you like to run the migrations now? [Y/n]')
23
+ # if run_migrations
24
+ # run 'bundle exec rake db:migrate'
25
+ # else
26
+ # puts 'Skipping rake db:migrate, don\'t forget to run it!'
27
+ # end
28
+ # end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,2 @@
1
+ require 'spree_core'
2
+ require 'spree_pay_cash_on_delivery/engine'
@@ -0,0 +1,25 @@
1
+ module SpreePayCashOnDelivery
2
+ class Engine < Rails::Engine
3
+ require 'spree/core'
4
+ isolate_namespace Spree
5
+ engine_name 'spree_pay_cash_on_delivery'
6
+
7
+ # use rspec for tests
8
+ config.generators do |g|
9
+ g.test_framework :rspec
10
+ end
11
+
12
+ def self.activate
13
+ Dir.glob(File.join(File.dirname(__FILE__), '../../app/**/*_decorator*.rb')) do |c|
14
+ Rails.configuration.cache_classes ? require(c) : load(c)
15
+ end
16
+ end
17
+
18
+ config.to_prepare &method(:activate).to_proc
19
+
20
+ initializer "spree_cash_on_delivery.register.payment_method", :after => "spree.register.payment_methods" do |app|
21
+ app.config.spree.payment_methods << Spree::CashOnDelivery::PaymentMethod
22
+ end
23
+
24
+ end
25
+ end
@@ -0,0 +1,6 @@
1
+ FactoryGirl.define do
2
+ # Define your Spree extensions Factories within this file to enable applications, and other extensions to use and override them.
3
+ #
4
+ # Example adding this to your spec_helper will load these Factories for use:
5
+ # require 'spree_pay_cash_on_delivery/factories'
6
+ end
@@ -0,0 +1,87 @@
1
+ # Run Coverage report
2
+ require 'simplecov'
3
+ SimpleCov.start do
4
+ add_filter 'spec/dummy'
5
+ add_group 'Controllers', 'app/controllers'
6
+ add_group 'Helpers', 'app/helpers'
7
+ add_group 'Mailers', 'app/mailers'
8
+ add_group 'Models', 'app/models'
9
+ add_group 'Views', 'app/views'
10
+ add_group 'Libraries', 'lib'
11
+ end
12
+
13
+ # Configure Rails Environment
14
+ ENV['RAILS_ENV'] = 'test'
15
+
16
+ require File.expand_path('../dummy/config/environment.rb', __FILE__)
17
+
18
+ require 'rspec/rails'
19
+ require 'database_cleaner'
20
+ require 'ffaker'
21
+
22
+ # Requires supporting ruby files with custom matchers and macros, etc,
23
+ # in spec/support/ and its subdirectories.
24
+ Dir[File.join(File.dirname(__FILE__), 'support/**/*.rb')].each { |f| require f }
25
+
26
+ # Requires factories and other useful helpers defined in spree_core.
27
+ require 'spree/testing_support/authorization_helpers'
28
+ require 'spree/testing_support/capybara_ext'
29
+ require 'spree/testing_support/controller_requests'
30
+ require 'spree/testing_support/factories'
31
+ require 'spree/testing_support/url_helpers'
32
+
33
+ # Requires factories defined in lib/spree_pay_cash_on_delivery/factories.rb
34
+ require 'spree_pay_cash_on_delivery/factories'
35
+
36
+ RSpec.configure do |config|
37
+ config.include FactoryGirl::Syntax::Methods
38
+
39
+ # Infer an example group's spec type from the file location.
40
+ config.infer_spec_type_from_file_location!
41
+
42
+ # == URL Helpers
43
+ #
44
+ # Allows access to Spree's routes in specs:
45
+ #
46
+ # visit spree.admin_path
47
+ # current_path.should eql(spree.products_path)
48
+ config.include Spree::TestingSupport::UrlHelpers
49
+
50
+ # == Mock Framework
51
+ #
52
+ # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
53
+ #
54
+ # config.mock_with :mocha
55
+ # config.mock_with :flexmock
56
+ # config.mock_with :rr
57
+ config.mock_with :rspec
58
+ config.color = true
59
+
60
+ # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
61
+ config.fixture_path = "#{::Rails.root}/spec/fixtures"
62
+
63
+ # Capybara javascript drivers require transactional fixtures set to false, and we use DatabaseCleaner
64
+ # to cleanup after each test instead. Without transactional fixtures set to false the records created
65
+ # to setup a test will be unavailable to the browser, which runs under a separate server instance.
66
+ config.use_transactional_fixtures = false
67
+
68
+ # Ensure Suite is set to use transactions for speed.
69
+ config.before :suite do
70
+ DatabaseCleaner.strategy = :transaction
71
+ DatabaseCleaner.clean_with :truncation
72
+ end
73
+
74
+ # Before each spec check if it is a Javascript test and switch between using database transactions or not where necessary.
75
+ config.before :each do
76
+ DatabaseCleaner.strategy = RSpec.current_example.metadata[:js] ? :truncation : :transaction
77
+ DatabaseCleaner.start
78
+ end
79
+
80
+ # After each spec clean the database.
81
+ config.after :each do
82
+ DatabaseCleaner.clean
83
+ end
84
+
85
+ config.fail_fast = ENV['FAIL_FAST'] || false
86
+ config.order = "random"
87
+ end
@@ -0,0 +1,21 @@
1
+ # encoding: UTF-8
2
+ Gem::Specification.new do |s|
3
+ s.platform = Gem::Platform::RUBY
4
+ s.name = 'spree_pay_cash_on_delivery'
5
+ s.version = '0.1.0'
6
+ s.summary = 'Spree Cash On Delivery payment method'
7
+ s.description = 'This extension adds Cash on delivery payment method to Spree'
8
+ s.required_ruby_version = '>= 1.9.3'
9
+
10
+ s.author = 'Sanad Liaquat'
11
+ s.email = 'sanadhussain@gmail.com'
12
+ s.homepage = 'https://github.com/sliaquat'
13
+
14
+ s.files = `git ls-files`.split("\n")
15
+ #s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
16
+ s.require_path = 'lib'
17
+ s.requirements << 'none'
18
+ s.license = "MIT"
19
+ s.add_dependency 'spree_core', '~> 2.4.1'
20
+
21
+ end
metadata ADDED
@@ -0,0 +1,89 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: spree_pay_cash_on_delivery
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Sanad Liaquat
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-12-03 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: spree_core
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 2.4.1
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 2.4.1
27
+ description: This extension adds Cash on delivery payment method to Spree
28
+ email: sanadhussain@gmail.com
29
+ executables: []
30
+ extensions: []
31
+ extra_rdoc_files: []
32
+ files:
33
+ - ".gitignore"
34
+ - ".rspec"
35
+ - Gemfile
36
+ - LICENSE
37
+ - README.md
38
+ - Rakefile
39
+ - app/assets/javascripts/spree/backend/spree_pay_cash_on_delivery.js
40
+ - app/assets/javascripts/spree/frontend/spree_pay_cash_on_delivery.js
41
+ - app/assets/stylesheets/spree/backend/spree_pay_cash_on_delivery.css
42
+ - app/assets/stylesheets/spree/frontend/spree_pay_cash_on_delivery.css
43
+ - app/controllers/spree/admin/cash_on_delivery_configs_controller.rb
44
+ - app/models/spree/cash_on_delivery/payment_method.rb
45
+ - app/models/spree/order_decorator.rb
46
+ - app/models/spree/payment_decorator.rb
47
+ - app/models/spree/payment_method_configuration.rb
48
+ - app/overrides/add_cash_on_delivery_config_to_admin_configuration_side_bar.rb
49
+ - app/views/spree/admin/cash_on_delivery_configs/edit.html.erb
50
+ - app/views/spree/admin/payments/source_forms/_cash_on_delivery.html.erb
51
+ - app/views/spree/admin/payments/source_views/_cash_on_delivery.html.erb
52
+ - app/views/spree/admin/shared/_cash_on_delivery_config_settings.html.erb
53
+ - app/views/spree/checkout/payment/_cash_on_delivery.html.erb
54
+ - bin/rails
55
+ - config/initializers/load_preferences.rb
56
+ - config/locales/en.yml
57
+ - config/routes.rb
58
+ - lib/generators/spree_pay_cash_on_delivery/install/install_generator.rb
59
+ - lib/spree_pay_cash_on_delivery.rb
60
+ - lib/spree_pay_cash_on_delivery/engine.rb
61
+ - lib/spree_pay_cash_on_delivery/factories.rb
62
+ - spec/spec_helper.rb
63
+ - spree_pay_cash_on_delivery.gemspec
64
+ homepage: https://github.com/sliaquat
65
+ licenses:
66
+ - MIT
67
+ metadata: {}
68
+ post_install_message:
69
+ rdoc_options: []
70
+ require_paths:
71
+ - lib
72
+ required_ruby_version: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: 1.9.3
77
+ required_rubygems_version: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - ">="
80
+ - !ruby/object:Gem::Version
81
+ version: '0'
82
+ requirements:
83
+ - none
84
+ rubyforge_project:
85
+ rubygems_version: 2.4.3
86
+ signing_key:
87
+ specification_version: 4
88
+ summary: Spree Cash On Delivery payment method
89
+ test_files: []