geoloqi 0.9.39 → 0.9.40

Sign up to get free protection for your applications and to get access to all the features.
@@ -215,7 +215,7 @@ module Geoloqi
215
215
  # @see #get_auth
216
216
  # @see #application_access_token
217
217
  def establish(opts={})
218
- require 'client_id and client_secret are required to get access token' unless @config.client_id? && @config.client_secret?
218
+ raise Error, 'client_id and client_secret are required to get access token' unless @config.client_id? && @config.client_secret?
219
219
  auth = post 'oauth/token', {:client_id => @config.client_id,
220
220
  :client_secret => @config.client_secret}.merge!(opts)
221
221
 
@@ -3,6 +3,6 @@ module Geoloqi
3
3
  #
4
4
  # @return [String]
5
5
  def self.version
6
- '0.9.39'
6
+ '0.9.40'
7
7
  end
8
8
  end
@@ -1,6 +1,10 @@
1
1
  require File.join File.dirname(__FILE__), '..', 'env.rb'
2
2
 
3
3
  describe Geoloqi::Config do
4
+ after do
5
+ Geoloqi.config({})
6
+ end
7
+
4
8
  describe 'with redirect_uri' do
5
9
  it 'returns authorize url' do
6
10
  Geoloqi.config :client_id => CLIENT_ID, :client_secret => CLIENT_SECRET, :redirect_uri => 'http://blah.blah/test'
@@ -96,6 +96,10 @@ describe Geoloqi::Session do
96
96
  before do
97
97
  @session = Geoloqi::Session.new :access_token => ACCESS_TOKEN
98
98
  end
99
+
100
+ it 'fails with establish without client_id and client_secret' do
101
+ lambda { @session.establish }.must_raise Geoloqi::Error
102
+ end
99
103
 
100
104
  it 'successfully makes a batch request' do
101
105
  stub_request(:post, api_url('batch/run')).
metadata CHANGED
@@ -1,126 +1,104 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: geoloqi
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 9
8
- - 39
9
- version: 0.9.39
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.9.40
5
+ prerelease:
10
6
  platform: ruby
11
- authors:
7
+ authors:
12
8
  - Kyle Drake
13
9
  - Aaron Parecki
14
10
  autorequire:
15
11
  bindir: bin
16
12
  cert_chain: []
17
-
18
- date: 2012-03-12 00:00:00 -05:00
19
- default_executable:
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
13
+ date: 2012-04-16 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
22
16
  name: json
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
25
- requirements:
26
- - - ">="
27
- - !ruby/object:Gem::Version
28
- segments:
29
- - 0
30
- version: "0"
17
+ requirement: &70104353347040 !ruby/object:Gem::Requirement
18
+ none: false
19
+ requirements:
20
+ - - ! '>='
21
+ - !ruby/object:Gem::Version
22
+ version: '0'
31
23
  type: :runtime
32
- version_requirements: *id001
33
- - !ruby/object:Gem::Dependency
34
- name: faraday
35
24
  prerelease: false
36
- requirement: &id002 !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- segments:
41
- - 0
42
- - 6
43
- - 1
25
+ version_requirements: *70104353347040
26
+ - !ruby/object:Gem::Dependency
27
+ name: faraday
28
+ requirement: &70104353345520 !ruby/object:Gem::Requirement
29
+ none: false
30
+ requirements:
31
+ - - ! '>='
32
+ - !ruby/object:Gem::Version
44
33
  version: 0.6.1
45
34
  type: :runtime
46
- version_requirements: *id002
47
- - !ruby/object:Gem::Dependency
48
- name: rake
49
35
  prerelease: false
50
- requirement: &id003 !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- segments:
55
- - 0
56
- version: "0"
36
+ version_requirements: *70104353345520
37
+ - !ruby/object:Gem::Dependency
38
+ name: rake
39
+ requirement: &70104353344720 !ruby/object:Gem::Requirement
40
+ none: false
41
+ requirements:
42
+ - - ! '>='
43
+ - !ruby/object:Gem::Version
44
+ version: '0'
57
45
  type: :development
58
- version_requirements: *id003
59
- - !ruby/object:Gem::Dependency
60
- name: minitest
61
46
  prerelease: false
62
- requirement: &id004 !ruby/object:Gem::Requirement
63
- requirements:
64
- - - "="
65
- - !ruby/object:Gem::Version
66
- segments:
67
- - 2
68
- - 2
69
- - 2
47
+ version_requirements: *70104353344720
48
+ - !ruby/object:Gem::Dependency
49
+ name: minitest
50
+ requirement: &70104353317060 !ruby/object:Gem::Requirement
51
+ none: false
52
+ requirements:
53
+ - - =
54
+ - !ruby/object:Gem::Version
70
55
  version: 2.2.2
71
56
  type: :development
72
- version_requirements: *id004
73
- - !ruby/object:Gem::Dependency
74
- name: webmock
75
57
  prerelease: false
76
- requirement: &id005 !ruby/object:Gem::Requirement
77
- requirements:
78
- - - "="
79
- - !ruby/object:Gem::Version
80
- segments:
81
- - 1
82
- - 6
83
- - 4
58
+ version_requirements: *70104353317060
59
+ - !ruby/object:Gem::Dependency
60
+ name: webmock
61
+ requirement: &70104353316420 !ruby/object:Gem::Requirement
62
+ none: false
63
+ requirements:
64
+ - - =
65
+ - !ruby/object:Gem::Version
84
66
  version: 1.6.4
85
67
  type: :development
86
- version_requirements: *id005
87
- - !ruby/object:Gem::Dependency
88
- name: hashie
89
68
  prerelease: false
90
- requirement: &id006 !ruby/object:Gem::Requirement
91
- requirements:
92
- - - "="
93
- - !ruby/object:Gem::Version
94
- segments:
95
- - 1
96
- - 0
97
- - 0
69
+ version_requirements: *70104353316420
70
+ - !ruby/object:Gem::Dependency
71
+ name: hashie
72
+ requirement: &70104353315300 !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - =
76
+ - !ruby/object:Gem::Version
98
77
  version: 1.0.0
99
78
  type: :development
100
- version_requirements: *id006
101
- - !ruby/object:Gem::Dependency
102
- name: yard
103
79
  prerelease: false
104
- requirement: &id007 !ruby/object:Gem::Requirement
105
- requirements:
106
- - - ">="
107
- - !ruby/object:Gem::Version
108
- segments:
109
- - 0
110
- version: "0"
80
+ version_requirements: *70104353315300
81
+ - !ruby/object:Gem::Dependency
82
+ name: yard
83
+ requirement: &70104353314800 !ruby/object:Gem::Requirement
84
+ none: false
85
+ requirements:
86
+ - - ! '>='
87
+ - !ruby/object:Gem::Version
88
+ version: '0'
111
89
  type: :development
112
- version_requirements: *id007
113
- description: Powerful, flexible, lightweight interface to the awesome Geoloqi platform API! Uses Faraday, and can be used with Ruby 1.9 and EM-Synchrony for really fast, highly concurrent development.
114
- email:
90
+ prerelease: false
91
+ version_requirements: *70104353314800
92
+ description: Powerful, flexible, lightweight interface to the awesome Geoloqi platform
93
+ API! Uses Faraday, and can be used with Ruby 1.9 and EM-Synchrony for really fast,
94
+ highly concurrent development.
95
+ email:
115
96
  - kyle@geoloqi.com
116
97
  - aaron@geoloqi.com
117
98
  executables: []
118
-
119
99
  extensions: []
120
-
121
100
  extra_rdoc_files: []
122
-
123
- files:
101
+ files:
124
102
  - .gitignore
125
103
  - .travis.yml
126
104
  - .yardopts
@@ -145,37 +123,30 @@ files:
145
123
  - spec/geoloqi/config_spec.rb
146
124
  - spec/geoloqi/session_spec.rb
147
125
  - spec/geoloqi_spec.rb
148
- has_rdoc: true
149
126
  homepage: http://github.com/geoloqi/geoloqi-ruby
150
127
  licenses: []
151
-
152
128
  post_install_message:
153
129
  rdoc_options: []
154
-
155
- require_paths:
130
+ require_paths:
156
131
  - lib
157
- required_ruby_version: !ruby/object:Gem::Requirement
158
- requirements:
159
- - - ">="
160
- - !ruby/object:Gem::Version
161
- segments:
162
- - 0
163
- version: "0"
164
- required_rubygems_version: !ruby/object:Gem::Requirement
165
- requirements:
166
- - - ">="
167
- - !ruby/object:Gem::Version
168
- segments:
169
- - 1
170
- - 3
171
- - 4
132
+ required_ruby_version: !ruby/object:Gem::Requirement
133
+ none: false
134
+ requirements:
135
+ - - ! '>='
136
+ - !ruby/object:Gem::Version
137
+ version: '0'
138
+ required_rubygems_version: !ruby/object:Gem::Requirement
139
+ none: false
140
+ requirements:
141
+ - - ! '>='
142
+ - !ruby/object:Gem::Version
172
143
  version: 1.3.4
173
144
  requirements: []
174
-
175
145
  rubyforge_project: geoloqi
176
- rubygems_version: 1.3.6
146
+ rubygems_version: 1.8.17
177
147
  signing_key:
178
148
  specification_version: 3
179
- summary: Powerful, flexible, lightweight interface to the awesome Geoloqi platform API
149
+ summary: Powerful, flexible, lightweight interface to the awesome Geoloqi platform
150
+ API
180
151
  test_files: []
181
-
152
+ has_rdoc: