spree_checkout_ru 0.0.1 → 0.0.2
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.
- checksums.yaml +4 -4
- data/README.md +12 -6
- data/app/models/spree/appconfiguration_decorator.rb +3 -0
- data/config/routes.rb +6 -0
- data/lib/generators/spree_checkout_ru/install_generator.rb +1 -1
- data/lib/spree_checkout_ru/engine.rb +14 -0
- data/lib/spree_checkout_ru/version.rb +1 -1
- data/lib/spree_checkout_ru.rb +1 -0
- metadata +5 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4c21073ad2ea66eabefed7c2f1d3dba01ade00ea
|
|
4
|
+
data.tar.gz: 41339760754d20b231e502d4ee2786a0e79de53a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 51fea76f64c85053f3b23d42a657db1d2ae71642ef3aeb9e1a2489b5612a89f8ea49b16376a079d0a8f7e0041cfe1959d124eaa2d819096102ccfcac1369f4dc
|
|
7
|
+
data.tar.gz: 5b5fa94951a58f7026747d404cdd11ef8ff7fd283a66a5e8785a3e9fb7a4dd2119ceaadeec803d54d18cea4fa584532b01a5f20b582285da9042c5e852ca39a8
|
data/README.md
CHANGED
|
@@ -10,19 +10,25 @@ Add this line to your application's Gemfile:
|
|
|
10
10
|
|
|
11
11
|
And then execute:
|
|
12
12
|
|
|
13
|
-
$ bundle
|
|
14
|
-
$
|
|
13
|
+
$ bundle install
|
|
14
|
+
$ rails g spree_checkout_ru:install
|
|
15
15
|
|
|
16
16
|
Or install it yourself as:
|
|
17
17
|
|
|
18
18
|
$ gem install spree_checkout_ru
|
|
19
|
-
$
|
|
19
|
+
$ rails g spree_checkout_ru:install
|
|
20
20
|
|
|
21
21
|
## Usage
|
|
22
22
|
|
|
23
|
-
0. Dependencies
|
|
24
|
-
1.
|
|
25
|
-
|
|
23
|
+
0. Dependencies jQuery autocomplete!
|
|
24
|
+
1. Добавить в spree.rb Идентификационный ключ клиента в Checkout.ru
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
Spree::Config[:checkout_store_key] = "KEY"
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
2. Подключите checkoutru.js в нужной вам вьюхе
|
|
31
|
+
3. Добавьте <%= render :partial => 'spree/checkout/checkout_ru'%> на страницу, где хотите выбирать способ доставки
|
|
26
32
|
|
|
27
33
|
## Contributing
|
|
28
34
|
|
data/config/routes.rb
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
Spree::Core::Engine.routes.draw do
|
|
2
|
+
post '/checkout/get_place_by_query' => 'checkout#get_place_by_query', :as => :checkout_get_place_by_query
|
|
3
|
+
post '/checkout/calculation' => 'checkout#calculation', :as => :calculation
|
|
4
|
+
post '/checkout/create_checkout_order' => 'checkout#create_checkout_order', :as => :create_checkout_order
|
|
5
|
+
post '/checkout/get_street_by_query' => 'checkout#get_street_by_query', :as => :get_street_by_query
|
|
6
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
module SpreeCheckoutRu
|
|
2
|
+
class Engine < Rails::Engine
|
|
3
|
+
require 'spree/core'
|
|
4
|
+
isolate_namespace Spree
|
|
5
|
+
engine_name 'spree_checkout_ru'
|
|
6
|
+
def self.activate
|
|
7
|
+
Dir.glob(File.join(File.dirname(__FILE__), '../../app/**/*decorator*.rb')) do |c|
|
|
8
|
+
Rails.configuration.cache_classes ? require(c) : load(c)
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
config.to_prepare &method(:activate).to_proc
|
|
13
|
+
end
|
|
14
|
+
end
|
data/lib/spree_checkout_ru.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: spree_checkout_ru
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- GENESIX
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-08-
|
|
11
|
+
date: 2014-08-07 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -50,11 +50,14 @@ files:
|
|
|
50
50
|
- LICENSE.txt
|
|
51
51
|
- README.md
|
|
52
52
|
- Rakefile
|
|
53
|
+
- app/models/spree/appconfiguration_decorator.rb
|
|
54
|
+
- config/routes.rb
|
|
53
55
|
- lib/_checkout_ru.html.erb
|
|
54
56
|
- lib/checkout_controller_decorator.rb
|
|
55
57
|
- lib/checkoutru.js
|
|
56
58
|
- lib/generators/spree_checkout_ru/install_generator.rb
|
|
57
59
|
- lib/spree_checkout_ru.rb
|
|
60
|
+
- lib/spree_checkout_ru/engine.rb
|
|
58
61
|
- lib/spree_checkout_ru/version.rb
|
|
59
62
|
- spree_checkout_ru.gemspec
|
|
60
63
|
homepage: https://github.com/gsix/spree_checkout_ru
|