open_street_map 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +8 -3
- data/.ruby-version +1 -1
- data/lib/open_street_map/client/request.rb +3 -2
- data/lib/open_street_map/client.rb +4 -3
- data/lib/open_street_map/version.rb +3 -1
- data/lib/open_street_map.rb +2 -1
- data/open_street_map.gemspec +4 -3
- metadata +16 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a1e278a717dae481c5901268fcee1bfd6cd17c44050b4824cbdd66924a86e16
|
4
|
+
data.tar.gz: 345103fee4f35f4faf91f0143cd291753bcdff202330eb1e8591f0921499c395
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b7790f5a3607598f33db9946c73e2a60b7e91a57026f41e51d49312643f9cbe09b35ea3ecf0c1ad233696b2e16a82cef1fcdb703cc93f044845512c10f73e5b1
|
7
|
+
data.tar.gz: 4217e529692d22ba661cc5cc97e5fec57c0304738d6c0cfad6aff0360b8484c52008b7dd5587b60c485daa259bf9340725a778e55bd717aeb287a3752817c4dd
|
data/.rubocop.yml
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
AllCops:
|
2
2
|
Exclude:
|
3
3
|
- bin/*
|
4
|
+
NewCops: enable
|
4
5
|
TargetRubyVersion: 2.5.0
|
5
6
|
|
6
7
|
Metrics/AbcSize:
|
@@ -12,7 +13,7 @@ Metrics/BlockLength:
|
|
12
13
|
Metrics/ClassLength:
|
13
14
|
Enabled: false
|
14
15
|
|
15
|
-
|
16
|
+
Layout/LineLength:
|
16
17
|
Enabled: false
|
17
18
|
|
18
19
|
Metrics/MethodLength:
|
@@ -34,8 +35,9 @@ Layout/CaseIndentation:
|
|
34
35
|
- end
|
35
36
|
IndentOneStep: true
|
36
37
|
|
37
|
-
Layout/
|
38
|
-
|
38
|
+
Layout/HashAlignment:
|
39
|
+
EnforcedHashRocketStyle: table
|
40
|
+
EnforcedColonStyle: table
|
39
41
|
|
40
42
|
Style/GuardClause:
|
41
43
|
Enabled: false
|
@@ -54,3 +56,6 @@ Style/FrozenStringLiteralComment:
|
|
54
56
|
|
55
57
|
Style/RescueStandardError:
|
56
58
|
Enabled: false
|
59
|
+
|
60
|
+
Style/Documentation:
|
61
|
+
Enabled: false
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
ruby-3.0.2
|
@@ -1,6 +1,7 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module OpenStreetMap
|
2
4
|
class Client
|
3
|
-
# methods for request
|
4
5
|
module Request
|
5
6
|
private
|
6
7
|
|
@@ -13,7 +14,7 @@ module OpenStreetMap
|
|
13
14
|
|
14
15
|
# generate body from args
|
15
16
|
def generate_body(type, args)
|
16
|
-
args['accept-language'
|
17
|
+
args[:'accept-language'] = args[:accept_language] if args.key?(:accept_language)
|
17
18
|
args.select { |key, _| valid_args(type).include?(key) }
|
18
19
|
end
|
19
20
|
|
@@ -1,14 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'httparty'
|
2
4
|
require_relative 'client/request'
|
3
5
|
|
4
6
|
module OpenStreetMap
|
5
|
-
# Client requests
|
6
7
|
class Client
|
7
8
|
include HTTParty
|
8
9
|
include OpenStreetMap::Client::Request
|
9
10
|
|
10
|
-
BASE_URI = 'https://nominatim.openstreetmap.org/'
|
11
|
-
DEFAULT_USER_AGENT = "webgents/open_street_map_gem_#{SecureRandom.urlsafe_base64}"
|
11
|
+
BASE_URI = 'https://nominatim.openstreetmap.org/'
|
12
|
+
DEFAULT_USER_AGENT = "webgents/open_street_map_gem_#{SecureRandom.urlsafe_base64}"
|
12
13
|
|
13
14
|
# Search objects by query
|
14
15
|
def search(args = {})
|
data/lib/open_street_map.rb
CHANGED
data/open_street_map.gemspec
CHANGED
@@ -7,6 +7,7 @@ Gem::Specification.new do |spec|
|
|
7
7
|
spec.version = OpenStreetMap::VERSION
|
8
8
|
spec.authors = ['JungleCoders', 'Anton Bogdanov']
|
9
9
|
spec.email = ['kortirso@gmail.com']
|
10
|
+
spec.metadata['rubygems_mfa_required'] = 'true'
|
10
11
|
|
11
12
|
spec.summary = 'OpenStrretMap API'
|
12
13
|
spec.description = 'Integration with OpenStreetMap API'
|
@@ -22,9 +23,9 @@ Gem::Specification.new do |spec|
|
|
22
23
|
|
23
24
|
spec.required_ruby_version = '>= 2.5.1'
|
24
25
|
|
25
|
-
spec.add_development_dependency 'bundler', '
|
26
|
+
spec.add_development_dependency 'bundler', '>= 2.2.33'
|
26
27
|
spec.add_development_dependency 'rake', '~> 13.0'
|
27
|
-
spec.add_development_dependency 'rspec', '~> 3.
|
28
|
-
spec.add_development_dependency 'rubocop', '~>
|
28
|
+
spec.add_development_dependency 'rspec', '~> 3.10'
|
29
|
+
spec.add_development_dependency 'rubocop', '~> 1.23'
|
29
30
|
spec.add_dependency 'httparty', '~> 0.17'
|
30
31
|
end
|
metadata
CHANGED
@@ -1,30 +1,30 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: open_street_map
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- JungleCoders
|
8
8
|
- Anton Bogdanov
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2021-12-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- - "
|
18
|
+
- - ">="
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version:
|
20
|
+
version: 2.2.33
|
21
21
|
type: :development
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
|
-
- - "
|
25
|
+
- - ">="
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version:
|
27
|
+
version: 2.2.33
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: rake
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
@@ -45,28 +45,28 @@ dependencies:
|
|
45
45
|
requirements:
|
46
46
|
- - "~>"
|
47
47
|
- !ruby/object:Gem::Version
|
48
|
-
version: '3.
|
48
|
+
version: '3.10'
|
49
49
|
type: :development
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
53
|
- - "~>"
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
version: '3.
|
55
|
+
version: '3.10'
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
57
|
name: rubocop
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
60
|
- - "~>"
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version:
|
62
|
+
version: '1.23'
|
63
63
|
type: :development
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
67
|
- - "~>"
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version:
|
69
|
+
version: '1.23'
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: httparty
|
72
72
|
requirement: !ruby/object:Gem::Requirement
|
@@ -108,8 +108,9 @@ files:
|
|
108
108
|
homepage: https://github.com/WebGents/open_street_map
|
109
109
|
licenses:
|
110
110
|
- MIT
|
111
|
-
metadata:
|
112
|
-
|
111
|
+
metadata:
|
112
|
+
rubygems_mfa_required: 'true'
|
113
|
+
post_install_message:
|
113
114
|
rdoc_options: []
|
114
115
|
require_paths:
|
115
116
|
- lib
|
@@ -124,9 +125,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
124
125
|
- !ruby/object:Gem::Version
|
125
126
|
version: '0'
|
126
127
|
requirements: []
|
127
|
-
|
128
|
-
|
129
|
-
signing_key:
|
128
|
+
rubygems_version: 3.2.22
|
129
|
+
signing_key:
|
130
130
|
specification_version: 4
|
131
131
|
summary: OpenStrretMap API
|
132
132
|
test_files: []
|