Skip to content

Commit a486672

Browse files
committed
Ready to 1.0.0
1 parent 676b717 commit a486672

File tree

6 files changed

+27
-9
lines changed

6 files changed

+27
-9
lines changed

CHANGELOG.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
## 1.0.0 (2017-06-20)
44

5-
- Lazy load and parse ENV configurtaion (https://github.com/palkan/anyway_config/commit/5fe407c75fefec8994ca201ea7b4691b5ddd96e5). ([@palkan][])
5+
- Lazy load and parse ENV configurtaion. ([@palkan][])
66

7-
- Add support for ERB in YML configuration (https://github.com/palkan/anyway_config/commit/8d8a47dbda6858a43ff509aaa4cddf4f938dd660). ([@palkan][])
7+
- Add support for ERB in YML configuration. ([@palkan][])
88

99
## 0.5.0 (2017-01-20)
1010

README.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44

55
Rails/Ruby plugin/application configuration tool which allows you to load parameters from different sources: YAML, Rails secrets, environment.
66

7-
Apps using AnywayConfig:
7+
Allows you to easily follow the [twelve-factor application](https://12factor.net/config) principles and adds zero complexity to your development process.
8+
9+
Libraries using Anyway Config:
810

911
- [Influxer](https://github.com/palkan/influxer)
1012

@@ -74,7 +76,7 @@ MyCoolGem.config.user #=> 'root'
7476

7577
#### Customize name
7678

77-
By default, AnywayConfig uses the namespace (the outer module name) as the config name, but you can set it manually:
79+
By default, Anyway Config uses the namespace (the outer module name) as the config name, but you can set it manually:
7880

7981
```ruby
8082
module MyCoolGem
@@ -106,7 +108,7 @@ Your config will be filled up with values from the following sources (ordered by
106108

107109
### Using with Ruby
108110

109-
By default AnywayConfig is looking for a config YAML at `./config/<config-name>.yml`. You can override this setting
111+
By default, Anyway Config is looking for a config YAML at `./config/<config-name>.yml`. You can override this setting
110112
through special environment variable – 'MYGEM_CONF' – containing the path to the YAML file.
111113

112114
Environmental variables work the same way as with Rails.
@@ -122,7 +124,7 @@ There are `#clear` and `#reload` functions on your config (which do exactly what
122124
Rails 4.2 introduced new feature: `Rails.application.config_for`. It looks very similar to
123125
`Anyway::Config.for`, but there are some differences:
124126

125-
| Feature | Rails | Anyway |
127+
| Feature | Rails | Anyway Config |
126128
| ------------- |:-------------:| -----:|
127129
| load data from `config/app.yml` | yes | yes |
128130
| load data from `secrets` | no | yes |

anyway_config.gemspec

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ Gem::Specification.new do |s|
1515
s.description = %{
1616
Configuration DSL for Ruby libraries and applications.
1717
18-
Allows you to easily follow the twevle factor application principles (https://12factor.net/config).
18+
Allows you to easily follow the twelve-factor application principles (https://12factor.net/config).
1919
}
2020

2121
s.license = "MIT"
2222

2323
s.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
2424
s.require_paths = ["lib"]
25-
s.required_ruby_version = '>= 2'
25+
s.required_ruby_version = '>= 2.2'
2626

2727
s.add_development_dependency "simplecov", ">= 0.3.8"
2828
s.add_development_dependency "rspec", "~> 3.5.0"

lib/anyway/version.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module Anyway # :nodoc:
4-
VERSION = "0.5.1.rc1"
4+
VERSION = "1.0.0"
55
end

spec/config_spec.rb

+9
Original file line numberDiff line numberDiff line change
@@ -104,4 +104,13 @@
104104
end
105105
end
106106
end
107+
108+
describe "config without defaults" do
109+
let(:conf) { SmallConfig.new }
110+
111+
it "works" do
112+
expect(conf.meta).to be_nil
113+
expect(conf.data).to be_nil
114+
end
115+
end
107116
end

spec/support/small_config.rb

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# frozen_string_literal: true
2+
3+
class SmallConfig < Anyway::Config # :nodoc:
4+
config_name :small
5+
attr_config :meta,
6+
:data
7+
end

0 commit comments

Comments
 (0)