overpass-api-ruby 0.2.2 → 0.2.3

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
2
  SHA1:
3
- metadata.gz: 2091fa63150f111ab3fe5c3aae154971a5ad0574
4
- data.tar.gz: 5c202dc9277040b0d4daa2b572d01b195d597362
3
+ metadata.gz: 29bf1c7ef0182dc24d885a9ba8200a87a4dcf4e7
4
+ data.tar.gz: 2336b1923149b79441d56a71faa6b51ce4189024
5
5
  SHA512:
6
- metadata.gz: 2b55bc705c1a9ea9d0cc822441bd04196f7c74d3f5d2353e37fadb5e0ff557b615e256dfa88dbf21f613851be044fa006fe27cfeb1c5a53c2ea1e78f2018ff79
7
- data.tar.gz: 125738c5d7bd1f9cbc1bd01b4866d656d452e42be62dc7e8bbcefcd4568d3845f54bfbff800d13e7eaa80672fb5cbead190395eab07bda1e8b32f61e60250bb8
6
+ metadata.gz: 981208f6cf4e4b8f9a926c4a9845f2e54f3770648b575d15cd946b64ae74bc50812609a0c4be43a9548043841fdba0164f5f9defffaacab21a31df66a2452acb
7
+ data.tar.gz: 5361b129f4ba79a761e1fbd0aa69e93774dacae2dcc25272d3f91a3ed6c0eaa6fc0f57c2686efc4f8153d902bafbb292c6b50fb72e8c90863c4b145042e33e93
@@ -1,5 +1,12 @@
1
1
  CHANGELOG
2
2
  =========
3
+ v 0.2.3
4
+ --------
5
+ Removes param `data` from ENDPOINT constant (Issue #5)
6
+
7
+ v 0.2.2
8
+ -------
9
+ Fixes `maxsize` option in the `XML` class. (Issue #4)
3
10
 
4
11
  v 0.2
5
12
  -----
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- overpass-api-ruby (0.2.2)
4
+ overpass-api-ruby (0.2.3)
5
5
  httpi (~> 2.4.0)
6
6
 
7
7
  GEM
@@ -4,7 +4,7 @@ require 'json'
4
4
 
5
5
  module OverpassAPI
6
6
  class Base
7
- DEFAULT_ENDPOINT='http://overpass-api.de/api/interpreter?data='
7
+ DEFAULT_ENDPOINT='http://overpass-api.de/api/interpreter'
8
8
 
9
9
  def initialize(args={})
10
10
  bbox = args[:bbox]
@@ -29,7 +29,7 @@ module OverpassAPI
29
29
  private
30
30
 
31
31
  def perform(q)
32
- url = URI::encode("#{@endpoint}#{q}")
32
+ url = URI::encode("#{@endpoint}?data=#{q}")
33
33
  r = HTTPI::Request.new(url)
34
34
  JSON.parse(HTTPI.get(r).body, symbolize_names: true)
35
35
  end
@@ -1,3 +1,3 @@
1
1
  module OverpassAPI
2
- VERSION='0.2.2'
2
+ VERSION='0.2.3'
3
3
  end
@@ -4,7 +4,7 @@ require 'httpi'
4
4
 
5
5
  describe OverpassAPI::Base do
6
6
  it "should return the default endpoint" do
7
- expect(OverpassAPI::Base::DEFAULT_ENDPOINT).to eq "http://overpass-api.de/api/interpreter?data="
7
+ expect(OverpassAPI::Base::DEFAULT_ENDPOINT).to eq "http://overpass-api.de/api/interpreter"
8
8
  base = OverpassAPI::Base.new
9
9
  expect(base.instance_variable_get("@endpoint")).to eq OverpassAPI::Base::DEFAULT_ENDPOINT
10
10
  end
@@ -67,7 +67,7 @@ describe OverpassAPI::Base do
67
67
  request = "a request"
68
68
  body = {key: "value"}
69
69
 
70
- url = URI::encode("#{OverpassAPI::Base::DEFAULT_ENDPOINT}#{query}")
70
+ url = URI::encode("#{OverpassAPI::Base::DEFAULT_ENDPOINT}?data=#{query}")
71
71
 
72
72
  allow(HTTPI::Request).to receive(:new).and_return(request)
73
73
  expect(HTTPI::Request).to receive(:new).with(url)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: overpass-api-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bruno Salerno
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-28 00:00:00.000000000 Z
11
+ date: 2017-06-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httpi