georama 0.2.2 → 0.3.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 002eef961146be495393e453c8d998205143d45b
4
- data.tar.gz: ae36f10e19e4a8fe60b62f385361ff5b99159aeb
2
+ SHA256:
3
+ metadata.gz: d262435254038ddb0dfa0989936c542677e949a7af18ba21fbbd8b7972436b37
4
+ data.tar.gz: b2fb40c79b9aa81fcf926bbd105ae93838c942bb6a5ae376541b2ef9e85a5aea
5
5
  SHA512:
6
- metadata.gz: d066823495b8eb875a6c25ef1e9772e24c53e613aba9bbda22e3233ed97061ab5d11c8fbc8b5670b0b54d59b219dd8da72b4b1d6835b2c9f2ec9c31305fc3fac
7
- data.tar.gz: e102fd689a3e008d7c50a201a5529100bf738aadf882413f22c61fd9e39ba87dd9500279da9b934a804608277deb532c2cbac7dcb86ea68f29fe140bafd1ecde
6
+ metadata.gz: 988a1f6a127d3771480d22ebfab42e048ded67419b1d78cd1425240ec45791b375c9928281c8361304579b280f4122d127b95380e6724c3e43ba21d66a68d1aa
7
+ data.tar.gz: f14792282cb18dd40259ba19876eba2476234da2800d0eb0545512caf9d5daaf002f344cbdedf09e2407b2d4b35a2d368edec5e9edb52524bb195f447db4ded7
@@ -0,0 +1,3 @@
1
+ machine:
2
+ ruby:
3
+ version: 2.0
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ # 0.3.0 - Release date: 2018-10-01
4
+ * UTF8 support
5
+
6
+
3
7
 
4
8
  # 0.2.2
5
9
  * Multiple Google domain suffixes can be parsed
@@ -4,10 +4,10 @@ module Georama
4
4
 
5
5
  def initialize(url)
6
6
  raise ArgumentError, "Expected a valid maps url, got nil" if url.nil?
7
- raise ArgumentError, "Not a valid url" unless Georama::Parser.is_valid_url?(url)
8
- raise ArgumentError, "Not a valid maps url" unless Georama::Parser.is_google_maps_url?(url)
9
- @url_string = url
10
- @parsed_url = URI.parse(url)
7
+ @url_string = URI.encode(url)
8
+ raise ArgumentError, "Not a valid url" unless Georama::Parser.is_valid_url?(@url_string)
9
+ raise ArgumentError, "Not a valid maps url" unless Georama::Parser.is_google_maps_url?(@url_string)
10
+ @parsed_url = URI.parse(@url_string)
11
11
  end
12
12
 
13
13
  def type
@@ -36,7 +36,7 @@ module Georama
36
36
 
37
37
  def place
38
38
  return nil unless type == :place
39
- @place ||= path_components[2].gsub("+", " ")
39
+ @place ||= URI.unescape(path_components[2].gsub("+", " "))
40
40
  end
41
41
 
42
42
  private
@@ -1,3 +1,3 @@
1
1
  module Georama
2
- VERSION = "0.2.2"
2
+ VERSION = "0.3.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: georama
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Pretorius
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-26 00:00:00.000000000 Z
11
+ date: 2018-10-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: semvergen
@@ -87,6 +87,7 @@ executables: []
87
87
  extensions: []
88
88
  extra_rdoc_files: []
89
89
  files:
90
+ - ".circle.yml"
90
91
  - CHANGELOG.md
91
92
  - Gemfile
92
93
  - README.md
@@ -118,7 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
118
119
  version: '0'
119
120
  requirements: []
120
121
  rubyforge_project:
121
- rubygems_version: 2.6.10
122
+ rubygems_version: 2.7.7
122
123
  signing_key:
123
124
  specification_version: 4
124
125
  summary: A simple google maps url parser