yaml_ref 0.1.3 → 0.1.4

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: 34b893abd750af2529919c6548200f4fe20348304b8c87dd0dac9947b1315772
4
- data.tar.gz: 74e9c07d4918d09f91d998bff961c737080912483b9d757743521a41ceffd66b
3
+ metadata.gz: 65b56b997945b1d4e4b1819d17b593634d0b4b27f505a47371edef92813d8d79
4
+ data.tar.gz: '088919053f3c1e13a17d6d56572bb3a58c6ad4fc559b1478e6e3e7042e4509b4'
5
5
  SHA512:
6
- metadata.gz: 74fffa8fd4bac915d18518eb655235c7cc0662e76bf4ff2cab5aec7b10cd72c4c7cbeb4d69352aa76cdefa99cb839e88d435ef8ea42f5ad633c6a1e0f2c5161f
7
- data.tar.gz: 5997e1a568fb4582d11041237a9b667fa5db8b9fc4452a01f7a587c2c34caf5b849210fb5591b915f997a7717e40f0182a4b0d4a1dd7c7036202386c6d5617c7
6
+ metadata.gz: a0c01613f1cc8e07e75b8bbbefd24d813fee593c010c2cda2d331292c3bebd30bb83b98b6eeadc598f829a55db6265d94dcd84fbd45ee9eeef4093d346822747
7
+ data.tar.gz: f71282fcbb2c98df1f2f4c4fa5edc57da7b4bf11eed4e11a471aaf9a5aff0b1fcca9ac8cd25907a51604cea09730eff534676aff6b7dad1e733293a053ed01dc
data/README.md CHANGED
@@ -34,11 +34,11 @@ It has the following effects:
34
34
  gem:
35
35
  name: YamlRef
36
36
  information:
37
- $ref: '../information.yml'
37
+ $ref: './information.yml'
38
38
  license:
39
39
  $ref: '#/schema/MIT'
40
40
  releases:
41
- - $ref: '../releases/0_0_1.yml'
41
+ - $ref: './releases/0_0_1.yml'
42
42
  ```
43
43
 
44
44
  ```yaml
data/lib/yaml_ref.rb CHANGED
@@ -88,6 +88,7 @@ module YamlRef
88
88
  end
89
89
 
90
90
  def file_ref(filepath, refpath)
91
+ filepath = File.dirname(filepath) unless File.directory?(filepath)
91
92
  path = File.expand_path(File.join(@ref_home || filepath, refpath))
92
93
  raise(Error, <<~MESSAGE) unless File.exist?(path)
93
94
  No such yml file -- #{path}
@@ -1,3 +1,3 @@
1
1
  module YamlRef
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yaml_ref
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - atomiyama
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-02-19 00:00:00.000000000 Z
11
+ date: 2020-02-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry