rugalytics 0.1.8 → 0.1.9

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,5 @@
1
+ v0.1.9. changes for Ruby 1.9 from leethal; danwrong added offset option to reports to enable paging
2
+
1
3
  v0.1.8. fixed reported bug due to missing 'www' in export url
2
4
 
3
5
  v0.1.7. rugalytics server, rugrat greasemonkey script
data/lib/rugalytics.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # coding:utf-8
1
2
  require 'net/http'
2
3
  require 'net/https'
3
4
  require 'uri'
@@ -8,11 +9,16 @@ require 'activesupport'
8
9
  require 'google/base'
9
10
  require 'morph'
10
11
  require 'yaml'
11
- require 'fastercsv'
12
+
13
+ if RUBY_VERSION < "1.9"
14
+ require 'fastercsv'
15
+ else
16
+ require 'csv'
17
+ end
12
18
 
13
19
  # See README for usage documentation.
14
20
  module Rugalytics
15
- VERSION = "0.1.8"
21
+ VERSION = "0.1.9"
16
22
 
17
23
  FORMAT_PDF = '0' unless defined? FORMAT_PDF
18
24
  FORMAT_XML = '1' unless defined? FORMAT_XML
@@ -84,6 +84,7 @@ module Rugalytics
84
84
  :view => options[:view],
85
85
  :tab => options[:tab],
86
86
  :trows=> options[:rows],
87
+ :tst => options[:offset],
87
88
  :gdfmt=> options[:gdfmt],
88
89
  :id => profile_id
89
90
  }
@@ -116,6 +117,7 @@ module Rugalytics
116
117
  :tab => 0,
117
118
  :format => FORMAT_CSV,
118
119
  :rows => 50,
120
+ :offset => 0,
119
121
  :compute => 'average',
120
122
  :gdfmt => 'nth_day',
121
123
  :view => 0
data/rugalytics.gemspec CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{rugalytics}
5
- s.version = "0.1.8"
5
+ s.version = "0.1.9"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Rob McKinnon"]
9
- s.date = %q{2009-02-09}
9
+ s.date = %q{2009-03-12}
10
10
  s.default_executable = %q{rugalytics}
11
11
  s.description = %q{Rugalytics is a Ruby API for Google Analytics.}
12
12
  s.email = ["rob ~@nospam@~ rubyforge.org"]
@@ -18,7 +18,7 @@ Gem::Specification.new do |s|
18
18
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Rugalytics", "--main", "README", "--inline-source"]
19
19
  s.require_paths = ["lib"]
20
20
  s.rubyforge_project = %q{rugalytics}
21
- s.rubygems_version = %q{1.3.0}
21
+ s.rubygems_version = %q{1.3.1}
22
22
  s.summary = %q{Rugalytics is a Ruby API for Google Analytics.}
23
23
 
24
24
  if s.respond_to? :specification_version then
@@ -32,7 +32,6 @@ Gem::Specification.new do |s|
32
32
  s.add_runtime_dependency(%q<morph>, [">= 0.2.0"])
33
33
  s.add_runtime_dependency(%q<fastercsv>, [">= 1.4.0"])
34
34
  s.add_runtime_dependency(%q<rack>, [">= 0.4.0"])
35
- s.add_development_dependency(%q<echoe>, [">= 0"])
36
35
  else
37
36
  s.add_dependency(%q<hpricot>, [">= 0.6"])
38
37
  s.add_dependency(%q<activesupport>, [">= 2.0.2"])
@@ -40,7 +39,6 @@ Gem::Specification.new do |s|
40
39
  s.add_dependency(%q<morph>, [">= 0.2.0"])
41
40
  s.add_dependency(%q<fastercsv>, [">= 1.4.0"])
42
41
  s.add_dependency(%q<rack>, [">= 0.4.0"])
43
- s.add_dependency(%q<echoe>, [">= 0"])
44
42
  end
45
43
  else
46
44
  s.add_dependency(%q<hpricot>, [">= 0.6"])
@@ -49,6 +47,5 @@ Gem::Specification.new do |s|
49
47
  s.add_dependency(%q<morph>, [">= 0.2.0"])
50
48
  s.add_dependency(%q<fastercsv>, [">= 1.4.0"])
51
49
  s.add_dependency(%q<rack>, [">= 0.4.0"])
52
- s.add_dependency(%q<echoe>, [">= 0"])
53
50
  end
54
51
  end
@@ -204,6 +204,7 @@ describe Profile do
204
204
  it_should_default :tab, '0'
205
205
  it_should_default :format, 'Rugalytics::FORMAT_CSV'
206
206
  it_should_default :rows, '50'
207
+ it_should_default :offset, '0'
207
208
  it_should_default :compute, '"average"'
208
209
  it_should_default :gdfmt, '"nth_day"'
209
210
  it_should_default :view, '0'
@@ -240,6 +241,7 @@ describe Profile do
240
241
  it_should_convert :format, :fmt
241
242
  it_should_convert :view, :view
242
243
  it_should_convert :rows, :trows
244
+ it_should_convert :offset, :tst
243
245
  it_should_convert :gdfmt, :gdfmt
244
246
  it_should_convert :url, :d1
245
247
  it_should_convert :page_title,:d1
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rugalytics
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rob McKinnon
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-02-09 00:00:00 +00:00
12
+ date: 2009-03-12 00:00:00 +00:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -72,16 +72,6 @@ dependencies:
72
72
  - !ruby/object:Gem::Version
73
73
  version: 0.4.0
74
74
  version:
75
- - !ruby/object:Gem::Dependency
76
- name: echoe
77
- type: :development
78
- version_requirement:
79
- version_requirements: !ruby/object:Gem::Requirement
80
- requirements:
81
- - - ">="
82
- - !ruby/object:Gem::Version
83
- version: "0"
84
- version:
85
75
  description: Rugalytics is a Ruby API for Google Analytics.
86
76
  email:
87
77
  - rob ~@nospam@~ rubyforge.org
@@ -151,7 +141,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
151
141
  requirements: []
152
142
 
153
143
  rubyforge_project: rugalytics
154
- rubygems_version: 1.3.0
144
+ rubygems_version: 1.3.1
155
145
  signing_key:
156
146
  specification_version: 2
157
147
  summary: Rugalytics is a Ruby API for Google Analytics.