spree_deprecated_user_agents 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,9 +4,9 @@ Spree::BaseController.class_eval do
4
4
  private
5
5
 
6
6
  def dua_setup
7
- if Spree::Config.get(:dua_enabled)
7
+ if Spree::Config.get(:dua_enabled).to_i == 1
8
8
  unless cookies[:dua_been_warned]
9
- @dua_enabled = Spree::Config.get(:dua_enabled) || true
9
+ @dua_enabled = (Spree::Config.get(:dua_enabled).to_i == 1) || true
10
10
  @dua_message = Spree::Config.get(:dua_message) || "Your Browser is outdated, please upgrade to the latest version."
11
11
  cookies[:dua_been_warned] = true
12
12
  end
@@ -1,9 +1,14 @@
1
1
  class SpreeDeprecatedUserAgentsHooks < Spree::ThemeSupport::HookListener
2
2
  # custom hooks go here
3
+ insert_after :inside_head do
4
+ '<%= render :partial => "shared/warn_ie_6" %>'
5
+ end
6
+
3
7
  insert_after :admin_general_settings_edit do
4
8
  <<EOT
5
9
  <p>
6
- <%= check_box_tag('preferences[dua_enabled]', Spree::Config[:dua_enabled], Spree::Config[:dua_enabled]) %>
10
+ <input name="preferences[dua_enabled]" type="hidden" value="0" />
11
+ <%= check_box_tag('preferences[dua_enabled]', 1, Spree::Config[:dua_enabled].to_i == 1 ? true : false) %>
7
12
  <label> <%= t("dua_enabled") %></label>
8
13
  </p>
9
14
  <p>
@@ -20,7 +25,7 @@ EOT
20
25
  </tr>
21
26
  <tr>
22
27
  <td colspan="2">
23
- <%= (Spree::Config[:dua_enabled] ? t("deprecated_user_agents_will_be_warned") : t("deprecated_user_agents_will_not_be_warned")) %>
28
+ <%= (Spree::Config[:dua_enabled].to_i == 1 ? t("deprecated_user_agents_will_be_warned") : t("deprecated_user_agents_will_not_be_warned")) %>
24
29
  </td>
25
30
  </tr>
26
31
  <tr>
@@ -34,4 +39,4 @@ EOT
34
39
  EOT
35
40
  end
36
41
 
37
- end
42
+ end
@@ -1,18 +1,17 @@
1
1
  Gem::Specification.new do |s|
2
- s.platform = Gem::Platform::RUBY
3
- s.name = 'spree_deprecated_user_agents'
4
- s.version = '0.1.0'
5
- s.summary = ''
6
- s.description = 'Add (optional) gem description here'
7
- s.required_ruby_version = '>= 1.8.7'
2
+ s.platform = Gem::Platform::RUBY
3
+ s.name = 'spree_deprecated_user_agents'
4
+ s.version = '0.2.0'
5
+ s.summary = ''
6
+ s.description = 'Deprecate IE6 (and eventually other ancient browsers)'
8
7
 
9
- s.author = 'Christopher Maujean'
10
- s.email = 'cmaujean@gmail.com'
8
+ s.authors = ['Christopher Maujean','Day Waterbury']
9
+ s.email = ['cmaujean@gmail.com','day@azimuthonline.com']
11
10
 
12
- s.files = `git ls-files`.split("\n")
13
- s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
11
+ s.files = `git ls-files`.split("\n")
12
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
14
13
  s.require_path = 'lib'
15
14
  s.requirements << 'none'
16
15
 
17
- s.add_dependency('spree_core', '>= 0.50.0')
16
+ s.add_dependency('spree_core', '>= 0.60.1')
18
17
  end
metadata CHANGED
@@ -2,15 +2,16 @@
2
2
  name: spree_deprecated_user_agents
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.0
5
+ version: 0.2.0
6
6
  platform: ruby
7
7
  authors:
8
8
  - Christopher Maujean
9
+ - Day Waterbury
9
10
  autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
12
13
 
13
- date: 2011-04-06 00:00:00 -07:00
14
+ date: 2011-07-07 00:00:00 -07:00
14
15
  default_executable:
15
16
  dependencies:
16
17
  - !ruby/object:Gem::Dependency
@@ -21,11 +22,13 @@ dependencies:
21
22
  requirements:
22
23
  - - ">="
23
24
  - !ruby/object:Gem::Version
24
- version: 0.50.0
25
+ version: 0.60.1
25
26
  type: :runtime
26
27
  version_requirements: *id001
27
- description: Add (optional) gem description here
28
- email: cmaujean@gmail.com
28
+ description: Deprecate IE6 (and eventually other ancient browsers)
29
+ email:
30
+ - cmaujean@gmail.com
31
+ - day@azimuthonline.com
29
32
  executables: []
30
33
 
31
34
  extensions: []
@@ -68,7 +71,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
68
71
  requirements:
69
72
  - - ">="
70
73
  - !ruby/object:Gem::Version
71
- version: 1.8.7
74
+ version: "0"
72
75
  required_rubygems_version: !ruby/object:Gem::Requirement
73
76
  none: false
74
77
  requirements: