analytical 0.9.0 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.0
1
+ 0.10.0
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{analytical}
8
- s.version = "0.9.0"
8
+ s.version = "0.10.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Joshua Krall"]
12
- s.date = %q{2010-05-18}
12
+ s.date = %q{2010-05-20}
13
13
  s.description = %q{Gem for managing multiple analytics services in your rails app.}
14
14
  s.email = %q{josh@transfs.com}
15
15
  s.extra_rdoc_files = [
@@ -18,12 +18,12 @@ module Analytical
18
18
  })
19
19
 
20
20
  config_options = {}
21
- File.open("#{RAILS_ROOT}/config/analytical.yml") do |f|
21
+ File.open("#{Rails.root}/config/analytical.yml") do |f|
22
22
  config_options = YAML::load(ERB.new(f.read).result).symbolize_keys
23
23
  config_options.each do |k,v|
24
24
  config_options[k] = v.symbolize_keys
25
25
  end
26
- end if File.exists?("#{RAILS_ROOT}/config/analytical.yml")
26
+ end if File.exists?("#{Rails.root}/config/analytical.yml")
27
27
 
28
28
  self.analytical_options = self.analytical_options.reverse_merge config_options
29
29
  end
@@ -51,4 +51,4 @@ end
51
51
 
52
52
  if defined?(ActionController::Base)
53
53
  ActionController::Base.extend Analytical
54
- end
54
+ end
@@ -45,7 +45,7 @@ describe "Analytical" do
45
45
  end
46
46
 
47
47
  it 'should open the initialization file' do
48
- File.should_receive(:'exists?').with("#{RAILS_ROOT}/config/analytical.yml").and_return(true)
48
+ File.should_receive(:'exists?').with("#{Rails.root}/config/analytical.yml").and_return(true)
49
49
  DummyForInit.analytical
50
50
  DummyForInit.analytical_options[:google].should == {:key=>'google_12345'}
51
51
  DummyForInit.analytical_options[:kiss_metrics].should == {:key=>'kiss_metrics_12345'}
@@ -18,5 +18,7 @@ Spec::Runner.configure do |config|
18
18
  end
19
19
 
20
20
  module Rails
21
+ def self.root
22
+ File.dirname(__FILE__)
23
+ end
21
24
  end
22
- RAILS_ROOT = File.dirname(__FILE__)
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 9
7
+ - 10
8
8
  - 0
9
- version: 0.9.0
9
+ version: 0.10.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - Joshua Krall
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-05-18 00:00:00 -05:00
17
+ date: 2010-05-20 00:00:00 -05:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency