rconfig 0.4.3.1 → 0.5.0

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,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- ZWVkNjJhODhkNTllYTE2Y2NiOTJlNTdiNTJkMDA1YTEwNWVjNzgyOA==
5
- data.tar.gz: !binary |-
6
- MjdhYjAxOGQ4ZDk3OTkzMTJhNmZjNjRhYzY4MzcwM2JiYjliOWExZQ==
2
+ SHA1:
3
+ metadata.gz: 4de105772ea9dcfc41a47a23df53342ad4f6efdc
4
+ data.tar.gz: 4067b78c457ec794bf956e45ddbedcb252b91c07
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- OWFiNDIzNjJlOTg2ZmI4ZmYwZjEwMjdiNjU5MTVmMDk1ZWNiNDVhNzIxYTA1
10
- OGUxZDQzZjMwN2M0YjQ4NGQ1NzdkMmVhN2JhYTZjNDUwMzkxYWU3OWNhYzM1
11
- YWQ2NjU0NGFmNzQ1ZTliN2JhMjQwNDgyZjFkMmNmN2ViOWMzNjk=
12
- data.tar.gz: !binary |-
13
- YjBhNWM4OTkwYjA3ZjUzY2E5ZjM4MDdkZGRmYTI5NmUyYzBlZTU0NGNiZDQ1
14
- NWEyZTQ3OWZjNTMxYWMyMGY2YWFjMGY3N2FjNjI4N2VlNGM1YjZhNjlmN2Ni
15
- OTQ3MDgyNDc5Y2I0OWE3Y2IwNjdiNTJkMGRhODFiOGQwYjM0Y2Y=
6
+ metadata.gz: dd71203d348b908d47fad71f869fddcd00ca9294472c7ef3917e2b8f00de3cc86e7f2b9c95e1ef62251530c7c775b630d01ac53c21e731f81120b5825be56a93
7
+ data.tar.gz: 2be95370f7e9dea1006ad821bdf55ee2dfea5cd34ce2434d8aaaef13ecbff6188fd2343defbf685e234307f7502078efaa7fb7d0b7d573ab1053b0e1674f6ba8
data/ChangeLog CHANGED
@@ -1,6 +1,11 @@
1
- 0.4.3.1
2
- =======
3
- * Fixed typo preventing use of custome Logger.
1
+ 0.5.0
2
+ =====
3
+ * Corrected typo in generator template
4
+ * Updated to support Rails 4
5
+
6
+ 0.4.4
7
+ =====
8
+ * Updated README file
4
9
 
5
10
  0.4.3
6
11
  =====
data/Gemfile CHANGED
@@ -1,10 +1,10 @@
1
1
  source 'http://rubygems.org'
2
2
 
3
- gem 'activesupport', '~> 3.0', :require => 'active_support'
3
+ gem 'activesupport', '> 3.0', :require => 'active_support'
4
4
 
5
5
  group :development do
6
- gem 'rspec', '~> 2.3.0'
7
- gem 'bundler', '~> 1.0.0'
8
- gem 'jeweler', '~> 1.6.4'
9
- gem 'i18n', '~> 0.6.0'
6
+ gem 'rspec', '> 2.3.0'
7
+ gem 'bundler', '> 1.0.0'
8
+ gem 'jeweler', '> 1.6.4'
9
+ gem 'i18n', '> 0.6.0'
10
10
  end
@@ -3,30 +3,59 @@ GEM
3
3
  specs:
4
4
  activesupport (3.1.1)
5
5
  multi_json (~> 1.0)
6
- diff-lcs (1.1.3)
7
- git (1.2.5)
8
- i18n (0.6.0)
9
- jeweler (1.6.4)
10
- bundler (~> 1.0)
6
+ addressable (2.3.5)
7
+ builder (3.2.2)
8
+ diff-lcs (1.2.5)
9
+ faraday (0.7.6)
10
+ addressable (~> 2.2)
11
+ multipart-post (~> 1.1)
12
+ rack (~> 1.1)
13
+ git (1.2.6)
14
+ github_api (0.4.10)
15
+ faraday (~> 0.7.6)
16
+ hashie (~> 1.2.0)
17
+ multi_json (~> 1.0)
18
+ oauth2 (~> 0.5.2)
19
+ hashie (1.2.0)
20
+ highline (1.6.20)
21
+ i18n (0.6.9)
22
+ jeweler (2.0.1)
23
+ builder
24
+ bundler (>= 1.0)
11
25
  git (>= 1.2.5)
26
+ github_api
27
+ highline (>= 1.6.15)
28
+ nokogiri (>= 1.5.10)
12
29
  rake
30
+ rdoc
31
+ json (1.8.1)
32
+ mini_portile (0.5.2)
13
33
  multi_json (1.1.0)
14
- rake (0.9.2.2)
15
- rspec (2.3.0)
16
- rspec-core (~> 2.3.0)
17
- rspec-expectations (~> 2.3.0)
18
- rspec-mocks (~> 2.3.0)
19
- rspec-core (2.3.1)
20
- rspec-expectations (2.3.0)
21
- diff-lcs (~> 1.1.2)
22
- rspec-mocks (2.3.0)
34
+ multipart-post (1.2.0)
35
+ nokogiri (1.6.1)
36
+ mini_portile (~> 0.5.0)
37
+ oauth2 (0.5.2)
38
+ faraday (~> 0.7)
39
+ multi_json (~> 1.0)
40
+ rack (1.5.2)
41
+ rake (10.1.1)
42
+ rdoc (4.1.1)
43
+ json (~> 1.4)
44
+ rspec (2.14.1)
45
+ rspec-core (~> 2.14.0)
46
+ rspec-expectations (~> 2.14.0)
47
+ rspec-mocks (~> 2.14.0)
48
+ rspec-core (2.14.7)
49
+ rspec-expectations (2.14.5)
50
+ diff-lcs (>= 1.1.3, < 2.0)
51
+ rspec-mocks (2.14.6)
23
52
 
24
53
  PLATFORMS
25
54
  ruby
26
55
 
27
56
  DEPENDENCIES
28
- activesupport (~> 3.0)
29
- bundler (~> 1.0.0)
30
- i18n (~> 0.6.0)
31
- jeweler (~> 1.6.4)
32
- rspec (~> 2.3.0)
57
+ activesupport (> 3.0)
58
+ bundler (> 1.0.0)
59
+ i18n (> 0.6.0)
60
+ jeweler (> 1.6.4)
61
+ rspec (> 2.3.0)
@@ -39,7 +39,7 @@ If you're not using RConfig in a Rails app, and you don't use Gemfile you can in
39
39
 
40
40
 
41
41
  == Requirements
42
- Starting with version 0.4.0, RConfig requires at least Ruby 1.9, and Rails 3. Previous versions can be used in Ruby 1.8 and Rails 2.2+. Non-rails projects need ActiveSupport (>= 3 for RConfig 0.4.0, and > 2.2 for RConfig 0.3).
42
+ Starting with version 0.4.0, RConfig requires at least Ruby 1.9, and Rails 3. Previous versions can be used in Ruby 1.8 and Rails 2.2+. Non-rails projects need ActiveSupport (>= 3 for RConfig 0.4.0, and > 2.2 for RConfig 0.3). RConfig now supports Rails 4 as of 0.5.0.
43
43
 
44
44
  * Ruby 1.9+
45
45
  * ActiveSupport 3.0+
@@ -65,7 +65,7 @@ Starting with version 0.4.0, RConfig requires at least Ruby 1.9, and Rails 3. Pr
65
65
 
66
66
  demo.rb =>
67
67
  require 'rconfig'
68
- RConfig.config_paths = ['$HOME/config', '#{APP_ROOT}/config', '/demo/conf']
68
+ RConfig.load_paths = ['$HOME/config', '#{APP_ROOT}/config', '/demo/conf']
69
69
  RConfig.demo[:server][:port] => 81
70
70
  RConfig.demo.server.address => 'host.domain.com'
71
71
  RConfig.demo.server.host => 'host.local'
@@ -45,7 +45,7 @@ RConfig.setup do |config|
45
45
  # Flag variable indicating whether or not periodic reloads should
46
46
  # be performed. Defaults to false.
47
47
  #
48
- # config.enabled_reload = false
48
+ # config.enable_reload = false
49
49
 
50
50
  # ==> Interval for Reloading Configuration Data
51
51
  # The interval in which to perform periodic reloading of config files (in
@@ -65,7 +65,7 @@ require 'rconfig/core_ext/hash'
65
65
  require 'rconfig/core_ext/nil'
