spree_dash 1.1.6 → 1.2.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
@@ -6,7 +6,7 @@ module Spree
6
6
  @store = {
7
7
  :first_name => '',
8
8
  :last_name => '',
9
- :email => current_user.email,
9
+ :email => try_spree_current_user.email,
10
10
  :currency => 'USD',
11
11
  :time_zone => Time.zone,
12
12
  :name => Spree::Config.site_name,
@@ -19,7 +19,7 @@ module Spree
19
19
  { :product => { :name => @product.name,
20
20
  :price => @product.price,
21
21
  :sku => @product.sku,
22
- :categories => @product.taxons.map { |t| t.permalink }
22
+ :categories => @product.taxons.map(&:permalink)
23
23
  }
24
24
  }
25
25
  end
@@ -42,7 +42,7 @@ module Spree
42
42
  end
43
43
 
44
44
  def completed_analytics_tags
45
- return {} unless flash[:commerce_tracking] and @order and @order.complete?
45
+ return {} unless @order and @order.complete?
46
46
  { :confirm => { :orderid => @order.number,
47
47
  :total => @order.total,
48
48
  :shipping => @order.ship_total,
@@ -56,11 +56,12 @@ module Spree
56
56
  def products_for_order
57
57
  @order.line_items.map do |line_item|
58
58
  variant = line_item.variant
59
- { :name => variant.name,
59
+ {
60
+ :name => variant.name,
60
61
  :qty => line_item.quantity,
61
62
  :price => variant.price,
62
63
  :sku => variant.sku,
63
- :categories => variant.product.taxons.map { |t| t.permalink }
64
+ :categories => variant.product.taxons.map(&:permalink)
64
65
  }
65
66
  end
66
67
  end
@@ -1,5 +1,5 @@
1
- Deface::Override.new(:virtual_path => Spree::Config[:layout].gsub(/^\//, ''),
1
+ Deface::Override.new(:virtual_path => "spree/layouts/spree_application",
2
2
  :name => "add_analytics_header",
3
- :insert_bottom => "head",
3
+ :insert_bottom => "[data-hook='inside_head']",
4
4
  :partial => "spree/analytics/header",
5
5
  :original => '6f23c8af6e863d0499835c00b3f2763cb98e1d75')
@@ -3,11 +3,11 @@
3
3
  <legend><%= t(:analytics_sign_up) %></legend>
4
4
  <p>
5
5
  <%= check_box_tag 'store[terms_of_service]', @store[:terms_of_service], @store.has_key?(:terms_of_service), :size => 50 %>
6
- <%= label_tag 'store[terms_of_service]', t(:agree_to_terms_of_service) %> (<a href="http://jirafe.com/about/terms" target="_new"><%= t(:review) %></a>)
6
+ <%= label_tag 'store[terms_of_service]', t(:agree_to_terms_of_service) %> (<a href="http://jirafe.com/terms" target="_new"><%= t(:review) %></a>)
7
7
  </p>
8
8
  <p>
9
9
  <%= check_box_tag 'store[privacy_policy]', @store[:privacy_policy], @store.has_key?(:privacy_policy), :size => 50 %>
10
- <%= label_tag 'store[privacy_policy]', t(:agree_to_privacy_policy) %> (<a href="http://jirafe.com/about/privacy" target="_new"><%= t(:review) %></a>)
10
+ <%= label_tag 'store[privacy_policy]', t(:agree_to_privacy_policy) %> (<a href="http://jirafe.com/privacy" target="_new"><%= t(:review) %></a>)
11
11
  </p>
12
12
  <p>
13
13
  <%= label_tag :first_name %><br>
@@ -10,13 +10,6 @@ end
10
10
  require 'spree/dash/engine'
11
11
  require 'spree/dash/jirafe'
12
12
 
13
- # add helper to all the base controllers
14
- # Spree::BaseController includes Spree::Core::ControllerHelpers
15
- require 'spree/core/controller_helpers'
16
- class << Spree::Core::ControllerHelpers
17
- def included_with_analytics(receiver)
18
- included_without_analytics(receiver)
19
- receiver.send :helper, 'spree/analytics'
20
- end
21
- alias_method_chain :included, :analytics
13
+ Spree::Dash::Engine.config.to_prepare do
14
+ Spree::BaseController.send :helper, 'spree/analytics'
22
15
  end
metadata CHANGED
@@ -1,59 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_dash
3
3
  version: !ruby/object:Gem::Version
4
- prerelease:
5
- version: 1.1.6
4
+ version: 1.2.0.rc1
5
+ prerelease: 6
6
6
  platform: ruby
7
7
  authors:
8
8
  - Brian Quinn
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-25 00:00:00.000000000 Z
12
+ date: 2012-08-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- type: :runtime
16
- version_requirements: !ruby/object:Gem::Requirement
17
- none: false
18
- requirements:
19
- - - '='
20
- - !ruby/object:Gem::Version
21
- version: 1.1.6
22
15
  name: spree_core
23
- prerelease: false
24
16
  requirement: !ruby/object:Gem::Requirement
25
17
  none: false
26
18
  requirements:
27
19
  - - '='
28
20
  - !ruby/object:Gem::Version
29
- version: 1.1.6
30
- - !ruby/object:Gem::Dependency
21
+ version: 1.2.0.rc1
31
22
  type: :runtime
32
- version_requirements: !ruby/object:Gem::Requirement
33
- none: false
34
- requirements:
35
- - - '='
36
- - !ruby/object:Gem::Version
37
- version: 1.1.6
38
- name: spree_auth
39
23
  prerelease: false
40
- requirement: !ruby/object:Gem::Requirement
24
+ version_requirements: !ruby/object:Gem::Requirement
41
25
  none: false
42
26
  requirements:
43
27
  - - '='
44
28
  - !ruby/object:Gem::Version
45
- version: 1.1.6
29
+ version: 1.2.0.rc1
46
30
  - !ruby/object:Gem::Dependency
47
- type: :runtime
48
- version_requirements: !ruby/object:Gem::Requirement
31
+ name: httparty
32
+ requirement: !ruby/object:Gem::Requirement
49
33
  none: false
50
34
  requirements:
51
35
  - - ~>
52
36
  - !ruby/object:Gem::Version
53
37
  version: 0.8.1
54
- name: httparty
38
+ type: :runtime
55
39
  prerelease: false
56
- requirement: !ruby/object:Gem::Requirement
40
+ version_requirements: !ruby/object:Gem::Requirement
57
41
  none: false
58
42
  requirements:
59
43
  - - ~>
@@ -84,8 +68,7 @@ files:
84
68
  - lib/spree/dash.rb
85
69
  - lib/spree_dash.rb
86
70
  homepage: http://spreecommerce.com
87
- licenses:
88
- - BSD-3
71
+ licenses: []
89
72
  post_install_message:
90
73
  rdoc_options: []
91
74
  require_paths:
@@ -99,12 +82,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
99
82
  required_rubygems_version: !ruby/object:Gem::Requirement
100
83
  none: false
101
84
  requirements:
102
- - - ! '>='
85
+ - - ! '>'
103
86
  - !ruby/object:Gem::Version
104
- segments:
105
- - 0
106
- hash: 2230583432281266077
107
- version: '0'
87
+ version: 1.3.1
108
88
  requirements:
109
89
  - none
110
90
  rubyforge_project: