touringplans 0.2.6 → 0.2.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 73b59b67226a12fe4d77223e9068c45928359062571a0c0571a769a6b22c3df2
4
- data.tar.gz: 40253a1085b837c4a99bec95d70ce9f79c75f189f3461acd463ad7edce8d9307
3
+ metadata.gz: 18bdc82546dc61c15dedbeea0caa0c42d9337d98c19cd090f92aae6ee04bfa82
4
+ data.tar.gz: c8ac7e30d3b70db10ecbf5d9b36b9b893ab594459a193754d4e605567f1a8c1c
5
5
  SHA512:
6
- metadata.gz: 605df55c3dc98501e5892af6e9b3a6ec6d02a95048973fae82b66c80ba2626e93f4dd2253dd1f2a1db5388b84ed9785a5ca9270fb327f01adf728cd39c738921
7
- data.tar.gz: 86e2240776b188df0128d40cfc4ef9ddb108ea609bc91a0f4493fc4cfc0cd8ce09b7746ee9f3eb8e3d6bf3526163143bae2249412d5d94e15363f2142b3e1787
6
+ metadata.gz: e2f3c1221c397553267e76725e270ec4643c0ba0642b2d59809b07e82c3a9d10cb33af39a441092f43b425f1c2a75a8628419065d031abe0a83c7f8bf406d7dd
7
+ data.tar.gz: 4b5f1dbb102c6391540c1354cfaea06fdc2750824f3ae5815f591645c0a242ac8d106aaef9752f73097b4274d79459474139a63810eed56171719aea27ece75d
data/.version CHANGED
@@ -1 +1 @@
1
- 0.2.6
1
+ 0.2.8
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Touringplans
4
- VERSION = "0.2.6"
4
+ VERSION = "0.2.8"
5
5
  end
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(relative_file_path: "/lib/routes.yml")
213
- routes_file = FileUtils.getwd() + relative_file_path
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.6
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-13 00:00:00.000000000 Z
11
+ date: 2021-10-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: awesome_print