touringplans 0.2.6 → 0.2.8
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 +4 -4
- data/.version +1 -1
- data/lib/touringplans/version.rb +1 -1
- data/lib/touringplans.rb +8 -2
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 18bdc82546dc61c15dedbeea0caa0c42d9337d98c19cd090f92aae6ee04bfa82
|
|
4
|
+
data.tar.gz: c8ac7e30d3b70db10ecbf5d9b36b9b893ab594459a193754d4e605567f1a8c1c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e2f3c1221c397553267e76725e270ec4643c0ba0642b2d59809b07e82c3a9d10cb33af39a441092f43b425f1c2a75a8628419065d031abe0a83c7f8bf406d7dd
|
|
7
|
+
data.tar.gz: 4b5f1dbb102c6391540c1354cfaea06fdc2750824f3ae5815f591645c0a242ac8d106aaef9752f73097b4274d79459474139a63810eed56171719aea27ece75d
|
data/.version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.2.
|
|
1
|
+
0.2.8
|
data/lib/touringplans/version.rb
CHANGED
data/lib/touringplans.rb
CHANGED
|
@@ -12,6 +12,8 @@ module Touringplans
|
|
|
12
12
|
include Dry.Types()
|
|
13
13
|
end
|
|
14
14
|
|
|
15
|
+
GEM_ROOT = File.expand_path("../", __FILE__)
|
|
16
|
+
|
|
15
17
|
include HTTParty
|
|
16
18
|
# currently Touring Plans has no verision in its API
|
|
17
19
|
DEFAULT_API_VERSION = "1"
|
|
@@ -209,8 +211,12 @@ module Touringplans
|
|
|
209
211
|
}
|
|
210
212
|
end
|
|
211
213
|
|
|
212
|
-
def self.load_routes_file(
|
|
213
|
-
|
|
214
|
+
def self.load_routes_file(routes_relative_file_path: "/lib/routes.yml")
|
|
215
|
+
tp_path = $LOAD_PATH.grep(/touringplans/).first.split("/")
|
|
216
|
+
tp_path.reject! {|k| k=="spec"}
|
|
217
|
+
tp_path.pop
|
|
218
|
+
tp_path = tp_path.join("/")
|
|
219
|
+
routes_file = "#{tp_path}#{routes_relative_file_path}"
|
|
214
220
|
YAML.load(File.read(routes_file))
|
|
215
221
|
end
|
|
216
222
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: touringplans
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- captproton
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-10-
|
|
11
|
+
date: 2021-10-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: awesome_print
|