overpass-api-ruby 0.1.2 → 0.1.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: 0321725e5dde46a85b82a0488558e5c1b28f81ed
4
- data.tar.gz: 241205cb3c4e3b909e4b92465ca2802e2eeb69ac
3
+ metadata.gz: c355abcbae641e6d2cc0e3294c805c356f8457fe
4
+ data.tar.gz: a544c96a81dd680fdc95e686f791e866aee603ec
5
5
  SHA512:
6
- metadata.gz: 587a327ac7a2340901fe18d01b245ba119c84b8b9ed9086959192283726cf28919fddcd9bc0256e4ecf6ca5f00b05e0df8ac95c4aa2b4a05b2a5bfdbe884c677
7
- data.tar.gz: cd2211b3838ff9d8440aae1849f7f53e9c8e27ab5bbb9aa004bb9b49eb2ba0e6ac68d97ec705464330613eddfe5207fc24bbc17287cad36f0503bccc645d78b9
6
+ metadata.gz: 6a700aca42928b8c93c53925bc4f4388631842ebb3a36e18b73b4dc521b1c808c228b2d221bc30524fb39e62d13f7e3c540160d8ec39683b5c3892b1bbcadf60
7
+ data.tar.gz: 9876dbd16aeebcd5eda9fed794ced6effd0f3e5266e2641f6fd2ae17051d94b8e2b1a059bc6a1a65207bd8da8599205c2600f194d18539adc7d3bb7861e64dbf
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --require spec_helper
data/Gemfile CHANGED
@@ -1,6 +1,3 @@
1
1
  source "https://rubygems.org/"
2
2
 
3
- gem 'httpi', "~> 1.1.0"
4
- gem 'pry-debugger'
5
- gem 'diskcached'
6
- gem 'nokogiri'
3
+ gemspec
@@ -1,36 +1,53 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ overpass-api-ruby (0.1.3)
5
+ diskcached
6
+ httpi (~> 2.4.0)
7
+ nokogiri
8
+
1
9
  GEM
2
10
  remote: https://rubygems.org/
3
11
  specs:
4
12
  coderay (1.1.0)
5
- columnize (0.9.0)
6
- debugger (1.6.8)
7
- columnize (>= 0.3.1)
8
- debugger-linecache (~> 1.2.0)
9
- debugger-ruby_core_source (~> 1.3.5)
10
- debugger-linecache (1.2.0)
11
- debugger-ruby_core_source (1.3.7)
12
- diskcached (1.1.0)
13
- httpi (1.1.1)
13
+ diff-lcs (1.2.5)
14
+ diskcached (1.1.2)
15
+ httpi (2.4.1)
14
16
  rack
15
17
  method_source (0.8.2)
16
18
  mini_portile (0.6.2)
17
- nokogiri (1.6.5)
19
+ nokogiri (1.6.6.2)
18
20
  mini_portile (~> 0.6.0)
19
21
  pry (0.10.1)
20
22
  coderay (~> 1.1.0)
21
23
  method_source (~> 0.8.1)
22
24
  slop (~> 3.4)
23
- pry-debugger (0.2.3)
24
- debugger (~> 1.3)
25
- pry (>= 0.9.10, < 0.11.0)
26
- rack (1.6.0)
25
+ rack (1.6.4)
26
+ rake (10.4.2)
27
+ rspec (3.3.0)
28
+ rspec-core (~> 3.3.0)
29
+ rspec-expectations (~> 3.3.0)
30
+ rspec-mocks (~> 3.3.0)
31
+ rspec-core (3.3.2)
32
+ rspec-support (~> 3.3.0)
33
+ rspec-expectations (3.3.1)
34
+ diff-lcs (>= 1.2.0, < 2.0)
35
+ rspec-support (~> 3.3.0)
36
+ rspec-mocks (3.3.2)
37
+ diff-lcs (>= 1.2.0, < 2.0)
38
+ rspec-support (~> 3.3.0)
39
+ rspec-support (3.3.0)
27
40
  slop (3.6.0)
28
41
 
29
42
  PLATFORMS
30
43
  ruby
31
44
 
32
45
  DEPENDENCIES
33
- diskcached
34
- httpi (~> 1.1.0)
35
- nokogiri
36
- pry-debugger
46
+ bundler (~> 1.3)
47
+ overpass-api-ruby!
48
+ pry
49
+ rake
50
+ rspec (>= 3)
51
+
52
+ BUNDLED WITH
53
+ 1.10.6
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env rake
2
+ require 'bundler/gem_tasks'
3
+
4
+ require 'rake'
5
+ require 'rspec/core/rake_task'
6
+
7
+ desc 'Run all examples'
8
+ RSpec::Core::RakeTask.new(:spec) do |t|
9
+ t.rspec_opts = %w(--color --warnings)
10
+ end
11
+
12
+ task default: [:spec]
@@ -5,7 +5,7 @@ require 'json'
5
5
  require 'nokogiri'
6
6
 
7
7
  class OverpassAPI
8
- VERSION='0.1.2'
8
+ VERSION='0.1.3'
9
9
  DEFAULT_ENDPOINT='http://overpass-api.de/api/interpreter?data='
10
10
 
11
11
  def initialize(args={})
@@ -18,11 +18,12 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_runtime_dependency "httpi", "~> 1.1.0"
21
+ spec.add_runtime_dependency "httpi", "~> 2.4.0"
22
22
  spec.add_runtime_dependency "diskcached"
23
23
  spec.add_runtime_dependency "nokogiri"
24
24
 
25
25
  spec.add_development_dependency "bundler", "~> 1.3"
26
26
  spec.add_development_dependency "rake"
27
- spec.add_development_dependency "pry-debugger"
27
+ spec.add_development_dependency "pry"
28
+ spec.add_development_dependency("rspec", ">= 3")
28
29
  end
@@ -0,0 +1,19 @@
1
+ require 'spec_helper'
2
+ require 'overpass_api_ruby'
3
+
4
+ describe OverpassAPI do
5
+ it "'s example works" do
6
+
7
+ ba_query = "<union><query type='relation'><has-kv k='route' v='subway'/></query>" <<
8
+ "</union><union><item/><recurse type='down'/></union>"
9
+
10
+ options={:bbox => {:s => -34.705448, :n => -34.526562,
11
+ :w => -58.531471, :e => -58.335159},
12
+ :timeout => 900,
13
+ :element_limit => 1,
14
+ :json => true}
15
+
16
+ overpass = OverpassAPI.new(options)
17
+ expect(overpass.query(ba_query)).to be_a(Array)
18
+ end
19
+ end
@@ -0,0 +1,96 @@
1
+ # This file was generated by the `rspec --init` command. Conventionally, all
2
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
3
+ # The generated `.rspec` file contains `--require spec_helper` which will cause
4
+ # this file to always be loaded, without a need to explicitly require it in any
5
+ # files.
6
+ #
7
+ # Given that it is always loaded, you are encouraged to keep this file as
8
+ # light-weight as possible. Requiring heavyweight dependencies from this file
9
+ # will add to the boot time of your test suite on EVERY test run, even for an
10
+ # individual file that may not need all of that loaded. Instead, consider making
11
+ # a separate helper file that requires the additional dependencies and performs
12
+ # the additional setup, and require it from the spec files that actually need
13
+ # it.
14
+ #
15
+ # The `.rspec` file also contains a few flags that are not defaults but that
16
+ # users commonly want.
17
+ #
18
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
19
+ RSpec.configure do |config|
20
+ # rspec-expectations config goes here. You can use an alternate
21
+ # assertion/expectation library such as wrong or the stdlib/minitest
22
+ # assertions if you prefer.
23
+ config.expect_with :rspec do |expectations|
24
+ # This option will default to `true` in RSpec 4. It makes the `description`
25
+ # and `failure_message` of custom matchers include text for helper methods
26
+ # defined using `chain`, e.g.:
27
+ # be_bigger_than(2).and_smaller_than(4).description
28
+ # # => "be bigger than 2 and smaller than 4"
29
+ # ...rather than:
30
+ # # => "be bigger than 2"
31
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
32
+ end
33
+
34
+ # rspec-mocks config goes here. You can use an alternate test double
35
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
36
+ config.mock_with :rspec do |mocks|
37
+ # Prevents you from mocking or stubbing a method that does not exist on
38
+ # a real object. This is generally recommended, and will default to
39
+ # `true` in RSpec 4.
40
+ mocks.verify_partial_doubles = true
41
+ end
42
+
43
+ # The settings below are suggested to provide a good initial experience
44
+ # with RSpec, but feel free to customize to your heart's content.
45
+ =begin
46
+ # These two settings work together to allow you to limit a spec run
47
+ # to individual examples or groups you care about by tagging them with
48
+ # `:focus` metadata. When nothing is tagged with `:focus`, all examples
49
+ # get run.
50
+ config.filter_run :focus
51
+ config.run_all_when_everything_filtered = true
52
+
53
+ # Allows RSpec to persist some state between runs in order to support
54
+ # the `--only-failures` and `--next-failure` CLI options. We recommend
55
+ # you configure your source control system to ignore this file.
56
+ config.example_status_persistence_file_path = "spec/examples.txt"
57
+
58
+ # Limits the available syntax to the non-monkey patched syntax that is
59
+ # recommended. For more details, see:
60
+ # - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
61
+ # - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
62
+ # - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching
63
+ config.disable_monkey_patching!
64
+
65
+ # This setting enables warnings. It's recommended, but in some cases may
66
+ # be too noisy due to issues in dependencies.
67
+ config.warnings = true
68
+
69
+ # Many RSpec users commonly either run the entire suite or an individual
70
+ # file, and it's useful to allow more verbose output when running an
71
+ # individual spec file.
72
+ if config.files_to_run.one?
73
+ # Use the documentation formatter for detailed output,
74
+ # unless a formatter has already been configured
75
+ # (e.g. via a command-line flag).
76
+ config.default_formatter = 'doc'
77
+ end
78
+
79
+ # Print the 10 slowest examples and example groups at the
80
+ # end of the spec run, to help surface which specs are running
81
+ # particularly slow.
82
+ config.profile_examples = 10
83
+
84
+ # Run specs in random order to surface order dependencies. If you find an
85
+ # order dependency and want to debug it, you can fix the order by providing
86
+ # the seed, which is printed after each run.
87
+ # --seed 1234
88
+ config.order = :random
89
+
90
+ # Seed global randomization in this process using the `--seed` CLI option.
91
+ # Setting this allows you to use `--seed` to deterministically reproduce
92
+ # test failures related to randomization by passing the same `--seed` value
93
+ # as the one that triggered the failure.
94
+ Kernel.srand config.seed
95
+ =end
96
+ end
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.1.2
4
+ version: 0.1.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: 2015-07-31 00:00:00.000000000 Z
11
+ date: 2015-08-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httpi
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.1.0
19
+ version: 2.4.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 1.1.0
26
+ version: 2.4.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: diskcached
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -81,7 +81,7 @@ dependencies:
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
- name: pry-debugger
84
+ name: pry
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - ">="
@@ -94,6 +94,20 @@ dependencies:
94
94
  - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: rspec
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '3'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '3'
97
111
  description: A Ruby wrapper for OpenStreetMap Overpass API
98
112
  email:
99
113
  - br.salerno@gmail.com
@@ -102,12 +116,16 @@ extensions: []
102
116
  extra_rdoc_files: []
103
117
  files:
104
118
  - ".gitignore"
119
+ - ".rspec"
105
120
  - Gemfile
106
121
  - Gemfile.lock
107
122
  - LICENSE
108
123
  - README.md
124
+ - Rakefile
109
125
  - lib/overpass_api_ruby.rb
110
126
  - overpass-api-ruby.gemspec
127
+ - spec/overpass_api_ruby_spec.rb
128
+ - spec/spec_helper.rb
111
129
  homepage: https://github.com/BrunoSalerno/overpass-api-ruby
112
130
  licenses:
113
131
  - MIT
@@ -132,4 +150,6 @@ rubygems_version: 2.2.2
132
150
  signing_key:
133
151
  specification_version: 4
134
152
  summary: Returns a Hash from a query
135
- test_files: []
153
+ test_files:
154
+ - spec/overpass_api_ruby_spec.rb
155
+ - spec/spec_helper.rb