spree_zoned 0.5.3 → 0.5.4

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.
data/README.md CHANGED
@@ -34,6 +34,10 @@ This Spree extension is probalbly essential to you if operating outside of the U
34
34
 
35
35
   
36
36
 
37
+ ## Installation
38
+
39
+ rails generate spree_zoned:install
40
+
37
41
  ## Example
38
42
 
39
43
  Example goes here.
@@ -1,2 +1,2 @@
1
1
  div#zoned-countryselect { text-align: right; }
2
- div#zoned-countryselect label { background-color: #a33; }
2
+ div#zoned-countryselect label { color: #a33; }
@@ -1,24 +1,14 @@
1
1
  module Spree
2
-
3
- module Admin
4
-
5
- module Zoned
6
-
7
- class ZonedController < BaseController
8
-
9
- def setcountry
10
- respond_to do |format|
11
- format.js do
12
- @current_country = params[:id]
13
- render :nothing => true
14
- end
2
+ module Admin
3
+ class ZonedController < BaseController
4
+ def setcountry
5
+ respond_to do |format|
6
+ format.js do
7
+ @current_country = params[:id]
8
+ render :nothing => true
15
9
  end
16
10
  end
17
-
18
11
  end
19
-
20
- end
21
-
12
+ end
22
13
  end
23
-
24
14
  end
@@ -4,7 +4,7 @@
4
4
  options_for_select( # common countries have negative id
5
5
  [["Kein Land ausgewählt", 0]] +
6
6
  Rails.application.config.commonCountriesForSelect,
7
- 0, # preselect item "No country selected"
7
+ @current_country || 0, # preselect item "No country selected"
8
8
  ),
9
9
  :data => {
10
10
  :remote => true,
@@ -1,44 +1,48 @@
1
- module Spree
2
- module Zoned
3
- module Generators
4
- class InstallGenerator < Rails::Generators::Base
5
-
6
- source_root File.expand_path("../assets", __FILE__)
1
+ module SpreeZoned
2
+ module Generators
3
+ class InstallGenerator < Rails::Generators::Base
4
+
5
+ source_root File.expand_path("../assets", __FILE__)
7
6
 
8
- def add_javascripts
7
+ def add_javascripts
8
+ res = ask 'Would you like to append spree_zoned to your js manifests now?\n(only answer no if you you\'ve already done it) [Y/n]'
9
+ if res == '' || res.downcase == 'y'
9
10
  append_file 'app/assets/javascripts/store/all.js', "//= require store/spree_zoned\n"
10
11
  append_file 'app/assets/javascripts/admin/all.js', "//= require admin/spree_zoned\n"
11
12
  end
13
+ end
12
14
 
13
- def add_stylesheets
15
+ def add_stylesheets
16
+ res = ask 'Would you like to inject spree_zoned into your css manifests now?\n(only answer no if you you\'ve already done it) [Y/n]'
17
+ if res == '' || res.downcase == 'y'
14
18
  inject_into_file 'app/assets/stylesheets/store/all.css', " *= require store/spree_zoned\n", :before => /\*\//, :verbose => true
15
19
  inject_into_file 'app/assets/stylesheets/admin/all.css', " *= require admin/spree_zoned\n", :before => /\*\//, :verbose => true
16
20
  end
21
+ end
17
22
 
18
- def add_migrations
19
- run 'bundle exec rake railties:install:migrations FROM=spree_zoned'
20
- end
23
+ def add_migrations
24
+ run 'bundle exec rake railties:install:migrations FROM=spree_zoned'
25
+ end
21
26
 
22
- def run_migrations
23
- res = ask 'Would you like to run the migrations now? [Y/n]'
24
- if res == '' || res.downcase == 'y'
25
- run 'bundle exec rake db:migrate'
26
- else
27
- puts 'Skiping rake db:migrate, don\'t forget to run it!'
28
- end
29
- end
30
-
31
- private
32
-
33
- def copyasset(filename)
34
- if copy_file "#{filename}", "app/assets/#{filename}"
35
- puts "Copied #{filename} into app/assets/#{filename}\n"
36
- else
37
- puts "[Failed] File copying #{filename} into app/assets/#{filename}\n"
38
- end
27
+ def run_migrations
28
+ res = ask 'Would you like to run the migrations now? [Y/n]'
29
+ if res == '' || res.downcase == 'y'
30
+ run 'bundle exec rake db:migrate'
31
+ else
32
+ puts 'Skipping rake db:migrate, don\'t forget to run it!'
33
+ end
34
+ end
35
+
36
+ private
37
+
38
+ def copyasset(filename)
39
+ if copy_file "#{filename}", "app/assets/#{filename}"
40
+ puts "Copied #{filename} into app/assets/#{filename}\n"
41
+ else
42
+ puts "[Failed] File copying #{filename} into app/assets/#{filename}\n"
39
43
  end
40
-
41
44
  end
45
+
42
46
  end
43
47
  end
44
48
  end
data/spree_zoned.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
  Gem::Specification.new do |s|
3
3
  s.platform = Gem::Platform::RUBY
4
4
  s.name = 'spree_zoned'
5
- s.version = '0.5.3'
5
+ s.version = '0.5.4'
6
6
  s.summary = 'A Spree extension to make your store zoned'
7
7
  s.description = "Everything you need for a zoned Spree store: zoned pricing, zoned products, zoned product ordering, zoned locales, ...\nProbalbly essential to you if you operate outside of the US."
8
8
  s.required_ruby_version = '>= 1.9.2'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_zoned
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.3
4
+ version: 0.5.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: