co_config 0.2.1 → 0.2.2

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
  SHA1:
3
- metadata.gz: 150831ae0e856796ceea3eb4b07f47cff3936877
4
- data.tar.gz: ce5543b72bd844491d4b68ad971f279718d882e8
3
+ metadata.gz: b0dd0158f19428fd11977fcdcd73052d740009c9
4
+ data.tar.gz: e7b25976ff15f046c9760691efab7b43391bed7b
5
5
  SHA512:
6
- metadata.gz: 29fbd032e51155173ee8923f248ed6b3ee5d58058632fc88b57a2575e425767171762af85e62d735132ce258cc23a053afd2c367f4b184f9a949c2855ddfcc78
7
- data.tar.gz: 1472c5dbce449fb145dadebdc9ff413acca88b162b2833680091bb118f0f57c5d56814b54a6c2f5feafef94e3d986232f0ca14071d86b2f3ccddc1e9e809d30e
6
+ metadata.gz: 85f00707b88108da65ad9080b8216810c4a7ec3b0e8e5990b8d90453ec4831bcc73b286b69629e311c112fc518e0e8cbf1c40e03083807195783a32cfbf74217
7
+ data.tar.gz: 03c49d91faa5142fcedaa27d396f67056128dabf9e5a9bb1ae6af52abafe74464382ccf3064ab8eea31cd598317c51c0a45f2d1c2e251a2666e085549f59da7d
@@ -2,9 +2,6 @@
2
2
  lib = File.expand_path('../lib', __FILE__)
3
3
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
  require 'co_config/version'
5
- require 'pathname'
6
-
7
- readme = Pathname.new(File.expand_path('../readme.md', __FILE__))
8
5
 
9
6
  Gem::Specification.new do |spec|
10
7
  spec.name = "co_config"
@@ -13,7 +10,11 @@ Gem::Specification.new do |spec|
13
10
  spec.email = ["erabinovich@gmail.com"]
14
11
 
15
12
  spec.summary = %q{Simple configuration management gem.}
16
- spec.description = readme.read if readme.exist?
13
+ spec.description = <<-EOF.gsub(/^\s{4}/, '')
14
+ Simple configuration management. For a description on
15
+ how to use this gem please check the readme file on
16
+ https://github.com/comparaonline/co_config/blob/master/README.md
17
+ EOF
17
18
  spec.homepage = "https://github.com/comparaonline/co_config"
18
19
  spec.license = "MIT"
19
20
 
@@ -1,3 +1,3 @@
1
1
  module CoConfig
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: co_config
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ezequiel Rabinovich
@@ -92,35 +92,10 @@ dependencies:
92
92
  - - "~>"
93
93
  - !ruby/object:Gem::Version
94
94
  version: '3'
95
- description: "# CoConfig\n[![Circle CI](https://circleci.com/gh/comparaonline/co_config.svg?style=svg)](https://circleci.com/gh/comparaonline/co_config)\n\nThis
96
- is a simple gem to load configuration files on rails.\n\n## Installation\n\nAdd
97
- this line to your application's Gemfile:\n\n```ruby\ngem 'co_config'\n```\n\nAnd
98
- then execute:\n\n $ bundle\n\nOr install it yourself as:\n\n $ gem install
99
- co_config\n\n## Usage\n\nCreate a `configuration.rb` file on your rails application's
100
- config folder.\nThis file will indicate which files are loaded.\n\n```ruby\n# To
101
- load the test.yml file into the CoConfig::TEST hash\nload 'test' \n\n# To validate
102
- the configuration you could use\nload 'test2' { |c| c.token.present? } \n# or\nload
103
- 'test3' { |c| raise if token.empty? }\n```\n\nYAML files must have a root key called
104
- like the current `Rails.env`. A key called `defaults` can be used to specify defaults
105
- for undefined environments.\n\n```yaml\n# test.yml\n---\n\ndevelopment:\n value:
106
- 1\n```\n\n```yaml\n# test2.yml\n---\n\ndefaults:\n token: 'MYAWESOMETOKEN'\n```\n\nTo
107
- read your configuration you can access the hash (with indifferent access) at `CoConfig::CONFIG_NAME_UPPERCASE`\n\n##
108
- To use on your engine/gem\n\nIf you want to load configuration from a different
109
- path (e.g. your engine's directory), you can do this:\n\n```ruby\n# lib/my_engine/railtie.rb\nrequire
110
- 'rails/railtie'\nmodule MyEngine\n class Railtie < ::Rails::Railtie\n config.before_configuration
111
- do\n CoConfig.load(MyEngine::Engine.root.join('config'))\n end\n end\nend\n\n#
112
- lib/my_engine.rb\nrequire 'my_engine/railtie'\n\nmodule MyEngine\n class Engine
113
- < ::Rails::Engine\n end\nend\n```\n\nIt will load `my_engine/config/configuration.rb`,
114
- and in there, `load` method calls will include configuration files in the same directory.\n\n##
115
- Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies.
116
- Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive
117
- prompt that will allow you to experiment.\n\nTo install this gem onto your local
118
- machine, run `bundle exec rake install`. To release a new version, update the version
119
- number in `version.rb`, and then run `bundle exec rake release`, which will create
120
- a git tag for the version, push git commits and tags, and push the `.gem` file to
121
- [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull
122
- requests are welcome on GitHub at https://github.com/comparaonline/co_config.\n\n\n##
123
- License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n\n"
95
+ description: |
96
+ Simple configuration management. For a description on
97
+ how to use this gem please check the readme file on
98
+ https://github.com/comparaonline/co_config/blob/master/README.md
124
99
  email:
125
100
  - erabinovich@gmail.com
126
101
  executables: []