better_settings 1.0.0 → 1.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 +5 -5
- data/README.md +84 -42
- data/lib/better_settings.rb +7 -3
- data/lib/better_settings/version.rb +1 -1
- data/spec/better_settings/better_settings_spec.rb +25 -23
- data/spec/spec_helper.rb +3 -3
- data/spec/support/settings.rb +5 -3
- metadata +47 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 34fa70db51a53b69111e00f5a879b0b88a77bf1b8bf8f407d2e6c892396867fb
|
4
|
+
data.tar.gz: bb872caccae378615c55100c464f4eb2ddf15cd732dc7a230cb703ccb743d6c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd721daa3d8b187d4ddf15b7757e8376c92c09289dea815d3b47234d7da0fceec3acb3a55f15df1d616de3c4b637d386388499e0882e4f07c59ab1d2aff31b42
|
7
|
+
data.tar.gz: e3a8e901ae7f28b40a6c60b16266e7e4da2a32262ea88f3b9238826d0d01b8a29a058e3db713a53dd343be14853503a8d9b2c898a8aa2fe3d8bdca09484b027e
|
data/README.md
CHANGED
@@ -1,9 +1,38 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
1
|
+
<h1 align="center">
|
2
|
+
Better Settings
|
3
|
+
<p align="center">
|
4
|
+
<a href="https://github.com/ElMassimo/better_settings/actions">
|
5
|
+
<img alt="Build Status" src="https://github.com/ElMassimo/better_settings/workflows/build/badge.svg"/>
|
6
|
+
</a>
|
7
|
+
<a href="https://codeclimate.com/github/ElMassimo/better_settings">
|
8
|
+
<img alt="Maintainability" src="https://codeclimate.com/github/ElMassimo/better_settings/badges/gpa.svg"/>
|
9
|
+
</a>
|
10
|
+
<a href="https://codeclimate.com/github/ElMassimo/better_settings">
|
11
|
+
<img alt="Test Coverage" src="https://codeclimate.com/github/ElMassimo/better_settings/badges/coverage.svg"/>
|
12
|
+
</a>
|
13
|
+
<a href="https://rubygems.org/gems/better_settings">
|
14
|
+
<img alt="Gem Version" src="https://img.shields.io/gem/v/better_settings.svg?colorB=e9573f"/>
|
15
|
+
</a>
|
16
|
+
<a href="https://github.com/ElMassimo/better_settings/blob/master/LICENSE.txt">
|
17
|
+
<img alt="License" src="https://img.shields.io/badge/license-MIT-428F7E.svg"/>
|
18
|
+
</a>
|
19
|
+
</p>
|
20
|
+
</h1>
|
21
|
+
|
22
|
+
A robust settings library for Ruby. Access your settings by calling methods on a safe immutable object.
|
23
|
+
|
24
|
+
## Features ⚡️
|
25
|
+
|
26
|
+
- 🚀 __Light and Performant:__ settings are eagerly loaded, no `method_missing` tricks, no dependencies.
|
27
|
+
- 💬 __Useful Error Messages:__ when trying to access a setting that does not exist.
|
28
|
+
- 💎 __Immutability:__ once created settings can't be modified.
|
29
|
+
- 🗂 __Multiple Files:__ useful to create multiple environment-specific source files.
|
30
|
+
- ❕ __No Optional Setings:__ since it encourages unsafe access patterns.
|
31
|
+
|
32
|
+
You can read more about it in [the blog announcement](https://maximomussini.com/posts/better-settings/).
|
33
|
+
|
34
|
+
|
35
|
+
## Installation 💿
|
7
36
|
|
8
37
|
Add this line to your application's Gemfile:
|
9
38
|
|
@@ -19,12 +48,11 @@ Or install it yourself as:
|
|
19
48
|
|
20
49
|
$ gem install better_settings
|
21
50
|
|
22
|
-
|
51
|
+
## Usage 🚀
|
23
52
|
|
24
|
-
|
53
|
+
### 1. Define a class
|
25
54
|
|
26
|
-
|
27
|
-
that looks like:
|
55
|
+
Create a class in your application that extends `BetterSettings`:
|
28
56
|
|
29
57
|
```ruby
|
30
58
|
# app/models/settings.rb
|
@@ -33,12 +61,16 @@ class Settings < BetterSettings
|
|
33
61
|
end
|
34
62
|
```
|
35
63
|
|
36
|
-
|
64
|
+
We use `Rails.root` in this example to obtain an absolute path to a plain YML file,
|
65
|
+
but when using other Ruby frameworks you can use `File.expand_path` with `__dir__` instead.
|
66
|
+
|
67
|
+
Also, we specified a `namespace` with the current environment. You can provide
|
68
|
+
any value that corresponds to a key in the YAML file that you want to use.
|
69
|
+
This allows to target different environments with the same file.
|
37
70
|
|
38
|
-
|
39
|
-
Also notice above that we specified a namespace for our environment. A namespace is just an optional string that corresponds to a key in the YAML file.
|
71
|
+
### 2. Create your settings
|
40
72
|
|
41
|
-
|
73
|
+
Now, create a YAML file that contains all the possible namespaces:
|
42
74
|
|
43
75
|
```yaml
|
44
76
|
# config/application.yml
|
@@ -59,43 +91,56 @@ production:
|
|
59
91
|
<<: *defaults
|
60
92
|
```
|
61
93
|
|
62
|
-
|
94
|
+
The `defaults` group in this example won't be used directly, we are using YAML's
|
95
|
+
syntax to reuse those values when we use `<<: *defaults`, allowing us to share
|
96
|
+
these values across environments.
|
63
97
|
|
64
|
-
|
65
|
-
=> "development"
|
98
|
+
### 3. Access your settings
|
66
99
|
|
67
|
-
|
68
|
-
=> "#<Settings ... >"
|
100
|
+
You can use these settings anywhere, for example in a model:
|
69
101
|
|
70
|
-
|
71
|
-
|
102
|
+
```ruby
|
103
|
+
class Post < ActiveRecord::Base
|
104
|
+
self.per_page = Settings.pagination.posts_per_page
|
105
|
+
end
|
106
|
+
```
|
72
107
|
|
73
|
-
|
74
|
-
=> 3000
|
108
|
+
or in the console:
|
75
109
|
|
76
|
-
|
77
|
-
|
110
|
+
```
|
111
|
+
>> Rails.env
|
112
|
+
=> "development"
|
78
113
|
|
79
|
-
|
114
|
+
>> Settings.mailer
|
115
|
+
=> "#<Settings ... >"
|
80
116
|
|
81
|
-
|
82
|
-
|
83
|
-
end
|
117
|
+
>> Settings.mailer.root
|
118
|
+
=> "www.example.com
|
84
119
|
|
85
|
-
|
86
|
-
|
120
|
+
>> Settings.port
|
121
|
+
=> 3000
|
87
122
|
|
88
|
-
|
123
|
+
>> Settings.dynamic
|
124
|
+
=> "Did you know you can use ERB inside the YML file? Env is development."
|
125
|
+
```
|
126
|
+
|
127
|
+
## Advanced Setup ⚙
|
128
|
+
|
129
|
+
You can create as many setting classes as you need, and name them in different ways, and read from as many files as necessary (nested keys will be merged).
|
130
|
+
|
131
|
+
The way I like to use it, is by reading a few optional files for the _development_ and _test_ environments, which allows each developer to override some settings in their own local environment (and git ignoring `development.yml` and `test.yml`).
|
89
132
|
|
90
133
|
```ruby
|
91
134
|
# app/models/settings.rb
|
92
135
|
class Settings < BetterSettings
|
93
|
-
source Rails.root.join('config
|
94
|
-
source Rails.root.join('config
|
95
|
-
source Rails.root.join('config
|
136
|
+
source Rails.root.join('config/application.yml'), namespace: Rails.env
|
137
|
+
source Rails.root.join('config/development.yml'), namespace: Rails.env, optional: true if Rails.env.development?
|
138
|
+
source Rails.root.join('config/test.yml'), namespace: Rails.env, optional: true if Rails.env.test?
|
96
139
|
end
|
97
140
|
```
|
98
|
-
|
141
|
+
|
142
|
+
Then `application.yml` looks like this:
|
143
|
+
|
99
144
|
```yaml
|
100
145
|
# application.yml
|
101
146
|
defaults: &defaults
|
@@ -123,15 +168,12 @@ production:
|
|
123
168
|
<<: *server_defaults
|
124
169
|
host: 'example.com'
|
125
170
|
```
|
171
|
+
|
126
172
|
A developer might want to override some settings by defining a `development.yml` such as:
|
173
|
+
|
127
174
|
```yaml
|
128
175
|
development:
|
129
176
|
auto_logout: true
|
130
177
|
````
|
131
|
-
The main advantage is that those changes won't be tracked by source control :smiley:
|
132
178
|
|
133
|
-
|
134
|
-
After using [settingslogic](https://github.com/settingslogic/settingslogic) for a long time, we learned some lessons, which are distilled in the following decisions:
|
135
|
-
- __Immutability:__ Once created settings can't be modified.
|
136
|
-
- __No Optional Setings:__ Any optional setting can be modeled in a safer way, this library doesn't allow them.
|
137
|
-
- __Not Tied to a Source File:__ Useful to create multiple environment-specific files.
|
179
|
+
The main advantage is that those changes won't be tracked in source control :smiley:
|
data/lib/better_settings.rb
CHANGED
@@ -17,6 +17,7 @@ class BetterSettings
|
|
17
17
|
]
|
18
18
|
|
19
19
|
attr_reader :settings
|
20
|
+
|
20
21
|
def_delegators :settings, :to_h, :to_hash
|
21
22
|
|
22
23
|
# Public: Initializes a new settings object from a Hash or compatible object.
|
@@ -34,7 +35,6 @@ class BetterSettings
|
|
34
35
|
end
|
35
36
|
|
36
37
|
# Internal: Display explicit errors for typos and missing settings.
|
37
|
-
# rubocop:disable Style/MethodMissing
|
38
38
|
def method_missing(name, *)
|
39
39
|
raise MissingSetting, "Missing setting '#{ name }' in #{ @parent }"
|
40
40
|
end
|
@@ -53,13 +53,14 @@ private
|
|
53
53
|
# Internal: Defines a getter for the specified setting.
|
54
54
|
def create_accessor(key, value)
|
55
55
|
raise InvalidSettingKey if !key.is_a?(String) || key !~ VALID_SETTING_NAME || RESERVED_METHODS.include?(key)
|
56
|
+
|
56
57
|
instance_variable_set("@#{ key }", auto_wrap(key, value))
|
57
58
|
singleton_class.send(:attr_reader, key)
|
58
59
|
end
|
59
60
|
|
60
61
|
# Internal: Recursively merges two hashes (in case ActiveSupport is not available).
|
61
62
|
def deep_merge(this_hash, other_hash)
|
62
|
-
this_hash.merge(other_hash) do |
|
63
|
+
this_hash.merge(other_hash) do |_key, this_val, other_val|
|
63
64
|
if this_val.is_a?(Hash) && other_val.is_a?(Hash)
|
64
65
|
deep_merge(this_val, other_val)
|
65
66
|
else
|
@@ -69,6 +70,7 @@ private
|
|
69
70
|
end
|
70
71
|
|
71
72
|
class MissingSetting < StandardError; end
|
73
|
+
|
72
74
|
class InvalidSettingKey < StandardError; end
|
73
75
|
|
74
76
|
class << self
|
@@ -98,12 +100,14 @@ private
|
|
98
100
|
# Internal: Methods called at the class level are delegated to this instance.
|
99
101
|
def root_settings
|
100
102
|
raise ArgumentError, '`source` must be specified for the settings' unless defined?(@root_settings)
|
103
|
+
|
101
104
|
@root_settings
|
102
105
|
end
|
103
106
|
|
104
107
|
# Internal: Parses a yml file that can optionally use ERB templating.
|
105
108
|
def yaml_to_hash(file_name)
|
106
|
-
return {} if (content = open(file_name).read).empty?
|
109
|
+
return {} if (content = File.open(file_name).read).empty?
|
110
|
+
|
107
111
|
YAML.load(ERB.new(content).result).to_hash
|
108
112
|
end
|
109
113
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'spec_helper'
|
2
4
|
require 'support/settings'
|
3
5
|
|
@@ -6,47 +8,47 @@ describe BetterSettings do
|
|
6
8
|
Settings.new(value, parent: 'new_settings')
|
7
9
|
end
|
8
10
|
|
9
|
-
it '
|
11
|
+
it 'accesses settings' do
|
10
12
|
expect(Settings.setting2).to eq 5
|
11
13
|
end
|
12
14
|
|
13
|
-
it '
|
15
|
+
it 'accesses nested settings' do
|
14
16
|
expect(Settings.setting1.setting1_child).to eq 'saweet'
|
15
17
|
end
|
16
18
|
|
17
|
-
it '
|
19
|
+
it 'accesses settings in nested arrays' do
|
18
20
|
expect(Settings.array.first.name).to eq 'first'
|
19
21
|
end
|
20
22
|
|
21
|
-
it '
|
23
|
+
it 'accesses deep nested settings' do
|
22
24
|
expect(Settings.setting1.deep.another).to eq 'my value'
|
23
25
|
end
|
24
26
|
|
25
|
-
it '
|
27
|
+
it 'accesses extra deep nested settings' do
|
26
28
|
expect(Settings.setting1.deep.child.value).to eq 2
|
27
29
|
end
|
28
30
|
|
29
|
-
it '
|
31
|
+
it 'enables erb' do
|
30
32
|
expect(Settings.setting3).to eq 25
|
31
33
|
end
|
32
34
|
|
33
|
-
it '
|
35
|
+
it 'namespaces settings' do
|
34
36
|
expect(DevSettings.language.haskell.paradigm).to eq 'functional'
|
35
37
|
expect(DevSettings.language.smalltalk.paradigm).to eq 'object-oriented'
|
36
38
|
expect(DevSettings.environment).to eq 'development'
|
37
39
|
end
|
38
40
|
|
39
|
-
it '
|
41
|
+
it 'distinguishes nested keys' do
|
40
42
|
expect(Settings.language.haskell.paradigm).to eq 'functional'
|
41
43
|
expect(Settings.language.smalltalk.paradigm).to eq 'object oriented'
|
42
44
|
end
|
43
45
|
|
44
|
-
it '
|
46
|
+
it 'does not override global methods' do
|
45
47
|
expect(Settings.global).to eq 'GLOBAL'
|
46
48
|
expect(Settings.custom).to eq 'CUSTOM'
|
47
49
|
end
|
48
50
|
|
49
|
-
it '
|
51
|
+
it 'raises a helpful error message' do
|
50
52
|
expect {
|
51
53
|
Settings.missing
|
52
54
|
}.to raise_error(BetterSettings::MissingSetting, /Missing setting 'missing' in/)
|
@@ -55,56 +57,56 @@ describe BetterSettings do
|
|
55
57
|
}.to raise_error(BetterSettings::MissingSetting, /Missing setting 'missing' in 'language' section/)
|
56
58
|
end
|
57
59
|
|
58
|
-
it '
|
60
|
+
it 'raises an error on a nil source argument' do
|
59
61
|
expect { NoSource.foo.bar }.to raise_error(ArgumentError, '`source` must be specified for the settings')
|
60
62
|
end
|
61
63
|
|
62
|
-
it '
|
64
|
+
it 'supports instance usage as well' do
|
63
65
|
expect(new_settings(Settings.setting1).setting1_child).to eq 'saweet'
|
64
66
|
end
|
65
67
|
|
66
|
-
it '
|
68
|
+
it 'handles invalid name settings' do
|
67
69
|
expect {
|
68
70
|
new_settings('some-dash-setting#' => 'dashtastic')
|
69
71
|
}.to raise_error(BetterSettings::InvalidSettingKey)
|
70
72
|
end
|
71
73
|
|
72
|
-
it '
|
74
|
+
it 'handles settings with nil value' do
|
73
75
|
expect(Settings.nil).to eq nil
|
74
76
|
end
|
75
77
|
|
76
|
-
it '
|
78
|
+
it 'handles settings with false value' do
|
77
79
|
expect(Settings.false).to eq false
|
78
80
|
end
|
79
81
|
|
80
82
|
# If .name is called on BetterSettings itself, handle appropriately
|
81
83
|
# by delegating to Hash
|
82
|
-
it '
|
83
|
-
expect(
|
84
|
+
it 'has the parent class always respond with Module.name' do
|
85
|
+
expect(described_class.name).to eq 'BetterSettings'
|
84
86
|
end
|
85
87
|
|
86
88
|
# If .name is not a property, delegate to superclass
|
87
|
-
it '
|
89
|
+
it 'responds with Module.name' do
|
88
90
|
expect(DevSettings.name).to eq 'DevSettings'
|
89
91
|
end
|
90
92
|
|
91
93
|
# If .name is a property, respond with that instead of delegating to superclass
|
92
|
-
it '
|
94
|
+
it 'allows a name setting to be overriden' do
|
93
95
|
expect(Settings.name).to eq 'test'
|
94
96
|
end
|
95
97
|
|
96
98
|
describe 'to_h' do
|
97
|
-
it '
|
99
|
+
it 'handles empty file' do
|
98
100
|
expect(NoSettings.to_h).to be_empty
|
99
101
|
end
|
100
102
|
|
101
|
-
it '
|
103
|
+
it 'is similar to the internal representation' do
|
102
104
|
expect(settings = Settings.send(:root_settings)).to be_is_a(Settings)
|
103
105
|
expect(hash = settings.send(:settings)).to be_is_a(Hash)
|
104
106
|
expect(Settings.to_h).to eq hash
|
105
107
|
end
|
106
108
|
|
107
|
-
it '
|
109
|
+
it 'does not mutate the original when getting a copy' do
|
108
110
|
result = Settings.language.to_h.merge('haskell' => 'awesome')
|
109
111
|
expect(result.class).to eq Hash
|
110
112
|
expect(result).to eq(
|
@@ -117,7 +119,7 @@ describe BetterSettings do
|
|
117
119
|
end
|
118
120
|
|
119
121
|
describe '#to_hash' do
|
120
|
-
it '
|
122
|
+
it 'returns a new instance of a Hash object' do
|
121
123
|
expect(Settings.to_hash).to be_kind_of(Hash)
|
122
124
|
expect(Settings.to_hash.class.name).to eq 'Hash'
|
123
125
|
expect(Settings.to_hash.object_id).not_to eq Settings.object_id
|
data/spec/spec_helper.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'simplecov'
|
2
|
-
require 'coveralls'
|
3
4
|
SimpleCov.start { add_filter '/spec/' }
|
4
|
-
Coveralls.wear!
|
5
5
|
|
6
6
|
require 'better_settings'
|
7
7
|
require 'rspec/given'
|
8
|
-
require 'pry-byebug'
|
8
|
+
require 'pry-byebug' if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.5.0')
|
data/spec/support/settings.rb
CHANGED
@@ -1,6 +1,8 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
class Settings < BetterSettings
|
2
4
|
source "#{ File.dirname(__FILE__) }/settings.yml"
|
3
|
-
source "#{File.dirname(__FILE__)}/settings_empty.yml"
|
5
|
+
source "#{ File.dirname(__FILE__) }/settings_empty.yml"
|
4
6
|
|
5
7
|
def self.custom
|
6
8
|
'CUSTOM'
|
@@ -17,8 +19,8 @@ class DevSettings < BetterSettings
|
|
17
19
|
end
|
18
20
|
|
19
21
|
class NoSettings < BetterSettings
|
20
|
-
source "#{File.dirname(__FILE__)}/settings_empty.yml", optional: true
|
21
|
-
source "#{File.dirname(__FILE__)}/settings_none.yml", optional: true
|
22
|
+
source "#{ File.dirname(__FILE__) }/settings_empty.yml", optional: true
|
23
|
+
source "#{ File.dirname(__FILE__) }/settings_none.yml", optional: true
|
22
24
|
end
|
23
25
|
|
24
26
|
class NoSource < BetterSettings
|
metadata
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: better_settings
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Máximo Mussini
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-02-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: pry-byebug
|
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:
|
28
|
+
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
@@ -39,7 +39,21 @@ dependencies:
|
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: rspec-given
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rubocop
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
44
58
|
requirements:
|
45
59
|
- - ">="
|
@@ -53,21 +67,35 @@ dependencies:
|
|
53
67
|
- !ruby/object:Gem::Version
|
54
68
|
version: '0'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
|
-
name: rspec
|
70
|
+
name: rubocop-rspec
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
58
72
|
requirements:
|
59
|
-
- - "
|
73
|
+
- - ">="
|
60
74
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
75
|
+
version: '0'
|
62
76
|
type: :development
|
63
77
|
prerelease: false
|
64
78
|
version_requirements: !ruby/object:Gem::Requirement
|
65
79
|
requirements:
|
66
|
-
- - "
|
80
|
+
- - ">="
|
67
81
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
69
|
-
|
70
|
-
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: simplecov
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "<"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0.18'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "<"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0.18'
|
97
|
+
description: Settings solution for Ruby or Rails applications that can read ERB-enabled
|
98
|
+
YAML files. Safe, performant, with friendly error messages, and no dependencies.
|
71
99
|
email:
|
72
100
|
- maximomussini@gmail.com
|
73
101
|
executables: []
|
@@ -85,26 +113,25 @@ homepage: https://github.com/ElMassimo/better_settings
|
|
85
113
|
licenses:
|
86
114
|
- MIT
|
87
115
|
metadata: {}
|
88
|
-
post_install_message:
|
116
|
+
post_install_message:
|
89
117
|
rdoc_options: []
|
90
118
|
require_paths:
|
91
119
|
- lib
|
92
120
|
required_ruby_version: !ruby/object:Gem::Requirement
|
93
121
|
requirements:
|
94
|
-
- - "
|
122
|
+
- - ">="
|
95
123
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
124
|
+
version: 2.3.0
|
97
125
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
98
126
|
requirements:
|
99
127
|
- - ">="
|
100
128
|
- !ruby/object:Gem::Version
|
101
129
|
version: '0'
|
102
130
|
requirements: []
|
103
|
-
|
104
|
-
|
105
|
-
signing_key:
|
131
|
+
rubygems_version: 3.2.3
|
132
|
+
signing_key:
|
106
133
|
specification_version: 4
|
107
|
-
summary: 'Settings for
|
134
|
+
summary: 'Settings for Ruby applications: fast, immutable, better.'
|
108
135
|
test_files:
|
109
136
|
- spec/better_settings/better_settings_spec.rb
|
110
137
|
- spec/spec_helper.rb
|