easy-settings 1.4.0 → 2.0.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eca42efdc829b39b03037a8b7766c5d756ed17062184cd462293e08f76c61943
4
- data.tar.gz: 677f4d8c4873063f8d4a438dbf5b9239f0bfb845417616f7853df1a7cd7b202c
3
+ metadata.gz: 8f5d8228b932f4104213b3ed882b41634ed54a4ab912b53b7474d0aa6741303c
4
+ data.tar.gz: bff317c95c1d2bffc339bfb6a30273296a6360b9225fd04d630853ad2333fa1c
5
5
  SHA512:
6
- metadata.gz: a60e3c7d5f4d0a5d9a4bb5cf3e5676e7d53f51d6fc32976451af1ba11144ccf3bf56f5a9989926642deeeda7fb536b6b30fef5ad1d4f065a5ce19ee65ac5d36c
7
- data.tar.gz: ed13427d253fe06a620c748db20bc37f5b44ed81205fa711df30709727bea9eb40fa0d5ef4b8a91d578affa74e979860208701034fbab09a450f4463ef856849
6
+ metadata.gz: 9d1db6b7540a373a6144c195be3bcdd2052a49e7619fcc6f8d16ecbea4336de6f92de7a0d3a82880b030e2d7cd2ca23c7688cadd9f1862ffaf12844f4d104781
7
+ data.tar.gz: 5c124330fdfe363d7f74c5f4a22b3beb202d6a9e3bccd42722c5fdd6ab66274f03e38f448d30c5be4b77950db186df3e055ebf6d2236276f92ab9346edf84cf3
@@ -0,0 +1,12 @@
1
+ FROM ruby:3.4-alpine AS base
2
+
3
+ RUN apk upgrade && apk -U add \
4
+ bash \
5
+ build-base \
6
+ git
7
+
8
+ RUN addgroup --gid 1000 vscode
9
+ RUN adduser --uid 1000 vscode --ingroup vscode --disabled-password
10
+ RUN chown -R vscode:vscode /usr/local/bundle
11
+
12
+ USER vscode
@@ -0,0 +1,14 @@
1
+ {
2
+ "name": "Ruby Gem Dev Container",
3
+ "dockerFile": "Dockerfile",
4
+ "containerEnv": {
5
+ "RUBY_DEBUG_OPEN": "true"
6
+ },
7
+ "customizations": {
8
+ "vscode": {
9
+ "extensions": [
10
+ "Shopify.ruby-lsp"
11
+ ]
12
+ }
13
+ }
14
+ }
data/.gitignore CHANGED
@@ -1,6 +1,5 @@
1
1
  *.gem
2
2
  .bundle
