garb-authsub 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +250 -0
- data/Rakefile +56 -0
- data/lib/garb.rb +38 -0
- data/lib/garb/account.rb +29 -0
- data/lib/garb/authentication_request.rb +53 -0
- data/lib/garb/data_request.rb +51 -0
- data/lib/garb/filter_parameters.rb +37 -0
- data/lib/garb/profile.rb +57 -0
- data/lib/garb/profile_reports.rb +15 -0
- data/lib/garb/report.rb +26 -0
- data/lib/garb/report_parameter.rb +25 -0
- data/lib/garb/report_response.rb +62 -0
- data/lib/garb/reports.rb +5 -0
- data/lib/garb/reports/bounces.rb +5 -0
- data/lib/garb/reports/exits.rb +5 -0
- data/lib/garb/reports/pageviews.rb +5 -0
- data/lib/garb/reports/unique_pageviews.rb +5 -0
- data/lib/garb/reports/visits.rb +5 -0
- data/lib/garb/resource.rb +92 -0
- data/lib/garb/session.rb +29 -0
- data/lib/garb/version.rb +13 -0
- data/lib/support.rb +39 -0
- data/test/fixtures/cacert.pem +67 -0
- data/test/fixtures/profile_feed.xml +40 -0
- data/test/fixtures/report_feed.xml +46 -0
- data/test/test_helper.rb +18 -0
- data/test/unit/garb/account_test.rb +53 -0
- data/test/unit/garb/authentication_request_test.rb +121 -0
- data/test/unit/garb/data_request_test.rb +106 -0
- data/test/unit/garb/filter_parameters_test.rb +57 -0
- data/test/unit/garb/oauth_session_test.rb +11 -0
- data/test/unit/garb/profile_reports_test.rb +29 -0
- data/test/unit/garb/profile_test.rb +87 -0
- data/test/unit/garb/report_parameter_test.rb +43 -0
- data/test/unit/garb/report_response_test.rb +29 -0
- data/test/unit/garb/report_test.rb +91 -0
- data/test/unit/garb/resource_test.rb +38 -0
- data/test/unit/garb/session_test.rb +84 -0
- data/test/unit/garb_test.rb +14 -0
- data/test/unit/symbol_operator_test.rb +37 -0
- metadata +131 -0
@@ -0,0 +1,14 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), '..', '/test_helper')
|
2
|
+
|
3
|
+
class GarbTest < MiniTest::Unit::TestCase
|
4
|
+
context "The Garb module" do
|
5
|
+
should 'prefix a string with ga: for GA' do
|
6
|
+
assert_equal '-ga:bob', Garb.to_google_analytics(stub(:to_google_analytics => '-ga:bob'))
|
7
|
+
assert_equal 'ga:bob', Garb.to_google_analytics('bob')
|
8
|
+
end
|
9
|
+
|
10
|
+
should 'remove ga: prefix' do
|
11
|
+
assert_equal 'bob', Garb.from_google_analytics('ga:bob')
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), '..', '/test_helper')
|
2
|
+
|
3
|
+
class SymbolOperatorTest < MiniTest::Unit::TestCase
|
4
|
+
context "An instance of a SymbolOperator" do
|
5
|
+
should "lower camelize the target" do
|
6
|
+
assert_equal "ga:uniqueVisits==", SymbolOperator.new(:unique_visits, :eql).to_google_analytics
|
7
|
+
end
|
8
|
+
|
9
|
+
should "return target and operator together" do
|
10
|
+
assert_equal "ga:metric==", SymbolOperator.new(:metric, :eql).to_google_analytics
|
11
|
+
end
|
12
|
+
|
13
|
+
should "prefix the operator to the target" do
|
14
|
+
assert_equal "-ga:metric", SymbolOperator.new(:metric, :desc).to_google_analytics
|
15
|
+
end
|
16
|
+
|
17
|
+
# should "know if it is equal to another operator" do
|
18
|
+
# op1 = SymbolOperator.new(:hello, "==")
|
19
|
+
# op2 = SymbolOperator.new(:hello, "==")
|
20
|
+
# assert_equal op1, op2
|
21
|
+
# end
|
22
|
+
#
|
23
|
+
# should "not be equal to another operator if target, operator, or prefix is different" do
|
24
|
+
# op1 = SymbolOperator.new(:hello, "==")
|
25
|
+
# op2 = SymbolOperator.new(:hello, "==", true)
|
26
|
+
# refute_equal op1, op2
|
27
|
+
#
|
28
|
+
# op1 = SymbolOperator.new(:hello1, "==")
|
29
|
+
# op2 = SymbolOperator.new(:hello2, "==")
|
30
|
+
# refute_equal op1, op2
|
31
|
+
#
|
32
|
+
# op1 = SymbolOperator.new(:hello, "!=")
|
33
|
+
# op2 = SymbolOperator.new(:hello, "==")
|
34
|
+
# refute_equal op1, op2
|
35
|
+
# end
|
36
|
+
end
|
37
|
+
end
|
metadata
ADDED
@@ -0,0 +1,131 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: garb-authsub
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.7.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Tony Pitale
|
8
|
+
- Dumitru Ceban
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
|
13
|
+
date: 2010-02-22 00:00:00 +01:00
|
14
|
+
default_executable:
|
15
|
+
dependencies:
|
16
|
+
- !ruby/object:Gem::Dependency
|
17
|
+
name: happymapper
|
18
|
+
type: :runtime
|
19
|
+
version_requirement:
|
20
|
+
version_requirements: !ruby/object:Gem::Requirement
|
21
|
+
requirements:
|
22
|
+
- - ~>
|
23
|
+
- !ruby/object:Gem::Version
|
24
|
+
version: 0.3.0
|
25
|
+
version:
|
26
|
+
- !ruby/object:Gem::Dependency
|
27
|
+
name: activesupport
|
28
|
+
type: :runtime
|
29
|
+
version_requirement:
|
30
|
+
version_requirements: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - ">="
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: 2.3.0
|
35
|
+
version:
|
36
|
+
description:
|
37
|
+
email: tony.pitale@viget.com
|
38
|
+
executables: []
|
39
|
+
|
40
|
+
extensions: []
|
41
|
+
|
42
|
+
extra_rdoc_files: []
|
43
|
+
|
44
|
+
files:
|
45
|
+
- README.md
|
46
|
+
- Rakefile
|
47
|
+
- lib/garb/account.rb
|
48
|
+
- lib/garb/authentication_request.rb
|
49
|
+
- lib/garb/data_request.rb
|
50
|
+
- lib/garb/filter_parameters.rb
|
51
|
+
- lib/garb/profile.rb
|
52
|
+
- lib/garb/profile_reports.rb
|
53
|
+
- lib/garb/report.rb
|
54
|
+
- lib/garb/report_parameter.rb
|
55
|
+
- lib/garb/report_response.rb
|
56
|
+
- lib/garb/reports/bounces.rb
|
57
|
+
- lib/garb/reports/exits.rb
|
58
|
+
- lib/garb/reports/pageviews.rb
|
59
|
+
- lib/garb/reports/unique_pageviews.rb
|
60
|
+
- lib/garb/reports/visits.rb
|
61
|
+
- lib/garb/reports.rb
|
62
|
+
- lib/garb/resource.rb
|
63
|
+
- lib/garb/session.rb
|
64
|
+
- lib/garb/version.rb
|
65
|
+
- lib/garb.rb
|
66
|
+
- lib/support.rb
|
67
|
+
- test/fixtures/cacert.pem
|
68
|
+
- test/fixtures/profile_feed.xml
|
69
|
+
- test/fixtures/report_feed.xml
|
70
|
+
- test/test_helper.rb
|
71
|
+
- test/unit/garb/account_test.rb
|
72
|
+
- test/unit/garb/authentication_request_test.rb
|
73
|
+
- test/unit/garb/data_request_test.rb
|
74
|
+
- test/unit/garb/filter_parameters_test.rb
|
75
|
+
- test/unit/garb/oauth_session_test.rb
|
76
|
+
- test/unit/garb/profile_reports_test.rb
|
77
|
+
- test/unit/garb/profile_test.rb
|
78
|
+
- test/unit/garb/report_parameter_test.rb
|
79
|
+
- test/unit/garb/report_response_test.rb
|
80
|
+
- test/unit/garb/report_test.rb
|
81
|
+
- test/unit/garb/resource_test.rb
|
82
|
+
- test/unit/garb/session_test.rb
|
83
|
+
- test/unit/garb_test.rb
|
84
|
+
- test/unit/symbol_operator_test.rb
|
85
|
+
has_rdoc: true
|
86
|
+
homepage: http://github.com/vigetlabs/garb
|
87
|
+
licenses: []
|
88
|
+
|
89
|
+
post_install_message:
|
90
|
+
rdoc_options: []
|
91
|
+
|
92
|
+
require_paths:
|
93
|
+
- lib
|
94
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
95
|
+
requirements:
|
96
|
+
- - ">="
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: "0"
|
99
|
+
version:
|
100
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
101
|
+
requirements:
|
102
|
+
- - ">="
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: "0"
|
105
|
+
version:
|
106
|
+
requirements: []
|
107
|
+
|
108
|
+
rubyforge_project: viget
|
109
|
+
rubygems_version: 1.3.5
|
110
|
+
signing_key:
|
111
|
+
specification_version: 3
|
112
|
+
summary: Google Analytics API Ruby Wrapper (Authsub sessions mod)
|
113
|
+
test_files:
|
114
|
+
- test/fixtures/cacert.pem
|
115
|
+
- test/fixtures/profile_feed.xml
|
116
|
+
- test/fixtures/report_feed.xml
|
117
|
+
- test/test_helper.rb
|
118
|
+
- test/unit/garb/account_test.rb
|
119
|
+
- test/unit/garb/authentication_request_test.rb
|
120
|
+
- test/unit/garb/data_request_test.rb
|
121
|
+
- test/unit/garb/filter_parameters_test.rb
|
122
|
+
- test/unit/garb/oauth_session_test.rb
|
123
|
+
- test/unit/garb/profile_reports_test.rb
|
124
|
+
- test/unit/garb/profile_test.rb
|
125
|
+
- test/unit/garb/report_parameter_test.rb
|
126
|
+
- test/unit/garb/report_response_test.rb
|
127
|
+
- test/unit/garb/report_test.rb
|
128
|
+
- test/unit/garb/resource_test.rb
|
129
|
+
- test/unit/garb/session_test.rb
|
130
|
+
- test/unit/garb_test.rb
|
131
|
+
- test/unit/symbol_operator_test.rb
|