spree_malls 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. data/.gitignore +14 -0
  2. data/.rspec +1 -0
  3. data/Gemfile +6 -0
  4. data/LICENSE +26 -0
  5. data/README.ja.md +59 -0
  6. data/README.md +60 -0
  7. data/Rakefile +15 -0
  8. data/app/assets/javascripts/admin/spree_malls.js +1 -0
  9. data/app/assets/javascripts/store/spree_malls.js +1 -0
  10. data/app/assets/stylesheets/admin/spree_malls.css +3 -0
  11. data/app/assets/stylesheets/store/spree_malls.css +3 -0
  12. data/app/controllers/spree/admin/add_on_mall_prices_controller.rb +117 -0
  13. data/app/controllers/spree/admin/add_on_malls_controller.rb +26 -0
  14. data/app/controllers/spree/admin/variant_controller_decorator.rb +14 -0
  15. data/app/models/spree/ability_decorator.rb +13 -0
  16. data/app/models/spree/add_on_mall.rb +10 -0
  17. data/app/models/spree/add_on_mall_price.rb +9 -0
  18. data/app/models/spree/add_on_mall_translation.rb +6 -0
  19. data/app/models/spree/variant_decorator.rb +26 -0
  20. data/app/overrides/add_add_on_mall_configration_menu_to_add_on_menu.rb +6 -0
  21. data/app/overrides/add_add_on_mall_price_variant_to_product_menu.rb +10 -0
  22. data/app/views/spree/admin/add_on_mall_prices/edit.html.erb +57 -0
  23. data/app/views/spree/admin/add_on_mall_prices/index.html.erb +44 -0
  24. data/app/views/spree/admin/add_on_mall_prices/new.html.erb +51 -0
  25. data/app/views/spree/admin/add_on_malls/_form.html.erb +14 -0
  26. data/app/views/spree/admin/add_on_malls/edit.html.erb +11 -0
  27. data/app/views/spree/admin/add_on_malls/index.html.erb +29 -0
  28. data/app/views/spree/admin/add_on_malls/new.html.erb +11 -0
  29. data/bin/rails +7 -0
  30. data/config/locales/en.yml +29 -0
  31. data/config/locales/ja.yml +29 -0
  32. data/config/routes.rb +21 -0
  33. data/db/migrate/20140417154602_create_spree_add_on_mall.rb +21 -0
  34. data/lib/generators/spree_malls/install/install_generator.rb +31 -0
  35. data/lib/spree_malls.rb +2 -0
  36. data/lib/spree_malls/engine.rb +22 -0
  37. data/lib/spree_malls/factories.rb +6 -0
  38. data/spec/spec_helper.rb +82 -0
  39. metadata +277 -0
data/.gitignore ADDED
@@ -0,0 +1,14 @@
1
+ \#*
2
+ *~
3
+ .#*
4
+ .DS_Store
5
+ .idea
6
+ .project
7
+ .sass-cache
8
+ coverage
9
+ Gemfile.lock
10
+ tmp
11
+ nbproject
12
+ pkg
13
+ *.swp
14
+ spec/dummy
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --color
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Provides basic authentication functionality for testing parts of your engine
4
+ gem 'spree_auth_devise', github: 'spree/spree_auth_devise'
5
+
6
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,26 @@
1
+ Copyright (c) 2014 [name of plugin creator]
2
+ All rights reserved.
3
+
4
+ Redistribution and use in source and binary forms, with or without modification,
5
+ are permitted provided that the following conditions are met:
6
+
7
+ * Redistributions of source code must retain the above copyright notice,
8
+ this list of conditions and the following disclaimer.
9
+ * Redistributions in binary form must reproduce the above copyright notice,
10
+ this list of conditions and the following disclaimer in the documentation
11
+ and/or other materials provided with the distribution.
12
+ * Neither the name Spree nor the names of its contributors may be used to
13
+ endorse or promote products derived from this software without specific
14
+ prior written permission.
15
+
16
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
20
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
21
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
22
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
23
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
24
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
25
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
data/README.ja.md ADDED
@@ -0,0 +1,59 @@
1
+ SpreeMalls
2
+ ==================
3
+
4
+ Purpose
5
+ -------
6
+ * 外部ショッピングモールの価格に関する情報を管理することができます。
7
+
8
+ 製品のサイドメニューへ「モール価格」を表示。
9
+ ![Malls](https://raw.githubusercontent.com/wiki/digitalm/spree_malls/images/malls2.jpg)
10
+
11
+ 「モール価格」 - edit(種類を選択)
12
+ ![Malls](https://raw.githubusercontent.com/wiki/digitalm/spree_malls/images/malls3.jpg)
13
+
14
+ モール価格の管理
15
+ ![Malls](https://raw.githubusercontent.com/wiki/digitalm/spree_malls/images/malls4.jpg)
16
+
17
+ モールの登録
18
+ ![Malls](https://raw.githubusercontent.com/wiki/digitalm/spree_malls/images/malls4.jpg)
19
+
20
+ 依存関係
21
+ ------------
22
+ * [spree_add_on_menu](https://github.com/digitalm/spree_add_on_menu)
23
+
24
+ Installation
25
+ ------------
26
+
27
+ Add spree_malls to your Gemfile:
28
+
29
+ ```ruby
30
+ gem 'spree_malls'
31
+ ```
32
+
33
+ Bundle your dependencies and run the installation generator:
34
+
35
+ ```shell
36
+ bundle
37
+ bundle exec rails g spree_add_on_menu:instal
38
+ bundle exec rails g spree_malls:install
39
+ ```
40
+
41
+ Testing
42
+ -------
43
+
44
+ Be sure to bundle your dependencies and then create a dummy test app for the specs to run against.
45
+
46
+ ```shell
47
+ bundle
48
+ bundle exec rake test_app
49
+ bundle exec rspec spec
50
+ ```
51
+
52
+ When testing your applications integration with this extension you may use it's factories.
53
+ Simply add this require statement to your spec_helper:
54
+
55
+ ```ruby
56
+ require 'spree_malls/factories'
57
+ ```
58
+
59
+ Copyright (c) 2014 [Exsight.inc](http://www.exsight.co.jp/) , released under the New BSD License
data/README.md ADDED
@@ -0,0 +1,60 @@
1
+ SpreeMalls
2
+ ==========
3
+
4
+ Purpose
5
+ -------
6
+ * Enable to manage price information on the mall that you are opening stores outside spree.
7
+
8
+ Show link "MALL PRICES" to Product side menu.
9
+ ![Malls](https://raw.githubusercontent.com/wiki/digitalm/spree_malls/images/malls2.jpg)
10
+
11
+ "MALL PRICES" show variant list. Select particular variant and edit
12
+ ![Malls](https://raw.githubusercontent.com/wiki/digitalm/spree_malls/images/malls3.jpg)
13
+
14
+ Admin can manage Mall Price informations.
15
+ ![Malls](https://raw.githubusercontent.com/wiki/digitalm/spree_malls/images/malls4.jpg)
16
+
17
+ Be sure to create Mall list before manage.
18
+ ![Malls](https://raw.githubusercontent.com/wiki/digitalm/spree_malls/images/malls4.jpg)
19
+
20
+ Dependency
21
+ ------------
22
+ It needs
23
+ * [spree_add_on_menu](https://github.com/digitalm/spree_add_on_menu) for admin menu tab expanding
24
+
25
+ Installation
26
+ ------------
27
+
28
+ Add spree_malls to your Gemfile:
29
+
30
+ ```ruby
31
+ gem 'spree_malls'
32
+ ```
33
+
34
+ Bundle your dependencies and run the installation generator:
35
+
36
+ ```shell
37
+ bundle
38
+ bundle exec rails g spree_add_on_menu:instal
39
+ bundle exec rails g spree_malls:install
40
+ ```
41
+
42
+ Testing
43
+ -------
44
+
45
+ Be sure to bundle your dependencies and then create a dummy test app for the specs to run against.
46
+
47
+ ```shell
48
+ bundle
49
+ bundle exec rake test_app
50
+ bundle exec rspec spec
51
+ ```
52
+
53
+ When testing your applications integration with this extension you may use it's factories.
54
+ Simply add this require statement to your spec_helper:
55
+
56
+ ```ruby
57
+ require 'spree_malls/factories'
58
+ ```
59
+
60
+ Copyright (c) 2014 [Exsight.inc](http://www.exsight.co.jp/) , released under the New BSD Licensee
data/Rakefile ADDED
@@ -0,0 +1,15 @@
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 => [:spec]
10
+
11
+ desc 'Generates a dummy app for testing'
12
+ task :test_app do
13
+ ENV['LIB_NAME'] = 'spree_malls'
14
+ Rake::Task['extension:test_app'].invoke
15
+ end
@@ -0,0 +1 @@
1
+ //= require admin/spree_backend
@@ -0,0 +1 @@
1
+ //= require store/spree_frontend
@@ -0,0 +1,3 @@
1
+ /*
2
+ *= require admin/spree_backend
3
+ */
@@ -0,0 +1,3 @@
1
+ /*
2
+ *= require store/spree_frontend
3
+ */
@@ -0,0 +1,117 @@
1
+ module Spree
2
+ module Admin
3
+ class AddOnMallPricesController < ResourceController
4
+ before_filter :load_data
5
+
6
+ def new
7
+ session[:return_to] ||= request.referer
8
+ @add_on_malls = Spree::AddOnMall.includes(:add_on_mall_prices).all
9
+ @add_on_mall_prices = Spree::AddOnMallPrice.where(:variant_id => params[:variant_id])
10
+ end
11
+
12
+ def show
13
+ session[:return_to] ||= request.referer
14
+ redirect_to( :action => :edit )
15
+ end
16
+
17
+ def index
18
+ session[:return_to] = request.url
19
+ @product = Spree::Product.find_by_permalink!(params[:product_id])
20
+ if @product.has_variants?
21
+ @variant = @product.variants.page(params[:page])
22
+ else
23
+ @variant = Spree::Variant.where(:id => @product.master.id).page(params[:page])
24
+ end
25
+ render :index
26
+ end
27
+
28
+ def edit
29
+ session[:return_to] = request.url
30
+ @add_on_malls = Spree::AddOnMall.order(:name)
31
+ # @add_on_malls = Spree::AddOnMall.includes(:add_on_mall_prices).where(Spree::AddOnMallPrice.arel_table[:variant_id].eq(params[:variant_id])).references(:add_on_mall_prices).order(:name)
32
+ @add_on_mall_prices = Spree::AddOnMallPrice.includes(:add_on_mall).where(:variant_id => params[:variant_id])
33
+ render :edit
34
+ end
35
+
36
+ def create
37
+ begin
38
+ params[:add_on_mall_prices].each_value { |value|
39
+ @add_on_mall_prices = Spree::AddOnMallPrice.new(value)
40
+ @add_on_mall_prices.save
41
+ }
42
+ respond_to do |format|
43
+ flash[:success] = t('add_on.notice_messages.admin_product_variant_add_on_mall_price_variant_created')
44
+ format.html { redirect_to admin_product_add_on_mall_prices_path }
45
+ format.json { render action: 'index', status: :created, location: @add_on_mall_prices }
46
+ end
47
+ rescue
48
+ respond_to do |format|
49
+ flash[:error] = t('add_on.notice_messages.admin_product_variant_add_on_mall_price_variant_has_error')
50
+ format.html { render action: 'new' }
51
+ format.json { render json: @add_on_mall_prices.errors }
52
+ end
53
+ end
54
+
55
+ end
56
+
57
+ def update
58
+ begin
59
+ params[:add_on_mall_prices].each_value { |value|
60
+ @add_on_mall_prices = Spree::AddOnMallPrice.where(:variant_id => value["variant_id"], :add_on_mall_id => value["add_on_mall_id"]).first_or_initialize
61
+ @add_on_mall_prices.update(value)
62
+ logger.info @add_on_mall_prices.errors.inspect
63
+ }
64
+ respond_to do |format|
65
+ flash[:success] = t('add_on.notice_messages.admin_product_variant_add_on_mall_price_variant_updated')
66
+ format.html { redirect_to :action => :index }
67
+ format.json { head :no_content }
68
+ end
69
+ rescue
70
+ respond_to do |format|
71
+ flash[:error] = t('add_on.notice_messages.admin_product_variant_add_on_mall_price_variant_has_error')
72
+ format.html { render action: 'edit' }
73
+ format.json { render json: @add_on_mall_price_variant.errors }
74
+ end
75
+ end
76
+ end
77
+
78
+ def destroy
79
+ @variant = Spree::Variant.find(params[:id])
80
+ if @variant.destroy
81
+ flash[:success] = Spree.t('notice_messages.variant_deleted')
82
+ else
83
+ flash[:success] = Spree.t('notice_messages.variant_not_deleted')
84
+ end
85
+
86
+ respond_with(@variant) do |format|
87
+ format.html { redirect_to admin_product_maker_variant_path(params[:product_id]) }
88
+ format.js { render_js_for_destroy }
89
+ end
90
+ end
91
+
92
+ protected
93
+ def variant_includes
94
+ [:add_on_mall_price_variants]
95
+ end
96
+
97
+ def load_data
98
+ @product = Spree::Product.find_by_permalink!(params[:product_id])
99
+ @taxons = Taxon.order(:name)
100
+ @option_types = OptionType.order(:name)
101
+ @tax_categories = TaxCategory.order(:name)
102
+ @shipping_categories = ShippingCategory.order(:name)
103
+ @add_on_malls = Spree::AddOnMall.order(:name)
104
+ end
105
+
106
+ private
107
+ def permit_attributes
108
+ params.require(:add_on_mall_prices).value.permit!
109
+ end
110
+
111
+ def add_on_mall_price_variant_params
112
+ params.require(:add_on_mall_prices).value.permit(:variant_id, :add_on_mall_id, :amount, :currency)
113
+ end
114
+
115
+ end
116
+ end
117
+ end
@@ -0,0 +1,26 @@
1
+ module Spree
2
+ module Admin
3
+ class AddOnMallsController < ResourceController
4
+
5
+ def update_values_positions
6
+ params[:positions].each do |id, index|
7
+ AddOnMall.where(:id => id).update_all(:position => index)
8
+ end
9
+
10
+ respond_to do |format|
11
+ format.html { redirect_to admin_add_on_malls_url(params[:id]) }
12
+ format.js { render :text => 'Ok' }
13
+ end
14
+ end
15
+
16
+ def index
17
+ @add_on_mall = Spree::AddOnMall.page(params[:page])
18
+ end
19
+
20
+ private
21
+ def add_on_mall_params
22
+ params.require(:add_on_mall).permit(add_on_mall_prices_attributes: [ :variant_id, :add_on_mall_id, :amount, :currency ])
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,14 @@
1
+ Spree::Admin::VariantsController.class_eval do
2
+ before_filter :load_add_on_mall_price, :only => :load_data
3
+
4
+ def load_add_on_mall_price
5
+ @add_on_mall_price = Spree::AddOnMallPrice.where(:variant_id => @variant.id).first
6
+ logger.info "####### loaded_add_on_mall_price ########"
7
+ logger.info @add_on_mall_price
8
+ end
9
+
10
+ private
11
+ def variant_params
12
+ params.require(:variant).permit(add_on_mall_price_attributes: [ :variant_id, :mall_id, :amount, :currency])
13
+ end
14
+ end
@@ -0,0 +1,13 @@
1
+ class AbilityDecorator
2
+ include CanCan::Ability
3
+ def initialize(user)
4
+ #can [:read, :index], Spree::NewsEntry
5
+
6
+ if user.respond_to?(:has_spree_role?) && user.has_spree_role?('admin')
7
+ can [:admin, :index, :read, :update, :edit], Spree::AddOnMall
8
+ can [:admin, :index, :read, :update, :edit], Spree::AddOnMallPrice
9
+ end
10
+ end
11
+ end
12
+
13
+ Spree::Ability.register_ability(AbilityDecorator)
@@ -0,0 +1,10 @@
1
+ module Spree
2
+ class AddOnMall < ActiveRecord::Base
3
+ has_many :add_on_mall_prices
4
+ acts_as_paranoid
5
+
6
+ validates :name, presence: true
7
+ validates_uniqueness_of :name
8
+ accepts_nested_attributes_for :add_on_mall_prices
9
+ end
10
+ end
@@ -0,0 +1,9 @@
1
+ module Spree
2
+ class AddOnMallPrice < ActiveRecord::Base
3
+ belongs_to :variant, class_name: 'Spree::Variant', :foreign_key => :variant_id
4
+ belongs_to :add_on_mall, class_name: 'Spree::AddOnMall', :foreign_key => :add_on_mall_id
5
+ validates_uniqueness_of :add_on_mall_id, :scope => :variant_id
6
+ validates_uniqueness_of :amount, :scope => [:add_on_mall_id, :variant_id], allow_nil: true
7
+ validates_uniqueness_of :currency, :scope => [:add_on_mall_id, :variant_id], allow_nil: true
8
+ end
9
+ end
@@ -0,0 +1,6 @@
1
+ module Spree
2
+ AddOnMall.class_eval do
3
+ translates :name, :presentation, :fallbacks_for_empty_translations => true
4
+ include SpreeI18n::Translatable
5
+ end
6
+ end
@@ -0,0 +1,26 @@
1
+ module Spree
2
+ Variant.class_eval do
3
+ has_many :add_on_mall_prices, class_name: 'Spree::AddOnMallPrice'
4
+
5
+ # builds add_on_maker_variants from created variant ids
6
+ after_create :create_add_on_mall_prices_from_variants
7
+
8
+ # enable variants to CRUD each own add_on_maker_variants by accept nesting as child
9
+ accepts_nested_attributes_for :add_on_mall_prices, allow_destroy: true
10
+
11
+ def create_add_on_mall_prices_from_variants
12
+ if Spree::AddOnMall.exists?
13
+ Spree::AddOnMallPrice.where(variant_id: self.id).first_or_initialize do |a|
14
+ a.variant_id = self.id
15
+ logger.info a.inspect
16
+ if a.save
17
+ logger.info "save completed"
18
+ else
19
+ logger.info "save imcompleted!"
20
+ end
21
+ end
22
+ end
23
+ end
24
+
25
+ end
26
+ end
@@ -0,0 +1,6 @@
1
+ Deface::Override.new(:virtual_path => 'spree/admin/add_on_menu/index',
2
+ :name => 'add_add_on_mall_configration_menu_to_add_on_menu',
3
+ :insert_bottom => "[data-hook='admin_add_on_menu_sidebar_menu']",
4
+ :text => "
5
+ <%= configurations_sidebar_menu_item t('add_on.add_on_mall'), admin_add_on_malls_path %>
6
+ ")
@@ -0,0 +1,10 @@
1
+ Deface::Override.new(:virtual_path => 'spree/admin/shared/_product_tabs',
2
+ :name => 'add_add_on_mall_price_variant_to_product_menu',
3
+ :insert_bottom => "[data-hook='admin_product_tabs']",
4
+ :sequence => {:after => "add_add_on_supplier_variant_to_product_menu"},
5
+ :text => "
6
+ <%= content_tag :li, :class => ('active' if current == 'Add On Mall Price Variants') do %>
7
+ <%= link_to_with_icon 'icon-edit', t('add_on.add_on_mall_prices'), admin_product_add_on_mall_prices_path(@product) %>
8
+ <% end if can?(:admin, Spree::AddOnMallPrice) %>
9
+
10
+ ")
@@ -0,0 +1,57 @@
1
+ <%= render :partial => 'spree/admin/shared/product_sub_menu' %>
2
+
3
+ <%= render :partial => 'spree/admin/shared/product_tabs', :locals => {:current => 'Add On Mall Price Variants'} %>
4
+
5
+ <% content_for :page_title do %>
6
+ <%= t('add_on.add_on_mall_price') %>
7
+ <% end %>
8
+
9
+ <% content_for :page_actions do %>
10
+ <li>
11
+ <%= button_link_to t('add_on.back_to_product_add_on_mall_prices_list'), admin_product_add_on_mall_prices_path, :icon => 'icon-arrow-left' %>
12
+ </li>
13
+ <% end %>
14
+
15
+ <% if @add_on_malls.empty? %>
16
+ <%= t('add_on.mall_is_not_registered_yet') %><br>
17
+ <%= link_to t('add_on.please_create_add_on_malls'), new_admin_add_on_mall_path %>
18
+ <% else %>
19
+ <%= form_tag(admin_product_variant_add_on_mall_prices_path(:variant_id => params[:variant_id]), {method: 'patch', action: 'update'}) do %>
20
+ <table class='index'>
21
+ <thead>
22
+ <tr>
23
+ <th><%= t("activerecord.attributes.add_on_mall.name") %></th>
24
+ <th><%= t("activerecord.attributes.add_on_mall_price.amount") %></th>
25
+ <th><%= t("activerecord.attributes.add_on_mall_price.currency") %></th>
26
+ </tr>
27
+ </thead>
28
+ <tbody>
29
+ <% @add_on_malls.each_with_index do |add_on_mall,index| %>
30
+ <tr class="<%= cycle('odd', 'even') %>">
31
+ <td class="align-center">
32
+ <%= hidden_field_tag "[add_on_mall_prices][#{index}][variant_id]", params[:variant_id] %>
33
+ <%= hidden_field_tag "[add_on_mall_prices][#{index}][add_on_mall_id]", add_on_mall.id %>
34
+ <%= add_on_mall.name %>
35
+ </td>
36
+ <td>
37
+ <% unless add_on_mall.add_on_mall_prices.blank? %>
38
+ <%= text_field_tag "[add_on_mall_prices][#{index}][amount]", add_on_mall.add_on_mall_prices.first.amount, :autofocus => true %>
39
+ <% else %>
40
+ <%= text_field_tag "[add_on_mall_prices][#{index}][amount]",nil ,:autofocus => true %>
41
+ <%end%>
42
+ </td>
43
+ <td>
44
+ <% unless add_on_mall.add_on_mall_prices.blank? %>
45
+ <%= text_field_tag "[add_on_mall_prices][#{index}][currency]", add_on_mall.add_on_mall_prices.first.currency%>
46
+ <% else %>
47
+ <%= text_field_tag "[add_on_mall_prices][#{index}][currency]", Spree::Config[:currency] %>
48
+ <%end%>
49
+ </td>
50
+ </tr>
51
+ <% end %>
52
+ </tbody>
53
+ </table>
54
+ <%= submit_tag Spree.t(:update) %>
55
+ <% end %>
56
+
57
+ <% end %>
@@ -0,0 +1,44 @@
1
+ <%= render :partial => 'spree/admin/shared/product_sub_menu' %>
2
+
3
+ <%= render :partial => 'spree/admin/shared/product_tabs', :locals => {:current => 'Add On Mall Price Variants'} %>
4
+
5
+ <% content_for :page_title do %>
6
+ <%= t("add_on.listing_add_on_mall_prices") %>
7
+ <% end %>
8
+
9
+ <% if @add_on_malls.empty? %>
10
+ <%= t('add_on.mall_is_not_registered_yet') %><br>
11
+ <%= link_to t('add_on.please_create_add_on_malls'), new_admin_add_on_mall_path %>
12
+ <% else %>
13
+
14
+ <%= paginate @variant %>
15
+
16
+ <table class='index'>
17
+ <thead>
18
+ <tr>
19
+ <th><%= t("activerecord.attributes.variant.id") %></th>
20
+ <th><%= Spree.t(:options) %></th>
21
+ <th><%= Spree.t(:price) %></th>
22
+ <th><%= Spree.t(:sku) %></th>
23
+ </tr>
24
+ </thead>
25
+
26
+ <tbody>
27
+ <% for variant in @variant %>
28
+ <tr class="<%= cycle('odd', 'even') %>">
29
+ <td class="align-center"><%= variant.id %></td>
30
+ <td class="align-center"><%= variant.options_text %></td>
31
+ <td class="align-center"><%= variant.price %></td>
32
+ <td class="align-center"><%= variant.sku %></td>
33
+
34
+ <% if variant.add_on_mall_prices.empty? %>
35
+ <td class="actions"><%= link_to t("edit"), ("/admin/products/" + params[:product_id] + "/variants/#{variant.id}/add_on_mall_prices/new") , :class => 'edit' %></td>
36
+ <% else %>
37
+ <td class="actions"><%= link_to t("edit"), ("/admin/products/" + params[:product_id] + "/variants/#{variant.id}/add_on_mall_prices/edit") , :class => 'edit' %></td>
38
+ <% end %>
39
+
40
+ </tr>
41
+ <% end %>
42
+ </tbody>
43
+ </table>
44
+ <% end %>
@@ -0,0 +1,51 @@
1
+ <%= render :partial => 'spree/admin/shared/product_sub_menu' %>
2
+
3
+ <%= render :partial => 'spree/admin/shared/product_tabs', :locals => {:current => 'Add On Mall Price Variants'} %>
4
+
5
+ <% content_for :page_title do %>
6
+ <%= t('add_on.add_on_mall_price') %>
7
+ <% end %>
8
+
9
+ <% content_for :page_actions do %>
10
+ <li>
11
+ <%= button_link_to t('add_on.back_to_product_add_on_mall_prices_list'), admin_product_add_on_mall_prices_path, :icon => 'icon-arrow-left' %>
12
+ </li>
13
+ <% end %>
14
+
15
+ <% if @add_on_malls.empty? %>
16
+ <%= t('add_on.mall_is_not_registered_yet') %><br>
17
+ <%= link_to t('add_on.please_create_add_on_malls'), new_admin_add_on_mall_path %>
18
+ <% else %>
19
+
20
+ <%= form_tag(admin_product_variant_add_on_mall_prices_path(:variant_id => params[:variant_id]), {method: 'post'}) do %>
21
+ <table class='index'>
22
+ <thead>
23
+ <tr>
24
+ <th><%= t("activerecord.attributes.add_on_mall.name") %></th>
25
+ <th><%= t("activerecord.attributes.add_on_mall_price.amount") %></th>
26
+ <th><%= t("activerecord.attributes.add_on_mall_price.currency") %></th>
27
+ </tr>
28
+ </thead>
29
+ <tbody>
30
+ <% @add_on_malls.each_with_index do |add_on_mall,index| %>
31
+ <% @add_on_mall_prices = add_on_mall.add_on_mall_prices.build(:currency => Spree::Config[:currency], :variant_id => params[:variant_id]) %>
32
+ <tr class="<%= cycle('odd', 'even') %>">
33
+ <td class="align-center">
34
+ <%= hidden_field_tag "[add_on_mall_prices]#{index}[variant_id]", params[:variant_id] %>
35
+ <%= hidden_field_tag "[add_on_mall_prices]#{index}[add_on_mall_id]", add_on_mall.id %>
36
+ <%= add_on_mall.name %>
37
+ </td>
38
+ <td>
39
+ <%= text_field_tag "[add_on_mall_prices]#{index}[amount]",@add_on_mall_prices.amount, :autofocus => true %>
40
+ </td>
41
+ <td>
42
+ <%= text_field_tag "[add_on_mall_prices]#{index}[currency]",@add_on_mall_prices.currency %>
43
+ </td>
44
+ </tr>
45
+ <% end %>
46
+ </tbody>
47
+ </table>
48
+ <%= submit_tag "Save" %>
49
+ <% end %>
50
+
51
+ <% end %>
@@ -0,0 +1,14 @@
1
+ <%= form_for [:admin, @add_on_mall] do |f| %>
2
+ <div data-hook="admin_inside_bank_form" class="row">
3
+ <div class="alpha five columns">
4
+ <%= f.field_container :name do %>
5
+ <%= f.label :name, Spree.t(:name) %> <span class="required">*</span><br />
6
+ <%= f.error_message_on :name, :class => 'fullwidth title' %>
7
+ <%= f.text_field :name, :class => 'fullwidth' %>
8
+ <% end %>
9
+
10
+ <%= f.submit %>
11
+
12
+ </div>
13
+ </div>
14
+ <% end %>
@@ -0,0 +1,11 @@
1
+ <% content_for :page_title do %>
2
+ <%= t("add_on.edit_mall") %>
3
+ <% end %>
4
+
5
+ <% content_for :page_actions do %>
6
+ <li>
7
+ <%= button_link_to t("add_on.back_to_malls_list"), admin_add_on_malls_path, :icon => 'icon-arrow-left' %>
8
+ </li>
9
+ <% end %>
10
+
11
+ <%= render :partial => 'form' %>
@@ -0,0 +1,29 @@
1
+ <% content_for :page_title do %>
2
+ <%= t("add_on.listing_add_on_mall") %>
3
+ <% end %>
4
+
5
+ <% content_for :page_actions do %>
6
+ <li>
7
+ <%= button_link_to t("add_on.new_add_on_mall"), new_admin_add_on_mall_path , :icon => 'icon-plus', :id => 'admin_new_add_on_mall'%>
8
+ </li>
9
+ <% end %>
10
+
11
+ <%= paginate @add_on_mall %>
12
+
13
+ <table class='index'>
14
+ <thead>
15
+ <tr>
16
+ <th><%= t("activerecord.attributes.add_on_mall.name") %></th>
17
+ </tr>
18
+ </thead>
19
+
20
+ <tbody>
21
+ <% @add_on_mall.each do |mall| %>
22
+ <tr class="<%= cycle('odd', 'even') %>">
23
+ <td class="align-center"><%= mall.name %></td>
24
+ <td class="actions"><%= link_to_edit mall, :no_text => true, :class => 'edit' %></td>
25
+ <td class="actions"><%= link_to_delete mall, :no_text => true if can?(:delete, mall) && !mall.deleted? %></td>
26
+ </tr>
27
+ <% end %>
28
+ </tbody>
29
+ </table>
@@ -0,0 +1,11 @@
1
+ <% content_for :page_title do %>
2
+ <%= t("add_on.new_add_on_mall") %>
3
+ <% end %>
4
+
5
+ <% content_for :page_actions do %>
6
+ <li>
7
+ <%= button_link_to t("add_on.back_to_add_on_malls_list"), admin_add_on_malls_path, :icon => 'icon-arrow-left' %>
8
+ </li>
9
+ <% end %>
10
+
11
+ <%= render :partial => 'form' %>
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_malls/engine', __FILE__)
5
+
6
+ require 'rails/all'
7
+ require 'rails/engine/commands'
@@ -0,0 +1,29 @@
1
+ en:
2
+ add_on:
3
+ add_on_mall: Mall
4
+ add_on_malls: Malls
5
+ add_on_mall_price: Mall Price
6
+ add_on_mall_prices: Mall Prices
7
+ listing_add_on_mall: Listing Malls
8
+ listing_add_on_mall_price: Listing Mall Price Products
9
+ new_add_on_mall: New Mall
10
+ edit_add_on_mall: Edit Mall
11
+ destroy: Destroy
12
+ add_one: Add One
13
+ back_to_add_on_malls_list: Back To Malls List
14
+ back_to_product_add_on_mall_prices_list: Back To Mall Prices List
15
+ mall_is_not_registered_yet: Mall is not registered yet.
16
+ please_create_add_on_malls: Please create mall.
17
+ notice_messages:
18
+ admin_product_variant_add_on_mall_price_variant_created: Mall Variant has been successfully created!
19
+ admin_product_variant_add_on_mall_price_variant_updated: Mall Variant has been successfully updated!
20
+ admin_product_variant_add_on_mall_price_variant_has_error: Cannnot save for invalid data.
21
+ activerecord:
22
+ attributes:
23
+ add_on_mall:
24
+ name: name
25
+ add_on_mall_price:
26
+ variant_id: Variant ID
27
+ add_on_mall_id: Mall ID
28
+ amount: amount
29
+ currency: currency
@@ -0,0 +1,29 @@
1
+ ja:
2
+ add_on:
3
+ add_on_mall: モール
4
+ add_on_malls: モール
5
+ add_on_mall_price: モール価格
6
+ add_on_mall_prices: モール価格
7
+ listing_add_on_mall: モール一覧
8
+ listing_add_on_mall_price: モール価格商品一覧
9
+ new_add_on_mall: 新規
10
+ edit_add_on_mall: 編集
11
+ destroy: 削除
12
+ add_one: 新規追加
13
+ back_to_add_on_malls_list: 登録済モール一覧
14
+ back_to_product_add_on_mall_prices_list: モール価格商品一覧へ戻る
15
+ mall_is_not_registered_yet: モールが登録されていません
16
+ please_create_add_on_malls: モールを登録する
17
+ notice_messages:
18
+ admin_product_variant_add_on_mall_price_variant_created: モール価格情報を作成しました
19
+ admin_product_variant_add_on_mall_price_variant_updated: モール価格情報を更新しました
20
+ admin_product_variant_add_on_mall_price_variant_has_error: エラーが発生しました
21
+ activerecord:
22
+ attributes:
23
+ add_on_mall:
24
+ name: 名前
25
+ add_on_mall_price:
26
+ variant_id: 種類
27
+ add_on_mall_id: モール
28
+ amount: 価格
29
+ currency: 通貨
data/config/routes.rb ADDED
@@ -0,0 +1,21 @@
1
+ Spree::Core::Engine.routes.draw do
2
+ # Add your extension routes here
3
+ namespace :admin do
4
+ resources :add_on_malls , :only => [:index, :new, :create, :edit, :update, :destroy] do
5
+ end
6
+ end
7
+
8
+
9
+ namespace :admin , :only => [] do
10
+ resources :products , :only => [] do
11
+ get 'add_on_mall_prices' => 'add_on_mall_prices#index'
12
+ resources :variants do
13
+ get 'add_on_mall_prices/edit', to: 'add_on_mall_prices#edit'
14
+ patch 'add_on_mall_prices', to: 'add_on_mall_prices#update'
15
+ resources :add_on_mall_prices, :only => [:new, :create] do
16
+ end
17
+ end
18
+ end
19
+ end
20
+
21
+ end
@@ -0,0 +1,21 @@
1
+ class CreateSpreeAddOnMall < ActiveRecord::Migration
2
+ def change
3
+ create_table :spree_add_on_malls do |t|
4
+ t.string :name
5
+ t.datetime :deleted_at
6
+ t.timestamps
7
+ end
8
+ create_table :spree_add_on_mall_translations do |t|
9
+ t.integer :add_on_mall_id
10
+ t.string :locale
11
+ t.string :name
12
+ t.timestamps
13
+ end
14
+ create_table :spree_add_on_mall_prices do |t|
15
+ t.integer :variant_id
16
+ t.integer :add_on_mall_id
17
+ t.decimal :amount, :precision => 8, :scale => 2
18
+ t.string :currency
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,31 @@
1
+ module SpreeMalls
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 'app/assets/javascripts/store/all.js', "//= require store/spree_malls\n"
9
+ append_file 'app/assets/javascripts/admin/all.js', "//= require admin/spree_malls\n"
10
+ end
11
+
12
+ def add_stylesheets
13
+ inject_into_file 'app/assets/stylesheets/store/all.css', " *= require store/spree_malls\n", :before => /\*\//, :verbose => true
14
+ inject_into_file 'app/assets/stylesheets/admin/all.css', " *= require admin/spree_malls\n", :before => /\*\//, :verbose => true
15
+ end
16
+
17
+ def add_migrations
18
+ run 'bundle exec rake railties:install:migrations FROM=spree_malls'
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,2 @@
1
+ require 'spree_core'
2
+ require 'spree_malls/engine'
@@ -0,0 +1,22 @@
1
+ module SpreeMalls
2
+ class Engine < Rails::Engine
3
+ require 'spree/core'
4
+ isolate_namespace Spree
5
+ engine_name 'spree_malls'
6
+
7
+ config.autoload_paths += %W(#{config.root}/lib)
8
+
9
+ # use rspec for tests
10
+ config.generators do |g|
11
+ g.test_framework :rspec
12
+ end
13
+
14
+ def self.activate
15
+ Dir.glob(File.join(File.dirname(__FILE__), '../../app/**/*_decorator*.rb')) do |c|
16
+ Rails.configuration.cache_classes ? require(c) : load(c)
17
+ end
18
+ end
19
+
20
+ config.to_prepare &method(:activate).to_proc
21
+ end
22
+ 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_malls/factories'
6
+ end
@@ -0,0 +1,82 @@
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 defined in spree_core
27
+ require 'spree/testing_support/factories'
28
+ require 'spree/testing_support/controller_requests'
29
+ require 'spree/testing_support/authorization_helpers'
30
+ require 'spree/testing_support/url_helpers'
31
+
32
+ # Requires factories defined in lib/spree_malls/factories.rb
33
+ require 'spree_malls/factories'
34
+
35
+ RSpec.configure do |config|
36
+ config.include FactoryGirl::Syntax::Methods
37
+
38
+ # == URL Helpers
39
+ #
40
+ # Allows access to Spree's routes in specs:
41
+ #
42
+ # visit spree.admin_path
43
+ # current_path.should eql(spree.products_path)
44
+ config.include Spree::TestingSupport::UrlHelpers
45
+
46
+ # == Mock Framework
47
+ #
48
+ # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
49
+ #
50
+ # config.mock_with :mocha
51
+ # config.mock_with :flexmock
52
+ # config.mock_with :rr
53
+ config.mock_with :rspec
54
+ config.color = true
55
+
56
+ # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
57
+ config.fixture_path = "#{::Rails.root}/spec/fixtures"
58
+
59
+ # Capybara javascript drivers require transactional fixtures set to false, and we use DatabaseCleaner
60
+ # to cleanup after each test instead. Without transactional fixtures set to false the records created
61
+ # to setup a test will be unavailable to the browser, which runs under a seperate server instance.
62
+ config.use_transactional_fixtures = false
63
+
64
+ # Ensure Suite is set to use transactions for speed.
65
+ config.before :suite do
66
+ DatabaseCleaner.strategy = :transaction
67
+ DatabaseCleaner.clean_with :truncation
68
+ end
69
+
70
+ # Before each spec check if it is a Javascript test and switch between using database transactions or not where necessary.
71
+ config.before :each do
72
+ DatabaseCleaner.strategy = example.metadata[:js] ? :truncation : :transaction
73
+ DatabaseCleaner.start
74
+ end
75
+
76
+ # After each spec clean the database.
77
+ config.after :each do
78
+ DatabaseCleaner.clean
79
+ end
80
+
81
+ config.fail_fast = ENV['FAIL_FAST'] || false
82
+ end
metadata ADDED
@@ -0,0 +1,277 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: spree_malls
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - digitalm
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2014-06-04 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.4
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.4
30
+ - !ruby/object:Gem::Dependency
31
+ name: spree_add_on_menu
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ~>
36
+ - !ruby/object:Gem::Version
37
+ version: '0.1'
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: '0.1'
46
+ - !ruby/object:Gem::Dependency
47
+ name: capybara
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ~>
52
+ - !ruby/object:Gem::Version
53
+ version: '2.1'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: '2.1'
62
+ - !ruby/object:Gem::Dependency
63
+ name: coffee-rails
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ type: :development
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ - !ruby/object:Gem::Dependency
79
+ name: database_cleaner
80
+ requirement: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ! '>='
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
86
+ type: :development
87
+ prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
94
+ - !ruby/object:Gem::Dependency
95
+ name: factory_girl
96
+ requirement: !ruby/object:Gem::Requirement
97
+ none: false
98
+ requirements:
99
+ - - ~>
100
+ - !ruby/object:Gem::Version
101
+ version: '4.2'
102
+ type: :development
103
+ prerelease: false
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ~>
108
+ - !ruby/object:Gem::Version
109
+ version: '4.2'
110
+ - !ruby/object:Gem::Dependency
111
+ name: ffaker
112
+ requirement: !ruby/object:Gem::Requirement
113
+ none: false
114
+ requirements:
115
+ - - ! '>='
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - ! '>='
124
+ - !ruby/object:Gem::Version
125
+ version: '0'
126
+ - !ruby/object:Gem::Dependency
127
+ name: rspec-rails
128
+ requirement: !ruby/object:Gem::Requirement
129
+ none: false
130
+ requirements:
131
+ - - ~>
132
+ - !ruby/object:Gem::Version
133
+ version: '2.13'
134
+ type: :development
135
+ prerelease: false
136
+ version_requirements: !ruby/object:Gem::Requirement
137
+ none: false
138
+ requirements:
139
+ - - ~>
140
+ - !ruby/object:Gem::Version
141
+ version: '2.13'
142
+ - !ruby/object:Gem::Dependency
143
+ name: sass-rails
144
+ requirement: !ruby/object:Gem::Requirement
145
+ none: false
146
+ requirements:
147
+ - - ! '>='
148
+ - !ruby/object:Gem::Version
149
+ version: '0'
150
+ type: :development
151
+ prerelease: false
152
+ version_requirements: !ruby/object:Gem::Requirement
153
+ none: false
154
+ requirements:
155
+ - - ! '>='
156
+ - !ruby/object:Gem::Version
157
+ version: '0'
158
+ - !ruby/object:Gem::Dependency
159
+ name: selenium-webdriver
160
+ requirement: !ruby/object:Gem::Requirement
161
+ none: false
162
+ requirements:
163
+ - - ! '>='
164
+ - !ruby/object:Gem::Version
165
+ version: '0'
166
+ type: :development
167
+ prerelease: false
168
+ version_requirements: !ruby/object:Gem::Requirement
169
+ none: false
170
+ requirements:
171
+ - - ! '>='
172
+ - !ruby/object:Gem::Version
173
+ version: '0'
174
+ - !ruby/object:Gem::Dependency
175
+ name: simplecov
176
+ requirement: !ruby/object:Gem::Requirement
177
+ none: false
178
+ requirements:
179
+ - - ! '>='
180
+ - !ruby/object:Gem::Version
181
+ version: '0'
182
+ type: :development
183
+ prerelease: false
184
+ version_requirements: !ruby/object:Gem::Requirement
185
+ none: false
186
+ requirements:
187
+ - - ! '>='
188
+ - !ruby/object:Gem::Version
189
+ version: '0'
190
+ - !ruby/object:Gem::Dependency
191
+ name: sqlite3
192
+ requirement: !ruby/object:Gem::Requirement
193
+ none: false
194
+ requirements:
195
+ - - ! '>='
196
+ - !ruby/object:Gem::Version
197
+ version: '0'
198
+ type: :development
199
+ prerelease: false
200
+ version_requirements: !ruby/object:Gem::Requirement
201
+ none: false
202
+ requirements:
203
+ - - ! '>='
204
+ - !ruby/object:Gem::Version
205
+ version: '0'
206
+ description: Admin can manage mall price and currency informations.
207
+ email: digitalm.github@gmail.com
208
+ executables: []
209
+ extensions: []
210
+ extra_rdoc_files: []
211
+ files:
212
+ - .gitignore
213
+ - .rspec
214
+ - Gemfile
215
+ - LICENSE
216
+ - README.ja.md
217
+ - README.md
218
+ - Rakefile
219
+ - app/assets/javascripts/admin/spree_malls.js
220
+ - app/assets/javascripts/store/spree_malls.js
221
+ - app/assets/stylesheets/admin/spree_malls.css
222
+ - app/assets/stylesheets/store/spree_malls.css
223
+ - app/controllers/spree/admin/add_on_mall_prices_controller.rb
224
+ - app/controllers/spree/admin/add_on_malls_controller.rb
225
+ - app/controllers/spree/admin/variant_controller_decorator.rb
226
+ - app/models/spree/ability_decorator.rb
227
+ - app/models/spree/add_on_mall.rb
228
+ - app/models/spree/add_on_mall_price.rb
229
+ - app/models/spree/add_on_mall_translation.rb
230
+ - app/models/spree/variant_decorator.rb
231
+ - app/overrides/add_add_on_mall_configration_menu_to_add_on_menu.rb
232
+ - app/overrides/add_add_on_mall_price_variant_to_product_menu.rb
233
+ - app/views/spree/admin/add_on_mall_prices/edit.html.erb
234
+ - app/views/spree/admin/add_on_mall_prices/index.html.erb
235
+ - app/views/spree/admin/add_on_mall_prices/new.html.erb
236
+ - app/views/spree/admin/add_on_malls/_form.html.erb
237
+ - app/views/spree/admin/add_on_malls/edit.html.erb
238
+ - app/views/spree/admin/add_on_malls/index.html.erb
239
+ - app/views/spree/admin/add_on_malls/new.html.erb
240
+ - bin/rails
241
+ - config/locales/en.yml
242
+ - config/locales/ja.yml
243
+ - config/routes.rb
244
+ - db/migrate/20140417154602_create_spree_add_on_mall.rb
245
+ - lib/generators/spree_malls/install/install_generator.rb
246
+ - lib/spree_malls.rb
247
+ - lib/spree_malls/engine.rb
248
+ - lib/spree_malls/factories.rb
249
+ - spec/spec_helper.rb
250
+ homepage: https://github.com/digitalm/spree_erp_variants
251
+ licenses: []
252
+ post_install_message:
253
+ rdoc_options: []
254
+ require_paths:
255
+ - lib
256
+ required_ruby_version: !ruby/object:Gem::Requirement
257
+ none: false
258
+ requirements:
259
+ - - ! '>='
260
+ - !ruby/object:Gem::Version
261
+ version: 1.9.3
262
+ required_rubygems_version: !ruby/object:Gem::Requirement
263
+ none: false
264
+ requirements:
265
+ - - ! '>='
266
+ - !ruby/object:Gem::Version
267
+ version: '0'
268
+ requirements:
269
+ - none
270
+ rubyforge_project:
271
+ rubygems_version: 1.8.23
272
+ signing_key:
273
+ specification_version: 3
274
+ summary: ! 'Spree Extension : Enable to manage price information on the mall that
275
+ you are opening stores outside spree.'
276
+ test_files:
277
+ - spec/spec_helper.rb