solidus_multi_domain 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/spree/store_decorator.rb +15 -17
- data/app/models/spree/tracker_decorator.rb +1 -1
- data/app/views/spree/admin/stores/_form.html.erb +1 -1
- data/lib/assets/stylesheets/spree/backend/solidus_multi_domain.css +0 -0
- data/solidus_multi_domain.gemspec +6 -6
- data/spec/controllers/spree/admin/stores_controller_spec.rb +15 -2
- metadata +20 -20
- data/.ruby-version +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc0b4763e90a463bb84869227fe5220a1a986618
|
4
|
+
data.tar.gz: edfe91b27a069951cf9a7b1a1fa1652a4a77b3b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6c49ec4ebeccfce595a2683bc63f870ff2bb937df2cb614552fda28ce9a9673b0a19cdcf22a19d4e8d048f4926951f6b9fbf97e241a16e7d7906280dc377a88f
|
7
|
+
data.tar.gz: 9f9d9f5d36186f26547d303a5ad9d1b232e64d116a0c837801f1158300d87ac03f523a9ba00035b3140ef252cfc8828c322f8fb4680c14f0dbfed681167293f7
|
@@ -1,22 +1,20 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
has_many :orders
|
1
|
+
Spree::Store.class_eval do
|
2
|
+
has_and_belongs_to_many :products, join_table: 'spree_products_stores'
|
3
|
+
has_many :taxonomies
|
4
|
+
has_many :orders
|
6
5
|
|
7
|
-
|
8
|
-
|
6
|
+
has_many :store_shipping_methods
|
7
|
+
has_many :shipping_methods, through: :store_shipping_methods
|
9
8
|
|
10
|
-
|
9
|
+
has_and_belongs_to_many :promotion_rules, class_name: 'Spree::Promotion::Rules::Store', join_table: 'spree_promotion_rules_stores', association_foreign_key: 'promotion_rule_id'
|
11
10
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
11
|
+
has_attached_file :logo,
|
12
|
+
styles: { mini: '48x48>', small: '100x100>', medium: '250x250>' },
|
13
|
+
default_style: :medium,
|
14
|
+
url: 'stores/:id/:style/:basename.:extension',
|
15
|
+
path: 'stores/:id/:style/:basename.:extension',
|
16
|
+
convert_options: { all: '-strip -auto-orient' }
|
18
17
|
|
19
|
-
|
20
|
-
|
21
|
-
end
|
18
|
+
validates_attachment_file_name :logo, matches: [/png\Z/i, /jpe?g\Z/i],
|
19
|
+
if: -> { respond_to?(:logo_file_name) }
|
22
20
|
end
|
@@ -2,6 +2,6 @@ Spree::Tracker.class_eval do
|
|
2
2
|
belongs_to :store
|
3
3
|
|
4
4
|
def self.current(store_key)
|
5
|
-
Spree::Tracker.where(active: true
|
5
|
+
Spree::Tracker.where(active: true).joins(:store).where("spree_stores.code = ? OR spree_stores.url LIKE ?", store_key, "%#{store_key}%").first
|
6
6
|
end
|
7
7
|
end
|
@@ -66,7 +66,7 @@
|
|
66
66
|
<label class="sub">
|
67
67
|
<%= check_box_tag 'store[payment_method_ids][]', payment_method.id, @store.payment_methods.include?(payment_method) %>
|
68
68
|
</label>
|
69
|
-
<%=
|
69
|
+
<%= payment_method.name %>
|
70
70
|
<br>
|
71
71
|
<% end %>
|
72
72
|
<%= hidden_field_tag 'store[payment_method_ids][]', '' %>
|
File without changes
|
@@ -3,7 +3,7 @@
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.platform = Gem::Platform::RUBY
|
5
5
|
s.name = "solidus_multi_domain"
|
6
|
-
s.version = "1.1.
|
6
|
+
s.version = "1.1.1"
|
7
7
|
s.summary = "Adds multiple site support to Solidus"
|
8
8
|
s.description = "Multiple Solidus stores on different domains - single unified backed for processing orders."
|
9
9
|
s.required_ruby_version = ">= 2.1"
|
@@ -18,14 +18,14 @@ Gem::Specification.new do |s|
|
|
18
18
|
s.require_path = "lib"
|
19
19
|
s.requirements << "none"
|
20
20
|
|
21
|
-
s.add_dependency "solidus", [">= 1.1.0.pre", "< 2"]
|
21
|
+
s.add_dependency "solidus", [">= 1.1.0.pre", "< 1.2.0"]
|
22
22
|
|
23
23
|
s.add_development_dependency "rspec-rails", "~> 3.2"
|
24
24
|
s.add_development_dependency "simplecov"
|
25
25
|
s.add_development_dependency "sqlite3"
|
26
|
-
s.add_development_dependency "sass-rails"
|
27
|
-
s.add_development_dependency "coffee-rails"
|
28
|
-
s.add_development_dependency "factory_girl", "~> 4.5
|
29
|
-
s.add_development_dependency "capybara"
|
26
|
+
s.add_development_dependency "sass-rails"
|
27
|
+
s.add_development_dependency "coffee-rails"
|
28
|
+
s.add_development_dependency "factory_girl", "~> 4.5"
|
29
|
+
s.add_development_dependency "capybara"
|
30
30
|
s.add_development_dependency "ffaker"
|
31
31
|
end
|
@@ -3,10 +3,23 @@ require 'spec_helper'
|
|
3
3
|
describe Spree::Admin::StoresController do
|
4
4
|
stub_authorization!
|
5
5
|
|
6
|
-
describe
|
7
|
-
|
6
|
+
describe '#index' do
|
7
|
+
render_views
|
8
|
+
|
9
|
+
it 'renders' do
|
8
10
|
spree_get :index
|
9
11
|
expect(response).to be_success
|
10
12
|
end
|
11
13
|
end
|
14
|
+
|
15
|
+
describe '#edit' do
|
16
|
+
render_views
|
17
|
+
|
18
|
+
let(:store) { create(:store) }
|
19
|
+
|
20
|
+
it 'renders' do
|
21
|
+
spree_get :edit, id: store.to_param
|
22
|
+
expect(response).to be_success
|
23
|
+
end
|
24
|
+
end
|
12
25
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solidus_multi_domain
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Solidus Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: solidus
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: 1.1.0.pre
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version:
|
22
|
+
version: 1.2.0
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: 1.1.0.pre
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version:
|
32
|
+
version: 1.2.0
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: rspec-rails
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -76,58 +76,58 @@ dependencies:
|
|
76
76
|
name: sass-rails
|
77
77
|
requirement: !ruby/object:Gem::Requirement
|
78
78
|
requirements:
|
79
|
-
- - "
|
79
|
+
- - ">="
|
80
80
|
- !ruby/object:Gem::Version
|
81
|
-
version:
|
81
|
+
version: '0'
|
82
82
|
type: :development
|
83
83
|
prerelease: false
|
84
84
|
version_requirements: !ruby/object:Gem::Requirement
|
85
85
|
requirements:
|
86
|
-
- - "
|
86
|
+
- - ">="
|
87
87
|
- !ruby/object:Gem::Version
|
88
|
-
version:
|
88
|
+
version: '0'
|
89
89
|
- !ruby/object:Gem::Dependency
|
90
90
|
name: coffee-rails
|
91
91
|
requirement: !ruby/object:Gem::Requirement
|
92
92
|
requirements:
|
93
|
-
- - "
|
93
|
+
- - ">="
|
94
94
|
- !ruby/object:Gem::Version
|
95
|
-
version:
|
95
|
+
version: '0'
|
96
96
|
type: :development
|
97
97
|
prerelease: false
|
98
98
|
version_requirements: !ruby/object:Gem::Requirement
|
99
99
|
requirements:
|
100
|
-
- - "
|
100
|
+
- - ">="
|
101
101
|
- !ruby/object:Gem::Version
|
102
|
-
version:
|
102
|
+
version: '0'
|
103
103
|
- !ruby/object:Gem::Dependency
|
104
104
|
name: factory_girl
|
105
105
|
requirement: !ruby/object:Gem::Requirement
|
106
106
|
requirements:
|
107
107
|
- - "~>"
|
108
108
|
- !ruby/object:Gem::Version
|
109
|
-
version: 4.5
|
109
|
+
version: '4.5'
|
110
110
|
type: :development
|
111
111
|
prerelease: false
|
112
112
|
version_requirements: !ruby/object:Gem::Requirement
|
113
113
|
requirements:
|
114
114
|
- - "~>"
|
115
115
|
- !ruby/object:Gem::Version
|
116
|
-
version: 4.5
|
116
|
+
version: '4.5'
|
117
117
|
- !ruby/object:Gem::Dependency
|
118
118
|
name: capybara
|
119
119
|
requirement: !ruby/object:Gem::Requirement
|
120
120
|
requirements:
|
121
|
-
- - "
|
121
|
+
- - ">="
|
122
122
|
- !ruby/object:Gem::Version
|
123
|
-
version: '
|
123
|
+
version: '0'
|
124
124
|
type: :development
|
125
125
|
prerelease: false
|
126
126
|
version_requirements: !ruby/object:Gem::Requirement
|
127
127
|
requirements:
|
128
|
-
- - "
|
128
|
+
- - ">="
|
129
129
|
- !ruby/object:Gem::Version
|
130
|
-
version: '
|
130
|
+
version: '0'
|
131
131
|
- !ruby/object:Gem::Dependency
|
132
132
|
name: ffaker
|
133
133
|
requirement: !ruby/object:Gem::Requirement
|
@@ -151,7 +151,6 @@ extra_rdoc_files: []
|
|
151
151
|
files:
|
152
152
|
- ".gitignore"
|
153
153
|
- ".rspec"
|
154
|
-
- ".ruby-version"
|
155
154
|
- Gemfile
|
156
155
|
- README.md
|
157
156
|
- Rakefile
|
@@ -218,6 +217,7 @@ files:
|
|
218
217
|
- lib/assets/javascripts/spree/backend/solidus_multi_domain.js
|
219
218
|
- lib/assets/javascripts/spree/backend/store_picker.js
|
220
219
|
- lib/assets/javascripts/spree/frontend/solidus_multi_domain.js
|
220
|
+
- lib/assets/stylesheets/spree/backend/solidus_multi_domain.css
|
221
221
|
- lib/assets/stylesheets/spree/frontend/solidus_multi_domain.css
|
222
222
|
- lib/generators/solidus_multi_domain/install/install_generator.rb
|
223
223
|
- lib/solidus_multi_domain.rb
|
@@ -267,7 +267,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
267
267
|
requirements:
|
268
268
|
- none
|
269
269
|
rubyforge_project:
|
270
|
-
rubygems_version: 2.2.
|
270
|
+
rubygems_version: 2.2.5
|
271
271
|
signing_key:
|
272
272
|
specification_version: 4
|
273
273
|
summary: Adds multiple site support to Solidus
|
data/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
2.1.6
|