alchemy_spree 1.0.0.beta → 2.0.0.beta

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
- SHA1:
3
- metadata.gz: c85623e15a5d44f28558ce70f514589423e5418c
4
- data.tar.gz: faeeec7cef1249a91eaa03bfba29f35f7c577198
2
+ SHA256:
3
+ metadata.gz: 52eb7795e263cdaf793dd1643038cc34474d3421134d5dbc3ccdf4898da89a17
4
+ data.tar.gz: 1e00185c4dfd8881a793969db48005247efd291b3a8e17b1359020e3990ab12f
5
5
  SHA512:
6
- metadata.gz: 300e1ba2611427bf96a7a697485d2d7a5fd9cd65821a48ba2102b8ef81c391d37dc0b36ef0e34ea2e9f182ae6df071346379dc6b0d11212e1e4c243a152e852f
7
- data.tar.gz: e49b7e103f6341e765ca5e2e6c82b460815968c098744a017a662c98f768f15845282af4d84a5d43f8cf91c2a90b8fedc0067d5a2ca630ccf3589567e536c95b
6
+ metadata.gz: d2c1d482368b64f9716a0bdd145e282dbedcf55bc4a216959c7f11dbaee1d41fcd47f5b8f45df1dbbb810b11e572ee73bdfb9b19bfea46f968a6569164085fc7
7
+ data.tar.gz: 85acfa71f621de22169a5affd9b5f6cbec509b8c8b5e385cde4642f11c2924e0995ca6fddf12cb5965dd360f19b326a8657d3cb46f77fdd083abb26887c683f8
data/README.md CHANGED
@@ -1,202 +1,7 @@
1
- # Alchemy CMS Spree Extension
1
+ # End of life notice
2
2
 
3
- The World's Most Flexible E-Commerce Platform meets The World's Most Flexible Content Management System!
3
+ **THIS GEM IS NOT SUPPORTED ANYMORE**
4
4
 
5
- This gem is a [Alchemy CMS](https://github.com/magiclabs/alchemy_cms) and [Spree](https://github.com/spree/spree) connector.
5
+ If possible for you switch to [Solidus](https://github.com/solidusio/solidus) (the successor of Spree) and it's Alchemy integration [`alchemy-solidus`](https://github.com/AlchemyCMS/alchemy-solidus).
6
6
 
7
- ### For now it does this:
8
-
9
- 1. It provides an Alchemy module that displays Spree admin in an iframe inside Alchemy admin.
10
- 2. It gives you new Essences for Alchemy called EssenceSpreeProduct and EssenceSpreeTaxon that you can use to place a Spree product and Taxon on your pages.
11
- 3. Shares admin session between Alchemy and Spree.
12
-
13
- ### Compatibility
14
-
15
- ## Spree
16
-
17
- This version runs with Spreecommerce 2.1 and above.
18
-
19
- ## Alchemy
20
-
21
- This version runs with Alchemy 3.0 and above.
22
-
23
- ## Installation
24
-
25
- Add this line to your application's Gemfile:
26
-
27
- ```ruby
28
- gem 'alchemy_spree', github: 'magiclabs/alchemy_spree', branch: 'master'
29
- ```
30
-
31
- Install the gem with:
32
-
33
- ```shell
34
- $ bundle install
35
- ```
36
-
37
- ### Authentication system installation
38
-
39
- Both Alchemy 3.0 and Spree come without an authentication system in place. You will need to choose an authentication system yourself. There are 3 available options. Whichever you choose, you need to instruct Spree & Alchemy about your choice of authentication system.
40
-
41
- Here are the steps for each option:
42
-
43
- #### 1. Option: Use [Spree Auth Devise](https://github.com/spree/spree_auth_devise)
44
-
45
- **Recommended for:**
46
- - An existing Spree installation (`gem 'spree_auth_devise'` should already be in your Gemfile).
47
- - You are just adding Alchemy
48
-
49
- To use Spree Auth Devise, instruct Alchemy to use the `Spree::User` class:
50
-
51
- ```ruby
52
- # config/initializers/alchemy.rb
53
-
54
- # Tell Alchemy to use the Spree::User class
55
- Alchemy.user_class_name = 'Spree::User'
56
- Alchemy.current_user_method = :spree_current_user
57
-
58
- # Load the Spree.user_class decorator for Alchemy roles
59
- require 'alchemy/spree/spree_user_decorator'
60
-
61
- # Include the Spree controller helpers to render the
62
- # alchemy pages within the default Spree layout
63
- Alchemy::BaseHelper.send :include, Spree::BaseHelper
64
- Alchemy::BaseController.send :include, Spree::Core::ControllerHelpers::Common
65
- Alchemy::BaseController.send :include, Spree::Core::ControllerHelpers::Store
66
- ```
67
-
68
- #### 2. Option: Use [Alchemy Devise](https://github.com/magiclabs/alchemy-devise)
69
-
70
- **Recommended for:**
71
- - An existing Alchemy installation
72
- - You don't have an authentication system and don't want to role an authentication system on your own.
73
-
74
- Add `alchemy-devise` to your `Gemfile`
75
-
76
- ```ruby
77
- # Gemfile
78
- gem 'alchemy-devise', '~> 2.0'
79
- ```
80
-
81
- and install it:
82
-
83
- ```shell
84
- $ bundle install
85
- $ bundle exec rails g alchemy:devise:install
86
- ```
87
-
88
- Run the Spree installer:
89
-
90
- *NOTE*: Skip this if you already have a running Spree installation.
91
-
92
- ```shell
93
- $ bundle exec rails g spree:install
94
- ```
95
-
96
- Then run the spree custom user generator:
97
-
98
- ```shell
99
- $ bundle exec rails g spree:custom_user Alchemy::User
100
- ```
101
-
102
- Now you'll need to instruct Spree to use the Alchemy User class:
103
-
104
- ```ruby
105
- # config/initializers/spree.rb
106
- ...
107
- Spree.user_class = "Alchemy::User"
108
- require 'alchemy/spree/alchemy_user_decorator'
109
- ...
110
- ```
111
-
112
- and tell Spree about Alchemy's path helpers:
113
-
114
- ```ruby
115
- # lib/spree/authentication_helpers.rb
116
- ...
117
- def spree_login_path
118
- alchemy.login_path
119
- end
120
-
121
- def spree_signup_path
122
- alchemy.signup_path
123
- end
124
-
125
- def spree_logout_path
126
- alchemy.logout_path
127
- end
128
- ...
129
- ```
130
-
131
- #### 3. Option: Build their own authentication
132
-
133
- Please follow the [spree custom authentication](https://guides.spreecommerce.com/developer/authentication.html) and the [Alchemy custom authentication](http://guides.alchemy-cms.com/edge/custom_authentication.html) guides in order to integrate your custom user with Spree and Alchemy.
134
-
135
- #### In either case
136
-
137
- Install the migrations
138
-
139
- ```shell
140
- $ bundle exec rake alchemy_spree:install:migrations
141
- ```
142
-
143
- Run the installer of Alchemy
144
-
145
- ```shell
146
- $ bundle exec rake alchemy:install
147
- ```
148
-
149
- and follow the on screen instructions.
150
-
151
- ## Usage
152
-
153
- ### Create a new Element for Alchemy
154
-
155
- ```yaml
156
- # config/alchemy/elements.yml
157
- - name: product
158
- contents:
159
- - name: spree_product
160
- type: EssenceSpreeProduct
161
-
162
- - name: product_category
163
- contents:
164
- - name: spree_taxon
165
- type: EssenceSpreeTaxon
166
- ```
167
-
168
- ### Generate the views
169
-
170
- ```sh
171
- $ rails g alchemy:elements --skip
172
- ```
173
-
174
- ### Place this element on a page layout
175
-
176
- ```yaml
177
- # config/alchemy/page_layouts.yml
178
- - name: product
179
- elements: [product]
180
- - name: products
181
- elements: [product_category]
182
- ```
183
-
184
- ### You can haz Spree product and taxons!
185
-
186
- ```erb
187
- # app/views/alchemy/elements/_product_view.html.erb
188
- <%= element.ingredient('spree_product') %>
189
-
190
- # app/views/alchemy/elements/_product_category_view.html.erb
191
- <%= element.ingredient('spree_taxon') %>
192
- ```
193
-
194
- Alchemy :heart: Spree!
195
-
196
- ## Contributing
197
-
198
- 1. Fork it
199
- 2. Create your feature branch (`git checkout -b my-new-feature`)
200
- 3. Commit your changes (`git commit -am 'Added some feature'`)
201
- 4. Push to the branch (`git push origin my-new-feature`)
202
- 5. Create new Pull Request
7
+ If someone still want to support this gem, please take over maintenance of this gem.
@@ -6,7 +6,7 @@ Gem::Specification.new do |gem|
6
6
  gem.email = ["tvd@magiclabs.de"]
7
7
  gem.description = %q{A Alchemy CMS and Spree connector}
8
8
  gem.summary = %q{The World's Most Flexible E-Commerce Platform meets The World's Most Flexible Content Management System!}
9
- gem.homepage = "https://github.com/magiclabs/alchemy_spree"
9
+ gem.homepage = "https://github.com/AlchemyCMS/alchemy_spree"
10
10
  gem.license = 'BSD New'
11
11
  gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
12
12
  gem.files = `git ls-files`.split("\n")
@@ -15,6 +15,6 @@ Gem::Specification.new do |gem|
15
15
  gem.require_paths = ["lib"]
16
16
  gem.version = Alchemy::Spree::VERSION
17
17
 
18
- gem.add_dependency('alchemy_cms', ['>= 3.1.0.rc1', '< 3.2'])
19
- gem.add_dependency('spree', ['>= 2.3', '< 3.0'])
18
+ gem.add_dependency('alchemy_cms', ['>= 3.3.0.rc1', '< 4.0'])
19
+ gem.add_dependency('spree', ['>= 3.0', '< 4.0'])
20
20
  end
@@ -1,10 +1,11 @@
1
1
  module Alchemy
2
2
  class EssenceSpreeProduct < ActiveRecord::Base
3
3
  belongs_to :product, class_name: "Spree::Product", foreign_key: 'spree_product_id'
4
+ delegate :name, to: :product, allow_nil: true
4
5
 
5
6
  acts_as_essence(
6
7
  ingredient_column: 'spree_product_id',
7
- preview_text_method: 'name'
8
+ preview_text_column: 'name'
8
9
  )
9
10
 
10
11
  def ingredient
@@ -1,10 +1,11 @@
1
1
  module Alchemy
2
2
  class EssenceSpreeTaxon < ActiveRecord::Base
3
3
  belongs_to :taxon, class_name: "Spree::Taxon", foreign_key: 'taxon_id'
4
+ delegate :name, to: :taxon, allow_nil: true
4
5
 
5
6
  acts_as_essence(
6
7
  ingredient_column: 'taxon_id',
7
- preview_text_method: 'name'
8
+ preview_text_column: 'name'
8
9
  )
9
10
 
10
11
  def ingredient
@@ -1,9 +1,15 @@
1
- <div class="content_editor essence_spree_product">
2
- <label><%= render_content_name(content) %></label>
1
+ <div class="content_editor essence_spree_product essence_select">
2
+ <%= content_label(content) %>
3
3
  <%= select_tag(
4
4
  content.form_field_name,
5
- options_from_collection_for_select(Spree::Product.not_deleted, :id, :name, content.essence.spree_product_id),
6
- class: ['alchemy_selectbox very_long', html_options[:class]].join(' '),
5
+ options_from_collection_for_select(
6
+ local_assigns.fetch(:options, {})[:products] || Spree::Product.not_deleted,
7
+ :id,
8
+ :name,
9
+ content.essence.spree_product_id
10
+ ),
11
+ include_blank: t(".none"),
12
+ class: ["alchemy_selectbox", "essence_editor_select", html_options[:class]].join(' '),
7
13
  style: html_options[:style]
8
14
  ) %>
9
15
  </div>
@@ -0,0 +1,18 @@
1
+ <% product = content.ingredient %>
2
+ <% url = spree.product_url(product, taxon_id: @taxon.try(:id)) %>
3
+
4
+ <div id="product_<%= product.id %>" class="col-md-3 col-sm-6 product-list-item" data-hook="products_list_item" itemscope itemtype="http://schema.org/Product">
5
+ <div class="panel panel-default">
6
+ <% cache(@taxon.present? ? [I18n.locale, current_currency, @taxon, product] : [I18n.locale, current_currency, product]) do %>
7
+ <div class="panel-body text-center product-body">
8
+ <%= link_to small_image(product, itemprop: "image"), url, itemprop: 'url' %><br/>
9
+ <%= link_to truncate(product.name, length: 50), url, class: 'info', itemprop: "name", title: product.name %>
10
+ </div>
11
+ <div class="panel-footer text-center">
12
+ <span itemprop="offers" itemscope itemtype="http://schema.org/Offer">
13
+ <span class="price selling lead" itemprop="price"><%= display_price(product) %></span>
14
+ </span>
15
+ </div>
16
+ <% end %>
17
+ </div>
18
+ </div>
@@ -1,16 +1,15 @@
1
- <div class="content_editor">
2
- <label><%= render_content_name(content) %></label>
1
+ <div class="content_editor essence_spree_taxon essence_select">
2
+ <%= content_label(content) %>
3
3
  <%= select_tag(
4
4
  content.form_field_name,
5
- option_groups_from_collection_for_select(
6
- Spree::Taxon.all,
7
- :children,
8
- :name,
5
+ options_from_collection_for_select(
6
+ local_assigns.fetch(:options, {})[:taxons] || Spree::Taxon.all,
9
7
  :id,
10
- :name,
8
+ :pretty_name,
11
9
  content.essence.taxon_id
12
10
  ),
13
- :class => ['alchemy_selectbox very_long', html_options[:class]].join(' '),
14
- :style => html_options[:style]
11
+ include_blank: t(".none"),
12
+ class: ["alchemy_selectbox", "essence_editor_select", html_options[:class]].join(' '),
13
+ style: html_options[:style]
15
14
  ) %>
16
15
  </div>
@@ -0,0 +1,8 @@
1
+ <% taxon = content.ingredient %>
2
+
3
+ <div class="taxon" data-hook="taxon">
4
+ <h5 class="subtaxon-title">
5
+ <%= link_to taxon.name, seo_url(taxon), class: 'breadcrumbs' %>
6
+ </h5>
7
+ <%= render 'spree/shared/products', products: taxon_preview(taxon), taxon: taxon %>
8
+ </div>
@@ -1,8 +1,8 @@
1
1
  Alchemy::Modules.register_module({
2
- engine_name: 'alchemy',
2
+ engine_name: 'spree',
3
3
  name: 'spree',
4
4
  navigation: {
5
- controller: 'alchemy/admin/spree',
5
+ controller: 'spree/admin/orders',
6
6
  action: 'index',
7
7
  name: 'Spree',
8
8
  image: 'alchemy_spree/alchemy_module_icon.png'
@@ -0,0 +1,7 @@
1
+ de:
2
+ alchemy:
3
+ essences:
4
+ essence_spree_product_editor:
5
+ none: "Keins"
6
+ essence_spree_taxon_editor:
7
+ none: "Keins"
@@ -0,0 +1,7 @@
1
+ en:
2
+ alchemy:
3
+ essences:
4
+ essence_spree_product_editor:
5
+ none: "None"
6
+ essence_spree_taxon_editor:
7
+ none: "None"
@@ -0,0 +1,7 @@
1
+ es:
2
+ alchemy:
3
+ essences:
4
+ essence_spree_product_editor:
5
+ none: "Ninguno"
6
+ essence_spree_taxon_editor:
7
+ none: "Ninguno"
@@ -3,8 +3,10 @@ Alchemy::User.class_eval do
3
3
  def spree_roles
4
4
  if admin?
5
5
  ::Spree::Role.where(name: 'admin')
6
+ elsif has_alchemy_role?(:member)
7
+ ::Spree::Role.where(name: 'user')
6
8
  else
7
- ::Spree::Role.where('1 = 0') # aka. empty relation
9
+ ::Spree::Role.none
8
10
  end
9
11
  end
10
12
  end
@@ -1,5 +1,3 @@
1
- require 'alchemy/spree/ability'
2
- require 'alchemy/spree/alchemy_language_store'
3
1
  require 'spree'
4
2
 
5
3
  module Alchemy
@@ -8,10 +6,7 @@ module Alchemy
8
6
  engine_name 'alchemy_spree'
9
7
 
10
8
  def self.activate
11
- Dir.glob(File.join(File.dirname(__FILE__), "../../../app/**/*_decorator*.rb")) do |c|
12
- Rails.configuration.cache_classes ? require(c) : load(c)
13
- end
14
- Alchemy.register_ability(Alchemy::Spree::Ability)
9
+ Alchemy.register_ability(::Spree::Ability)
15
10
  end
16
11
 
17
12
  config.to_prepare &method(:activate).to_proc
@@ -3,8 +3,10 @@ Spree::User.class_eval do
3
3
  def alchemy_roles
4
4
  if has_spree_role?(:admin)
5
5
  %w(admin)
6
+ elsif has_spree_role?(:user)
7
+ %w(member)
6
8
  else
7
- []
9
+ %w()
8
10
  end
9
11
  end
10
12
  end
@@ -1,5 +1,5 @@
1
1
  module Alchemy
2
2
  module Spree
3
- VERSION = "1.0.0.beta"
3
+ VERSION = "2.0.0.beta"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alchemy_spree
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.beta
4
+ version: 2.0.0.beta
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas von Deyen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-30 00:00:00.000000000 Z
11
+ date: 2020-01-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: alchemy_cms
@@ -16,40 +16,40 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 3.1.0.rc1
19
+ version: 3.3.0.rc1
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '3.2'
22
+ version: '4.0'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 3.1.0.rc1
29
+ version: 3.3.0.rc1
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '3.2'
32
+ version: '4.0'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: spree
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - ">="
38
38
  - !ruby/object:Gem::Version
39
- version: '2.3'
39
+ version: '3.0'
40
40
  - - "<"
41
41
  - !ruby/object:Gem::Version
42
- version: '3.0'
42
+ version: '4.0'
43
43
  type: :runtime
44
44
  prerelease: false
45
45
  version_requirements: !ruby/object:Gem::Requirement
46
46
  requirements:
47
47
  - - ">="
48
48
  - !ruby/object:Gem::Version
49
- version: '2.3'
49
+ version: '3.0'
50
50
  - - "<"
51
51
  - !ruby/object:Gem::Version
52
- version: '3.0'
52
+ version: '4.0'
53
53
  description: A Alchemy CMS and Spree connector
54
54
  email:
55
55
  - tvd@magiclabs.de
@@ -65,22 +65,18 @@ files:
65
65
  - Versionfile
66
66
  - alchemy_spree.gemspec
67
67
  - app/assets/images/alchemy_spree/alchemy_module_icon.png
68
- - app/controllers/alchemy/admin/spree_controller.rb
69
- - app/controllers/spree/base_controller_decorator.rb
70
- - app/controllers/spree/user_sessions_controller_decorator.rb
71
68
  - app/models/alchemy/essence_spree_product.rb
72
69
  - app/models/alchemy/essence_spree_taxon.rb
73
- - app/views/alchemy/admin/spree/index.html.erb
74
70
  - app/views/alchemy/essences/_essence_spree_product_editor.html.erb
75
71
  - app/views/alchemy/essences/_essence_spree_product_view.html.erb
76
72
  - app/views/alchemy/essences/_essence_spree_taxon_editor.html.erb
77
73
  - app/views/alchemy/essences/_essence_spree_taxon_view.html.erb
78
74
  - config/initializers/alchemy.rb
79
- - config/routes.rb
75
+ - config/locales/alchemy_spree.de.yml
76
+ - config/locales/alchemy_spree.en.yml
77
+ - config/locales/alchemy_spree.es.yml
80
78
  - db/migrate/20120229160509_create_alchemy_essence_spree_products.rb
81
79
  - db/migrate/20131030140218_create_alchemy_essence_spree_taxons.rb
82
- - lib/alchemy/spree/ability.rb
83
- - lib/alchemy/spree/alchemy_language_store.rb
84
80
  - lib/alchemy/spree/alchemy_user_decorator.rb
85
81
  - lib/alchemy/spree/engine.rb
86
82
  - lib/alchemy/spree/spree_user_decorator.rb
@@ -121,7 +117,7 @@ files:
121
117
  - test/dummy/script/rails
122
118
  - test/integration/navigation_test.rb
123
119
  - test/test_helper.rb
124
- homepage: https://github.com/magiclabs/alchemy_spree
120
+ homepage: https://github.com/AlchemyCMS/alchemy_spree
125
121
  licenses:
126
122
  - BSD New
127
123
  metadata: {}
@@ -140,8 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
140
136
  - !ruby/object:Gem::Version
141
137
  version: 1.3.1
142
138
  requirements: []
143
- rubyforge_project:
144
- rubygems_version: 2.4.3
139
+ rubygems_version: 3.0.3
145
140
  signing_key:
146
141
  specification_version: 4
147
142
  summary: The World's Most Flexible E-Commerce Platform meets The World's Most Flexible
@@ -1,6 +0,0 @@
1
- class Alchemy::Admin::SpreeController < Alchemy::Admin::BaseController
2
- def index
3
- authorize! :index, :alchemy_admin_spree
4
- render
5
- end
6
- end
@@ -1,3 +0,0 @@
1
- Spree::BaseController.class_eval do
2
- include AlchemySpree::AlchemyLanguageStore
3
- end
@@ -1,5 +0,0 @@
1
- if defined? Spree::UserSessionsController
2
- Spree::UserSessionsController.class_eval do
3
- include AlchemySpree::AlchemyLanguageStore
4
- end
5
- end
@@ -1,47 +0,0 @@
1
- <iframe src="<%= spree.admin_url %>" frameborder=0 width="100%" id="spree_admin" style="display: none"></iframe>
2
- <script type="text/javascript">
3
- jQuery(document).ready(function($) {
4
- var $frame = $('iframe#spree_admin');
5
-
6
- spinner = Alchemy.Spinner.medium();
7
- spinner.spin($("#main_content")[0])
8
-
9
- function sizeSpreeFrame() {
10
- $frame.css({height: $(window).height() - 30});
11
- }
12
-
13
- $('#toolbar').remove();
14
- $('#main_content').css({
15
- padding: '27px 0px 0px 66px',
16
- backgroundColor: 'white'
17
- });
18
-
19
- $frame.on('load', function() {
20
- var frame_document;
21
- var frame_window = (this.contentWindow || this.contentDocument);
22
- var elements = ['header', 'footer', 'admin-menu', 'sub-menu', 'content'];
23
- spinner.stop();
24
- if (frame_window.document) {
25
- frame_document = frame_window.document;
26
- } else {
27
- frame_document = frame_window;
28
- frame_window = frame_document.window;
29
- }
30
- frame_document.body.style.backgroundColor = '#fff';
31
- frame_document.body.style.fontFamily = '"Lucida Grande", Arial, sans-serif';
32
- frame_document.body.style.fontSize = '12px';
33
- for (var i = elements.length - 1; i >= 0; i--) {
34
- element = frame_document.getElementById(elements[i]);
35
- if (element) {
36
- if (element.id === 'header' || element.id === 'footer') element.style.display = 'none';
37
- element.style.margin = 0;
38
- }
39
- }
40
- sizeSpreeFrame();
41
- $('#frame_load_info').hide();
42
- $frame.show();
43
- });
44
-
45
- $(window).on('resize', sizeSpreeFrame);
46
- });
47
- </script>
@@ -1,3 +0,0 @@
1
- Alchemy::Engine.routes.draw do
2
- get '/admin/spree' => 'admin/spree#index', :as => :spree_admin
3
- end
@@ -1,13 +0,0 @@
1
- module Alchemy
2
- module Spree
3
- class Ability
4
- include CanCan::Ability
5
-
6
- def initialize(user)
7
- if user && user.alchemy_roles.include?('admin')
8
- can :index, :alchemy_admin_spree
9
- end
10
- end
11
- end
12
- end
13
- end
@@ -1,17 +0,0 @@
1
- module AlchemySpree
2
- module AlchemyLanguageStore
3
- def self.included(c)
4
- c.send(:before_filter, :store_alchemy_language)
5
- end
6
-
7
- private
8
-
9
- def store_alchemy_language
10
- @alchemy_language ||= Alchemy::Language.find_by_code(::I18n.locale.to_s)
11
- @alchemy_language ||= Alchemy::Language.get_default
12
- session[:language_id] = @alchemy_language.id
13
- session[:language_code] = @alchemy_language.code
14
- end
15
-
16
- end
17
- end