gicodewarrior-gattica 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +4 -0
- data/VERSION.yml +3 -4
- data/gattica.gemspec +47 -35
- data/lib/gattica.rb +4 -4
- data/lib/gattica/auth.rb +2 -2
- metadata +20 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ae5cc9615e34f43de2d081b800305c8a6f6d9747
|
4
|
+
data.tar.gz: faa877e6ec18d7a67291f3592bec5fa506807f12
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 59a182cc7efe05067361d35f0390907d84bce6d1b13cca832064db1ad463d4c05c9e20b259392fd902c035eefef014feec832e9651eef448e10c50c5bd6c35ad
|
7
|
+
data.tar.gz: 012343087b1d9c2322960f40876ab32c8e076d402c006dda514b4e8b3cd3a41ee3a2083c4778de8200ce3caade7e0cd5a6cc99a907743bf73e29d6864373573b
|
data/.gitignore
ADDED
data/VERSION.yml
CHANGED
data/gattica.gemspec
CHANGED
@@ -1,59 +1,71 @@
|
|
1
1
|
# Generated by jeweler
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
|
-
s.name =
|
8
|
-
s.version = "0.5.
|
7
|
+
s.name = %q{gicodewarrior-gattica}
|
8
|
+
s.version = "0.5.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["The Active Network"]
|
12
|
-
s.date =
|
13
|
-
s.description =
|
14
|
-
s.email =
|
12
|
+
s.date = %q{2011-11-01}
|
13
|
+
s.description = %q{Gattica is a Ruby library for extracting data from the Google Analytics API.}
|
14
|
+
s.email = %q{rob.cameron@active.com}
|
15
15
|
s.extra_rdoc_files = [
|
16
16
|
"LICENSE",
|
17
|
-
|
17
|
+
"README.rdoc"
|
18
18
|
]
|
19
19
|
s.files = [
|
20
|
-
"
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
20
|
+
".gitignore",
|
21
|
+
"History.txt",
|
22
|
+
"LICENSE",
|
23
|
+
"README.rdoc",
|
24
|
+
"Rakefile",
|
25
|
+
"VERSION.yml",
|
26
|
+
"examples/example.rb",
|
27
|
+
"gattica.gemspec",
|
28
|
+
"lib/gattica.rb",
|
29
|
+
"lib/gattica/account.rb",
|
30
|
+
"lib/gattica/auth.rb",
|
31
|
+
"lib/gattica/convertible.rb",
|
32
|
+
"lib/gattica/data_point.rb",
|
33
|
+
"lib/gattica/data_set.rb",
|
34
|
+
"lib/gattica/exceptions.rb",
|
35
|
+
"lib/gattica/user.rb",
|
36
|
+
"test/helper.rb",
|
37
|
+
"test/suite.rb",
|
38
|
+
"test/test_auth.rb",
|
39
|
+
"test/test_engine.rb",
|
40
|
+
"test/test_gattica.rb",
|
41
|
+
"test/test_user.rb"
|
41
42
|
]
|
42
|
-
s.homepage =
|
43
|
+
s.homepage = %q{http://github.com/activenetwork/gattica}
|
44
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
43
45
|
s.require_paths = ["lib"]
|
44
|
-
s.rubygems_version =
|
45
|
-
s.summary =
|
46
|
+
s.rubygems_version = %q{1.3.7}
|
47
|
+
s.summary = %q{Gattica is a Ruby library for extracting data from the Google Analytics API.}
|
48
|
+
s.test_files = [
|
49
|
+
"test/test_auth.rb",
|
50
|
+
"test/helper.rb",
|
51
|
+
"test/test_user.rb",
|
52
|
+
"test/test_engine.rb",
|
53
|
+
"test/suite.rb",
|
54
|
+
"test/test_gattica.rb",
|
55
|
+
"examples/example.rb"
|
56
|
+
]
|
46
57
|
|
47
58
|
if s.respond_to? :specification_version then
|
48
|
-
|
59
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
60
|
+
s.specification_version = 3
|
49
61
|
|
50
62
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
51
|
-
s.add_runtime_dependency(%q<nokogiri>, ["
|
63
|
+
s.add_runtime_dependency(%q<nokogiri>, [">= 1.4.0", "< 1.6"])
|
52
64
|
else
|
53
|
-
s.add_dependency(%q<nokogiri>, ["
|
65
|
+
s.add_dependency(%q<nokogiri>, [">= 1.4.0", "< 1.6"])
|
54
66
|
end
|
55
67
|
else
|
56
|
-
s.add_dependency(%q<nokogiri>, ["
|
68
|
+
s.add_dependency(%q<nokogiri>, [">= 1.4.0", "< 1.6"])
|
57
69
|
end
|
58
70
|
end
|
59
71
|
|
data/lib/gattica.rb
CHANGED
@@ -11,7 +11,7 @@ require 'nokogiri'
|
|
11
11
|
require 'yaml'
|
12
12
|
|
13
13
|
module Gattica
|
14
|
-
VERSION = '0.4.
|
14
|
+
VERSION = '0.4.0'
|
15
15
|
end
|
16
16
|
|
17
17
|
# internal
|
@@ -239,7 +239,7 @@ module Gattica
|
|
239
239
|
# sure it's valid and not an error
|
240
240
|
|
241
241
|
def do_http_get(query_string)
|
242
|
-
response
|
242
|
+
response = @http.get(query_string, @headers)
|
243
243
|
|
244
244
|
# error checking
|
245
245
|
if response.code != '200'
|
@@ -253,7 +253,7 @@ module Gattica
|
|
253
253
|
end
|
254
254
|
end
|
255
255
|
|
256
|
-
return
|
256
|
+
return response.body
|
257
257
|
end
|
258
258
|
|
259
259
|
private
|
@@ -317,7 +317,7 @@ module Gattica
|
|
317
317
|
|
318
318
|
# Validates that the args passed to +get+ are valid
|
319
319
|
def validate_and_clean(args)
|
320
|
-
[:dimensions, :metrics].each do |key|
|
320
|
+
[:dimensions, :metrics, :sort, :filters].each do |key|
|
321
321
|
value = args[key] || []
|
322
322
|
args[key] = value.respond_to?(:to_ary) ? value.to_ary : [value]
|
323
323
|
end
|
data/lib/gattica/auth.rb
CHANGED
@@ -19,7 +19,7 @@ module Gattica
|
|
19
19
|
def initialize(http, user)
|
20
20
|
options = OPTIONS.merge(user.to_h)
|
21
21
|
|
22
|
-
response
|
22
|
+
response = http.post(SCRIPT_NAME, options.to_query, HEADERS)
|
23
23
|
if response.code != '200'
|
24
24
|
case response.code
|
25
25
|
when '403'
|
@@ -28,7 +28,7 @@ module Gattica
|
|
28
28
|
raise GatticaError::UnknownAnalyticsError, response.body + " (status code: #{response.code})"
|
29
29
|
end
|
30
30
|
end
|
31
|
-
@tokens = parse_tokens(
|
31
|
+
@tokens = parse_tokens(response.body)
|
32
32
|
end
|
33
33
|
|
34
34
|
|
metadata
CHANGED
@@ -1,35 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gicodewarrior-gattica
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- The Active Network
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2011-11-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - <
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '1.6'
|
20
17
|
- - '>='
|
21
18
|
- !ruby/object:Gem::Version
|
22
19
|
version: 1.4.0
|
20
|
+
- - <
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '1.6'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
|
-
- - <
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: '1.6'
|
30
27
|
- - '>='
|
31
28
|
- !ruby/object:Gem::Version
|
32
29
|
version: 1.4.0
|
30
|
+
- - <
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '1.6'
|
33
33
|
description: Gattica is a Ruby library for extracting data from the Google Analytics
|
34
34
|
API.
|
35
35
|
email: rob.cameron@active.com
|
@@ -39,6 +39,7 @@ extra_rdoc_files:
|
|
39
39
|
- LICENSE
|
40
40
|
- README.rdoc
|
41
41
|
files:
|
42
|
+
- .gitignore
|
42
43
|
- History.txt
|
43
44
|
- LICENSE
|
44
45
|
- README.rdoc
|
@@ -64,7 +65,8 @@ homepage: http://github.com/activenetwork/gattica
|
|
64
65
|
licenses: []
|
65
66
|
metadata: {}
|
66
67
|
post_install_message:
|
67
|
-
rdoc_options:
|
68
|
+
rdoc_options:
|
69
|
+
- --charset=UTF-8
|
68
70
|
require_paths:
|
69
71
|
- lib
|
70
72
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -81,6 +83,13 @@ requirements: []
|
|
81
83
|
rubyforge_project:
|
82
84
|
rubygems_version: 2.0.3
|
83
85
|
signing_key:
|
84
|
-
specification_version:
|
86
|
+
specification_version: 3
|
85
87
|
summary: Gattica is a Ruby library for extracting data from the Google Analytics API.
|
86
|
-
test_files:
|
88
|
+
test_files:
|
89
|
+
- test/test_auth.rb
|
90
|
+
- test/helper.rb
|
91
|
+
- test/test_user.rb
|
92
|
+
- test/test_engine.rb
|
93
|
+
- test/suite.rb
|
94
|
+
- test/test_gattica.rb
|
95
|
+
- examples/example.rb
|