3
- Gemfile.lock
4
3
  pkg/*
5
4
 
6
5
  .idea
data/Gemfile.lock ADDED
@@ -0,0 +1,57 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ easy-settings (2.0.0)
5
+ activesupport (~> 3.0, >= 3.0.0)
6
+
7
+ GEM
8
+ remote: http://rubygems.org/
9
+ specs:
10
+ activesupport (3.1.12)
11
+ multi_json (~> 1.0)
12
+ date (3.4.1)
13
+ debug (1.10.0)
14
+ irb (~> 1.10)
15
+ reline (>= 0.3.8)
16
+ diff-lcs (1.2.5)
17
+ io-console (0.8.0)
18
+ irb (1.15.1)
19
+ pp (>= 0.6.0)
20
+ rdoc (>= 4.0.0)
21
+ reline (>= 0.4.2)
22
+ multi_json (1.15.0)
23
+ pp (0.6.2)
24
+ prettyprint
25
+ prettyprint (0.2.0)
26
+ psych (5.2.3)
27
+ date
28
+ stringio
29
+ rdoc (6.11.0)
30
+ psych (>= 4.0.0)
31
+ reline (0.6.0)
32
+ io-console (~> 0.5)
33
+ rspec (3.4.0)
34
+ rspec-core (~> 3.4.0)
35
+ rspec-expectations (~> 3.4.0)
36
+ rspec-mocks (~> 3.4.0)
37
+ rspec-core (3.4.2)
38
+ rspec-support (~> 3.4.0)
39
+ rspec-expectations (3.4.0)
40
+ diff-lcs (>= 1.2.0, < 2.0)
41
+ rspec-support (~> 3.4.0)
42
+ rspec-mocks (3.4.1)
43
+ diff-lcs (>= 1.2.0, < 2.0)
44
+ rspec-support (~> 3.4.0)
45
+ rspec-support (3.4.1)
46
+ stringio (3.1.2)
47
+
48
+ PLATFORMS
49
+ ruby
50
+
51
+ DEPENDENCIES
52
+ debug (~> 1.10.0)
53
+ easy-settings!
54
+ rspec (~> 3.4.0)
55
+
56
+ BUNDLED WITH
57
+ 2.6.2
@@ -9,8 +9,7 @@ Gem::Specification.new do |s|
9
9
  s.authors = ["Corin Langosch"]
10
10
  s.email = ["info@corinlangosch.com"]
11
11
  s.homepage = "https://github.com/gucki/easy-settings"
12
- s.summary = %q{flexible yet easy handling of application settings}
13
- s.description = %q{flexible yet easy handling of application settings}
12
+ s.summary = %q{Flexible yet easy handling of application settings.}
14
13
 
15
14
  s.files = `git ls-files`.split("\n")
16
15
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
@@ -18,7 +17,8 @@ Gem::Specification.new do |s|
18
17
  s.require_paths = ["lib"]
19
18
 
20
19
  # specify any dependencies here; for example:
21
- s.add_development_dependency "rspec"
22
- s.add_development_dependency "byebug"
23
- s.add_runtime_dependency "activesupport", ">=3.0.0"
20
+ s.required_ruby_version = ">= 2.6"
21
+ s.add_development_dependency "rspec", "~> 3.4.0"
22
+ s.add_development_dependency "debug", "~> 1.10.0"
23
+ s.add_runtime_dependency "activesupport", "~> 3.0", ">= 3.0.0"
24
24
  end
@@ -15,7 +15,7 @@ class EasySettings::CertificateManagerSource < EasySettings::PathSource
15
15
  keys = settings_root + variable.to_s.split(separator)
16
16
 
17
17
  filenames.each do |filename, key|
18
- value = File.read("#{path}/#{filename}").strip
18
+ value = File.binread("#{path}/#{filename}").strip
19
19
  assign_value(data, keys + [key], value)
20
20
  end
21
21
  end
@@ -18,7 +18,7 @@ class EasySettings::PathSource
18
18
 
19
19
  variable = path.gsub("#{base_path}/", "")
20
20
  keys = settings_root + variable.to_s.split(separator)
21
- value = File.read(path).strip
21
+ value = File.binread(path).strip
22
22
  assign_value(data, keys, value)
23
23
  end
24
24
  end
@@ -1,3 +1,3 @@
1
1
  class EasySettings
2
- VERSION = "1.4.0"
2
+ VERSION = "2.0.1"
3
3
  end
@@ -9,7 +9,7 @@ class EasySettings::YamlSource
9
9
  end
10
10
 
11
11
  def load
12
- result = File.exist?(path) ? YAML.load(ERB.new(IO.read(path)).result) : {}
12
+ File.exist?(path) ? (YAML.load(ERB.new(IO.read(path)).result) || {}) : {}
13
13
  rescue StandardError => e
14
14
  raise "Error occurred while parsing #{path}: #{e.message}"
15
15
  end
metadata CHANGED
@@ -1,47 +1,49 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: easy-settings
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Corin Langosch
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2021-06-17 00:00:00.000000000 Z
10
+ date: 2025-01-22 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: rspec
15
14
  requirement: !ruby/object:Gem::Requirement
16
15
  requirements:
17
- - - ">="
16
+ - - "~>"
18
17
  - !ruby/object:Gem::Version
19
- version: '0'
18
+ version: 3.4.0
20
19
  type: :development
21
20
  prerelease: false
22
21
  version_requirements: !ruby/object:Gem::Requirement
23
22
  requirements:
24
- - - ">="
23
+ - - "~>"
25
24
  - !ruby/object:Gem::Version
26
- version: '0'
25
+ version: 3.4.0
27
26
  - !ruby/object:Gem::Dependency
28
- name: byebug
27
+ name: debug
29
28
  requirement: !ruby/object:Gem::Requirement
30
29
  requirements:
31
- - - ">="
30
+ - - "~>"
32
31
  - !ruby/object:Gem::Version
33
- version: '0'
32
+ version: 1.10.0
34
33
  type: :development
35
34
  prerelease: false
36
35
  version_requirements: !ruby/object:Gem::Requirement
37
36
  requirements:
38
- - - ">="
37
+ - - "~>"
39
38
  - !ruby/object:Gem::Version
40
- version: '0'
39
+ version: 1.10.0
41
40
  - !ruby/object:Gem::Dependency
42
41
  name: activesupport
43
42
  requirement: !ruby/object:Gem::Requirement
44
43
  requirements:
44
+ - - "~>"
45
+ - !ruby/object:Gem::Version
46
+ version: '3.0'
45
47
  - - ">="
46
48
  - !ruby/object:Gem::Version
47
49
  version: 3.0.0
@@ -49,19 +51,23 @@ dependencies:
49
51
  prerelease: false
50
52
  version_requirements: !ruby/object:Gem::Requirement
51
53
  requirements:
54
+ - - "~>"
55
+ - !ruby/object:Gem::Version
56
+ version: '3.0'
52
57
  - - ">="
53
58
  - !ruby/object:Gem::Version
54
59
  version: 3.0.0
55
- description: flexible yet easy handling of application settings
56
60
  email:
57
61
  - info@corinlangosch.com
58
62
  executables: []
59
63
  extensions: []
60
64
  extra_rdoc_files: []
61
65
  files:
66
+ - ".devcontainer/Dockerfile"
67
+ - ".devcontainer/devcontainer.json"
62
68
  - ".gitignore"
63
- - Dockerfile
64
69
  - Gemfile
70
+ - Gemfile.lock
65
71
  - LICENSE.txt
66
72
  - README.rdoc
67
73
  - Rakefile
@@ -81,7 +87,6 @@ homepage: https://github.com/gucki/easy-settings
81
87
  licenses:
82
88
  - MIT
83
89
  metadata: {}
84
- post_install_message:
85
90
  rdoc_options: []
86
91
  require_paths:
87
92
  - lib
@@ -89,15 +94,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
89
94
  requirements:
90
95
  - - ">="
91
96
  - !ruby/object:Gem::Version
92
- version: '0'
97
+ version: '2.6'
93
98
  required_rubygems_version: !ruby/object:Gem::Requirement
94
99
  requirements:
95
100
  - - ">="
96
101
  - !ruby/object:Gem::Version
97
102
  version: '0'
98
103
  requirements: []
99
- rubygems_version: 3.0.3
100
- signing_key:
104
+ rubygems_version: 3.6.2
101
105
  specification_version: 4
102
- summary: flexible yet easy handling of application settings
106
+ summary: Flexible yet easy handling of application settings.
103
107
  test_files: []
data/Dockerfile DELETED
@@ -1,7 +0,0 @@
1
- FROM ruby:2.6-stretch
2
-
3
- RUN groupadd --gid 1000 web && useradd --create-home --uid 1000 --gid 1000 --shell /bin/bash web
4
-
5
- WORKDIR /home/web/app
6
-
7
- USER web