66
66
 
67
67
  module RConfig
68
- VERSION = '0.4.3.1'
68
+ VERSION = '0.5.0'
69
69
 
70
70
  autoload :Socket, 'socket'
71
71
  autoload :YAML, 'yaml'
@@ -6,9 +6,12 @@ module RConfig
6
6
  CONFIG_ROOT = File.join(::Rails.root || '', 'config').gsub(/^\//, '').gsub(/\/$/,'') if defined?(::Rails) && !defined?(CONFIG_ROOT)
7
7
 
8
8
  # ENV TIER i.e. (development, integration, staging, or production)
9
- # Defaults to RAILS_ENV if running in Rails, otherwise, it checks
10
- # if ENV['TIER'] is present. If not, it assumes production.
11
- ENV_TIER = (defined?(RAILS_ENV) ? RAILS_ENV : (ENV['TIER'] || 'production')) unless defined? ENV_TIER
9
+ # Defaults to Rails.env (or RAILS_ENV) if running in Rails, otherwise,
10
+ # it checks ENV for 'RACK_ENV', or 'CONFIG_ENV'. If neither is present, it
11
+ # assumes production. In apps that are not Rails or Rack-based, CONFIG_ENV
12
+ # can be set to provide RConfig with a environment other than prodution.
13
+ ENV_TIER = ((defined?(Rails) && Rails.env) || (defined?(RAILS_ENV) && RAILS_ENV) ||
14
+ ENV['RAILS_ENV'] || ENV['RACK_ENV'] || ENV['CONFIG_ENV'] || 'production') unless defined? ENV_TIER
12
15
 
13
16
  # yml, yaml => yaml files, parsable by YAML library
14
17
  YML_FILE_TYPES = [:yml, :yaml].freeze unless defined? YML_FILE_TYPES
@@ -55,4 +58,4 @@ module RConfig
55
58
  EMPTY_ARRAY = [].freeze unless defined? EMPTY_ARRAY
56
59
 
57
60
  end
58
- end
61
+ end
@@ -21,7 +21,7 @@ module RConfig
21
21
  logger.info "Loading config files for: #{name}"
22
22
  logger.debug "load_config_files(#{name.inspect})"
23
23
 
24
-
24
+ # Get current time for checking last loaded status.
25
25
  now = Time.now
26
26
 
27
27
  # Get array of all the existing files file the config name.
@@ -19,7 +19,7 @@ module RConfig
19
19
  end
20
20
 
21
21
  # Use log file
22
- if output.nil? && options[:file] && File.exists?(options[:file])
22
+ if output.nil? && options[:file] && File.exists?(optios[:file])
23
23
  @output = File.open(options[:file].to_s, 'a')
24
24
  @needs_close = true
25
25
  end
@@ -24,12 +24,12 @@ Gem::Specification.new do |s|
24
24
  s.require_paths = ['lib']
25
25
 
26
26
  # Dependencies
27
- s.add_dependency 'activesupport', '~> 3.0'
27
+ s.add_dependency 'activesupport', '> 3.0'
28
28
 
29
29
  # Development Dependencies
30
- s.add_development_dependency 'rspec', '~> 2.3.0'
31
- s.add_development_dependency 'bundler', '~> 1.0.0'
32
- s.add_development_dependency 'jeweler', '~> 1.6.4'
30
+ s.add_development_dependency 'rspec', '> 2.3.0'
31
+ s.add_development_dependency 'bundler', '> 1.0.0'
32
+ s.add_development_dependency 'jeweler', '> 1.6.4'
33
33
  s.add_development_dependency 'i18n'
34
34
  end
35
35
 
@@ -1,6 +1,15 @@
1
1
  ROOT_DIR = File.expand_path(File.dirname(__FILE__))
2
2
  CONF_DIR = File.join(ROOT_DIR, 'config')
3
3
 
4
+ # Set the environment to test
5
+ ENV['CONFIG_ENV'] = 'test'
6
+
7
+ # Host-specific config to test cascade logic
8
+ cascade_host_file = "spec/config/cascade2_#{Socket.gethostname}.yml"
9
+ unless File.exist?(cascade_host_file)
10
+ %x[ cp spec/config/cascade2_host.yml #{cascade_host_file}]
11
+ end
12
+
4
13
  # Loads the rconfig library
5
14
  $LOAD_PATH << File.join(ROOT_DIR, '..', 'lib')
6
15
 
metadata CHANGED
@@ -1,91 +1,83 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rconfig
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3.1
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rahmal Conda
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-24 00:00:00.000000000 Z
11
+ date: 2014-02-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - '>'
18
18
  - !ruby/object:Gem::Version
19
- version: !binary |-
20
- My4w
19
+ version: '3.0'
21
20
  type: :runtime
22
21
  prerelease: false
23
22
  version_requirements: !ruby/object:Gem::Requirement
24
23
  requirements:
25
- - - ~>
24
+ - - '>'
26
25
  - !ruby/object:Gem::Version
27
- version: !binary |-
28
- My4w
26
+ version: '3.0'
29
27
  - !ruby/object:Gem::Dependency
30
28
  name: rspec
31
29
  requirement: !ruby/object:Gem::Requirement
32
30
  requirements:
33
- - - ~>
31
+ - - '>'
34
32
  - !ruby/object:Gem::Version
35
- version: !binary |-
36
- Mi4zLjA=
33
+ version: 2.3.0
37
34
  type: :development
38
35
  prerelease: false
39
36
  version_requirements: !ruby/object:Gem::Requirement
40
37
  requirements:
41
- - - ~>
38
+ - - '>'
42
39
  - !ruby/object:Gem::Version
43
- version: !binary |-
44
- Mi4zLjA=
40
+ version: 2.3.0
45
41
  - !ruby/object:Gem::Dependency
46
42
  name: bundler
47
43
  requirement: !ruby/object:Gem::Requirement
48
44
  requirements:
49
- - - ~>
45
+ - - '>'
50
46
  - !ruby/object:Gem::Version
51
- version: !binary |-
52
- MS4wLjA=
47
+ version: 1.0.0
53
48
  type: :development
54
49
  prerelease: false
55
50
  version_requirements: !ruby/object:Gem::Requirement
56
51
  requirements:
57
- - - ~>
52
+ - - '>'
58
53
  - !ruby/object:Gem::Version
59
- version: !binary |-
60
- MS4wLjA=
54
+ version: 1.0.0
61
55
  - !ruby/object:Gem::Dependency
62
56
  name: jeweler
63
57
  requirement: !ruby/object:Gem::Requirement
64
58
  requirements:
65
- - - ~>
59
+ - - '>'
66
60
  - !ruby/object:Gem::Version
67
- version: !binary |-
68
- MS42LjQ=
61
+ version: 1.6.4
69
62
  type: :development
70
63
  prerelease: false
71
64
  version_requirements: !ruby/object:Gem::Requirement
72
65
  requirements:
73
- - - ~>
66
+ - - '>'
74
67
  - !ruby/object:Gem::Version
75
- version: !binary |-
76
- MS42LjQ=
68
+ version: 1.6.4
77
69
  - !ruby/object:Gem::Dependency
78
70
  name: i18n
79
71
  requirement: !ruby/object:Gem::Requirement
80
72
  requirements:
81
- - - ! '>='
73
+ - - '>='
82
74
  - !ruby/object:Gem::Version
83
75
  version: '0'
84
76
  type: :development
85
77
  prerelease: false
86
78
  version_requirements: !ruby/object:Gem::Requirement
87
79
  requirements:
88
- - - ! '>='
80
+ - - '>='
89
81
  - !ruby/object:Gem::Version
90
82
  version: '0'
91
83
  description: Configuration management library for Ruby applications.
@@ -202,17 +194,17 @@ require_paths:
202
194
  - lib
203
195
  required_ruby_version: !ruby/object:Gem::Requirement
204
196
  requirements:
205
- - - ! '>='
197
+ - - '>='
206
198
  - !ruby/object:Gem::Version
207
199
  version: '0'
208
200
  required_rubygems_version: !ruby/object:Gem::Requirement
209
201
  requirements:
210
- - - ! '>='
202
+ - - '>='
211
203
  - !ruby/object:Gem::Version
212
204
  version: '0'
213
205
  requirements: []
214
206
  rubyforge_project:
215
- rubygems_version: 2.1.5
207
+ rubygems_version: 2.2.2
216
208
  signing_key:
217
209
  specification_version: 4
218
210
  summary: The complete solution for Ruby Configuration Management. RConfig is a Ruby