google_api 1.0.0.beta

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,3 @@
1
+ module GoogleApi
2
+ VERSION = "1.0.0.beta"
3
+ end
@@ -0,0 +1,63 @@
1
+ require "spec_helper"
2
+
3
+ describe "GoogleApi config" do
4
+
5
+ it "Setting is right." do
6
+ GoogleApi.configure do
7
+ client_id "1"
8
+ client_secret "2"
9
+ client_developer_email "3"
10
+
11
+ ga do
12
+ client_id "4"
13
+ client_secret "5"
14
+ client_developer_email "6"
15
+ end
16
+ end
17
+
18
+ GoogleApi.config.client_id.should match("1")
19
+ GoogleApi.config.client_secret.should match("2")
20
+ GoogleApi.config.client_developer_email.should match("3")
21
+
22
+ GoogleApi.config.ga.client_id.should match("4")
23
+ GoogleApi.config.ga.client_secret.should match("5")
24
+ GoogleApi.config.ga.client_developer_email.should match("6")
25
+
26
+ GoogleApi.configure do |config|
27
+ config.client_id "7"
28
+ config.client_secret "8"
29
+ config.client_developer_email "9"
30
+
31
+ config.ga do |ga_config|
32
+ ga_config.client_id "10"
33
+ ga_config.client_secret "11"
34
+ ga_config.client_developer_email "12"
35
+ end
36
+ end
37
+
38
+ GoogleApi.config.client_id.should match("7")
39
+ GoogleApi.config.client_secret.should match("8")
40
+ GoogleApi.config.client_developer_email.should match("9")
41
+
42
+ GoogleApi.config.ga.client_id.should match("10")
43
+ GoogleApi.config.ga.client_secret.should match("11")
44
+ GoogleApi.config.ga.client_developer_email.should match("12")
45
+
46
+ GoogleApi.config.client_id = "13"
47
+ GoogleApi.config.client_secret = "14"
48
+ GoogleApi.config.client_developer_email = "15"
49
+
50
+ GoogleApi.config.ga.client_id = "16"
51
+ GoogleApi.config.ga.client_secret = "17"
52
+ GoogleApi.config.ga.client_developer_email = "18"
53
+
54
+ GoogleApi.config.client_id.should match("13")
55
+ GoogleApi.config.client_secret.should match("14")
56
+ GoogleApi.config.client_developer_email.should match("15")
57
+
58
+ GoogleApi.config.ga.client_id.should match("16")
59
+ GoogleApi.config.ga.client_secret.should match("17")
60
+ GoogleApi.config.ga.client_developer_email.should match("18")
61
+ end
62
+
63
+ end
@@ -0,0 +1,8 @@
1
+ $:.unshift File.dirname(__FILE__) + '/../lib'
2
+ require "google_api"
3
+
4
+ RSpec.configure do |config|
5
+ config.treat_symbols_as_metadata_keys_with_true_values = true
6
+ config.run_all_when_everything_filtered = true
7
+ # config.filter_run :focus
8
+ end
metadata ADDED
@@ -0,0 +1,125 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: google_api
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0.beta
5
+ prerelease: 6
6
+ platform: ruby
7
+ authors:
8
+ - Ondřej Moravčík
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-08-19 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: google-api-client
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: rake
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ type: :development
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ - !ruby/object:Gem::Dependency
47
+ name: rspec
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ description: Simple Google Api. Include google analytics.
63
+ email:
64
+ - moravcik.ondrej@gmail.com
65
+ executables: []
66
+ extensions: []
67
+ extra_rdoc_files: []
68
+ files:
69
+ - .gitignore
70
+ - .rspec
71
+ - Gemfile
72
+ - LICENSE
73
+ - README.md
74
+ - Rakefile
75
+ - google_api.gemspec
76
+ - lib/google_api.rb
77
+ - lib/google_api/cache.rb
78
+ - lib/google_api/configuration.rb
79
+ - lib/google_api/core_ext/hash.rb
80
+ - lib/google_api/core_ext/string.rb
81
+ - lib/google_api/date.rb
82
+ - lib/google_api/ga.rb
83
+ - lib/google_api/ga/data.rb
84
+ - lib/google_api/ga/data/data_dsl.rb
85
+ - lib/google_api/ga/data/filters_dsl.rb
86
+ - lib/google_api/ga/data/segment_dsl.rb
87
+ - lib/google_api/ga/helper.rb
88
+ - lib/google_api/ga/management/account.rb
89
+ - lib/google_api/ga/management/goal.rb
90
+ - lib/google_api/ga/management/management.rb
91
+ - lib/google_api/ga/management/profile.rb
92
+ - lib/google_api/ga/management/segment.rb
93
+ - lib/google_api/ga/management/webproperty.rb
94
+ - lib/google_api/ga/session.rb
95
+ - lib/google_api/version.rb
96
+ - spec/lib/google_api_spec.rb
97
+ - spec/spec_helper.rb
98
+ homepage: https://github.com/ondra-m/google_api
99
+ licenses: []
100
+ post_install_message:
101
+ rdoc_options: []
102
+ require_paths:
103
+ - lib
104
+ required_ruby_version: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ! '>='
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
110
+ required_rubygems_version: !ruby/object:Gem::Requirement
111
+ none: false
112
+ requirements:
113
+ - - ! '>'
114
+ - !ruby/object:Gem::Version
115
+ version: 1.3.1
116
+ requirements: []
117
+ rubyforge_project:
118
+ rubygems_version: 1.8.23
119
+ signing_key:
120
+ specification_version: 3
121
+ summary: Simple Google Api. Include google analytics.
122
+ test_files:
123
+ - spec/lib/google_api_spec.rb
124
+ - spec/spec_helper.rb
125
+ has_rdoc: