citygrid_api 0.0.27 → 0.0.28
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/citygrid_api.gemspec +2 -2
- data/lib/citygrid/api/accounts/login.rb +5 -1
- data/lib/citygrid/api/accounts/user.rb +6 -6
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.28
|
data/citygrid_api.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "citygrid_api"
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.28"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Elpizo Choi"]
|
12
|
-
s.date = "2013-07-
|
12
|
+
s.date = "2013-07-19"
|
13
13
|
s.description = "Ruby wrapper for CityGrid APIs"
|
14
14
|
s.email = "fu7iin@gmail.com"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -3,6 +3,10 @@ class CityGrid
|
|
3
3
|
class Accounts
|
4
4
|
class Login < Accounts
|
5
5
|
def self.login options = {}
|
6
|
+
if endpoint.blank? and base_uri.blank?
|
7
|
+
endpoint = CityGrid::API::Accounts::User.endpoint
|
8
|
+
base_uri = CityGrid::API::Accounts::User.base_uri
|
9
|
+
end
|
6
10
|
request_and_handle :post,
|
7
11
|
"#{endpoint}/login",
|
8
12
|
:query => options,
|
@@ -11,4 +15,4 @@ class CityGrid
|
|
11
15
|
end
|
12
16
|
end
|
13
17
|
end
|
14
|
-
end
|
18
|
+
end
|
@@ -5,12 +5,12 @@ class CityGrid
|
|
5
5
|
include CityGrid::API::Mutable
|
6
6
|
include CityGrid::API::Searchable
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
8
|
+
def self.login options = {}
|
9
|
+
request_and_handle :post,
|
10
|
+
"#{endpoint}/login",
|
11
|
+
:query => options,
|
12
|
+
:headers => merge_headers()
|
13
|
+
end
|
14
14
|
|
15
15
|
# login behaves weird right now - expects string as body, not json encoded.
|
16
16
|
# define_action :login, :post, "login", :auth_token => false, :format => false
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: citygrid_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.28
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-07-
|
12
|
+
date: 2013-07-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httparty
|