spree_dash 1.3.0.rc2 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -47,7 +47,12 @@ module Spree
47
47
  end
48
48
 
49
49
  def store_hash
50
- url = Spree::Config.site_url || "http://demo.spreecommerce.com"
50
+ if Spree::Config.site_url.blank? || Spree::Config.site_url.include?("localhost")
51
+ url = "http://demo.spreecommerce.com"
52
+ else
53
+ url = Spree::Config.site_url
54
+ end
55
+
51
56
  email = "junk@spreecommerce.com"
52
57
  name = Spree::Config.site_name || "Spree Store"
53
58
  platform_type = Rails.env.production? ? "spree" : "spree-#{Rails.env}"
@@ -18,11 +18,13 @@ module Spree
18
18
  private
19
19
 
20
20
  def check_last_jirafe_sync_time
21
- if session[:last_jirafe_sync]
22
- hours_since_last_sync = ((DateTime.now - session[:last_jirafe_sync]) * 24).to_i
23
- redirect_to admin_analytics_sync_path if hours_since_last_sync > 24
24
- else
25
- redirect_to admin_analytics_sync_path
21
+ if Spree::Dash::Config.configured?
22
+ if session[:last_jirafe_sync]
23
+ hours_since_last_sync = ((DateTime.now - session[:last_jirafe_sync]) * 24).to_i
24
+ redirect_to admin_analytics_sync_path if hours_since_last_sync > 24
25
+ else
26
+ redirect_to admin_analytics_sync_path
27
+ end
26
28
  end
27
29
  end
28
30
  end
metadata CHANGED
@@ -1,35 +1,30 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_dash
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0.rc2
5
- prerelease: 6
4
+ version: 1.3.0
5
+ prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - Brian Quinn
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-16 00:00:00.000000000 Z
12
+ date: 2012-12-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: spree_core
16
- requirement: !ruby/object:Gem::Requirement
16
+ requirement: &70316364234280 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
- - - '='
19
+ - - =
20
20
  - !ruby/object:Gem::Version
21
- version: 1.3.0.rc2
21
+ version: 1.3.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
27
- - - '='
28
- - !ruby/object:Gem::Version
29
- version: 1.3.0.rc2
24
+ version_requirements: *70316364234280
30
25
  - !ruby/object:Gem::Dependency
31
26
  name: httparty
32
- requirement: !ruby/object:Gem::Requirement
27
+ requirement: &70316364232660 !ruby/object:Gem::Requirement
33
28
  none: false
34
29
  requirements:
35
30
  - - ~>
@@ -37,12 +32,7 @@ dependencies:
37
32
  version: 0.8.1
38
33
  type: :runtime
39
34
  prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - ~>
44
- - !ruby/object:Gem::Version
45
- version: 0.8.1
35
+ version_requirements: *70316364232660
46
36
  description: Required dependency for Spree
47
37
  email: brian@spreecommerce.com
48
38
  executables: []
@@ -85,13 +75,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
85
75
  required_rubygems_version: !ruby/object:Gem::Requirement
86
76
  none: false
87
77
  requirements:
88
- - - ! '>'
78
+ - - ! '>='
89
79
  - !ruby/object:Gem::Version
90
- version: 1.3.1
80
+ version: '0'
81
+ segments:
82
+ - 0
83
+ hash: -2031476980098309200
91
84
  requirements:
92
85
  - none
93
86
  rubyforge_project:
94
- rubygems_version: 1.8.23
87
+ rubygems_version: 1.8.10
95
88
  signing_key:
96
89
  specification_version: 3
97
90
  summary: Overview dashboard for use with Spree.