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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e9edd0dc3b0d6543142a78c198b56c2e10433089
4
- data.tar.gz: d5cc3230d9e6f141e08ea0ba2fce95df3e71e13f
3
+ metadata.gz: 4c21073ad2ea66eabefed7c2f1d3dba01ade00ea
4
+ data.tar.gz: 41339760754d20b231e502d4ee2786a0e79de53a
5
5
  SHA512:
6
- metadata.gz: f95fd1ff0b4279e764b35d91de1309265632490ca62445a908a2a7d5a1788f6060ddb899fed7e4a536e565a59cc1f541d33a1f0a85a57d704d34ac37c1495761
7
- data.tar.gz: 5d53799818ae9e7c7167862a365c48b60580bb940bb9e39c926e9150e3fe17265ba58647b68edf1ad9494d4b4b1a1c8739dae7cf641ca07abdd3599a9061ec15
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
- $ run rails g checkout_ru:install
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
- $ run rails g checkout_ru:install
19
+ $ rails g spree_checkout_ru:install
20
20
 
21
21
  ## Usage
22
22
 
23
- 0. Dependencies jquery autocomplete!
24
- 1. Подключите checkoutru.js в нужной вам вьюхе
25
- 2. Добавьте <%= render :partial => 'spree/checkout/checkout_ru'%> на страницу, где хотите выбирать способ доставки
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
 
@@ -0,0 +1,3 @@
1
+ Spree::AppConfiguration.class_eval do
2
+ preference :checkout_store_key, :string
3
+ end
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
@@ -1,4 +1,4 @@
1
- module CheckoutRu
1
+ module SpreeCheckoutRu
2
2
  module Generators
3
3
  class InstallGenerator < Rails::Generators::Base
4
4
  source_root File.expand_path("../../..", __FILE__)
@@ -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
@@ -1,3 +1,3 @@
1
1
  module SpreeCheckoutRu
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -1,4 +1,5 @@
1
1
  require "spree_checkout_ru/version"
2
+ require "spree_checkout_ru/engine"
2
3
 
3
4
  module SpreeCheckoutRu
4
5
 
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.1
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-06 00:00:00.000000000 Z
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