co_config 0.2.0 → 0.2.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
  SHA1:
3
- metadata.gz: f69473c9ade95785cfa6f57136d7d6d4615ade60
4
- data.tar.gz: 584449eabc95751ef58023f35baca8b71978127f
3
+ metadata.gz: 150831ae0e856796ceea3eb4b07f47cff3936877
4
+ data.tar.gz: ce5543b72bd844491d4b68ad971f279718d882e8
5
5
  SHA512:
6
- metadata.gz: 99ca5f6ac8bbbe0b8f0eec4c13d3603c5c13e541e779b36a7388c0485a0cc1444d9ef5936925721ff330752271e0cc1fca888750c8aa55716b73f0a07c0c0bba
7
- data.tar.gz: 040bb849f4e01aa00f791b7cb12b09e4d005322143fafd370c2d03f1dcb0ba02aaa8a84624292bca89b9f2f417bcac0ead900dd6380483e53ac3a97178b37930
6
+ metadata.gz: 29fbd032e51155173ee8923f248ed6b3ee5d58058632fc88b57a2575e425767171762af85e62d735132ce258cc23a053afd2c367f4b184f9a949c2855ddfcc78
7
+ data.tar.gz: 1472c5dbce449fb145dadebdc9ff413acca88b162b2833680091bb118f0f57c5d56814b54a6c2f5feafef94e3d986232f0ca14071d86b2f3ccddc1e9e809d30e
@@ -2,6 +2,9 @@
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__))
5
8
 
6
9
  Gem::Specification.new do |spec|
7
10
  spec.name = "co_config"
@@ -10,6 +13,7 @@ Gem::Specification.new do |spec|
10
13
  spec.email = ["erabinovich@gmail.com"]
11
14
 
12
15
  spec.summary = %q{Simple configuration management gem.}
16
+ spec.description = readme.read if readme.exist?
13
17
  spec.homepage = "https://github.com/comparaonline/co_config"
14
18
  spec.license = "MIT"
15
19
 
@@ -18,10 +22,10 @@ Gem::Specification.new do |spec|
18
22
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
23
  spec.require_paths = ["lib"]
20
24
 
21
- spec.add_dependency 'activesupport', '>= 3.0'
22
- spec.add_dependency 'rails', '>= 3.0'
25
+ spec.add_dependency 'activesupport', '>= 3.0', '< 5'
26
+ spec.add_dependency 'rails', '>= 3.0', '< 5'
23
27
 
24
- spec.add_development_dependency "bundler", ">= 1.9"
28
+ spec.add_development_dependency "bundler", "~> 1.9"
25
29
  spec.add_development_dependency "rake", "~> 10.0"
26
- spec.add_development_dependency "rspec"
30
+ spec.add_development_dependency "rspec", "~> 3"
27
31
  end
@@ -1,3 +1,3 @@
1
1
  module CoConfig
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
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.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ezequiel Rabinovich
@@ -17,6 +17,9 @@ dependencies:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '3.0'
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '5'
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -24,6 +27,9 @@ dependencies:
24
27
  - - ">="
25
28
  - !ruby/object:Gem::Version
26
29
  version: '3.0'
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '5'
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: rails
29
35
  requirement: !ruby/object:Gem::Requirement
@@ -31,6 +37,9 @@ dependencies:
31
37
  - - ">="
32
38
  - !ruby/object:Gem::Version
33
39
  version: '3.0'
40
+ - - "<"
41
+ - !ruby/object:Gem::Version
42
+ version: '5'
34
43
  type: :runtime
35
44
  prerelease: false
36
45
  version_requirements: !ruby/object:Gem::Requirement
@@ -38,18 +47,21 @@ dependencies:
38
47
  - - ">="
39
48
  - !ruby/object:Gem::Version
40
49
  version: '3.0'
50
+ - - "<"
51
+ - !ruby/object:Gem::Version
52
+ version: '5'
41
53
  - !ruby/object:Gem::Dependency
42
54
  name: bundler
43
55
  requirement: !ruby/object:Gem::Requirement
44
56
  requirements:
45
- - - ">="
57
+ - - "~>"
46
58
  - !ruby/object:Gem::Version
47
59
  version: '1.9'
48
60
  type: :development
49
61
  prerelease: false
50
62
  version_requirements: !ruby/object:Gem::Requirement
51
63
  requirements:
52
- - - ">="
64
+ - - "~>"
53
65
  - !ruby/object:Gem::Version
54
66
  version: '1.9'
55
67
  - !ruby/object:Gem::Dependency
@@ -70,17 +82,45 @@ dependencies:
70
82
  name: rspec
71
83
  requirement: !ruby/object:Gem::Requirement
72
84
  requirements:
73
- - - ">="
85
+ - - "~>"
74
86
  - !ruby/object:Gem::Version
75
- version: '0'
87
+ version: '3'
76
88
  type: :development
77
89
  prerelease: false
78
90
  version_requirements: !ruby/object:Gem::Requirement
79
91
  requirements:
80
- - - ">="
92
+ - - "~>"
81
93
  - !ruby/object:Gem::Version
82
- version: '0'
83
- description:
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"
84
124
  email:
85
125
  - erabinovich@gmail.com
86
126
  executables: []