spree_wallet 2.0.8 → 2.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +26 -8
- data/db/migrate/20130729071647_add_lock_version_to_spree_users.rb +3 -1
- metadata +70 -52
data/README.md
CHANGED
@@ -7,10 +7,7 @@ Installation
|
|
7
7
|
Add spree_wallet to your Gemfile:
|
8
8
|
|
9
9
|
```ruby
|
10
|
-
|
11
|
-
gem 'spree_wallet', :git => 'git://github.com/vinsol/spree_wallet.git'
|
12
|
-
OR
|
13
|
-
gem 'spree_wallet', '~> 2.0.6'
|
10
|
+
gem 'spree_wallet', '2.0.9'
|
14
11
|
```
|
15
12
|
|
16
13
|
Bundle your dependencies and run the installation generator:
|
@@ -28,12 +25,33 @@ From Admin end, create a payment method of Wallet type. From User end, user can
|
|
28
25
|
|
29
26
|
While from admin end, Admin can select any amount from wallet, but it should be less than amount present in user's balance.
|
30
27
|
|
31
|
-
##
|
28
|
+
## Testing
|
32
29
|
|
33
30
|
You need to do a quick one-time creation of a test application and then you can use it to run the tests.
|
34
31
|
|
35
|
-
|
36
|
-
|
32
|
+
```
|
33
|
+
bundle exec rake test_app
|
34
|
+
````
|
37
35
|
Then run the rspec tests with mysql.
|
38
36
|
|
39
|
-
|
37
|
+
```
|
38
|
+
bundle exec rspec .
|
39
|
+
```
|
40
|
+
|
41
|
+
Contributing
|
42
|
+
------------
|
43
|
+
|
44
|
+
1. Fork the repo.
|
45
|
+
2. Clone your repo.
|
46
|
+
3. Run `bundle install`.
|
47
|
+
4. Run `bundle exec rake test_app` to create the test application in `spec/test_app`.
|
48
|
+
5. Make your changes.
|
49
|
+
6. Ensure specs pass by running `bundle exec rspec spec`.
|
50
|
+
7. Submit your pull request.
|
51
|
+
|
52
|
+
Credits
|
53
|
+
-------
|
54
|
+
|
55
|
+
[](http://vinsol.com)
|
56
|
+
|
57
|
+
Copyright (c) 2014 [vinsol.com](http://vinsol.com "Ruby on Rails, iOS and Android developers"), released under the New MIT License
|
@@ -1,5 +1,7 @@
|
|
1
1
|
class AddLockVersionToSpreeUsers < ActiveRecord::Migration
|
2
2
|
def change
|
3
|
-
|
3
|
+
unless Spree::User.column_names.include? "lock_version"
|
4
|
+
add_column :spree_users, :lock_version, :integer, :default => 0
|
5
|
+
end
|
4
6
|
end
|
5
7
|
end
|
metadata
CHANGED
@@ -1,97 +1,115 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_wallet
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 29
|
5
5
|
prerelease:
|
6
|
+
segments:
|
7
|
+
- 2
|
8
|
+
- 0
|
9
|
+
- 9
|
10
|
+
version: 2.0.9
|
6
11
|
platform: ruby
|
7
|
-
authors:
|
12
|
+
authors:
|
8
13
|
- Nishant 'CyRo' Tuteja
|
9
14
|
autorequire:
|
10
15
|
bindir: bin
|
11
16
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
17
|
+
|
18
|
+
date: 2014-03-27 00:00:00 Z
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
15
21
|
name: spree_core
|
16
|
-
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
|
-
requirements:
|
19
|
-
- - ~>
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
version: '2.0'
|
22
|
-
type: :runtime
|
23
22
|
prerelease: false
|
24
|
-
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
24
|
none: false
|
26
|
-
requirements:
|
25
|
+
requirements:
|
27
26
|
- - ~>
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
hash: 3
|
29
|
+
segments:
|
30
|
+
- 2
|
31
|
+
- 0
|
32
|
+
version: "2.0"
|
33
|
+
type: :runtime
|
34
|
+
version_requirements: *id001
|
30
35
|
description: Add wallet payment method functionality to spree
|
31
36
|
email: info@vinsol.com
|
32
37
|
executables: []
|
38
|
+
|
33
39
|
extensions: []
|
40
|
+
|
34
41
|
extra_rdoc_files: []
|
35
|
-
|
42
|
+
|
43
|
+
files:
|
36
44
|
- LICENSE
|
37
45
|
- README.md
|
38
46
|
- app/assets/stylesheets/store/checkout.css
|
39
47
|
- app/assets/stylesheets/store/spree_wallet.css
|
40
|
-
- app/overrides/add_store_credits_tab_in_configuration_menu.rb
|
41
|
-
- app/models/spree/user_decorator.rb
|
42
|
-
- app/models/spree/payment_method/wallet.rb
|
43
|
-
- app/models/spree/payment_decorator.rb
|
44
|
-
- app/models/spree/store_credit.rb
|
45
|
-
- app/models/spree/debit.rb
|
46
|
-
- app/models/spree/credit.rb
|
47
|
-
- app/models/spree/order_decorator.rb
|
48
|
-
- app/controllers/spree/checkout_controller_decorator.rb
|
49
48
|
- app/controllers/spree/admin/store_credits_controller.rb
|
49
|
+
- app/controllers/spree/checkout_controller_decorator.rb
|
50
50
|
- app/controllers/spree/payments_controller_decorator.rb
|
51
|
-
- app/
|
52
|
-
- app/
|
53
|
-
- app/
|
54
|
-
- app/
|
55
|
-
- app/
|
56
|
-
- app/
|
51
|
+
- app/models/spree/credit.rb
|
52
|
+
- app/models/spree/debit.rb
|
53
|
+
- app/models/spree/order_decorator.rb
|
54
|
+
- app/models/spree/payment_decorator.rb
|
55
|
+
- app/models/spree/payment_method/wallet.rb
|
56
|
+
- app/models/spree/store_credit.rb
|
57
|
+
- app/models/spree/user_decorator.rb
|
58
|
+
- app/overrides/add_store_credits_tab_in_configuration_menu.rb
|
57
59
|
- app/views/spree/admin/payments/source_forms/_wallet.html.erb
|
58
|
-
-
|
60
|
+
- app/views/spree/admin/payments/source_views/_wallet.html.erb
|
61
|
+
- app/views/spree/admin/store_credits/index.html.erb
|
62
|
+
- app/views/spree/admin/store_credits/new.html.erb
|
63
|
+
- app/views/spree/admin/users/index.html.erb
|
64
|
+
- app/views/spree/checkout/_payment.html.erb
|
65
|
+
- app/views/spree/checkout/payment/_wallet.html.erb
|
59
66
|
- config/locales/en.yml
|
67
|
+
- config/routes.rb
|
60
68
|
- lib/generators/spree_wallet/install/install_generator.rb
|
61
69
|
- lib/spree/disable_negative_payment_mode_and_set_balance_ability.rb
|
62
|
-
- lib/spree_wallet.rb
|
63
70
|
- lib/spree_wallet/engine.rb
|
64
71
|
- lib/spree_wallet/factories.rb
|
65
|
-
-
|
66
|
-
- db/migrate/20130719124429_add_indexes_on_spree_store_credits_fields_type_and_user_id.rb
|
72
|
+
- lib/spree_wallet.rb
|
67
73
|
- db/migrate/20130712094651_create_spree_store_credits.rb
|
68
|
-
- db/migrate/20130729140933_add_unique_index_on_transaction_id_to_spree_store_credits.rb
|
69
74
|
- db/migrate/20130715130434_add_store_credits_to_spree_users.rb
|
75
|
+
- db/migrate/20130719124429_add_indexes_on_spree_store_credits_fields_type_and_user_id.rb
|
76
|
+
- db/migrate/20130729071647_add_lock_version_to_spree_users.rb
|
77
|
+
- db/migrate/20130729140933_add_unique_index_on_transaction_id_to_spree_store_credits.rb
|
70
78
|
- db/migrate/20130801135105_add_transactioner_id_to_spree_store_credits.rb
|
71
79
|
homepage: http://vinsol.com
|
72
|
-
licenses:
|
80
|
+
licenses:
|
73
81
|
- MIT
|
74
82
|
post_install_message:
|
75
83
|
rdoc_options: []
|
76
|
-
|
84
|
+
|
85
|
+
require_paths:
|
77
86
|
- lib
|
78
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
87
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
79
88
|
none: false
|
80
|
-
requirements:
|
81
|
-
- -
|
82
|
-
- !ruby/object:Gem::Version
|
89
|
+
requirements:
|
90
|
+
- - ">="
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
hash: 53
|
93
|
+
segments:
|
94
|
+
- 1
|
95
|
+
- 9
|
96
|
+
- 3
|
83
97
|
version: 1.9.3
|
84
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
98
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
85
99
|
none: false
|
86
|
-
requirements:
|
87
|
-
- -
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
|
90
|
-
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
hash: 3
|
104
|
+
segments:
|
105
|
+
- 0
|
106
|
+
version: "0"
|
107
|
+
requirements:
|
91
108
|
- none
|
92
109
|
rubyforge_project:
|
93
|
-
rubygems_version: 1.8.
|
110
|
+
rubygems_version: 1.8.24
|
94
111
|
signing_key:
|
95
112
|
specification_version: 3
|
96
113
|
summary: Add payment method wallet to spree
|
97
114
|
test_files: []
|
115
|
+
|