Skip to content

Commit

Permalink
Fixed a couple style things. Update changelog and version.
Browse files Browse the repository at this point in the history
  • Loading branch information
elifoster committed Oct 24, 2015
1 parent 558c24a commit 8f7b30a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
# Changelog
## Version 1
### Version 1.2.0
* Implement a simple cache that will prevent you ever exceeding the request quota! (vladc)
* New method connection for getting the types of connection you have (proxy and/or mobile) (vladc)

### Version 1.1.0
* Fix error method causing NoMethodError.
* Better documentation for all methods, including adding the missing documentation for the private error method.
* Case/When statement instead of if conditional in request_successful?
* Better code in all the getter methods, improving how values are returned and how error is called.
* New get_error_description for getting the description to go with the ambiguous error message.
* Better error code, which is now dependent on request_successful?, instead of having getter methods being dependent on request_successful?. This greatly reduces the length of the methods.
* HTTPClient dependency is no longer open-eneded.
* HTTPClient dependency is no longer open-ended.

### Version 1.0.0
* Initial release version. Contains methods for most everything available with IP-API.com. The only API that I am not utilizing is the DNS API. That should come in a future release.
5 changes: 3 additions & 2 deletions lib/simple_geolocator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module SimpleGeolocator
extend self

@client = HTTPClient.new
@cache = Hash.new
@cache = {}

# Gets the full JSON response, useful for getting multiple pieces of data in
# a single request.
Expand Down Expand Up @@ -138,7 +138,8 @@ def organization_name(ip)
response['org']
end

# Gets the IP connection attributes - if it's a mobile and/or a proxy connection
# Gets the IP connection attributes - if it's a mobile and/or a proxy
# connection.
# @param ip [String] See #get_full_response
# @return [Hash] A hash containing data formatted as
# { :mobile => true, :proxy => true}
Expand Down
2 changes: 1 addition & 1 deletion simple_geolocator.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Gem::Specification.new do |s|
s.name = 'simple_geolocator'
s.summary = 'A Ruby gem for easily using the IP-API.com API to perform ' \
'IP geolocation.'
s.version = '1.1.0'
s.version = '1.2.0'
s.license = 'CC-BY-NC-ND-4.0'
s.description = 'Accessing the IP API through HTTPClient. I found that many' \
', if not all, Geolocation gems were very annoying and ' \
Expand Down

0 comments on commit 8f7b30a

Please sign in to comment.