dorian-yaml-compare 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/yaml-compare +4 -4
  3. metadata +6 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8b484e45d633e3480cdc0114549cbb9217d149708ab08048671fe4555a37937d
4
- data.tar.gz: a5854d191a25bafad252e0ee71bc7639f7913c4b74a1a5b68ed119cfa6f6cd7d
3
+ metadata.gz: 9664a4d8434187725060c4d9c36dfa88d0300c203d2f693297b8fa7bb1718031
4
+ data.tar.gz: 57efc4cf5a83da0a229427a1ed057622598126cfbd07cdf3c8c631ada5366289
5
5
  SHA512:
6
- metadata.gz: 5052ffdb3e9374c51917499b2fac008820432274a230903939dac5b2afd108b313ec381d1063d6200ea4f7520f42923a29ca3782648ff963c26387826e92a1eb
7
- data.tar.gz: c5f2c2550b23049eb5caa725204dd8a8ecdc242f648b213ebc38a96a56597d55d29fed6e2b83cf9718c58cf611b9381fa2d4fdb86c4b8459f719b2400d921491
6
+ metadata.gz: 83b7fbad75fefe18808cbf6a10e2ff8def397e5c10994020969126d37014272f1f5f3928a00cdec23d033df1a31fa741aba0b5b2e98562b9c594f980cb4b9f9b
7
+ data.tar.gz: 9d63be137078f91937fd2aa518b8b2e48de51a54a358773dec4138f8edda84edf99fac1c38c93ee2b089ab9d8a1dd7b54eafc5a04ac5a27b39f2c9ef39db6115
data/bin/yaml-compare CHANGED
@@ -28,10 +28,10 @@ def compare(hash1, hash2, current: "")
28
28
  end
29
29
  end
30
30
 
31
- def with_captured_stdout(&block)
31
+ def with_captured_stdout
32
32
  original_stdout = $stdout
33
33
  $stdout = StringIO.new
34
- block.call
34
+ yield
35
35
  $stdout.string
36
36
  ensure
37
37
  $stdout = original_stdout
@@ -42,10 +42,10 @@ parsed = Dorian::Arguments.parse(version: { alias: :v }, help: { alias: :h })
42
42
  abort parsed.help if parsed.options.help
43
43
 
44
44
  if parsed.options.version
45
- abort File.read(File.expand_path("../../VERSION", __FILE__))
45
+ abort File.read(File.expand_path("../VERSION", __dir__))
46
46
  end
47
47
 
48
- file1, file2 = parsed.files.map { |file| YAML.safe_load(File.read(file)) }
48
+ file1, file2 = parsed.files.map { |file| YAML.safe_load_file(file) }
49
49
  root1, root2 = parsed.arguments
50
50
  file1 = file1[root1] if root1
51
51
  file2 = file2[root2] if root2
metadata CHANGED
@@ -1,17 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dorian-yaml-compare
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dorian Marié
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-08-24 00:00:00.000000000 Z
11
+ date: 2024-08-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: yaml
14
+ name: dorian-arguments
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - ">="
@@ -25,7 +25,7 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: dorian-arguments
28
+ name: yaml
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
@@ -57,9 +57,9 @@ require_paths:
57
57
  - lib
58
58
  required_ruby_version: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - ">="
60
+ - - '='
61
61
  - !ruby/object:Gem::Version
62
- version: '0'
62
+ version: 3.3.4
63
63
  required_rubygems_version: !ruby/object:Gem::Requirement
64
64
  requirements:
65
65
  - - ">="