citygrid_api 0.0.27 → 0.0.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.27
1
+ 0.0.28
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "citygrid_api"
8
- s.version = "0.0.27"
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-18"
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
- # def self.login options = {}
9
- # request_and_handle :post,
10
- # "#{endpoint}/login",
11
- # :query => options,
12
- # :headers => merge_headers()
13
- # end
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.27
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-18 00:00:00.000000000 Z
12
+ date: 2013-07-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty