osm 1.3.5 → 1.3.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +4 -1
- data/UNSUPPORTED.md +22 -0
- data/lib/osm/api.rb +8 -1
- data/spec/osm/api_spec.rb +5 -0
- data/spec/spec_helper.rb +2 -1
- data/version.rb +2 -2
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: de944e799944f2224443c581abf8055e0de057e711f16e0d5caaab6a3112e055
|
4
|
+
data.tar.gz: 641523cb53513ba158f46ee9f451c616b425853217daae3d3232255f1debd50a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 01e7e3484bb55078609f242e8c5d4382bf7af025b7160f7b31d33ad8ced0545bb07b591f2991808ae6a5c03527b976598a863a68738fc0fb91b57a996511b030
|
7
|
+
data.tar.gz: 7b6f1071a85cd1bf688841a0eec8e9f4abe2e64b770f54f4e32af3b498cc5788899ca169ce076b9274679a5fe0141a12ee1a16a5cf28c3f7dac251d1ff762fa2
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
# UNSUPPORTED!
|
2
|
+
**This gem is no longer supported, see [UNSUPPORTED.md](UNSUPPORTED.md).**
|
3
|
+
|
1
4
|
[![Gem Version](https://badge.fury.io/rb/osm.png)](http://badge.fury.io/rb/osm)
|
2
5
|
|
3
6
|
Master branch:
|
@@ -11,7 +14,7 @@ Staging branch:
|
|
11
14
|
[![Code Climate](https://codeclimate.com/github/robertgauld/osm.png?branch=staging)](https://codeclimate.com/github/robertgauld/osm)
|
12
15
|
|
13
16
|
|
14
|
-
##Build State
|
17
|
+
## Build State
|
15
18
|
This project uses continuous integration to help ensure that a quality product is delivered.
|
16
19
|
Travis CI monitors two branches (versions) of the code - Master (which is what gets released)
|
17
20
|
and Staging (which is what is currently being developed ready for moving to master).
|
data/UNSUPPORTED.md
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
# OSM GEM WILL BE UNSUPPORTED AFTER 4th NOVEMBER 2019
|
2
|
+
|
3
|
+
After much annoyance at seeing how society is still insisting that STEM is not girly and consequences that has
|
4
|
+
on Brownie aged girls I’ve decided to do something about it. In order to get the time I need I’m leaving Scouting
|
5
|
+
(after almost 20 years so whilst this is a positive decision for me it is still big enough that I’ve not taken it
|
6
|
+
lightly). Since that means I will no longer be routinely using OSM or legitimately having access to any live
|
7
|
+
sections in OSM I feel that future development/maintenance of OSM Extender is not something that I can in good
|
8
|
+
conscious continue to commit to.
|
9
|
+
|
10
|
+
In the absence of anyone coming forward to pick up the baton, in which case I'll update you again by updating
|
11
|
+
this file and requiring you to change the value of the :i_know argument passed when configuring the API class.
|
12
|
+
|
13
|
+
OSM gem will be available but unsupported after the 4th of November 2019.
|
14
|
+
|
15
|
+
You will be required to acknowledge this message by adding **i_know: :unsupported** to either:
|
16
|
+
* the arguments passed to Osm::Api.configure
|
17
|
+
* the hash passed as the :api argument to Osm.configure
|
18
|
+
|
19
|
+
# OSM Gem will only receive urgent security/bug fixes until then!
|
20
|
+
|
21
|
+
If a security issue arises before then it will be fixed and a new version pushed as normal.
|
22
|
+
However only important bugs will be fixed.
|
data/lib/osm/api.rb
CHANGED
@@ -31,14 +31,21 @@ module Osm
|
|
31
31
|
# @option options [Boolean] :debug if true debugging info is output (optional, default = false)
|
32
32
|
# @return nil
|
33
33
|
def self.configure(options)
|
34
|
+
unless options[:i_know].eql?(:unsupported)
|
35
|
+
raise Osm::Error, 'The OSM gem is now unsupported. ' \
|
36
|
+
'To continue using it append "i_know: :unsupported" to your passed options. ' \
|
37
|
+
"See #{File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'UNSUPPORTED.md'))} for more details."
|
38
|
+
end
|
39
|
+
|
34
40
|
raise ArgumentError, ':default_site does not exist in options hash or is invalid, this should be set to either :osm or :ogm' unless Osm::Api::BASE_URLS.keys.include?(options[:default_site])
|
35
41
|
raise ArgumentError, ":#{options[:default_site]} does not exist in options hash" if options[options[:default_site]].nil?
|
42
|
+
|
36
43
|
Osm::Api::BASE_URLS.keys.each do |api_key|
|
37
44
|
if options[api_key]
|
38
45
|
api_data = options[api_key]
|
39
46
|
raise ArgumentError, ":#{api_key} must be a Hash" unless api_data.is_a?(Hash)
|
40
47
|
[:id, :token, :name].each do |key|
|
41
|
-
raise ArgumentError, ":#{api_key} must contain a key :#{key}"
|
48
|
+
raise ArgumentError, ":#{api_key} must contain a key :#{key}" unless api_data.key?(key)
|
42
49
|
end
|
43
50
|
end
|
44
51
|
end
|
data/spec/osm/api_spec.rb
CHANGED
@@ -10,6 +10,11 @@ describe "API" do
|
|
10
10
|
@api.api_name.should == @CONFIGURATION[:api][:osm][:name]
|
11
11
|
end
|
12
12
|
|
13
|
+
it "Raises errors on trying to configure if abandonment is not acknowledged" do
|
14
|
+
expect { Osm::Api.configure default_site: :osm, osm: { id: nil, token: nil, name: nil } }
|
15
|
+
.to raise_error Osm::Error, /^The OSM gem is now unsupported. To continue using it append "i_know: :unsupported" to your passed options. See .+ for more details.$/
|
16
|
+
end
|
17
|
+
|
13
18
|
it "Raises errors on bad arguments to configure" do
|
14
19
|
expect{ Osm::Api.configure(@CONFIGURATION[:api].select{ |k,v| (k != :default_site)}) }.to raise_error(ArgumentError, ':default_site does not exist in options hash or is invalid, this should be set to either :osm or :ogm')
|
15
20
|
expect{ Osm::Api.configure(@CONFIGURATION[:api].merge(:default_site => :invalid)) }.to raise_error(ArgumentError, ':default_site does not exist in options hash or is invalid, this should be set to either :osm or :ogm')
|
data/spec/spec_helper.rb
CHANGED
@@ -57,13 +57,14 @@ RSpec.configure do |config|
|
|
57
57
|
:token => 'API TOKEN 2',
|
58
58
|
:name => 'API NAME 2',
|
59
59
|
},
|
60
|
+
:i_know => :unsupported
|
60
61
|
},
|
61
62
|
:cache => {
|
62
63
|
:cache => OsmTest::Cache,
|
63
64
|
},
|
64
65
|
}
|
65
66
|
Osm::configure(@CONFIGURATION)
|
66
|
-
|
67
|
+
|
67
68
|
@api = Osm::Api.new('user_id', 'secret')
|
68
69
|
Osm::Model.stub(:require_ability_to).and_return(nil)
|
69
70
|
Osm::Model.stub(:require_access_to_section).and_return(nil)
|
data/version.rb
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
module Osm
|
2
|
-
VERSION = '1.3.
|
3
|
-
end
|
2
|
+
VERSION = '1.3.6'
|
3
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: osm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Gauld
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-07-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -233,6 +233,7 @@ files:
|
|
233
233
|
- LICENSE.rdoc
|
234
234
|
- README.md
|
235
235
|
- Rakefile
|
236
|
+
- UNSUPPORTED.md
|
236
237
|
- gemfiles/rails3
|
237
238
|
- gemfiles/rails4
|
238
239
|
- gemfiles/rails5
|