spree_location_prioritizer 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +14 -0
- data/.rspec +1 -0
- data/Gemfile +7 -0
- data/HEAD +1 -0
- data/README.md +45 -0
- data/Rakefile +21 -0
- data/app/assets/javascripts/spree/backend/spree_location_prioritizer.js +2 -0
- data/app/assets/javascripts/spree/frontend/spree_location_prioritizer.js +2 -0
- data/app/assets/stylesheets/spree/backend/spree_location_prioritizer.css +4 -0
- data/app/assets/stylesheets/spree/frontend/spree_location_prioritizer.css +4 -0
- data/app/models/spree/stock/coordinator_decorator.rb +28 -0
- data/app/models/spree/stock/prioritizer_decorator.rb +20 -0
- data/bin/rails +7 -0
- data/config/locales/en.yml +5 -0
- data/config/routes.rb +3 -0
- data/db/migrate/20150126092933_add_priorities_to_locations.rb +11 -0
- data/description +1 -0
- data/lib/generators/spree_location_prioritizer/install/install_generator.rb +31 -0
- data/lib/spree_location_prioritizer.rb +2 -0
- data/lib/spree_location_prioritizer/engine.rb +20 -0
- data/lib/spree_location_prioritizer/factories.rb +6 -0
- data/spec/spec_helper.rb +87 -0
- data/spree_location_prioritizer.gemspec +32 -0
- metadata +222 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 7323d24b35a4ac60a2759a40baa442f1db8bbda4
|
4
|
+
data.tar.gz: f97e587c5207bcfb7e5fade53e8f0c0a0867e8a9
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 9cfd9a2da9c3ad9620b5ae7154a80ec8d5c3d9bfbd5ce558343e161e5c2cbd64bcddbd3859f058ffb01698cc4f8d1661aca163cf64095e0d3cee3f4e7c781b7b
|
7
|
+
data.tar.gz: 183e9a943a5640404f839d05b83fad9c671bfd0960fb818fdaed797683b5ec268e6ce4a6dbcdee55ac825c27e54559a43d10cb0fd024c7bc9c2d6a0252dcf2d4
|
data/.gitignore
ADDED
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color
|
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
SpreeLocationPrioritizer
|
2
|
+
=============
|
3
|
+
|
4
|
+
Spree 3.0 has the priotitizer to sort the package capability but not implemented.
|
5
|
+
This gem/extenstion assume every stock location has its own serving countries and priorities.
|
6
|
+
Example, stock location with priorities as {"ca" => 1, "all" => 0, "us" => 10000} , and location with prioties as {"ca" => 10000}
|
7
|
+
The second location should serve Canadian customers when possible.
|
8
|
+
|
9
|
+
The coordinator will put all items into one package and ship from one warehouse. It will will not check the on_hand_count. If you want remove one item away from one stock location,
|
10
|
+
delete it from the item location lists, not just set the on_hand_count to 0.
|
11
|
+
|
12
|
+
Installation
|
13
|
+
------------
|
14
|
+
|
15
|
+
Add spree_location_prioritizer to your Gemfile:
|
16
|
+
|
17
|
+
```ruby
|
18
|
+
gem 'spree_location_prioritizer'
|
19
|
+
```
|
20
|
+
|
21
|
+
Bundle your dependencies and run the installation generator:
|
22
|
+
|
23
|
+
```shell
|
24
|
+
bundle
|
25
|
+
bundle exec rails g spree_location_prioritizer:install
|
26
|
+
```
|
27
|
+
|
28
|
+
Testing
|
29
|
+
-------
|
30
|
+
|
31
|
+
First bundle your dependencies, then run `rake`. `rake` will default to building the dummy app if it does not exist, then it will run specs. The dummy app can be regenerated by using `rake test_app`.
|
32
|
+
|
33
|
+
```shell
|
34
|
+
bundle
|
35
|
+
bundle exec rake
|
36
|
+
```
|
37
|
+
|
38
|
+
When testing your applications integration with this extension you may use it's factories.
|
39
|
+
Simply add this require statement to your spec_helper:
|
40
|
+
|
41
|
+
```ruby
|
42
|
+
require 'spree_location_prioritizer/factories'
|
43
|
+
```
|
44
|
+
|
45
|
+
Copyright (c) 2014 [name of extension creator], released under the New BSD License
|
data/Rakefile
ADDED
@@ -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_location_prioritizer'
|
20
|
+
Rake::Task['extension:test_app'].invoke
|
21
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module Spree
|
2
|
+
module Stock
|
3
|
+
Coordinator.class_eval do
|
4
|
+
# Build packages as per stock location
|
5
|
+
#
|
6
|
+
# It needs to check whether each stock location holds at least one stock
|
7
|
+
# item for the order. In case none is found it wouldn't make any sense
|
8
|
+
# to build a package because it would be empty. Plus we avoid errors down
|
9
|
+
# the stack because it would assume the stock location has stock items
|
10
|
+
# for the given order
|
11
|
+
#
|
12
|
+
# Returns an array of Package instances
|
13
|
+
# we drop the package who does not cover all inventories
|
14
|
+
def build_packages(packages = Array.new)
|
15
|
+
StockLocation.active.each do |stock_location|
|
16
|
+
next unless stock_location.stock_items.where(:variant_id => inventory_units.map(&:variant_id).uniq).exists?
|
17
|
+
# skip the warehouse we can not fulfill the order as one package.
|
18
|
+
# this need we have one primary warehouse can ship them all.
|
19
|
+
|
20
|
+
next unless stock_location.stock_items.where(:variant_id => inventory_units.map(&:variant_id).uniq).length == inventory_units.map(&:variant_id).uniq.length
|
21
|
+
packer = build_packer(stock_location, inventory_units)
|
22
|
+
packages += packer.packages
|
23
|
+
end
|
24
|
+
packages
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module Spree
|
2
|
+
module Stock
|
3
|
+
Prioritizer.class_eval do
|
4
|
+
private
|
5
|
+
def sort_packages
|
6
|
+
Rails.logger.info("sort_packages track: #{caller_locations(0..2)}")
|
7
|
+
# order packages by preferred stock_locations
|
8
|
+
# de={"ca" => 1, "all" => 0, "us" => 10000} in string "{\"gb\":1, \"all\":0, \"us\":10000}"
|
9
|
+
# nwb={"ca" => 10000} in string "{\"gb\":10000}"
|
10
|
+
# p=[de,nwb]
|
11
|
+
# p.sort!{|t,y| y[o["country"]]<=>t[o["country"]]} # t y sequence reversed here p
|
12
|
+
|
13
|
+
packages.sort!{|f,s| (JSON.parse(s.stock_location.priorities)[inventory_units.first.order.ship_address.country.iso.downcase] || JSON.parse(s.stock_location.priorities)["all"] || 0) <=> (JSON.parse(f.stock_location.priorities)[inventory_units.first.order.ship_address.country.iso.downcase] || JSON.parse(f.stock_location.priorities)["all"] || 0)}
|
14
|
+
|
15
|
+
Rails.logger.info("packages after sort: #{packages.length} at locations of #{packages.map(&:stock_location).inspect}")
|
16
|
+
packages
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
data/bin/rails
ADDED
@@ -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_location_prioritizer/engine', __FILE__)
|
5
|
+
|
6
|
+
require 'rails/all'
|
7
|
+
require 'rails/engine/commands'
|
data/config/routes.rb
ADDED
data/description
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
Unnamed repository; edit this file 'description' to name the repository.
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module SpreeLocationPrioritizer
|
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_location_prioritizer\n"
|
9
|
+
append_file 'vendor/assets/javascripts/spree/backend/all.js', "//= require spree/backend/spree_location_prioritizer\n"
|
10
|
+
end
|
11
|
+
|
12
|
+
def add_stylesheets
|
13
|
+
inject_into_file 'vendor/assets/stylesheets/spree/frontend/all.css', " *= require spree/frontend/spree_location_prioritizer\n", :before => /\*\//, :verbose => true
|
14
|
+
inject_into_file 'vendor/assets/stylesheets/spree/backend/all.css', " *= require spree/backend/spree_location_prioritizer\n", :before => /\*\//, :verbose => true
|
15
|
+
end
|
16
|
+
|
17
|
+
def add_migrations
|
18
|
+
run 'bundle exec rake railties:install:migrations FROM=spree_location_prioritizer'
|
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,20 @@
|
|
1
|
+
module SpreeLocationPrioritizer
|
2
|
+
class Engine < Rails::Engine
|
3
|
+
require 'spree/core'
|
4
|
+
isolate_namespace Spree
|
5
|
+
engine_name 'spree_location_prioritizer'
|
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
|
+
end
|
20
|
+
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_location_prioritizer/factories'
|
6
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -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_location_prioritizer/factories.rb
|
34
|
+
require 'spree_location_prioritizer/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,32 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
Gem::Specification.new do |s|
|
3
|
+
s.platform = Gem::Platform::RUBY
|
4
|
+
s.name = 'spree_location_prioritizer'
|
5
|
+
s.version = '3.0.0'
|
6
|
+
s.summary = 'sort the packages with stock location priority settings'
|
7
|
+
s.description = 'for multi-warehouse stores, we need set the closest/cheapest stock location for the shipment. this extension will do it with stock location settings.'
|
8
|
+
s.required_ruby_version = '>= 1.9.3'
|
9
|
+
|
10
|
+
s.author = 'Albert Liu'
|
11
|
+
s.email = 'albertliu@naturalwellbeing.com'
|
12
|
+
s.homepage = 'http://www.naturalwellbeing.com'
|
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
|
+
|
19
|
+
version = '~> 3-0-stable'
|
20
|
+
s.add_dependency 'spree_core'
|
21
|
+
|
22
|
+
s.add_development_dependency 'capybara', '~> 2.4'
|
23
|
+
s.add_development_dependency 'coffee-rails'
|
24
|
+
s.add_development_dependency 'database_cleaner'
|
25
|
+
s.add_development_dependency 'factory_girl', '~> 4.4'
|
26
|
+
s.add_development_dependency 'ffaker'
|
27
|
+
s.add_development_dependency 'rspec-rails', '~> 3.1'
|
28
|
+
s.add_development_dependency 'sass-rails', '~> 4.0.2'
|
29
|
+
s.add_development_dependency 'selenium-webdriver'
|
30
|
+
s.add_development_dependency 'simplecov'
|
31
|
+
s.add_development_dependency 'sqlite3'
|
32
|
+
end
|
metadata
ADDED
@@ -0,0 +1,222 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: spree_location_prioritizer
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 3.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Albert Liu
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-06-23 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: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: capybara
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '2.4'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '2.4'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: coffee-rails
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: database_cleaner
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: factory_girl
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '4.4'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '4.4'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: ffaker
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rspec-rails
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '3.1'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '3.1'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: sass-rails
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: 4.0.2
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: 4.0.2
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: selenium-webdriver
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: simplecov
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: sqlite3
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
167
|
+
description: for multi-warehouse stores, we need set the closest/cheapest stock location
|
168
|
+
for the shipment. this extension will do it with stock location settings.
|
169
|
+
email: albertliu@naturalwellbeing.com
|
170
|
+
executables: []
|
171
|
+
extensions: []
|
172
|
+
extra_rdoc_files: []
|
173
|
+
files:
|
174
|
+
- ".gitignore"
|
175
|
+
- ".rspec"
|
176
|
+
- Gemfile
|
177
|
+
- HEAD
|
178
|
+
- README.md
|
179
|
+
- Rakefile
|
180
|
+
- app/assets/javascripts/spree/backend/spree_location_prioritizer.js
|
181
|
+
- app/assets/javascripts/spree/frontend/spree_location_prioritizer.js
|
182
|
+
- app/assets/stylesheets/spree/backend/spree_location_prioritizer.css
|
183
|
+
- app/assets/stylesheets/spree/frontend/spree_location_prioritizer.css
|
184
|
+
- app/models/spree/stock/coordinator_decorator.rb
|
185
|
+
- app/models/spree/stock/prioritizer_decorator.rb
|
186
|
+
- bin/rails
|
187
|
+
- config/locales/en.yml
|
188
|
+
- config/routes.rb
|
189
|
+
- db/migrate/20150126092933_add_priorities_to_locations.rb
|
190
|
+
- description
|
191
|
+
- lib/generators/spree_location_prioritizer/install/install_generator.rb
|
192
|
+
- lib/spree_location_prioritizer.rb
|
193
|
+
- lib/spree_location_prioritizer/engine.rb
|
194
|
+
- lib/spree_location_prioritizer/factories.rb
|
195
|
+
- spec/spec_helper.rb
|
196
|
+
- spree_location_prioritizer.gemspec
|
197
|
+
homepage: http://www.naturalwellbeing.com
|
198
|
+
licenses: []
|
199
|
+
metadata: {}
|
200
|
+
post_install_message:
|
201
|
+
rdoc_options: []
|
202
|
+
require_paths:
|
203
|
+
- lib
|
204
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
205
|
+
requirements:
|
206
|
+
- - ">="
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: 1.9.3
|
209
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
210
|
+
requirements:
|
211
|
+
- - ">="
|
212
|
+
- !ruby/object:Gem::Version
|
213
|
+
version: '0'
|
214
|
+
requirements:
|
215
|
+
- none
|
216
|
+
rubyforge_project:
|
217
|
+
rubygems_version: 2.4.5
|
218
|
+
signing_key:
|
219
|
+
specification_version: 4
|
220
|
+
summary: sort the packages with stock location priority settings
|
221
|
+
test_files:
|
222
|
+
- spec/spec_helper.rb
|