tty-config 0.5.0 → 0.5.1

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: '082839e3aab5e29ce83325a7c96c2c6ce636fde381f4dc4c39cf66309bdb10b7'
4
- data.tar.gz: c0be15cc9d7e0f211fefe9a9e6317f3076b26bfe2bff4a13eb4c0b2ce68a6174
3
+ metadata.gz: 106bc8ef14d41383dee670ba581128d5cb22492357e1a01fa7610cc9fcdf26d1
4
+ data.tar.gz: 78e5a75dff911c39eb7355b114bbc7a511123b22050b792c99936e3b337b5d5e
5
5
  SHA512:
6
- metadata.gz: fb63f5a33972507ebdc97c4986117b93085314b2a66bd0ed455c2c7bda03ff520f69eee72b72350a868e9370ab287980e34ef60a008c0dbe4917cd6cce8a26bd
7
- data.tar.gz: 88b31c1a9cc6023c9057b9ea8c7970e791d3de9c64118c8ddc0b753a48c643f5e62bd364c2089feccc40ca1977d821a5c0ab7ca6425ea7e5d69dcf04d03d43cd
6
+ metadata.gz: 7d94ee40e738070bd66ad3371df6ea6dc281fabb26d6b66c6e07988e637a352d01402081d9c6d8dd8979c9c712b3a932b93d0d178cb9e779058bfeb290ee7605
7
+ data.tar.gz: '0119ee7f6f3ecdade2606f3df3ebce8d814e3241de3d191ac6ee3cc947691981a3c03dad1f0af29657807c9fda9e08c2c2533614f406dc6511f9c9eb9858a37e'
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Change log
2
2
 
3
+ ## [v0.5.1] - 2022-02-04
4
+
5
+ ### Fixed
6
+ * Fix reading configuration from an INI file without global properties
7
+ * Fix reading an empty config file with hcl extension to return an empty hash
8
+
3
9
  ## [v0.5.0] - 2021-05-23
4
10
 
5
11
  ### Added
@@ -71,6 +77,7 @@
71
77
 
72
78
  * Initial implementation and release
73
79
 
80
+ [v0.5.1]: https://github.com/piotrmurach/tty-config/compare/v0.5.0...v0.5.1
74
81
  [v0.5.0]: https://github.com/piotrmurach/tty-config/compare/v0.4.0...v0.5.0
75
82
  [v0.4.0]: https://github.com/piotrmurach/tty-config/compare/v0.3.2...v0.4.0
76
83
  [v0.3.2]: https://github.com/piotrmurach/tty-config/compare/v0.3.1...v0.3.2
@@ -20,6 +20,8 @@ module TTY
20
20
  end
21
21
 
22
22
  def unmarshal(content)
23
+ return {} if content == ""
24
+
23
25
  Rhcl.parse(content)
24
26
  end
25
27
  end # HCLMarshaller
@@ -22,8 +22,8 @@ module TTY
22
22
 
23
23
  def unmarshal(content)
24
24
  ini = IniFile.new(content: content).to_h
25
- global = ini.delete("global")
26
- ini.merge!(global)
25
+ global = ini.delete("global") { {} }
26
+ ini.merge(global)
27
27
  end
28
28
  end # INIMarshaller
29
29
  end # Marshallers
@@ -2,6 +2,6 @@
2
2
 
3
3
  module TTY
4
4
  class Config
5
- VERSION = "0.5.0"
5
+ VERSION = "0.5.1"
6
6
  end # Config
7
7
  end # TTY
metadata CHANGED
@@ -1,99 +1,99 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tty-config
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piotr Murach
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-05-23 00:00:00.000000000 Z
11
+ date: 2022-02-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: rake
14
+ name: inifile
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: '3.0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: '3.0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: rspec
28
+ name: java-properties
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '3.0'
33
+ version: '0.3'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '3.0'
40
+ version: '0.3'
41
41
  - !ruby/object:Gem::Dependency
42
- name: toml
42
+ name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '0.2'
47
+ version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: '0.2'
54
+ version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: inifile
56
+ name: rhcl
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '3.0'
61
+ version: '0.1'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '3.0'
68
+ version: '0.1'
69
69
  - !ruby/object:Gem::Dependency
70
- name: rhcl
70
+ name: rspec
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
- version: '0.1'
75
+ version: '3.0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - "~>"
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
- version: '0.1'
82
+ version: '3.0'
83
83
  - !ruby/object:Gem::Dependency
84
- name: java-properties
84
+ name: toml
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '0.3'
89
+ version: '0.2'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '0.3'
96
+ version: '0.2'
97
97
  description: A highly customisable application configuration interface for building
98
98
  terminal tools. It supports many file formats such as YAML, JSON, TOML, INI, HCL
99
99
  and Java Properties.