spree_loyalty_points 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +26 -0
- data/README.md +68 -0
- data/app/assets/javascripts/admin/spree_loyalty_points.js +83 -0
- data/app/assets/javascripts/store/spree_loyalty_points.js +1 -0
- data/app/assets/stylesheets/admin/spree_loyalty_points.css +3 -0
- data/app/assets/stylesheets/store/spree_loyalty_points.css +13 -0
- data/app/controllers/spree/admin/general_settings_controller_decorator.rb +17 -0
- data/app/controllers/spree/admin/loyalty_points_transactions_controller.rb +80 -0
- data/app/controllers/spree/admin/resource_controller_decorator.rb +21 -0
- data/app/controllers/spree/admin/return_authorizations_controller_decorator.rb +11 -0
- data/app/controllers/spree/checkout_controller_decorator.rb +17 -0
- data/app/controllers/spree/loyalty_points_controller.rb +9 -0
- data/app/models/concerns/spree/loyalty_points.rb +22 -0
- data/app/models/concerns/spree/order/loyalty_points.rb +55 -0
- data/app/models/concerns/spree/payment/loyalty_points.rb +39 -0
- data/app/models/concerns/spree/transactions_total_validation.rb +25 -0
- data/app/models/spree/app_configuration_decorator.rb +8 -0
- data/app/models/spree/loyalty_points_credit_transaction.rb +18 -0
- data/app/models/spree/loyalty_points_debit_transaction.rb +18 -0
- data/app/models/spree/loyalty_points_transaction.rb +45 -0
- data/app/models/spree/order_decorator.rb +18 -0
- data/app/models/spree/payment_decorator.rb +34 -0
- data/app/models/spree/payment_method/loyalty_points.rb +27 -0
- data/app/models/spree/payment_method_decorator.rb +7 -0
- data/app/models/spree/return_authorization_decorator.rb +23 -0
- data/app/models/spree/user_decorator.rb +20 -0
- data/app/overrides/add_condition_to_amount_on_return_authorization_page.rb +8 -0
- data/app/overrides/add_loyalty_points_balance_to_account_page.rb +9 -0
- data/app/overrides/add_loyalty_points_debiting_to_return_authorization_page.rb +28 -0
- data/app/overrides/add_loyalty_points_preferences_to_general_settings_page.rb +18 -0
- data/app/overrides/add_loyalty_points_to_admin_user_show_page.rb +15 -0
- data/app/overrides/add_loyalty_points_to_cart_page.rb +8 -0
- data/app/overrides/add_loyalty_points_to_order_checkout_page.rb +16 -0
- data/app/overrides/add_loyalty_points_to_return_authorization_index_page.rb +13 -0
- data/app/overrides/add_loyalty_points_transaction_table_to_return_authorization_form.rb +6 -0
- data/app/views/spree/admin/loyalty_points_transactions/index.html.erb +16 -0
- data/app/views/spree/admin/loyalty_points_transactions/new.html.erb +62 -0
- data/app/views/spree/admin/payments/source_forms/_loyaltypoints.html.erb +0 -0
- data/app/views/spree/admin/payments/source_views/_loyaltypoints.html.erb +0 -0
- data/app/views/spree/checkout/payment/_loyaltypoints.html.erb +8 -0
- data/app/views/spree/loyalty_points/_transaction_table.html.erb +44 -0
- data/app/views/spree/loyalty_points/index.html.erb +4 -0
- data/config/locales/en.yml +18 -0
- data/config/routes.rb +14 -0
- data/db/migrate/20140116090042_add_loyalty_points_balance_to_spree_user.rb +5 -0
- data/db/migrate/20140116110437_create_loyalty_points_transactions.rb +10 -0
- data/db/migrate/20140117062720_add_timestamps_to_loyalty_points_transaction.rb +7 -0
- data/db/migrate/20140117065314_add_fields_to_spree_loyalty_points_transaction.rb +7 -0
- data/db/migrate/20140122084005_add_comment_to_spree_loyalty_points_transaction.rb +5 -0
- data/db/migrate/20140123092709_add_paid_at_to_spree_order.rb +5 -0
- data/db/migrate/20140123120355_add_loyalty_points_to_spree_return_authorization.rb +6 -0
- data/db/migrate/20140124121728_add_loyalty_points_awarded_to_spree_order.rb +5 -0
- data/db/migrate/20140130131957_rename_fields_in_spree_loyalty_points_transaction.rb +6 -0
- data/db/migrate/20140131072702_remove_loyalty_points_awarded_from_spree_order.rb +5 -0
- data/db/migrate/20140203063433_add_indexing_to_spree_loyalty_points_transaction.rb +7 -0
- data/db/migrate/20140205111553_add_transaction_id_to_spree_loyalty_points_transactions.rb +5 -0
- data/db/migrate/20140207055836_add_lock_version_to_spree_user.rb +5 -0
- data/lib/generators/spree_loyalty_points/install/install_generator.rb +31 -0
- data/lib/spree_loyalty_points/engine.rb +26 -0
- data/lib/spree_loyalty_points/factories.rb +75 -0
- data/lib/spree_loyalty_points.rb +2 -0
- data/lib/tasks/loyalty_points/award.rake +10 -0
- metadata +124 -0
@@ -0,0 +1,10 @@
|
|
1
|
+
#TODO -> Rspecs missing
|
2
|
+
#TODO -> Add description of this rake task in README and also tell them to create a cron job for this.
|
3
|
+
namespace :spree do
|
4
|
+
namespace :loyalty_points do
|
5
|
+
desc "Credit loyalty points to pending users accounts"
|
6
|
+
task :award => :environment do
|
7
|
+
Spree::Order.credit_loyalty_points_to_user
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
metadata
ADDED
@@ -0,0 +1,124 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: spree_loyalty_points
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Jatin Baweja
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2014-02-26 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: spree_core
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '2.1'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '2.1'
|
30
|
+
description: To award loyalty points and add loyalty points payment method to spree
|
31
|
+
email: info@vinsol.com
|
32
|
+
executables: []
|
33
|
+
extensions: []
|
34
|
+
extra_rdoc_files: []
|
35
|
+
files:
|
36
|
+
- LICENSE
|
37
|
+
- README.md
|
38
|
+
- app/assets/javascripts/admin/spree_loyalty_points.js
|
39
|
+
- app/assets/javascripts/store/spree_loyalty_points.js
|
40
|
+
- app/assets/stylesheets/admin/spree_loyalty_points.css
|
41
|
+
- app/assets/stylesheets/store/spree_loyalty_points.css
|
42
|
+
- app/controllers/spree/admin/general_settings_controller_decorator.rb
|
43
|
+
- app/controllers/spree/admin/loyalty_points_transactions_controller.rb
|
44
|
+
- app/controllers/spree/admin/resource_controller_decorator.rb
|
45
|
+
- app/controllers/spree/admin/return_authorizations_controller_decorator.rb
|
46
|
+
- app/controllers/spree/checkout_controller_decorator.rb
|
47
|
+
- app/controllers/spree/loyalty_points_controller.rb
|
48
|
+
- app/models/concerns/spree/loyalty_points.rb
|
49
|
+
- app/models/concerns/spree/order/loyalty_points.rb
|
50
|
+
- app/models/concerns/spree/payment/loyalty_points.rb
|
51
|
+
- app/models/concerns/spree/transactions_total_validation.rb
|
52
|
+
- app/models/spree/app_configuration_decorator.rb
|
53
|
+
- app/models/spree/loyalty_points_credit_transaction.rb
|
54
|
+
- app/models/spree/loyalty_points_debit_transaction.rb
|
55
|
+
- app/models/spree/loyalty_points_transaction.rb
|
56
|
+
- app/models/spree/order_decorator.rb
|
57
|
+
- app/models/spree/payment_decorator.rb
|
58
|
+
- app/models/spree/payment_method/loyalty_points.rb
|
59
|
+
- app/models/spree/payment_method_decorator.rb
|
60
|
+
- app/models/spree/return_authorization_decorator.rb
|
61
|
+
- app/models/spree/user_decorator.rb
|
62
|
+
- app/overrides/add_condition_to_amount_on_return_authorization_page.rb
|
63
|
+
- app/overrides/add_loyalty_points_balance_to_account_page.rb
|
64
|
+
- app/overrides/add_loyalty_points_debiting_to_return_authorization_page.rb
|
65
|
+
- app/overrides/add_loyalty_points_preferences_to_general_settings_page.rb
|
66
|
+
- app/overrides/add_loyalty_points_to_admin_user_show_page.rb
|
67
|
+
- app/overrides/add_loyalty_points_to_cart_page.rb
|
68
|
+
- app/overrides/add_loyalty_points_to_order_checkout_page.rb
|
69
|
+
- app/overrides/add_loyalty_points_to_return_authorization_index_page.rb
|
70
|
+
- app/overrides/add_loyalty_points_transaction_table_to_return_authorization_form.rb
|
71
|
+
- app/views/spree/admin/loyalty_points_transactions/index.html.erb
|
72
|
+
- app/views/spree/admin/loyalty_points_transactions/new.html.erb
|
73
|
+
- app/views/spree/admin/payments/source_forms/_loyaltypoints.html.erb
|
74
|
+
- app/views/spree/admin/payments/source_views/_loyaltypoints.html.erb
|
75
|
+
- app/views/spree/checkout/payment/_loyaltypoints.html.erb
|
76
|
+
- app/views/spree/loyalty_points/_transaction_table.html.erb
|
77
|
+
- app/views/spree/loyalty_points/index.html.erb
|
78
|
+
- config/locales/en.yml
|
79
|
+
- config/routes.rb
|
80
|
+
- lib/generators/spree_loyalty_points/install/install_generator.rb
|
81
|
+
- lib/spree_loyalty_points/engine.rb
|
82
|
+
- lib/spree_loyalty_points/factories.rb
|
83
|
+
- lib/spree_loyalty_points.rb
|
84
|
+
- lib/tasks/loyalty_points/award.rake
|
85
|
+
- db/migrate/20140116090042_add_loyalty_points_balance_to_spree_user.rb
|
86
|
+
- db/migrate/20140116110437_create_loyalty_points_transactions.rb
|
87
|
+
- db/migrate/20140117062720_add_timestamps_to_loyalty_points_transaction.rb
|
88
|
+
- db/migrate/20140117065314_add_fields_to_spree_loyalty_points_transaction.rb
|
89
|
+
- db/migrate/20140122084005_add_comment_to_spree_loyalty_points_transaction.rb
|
90
|
+
- db/migrate/20140123092709_add_paid_at_to_spree_order.rb
|
91
|
+
- db/migrate/20140123120355_add_loyalty_points_to_spree_return_authorization.rb
|
92
|
+
- db/migrate/20140124121728_add_loyalty_points_awarded_to_spree_order.rb
|
93
|
+
- db/migrate/20140130131957_rename_fields_in_spree_loyalty_points_transaction.rb
|
94
|
+
- db/migrate/20140131072702_remove_loyalty_points_awarded_from_spree_order.rb
|
95
|
+
- db/migrate/20140203063433_add_indexing_to_spree_loyalty_points_transaction.rb
|
96
|
+
- db/migrate/20140205111553_add_transaction_id_to_spree_loyalty_points_transactions.rb
|
97
|
+
- db/migrate/20140207055836_add_lock_version_to_spree_user.rb
|
98
|
+
homepage: http://vinsol.com
|
99
|
+
licenses:
|
100
|
+
- MIT
|
101
|
+
post_install_message:
|
102
|
+
rdoc_options: []
|
103
|
+
require_paths:
|
104
|
+
- lib
|
105
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
106
|
+
none: false
|
107
|
+
requirements:
|
108
|
+
- - ! '>='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 1.9.3
|
111
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
112
|
+
none: false
|
113
|
+
requirements:
|
114
|
+
- - ! '>='
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '0'
|
117
|
+
requirements:
|
118
|
+
- none
|
119
|
+
rubyforge_project:
|
120
|
+
rubygems_version: 1.8.23
|
121
|
+
signing_key:
|
122
|
+
specification_version: 3
|
123
|
+
summary: Add loyalty points to spree
|
124
|
+
test_files: []
|