rconfig 0.5.2 → 0.5.4

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: 2c485c69a2d0b78cc4a9228b8e57c9ff0c8dfefc
4
- data.tar.gz: b6b478faf25cd377bf068f655d013fdfebb47005
3
+ metadata.gz: 2f6c63a184f6c78b4eaa52eb6f72925806ac738e
4
+ data.tar.gz: cb06566e303bdb434d39e26a1a7bde66d145a9ba
5
5
  SHA512:
6
- metadata.gz: 8fbdec9ede9ef81a41690184d92231eeb2d9311d438a047597a43f022cc2565a96fca1c461e1cf3120ef4eed443ea1c0057c365a6d1410cce8e39d324b87bcc5
7
- data.tar.gz: a3d7a1ba27d736348b52783a4afa06492e57183d39a33c1a401a02bff511f696febf4e465304a9008ab588409fd1da71671f2e3f500f4864b9075235b829f30c
6
+ metadata.gz: c39fd812ef68b0c926dd696c581fc0eee4f1fb0bddc092a0ea61c162373eec3a4131747d69a3527c84993f3dc835757ea522a4c17dc74402d0a4379fba231d11
7
+ data.tar.gz: da16510336c89949f74a5b485b430a74581e5329343a4f20dec36dc51eb09711b4cb8bb7b5283ab77b3856c3b635281a7accc97659655a069197576b39049a8a
@@ -0,0 +1 @@
1
+ rconfig
@@ -0,0 +1 @@
1
+ 2.1.5
data/ChangeLog CHANGED
@@ -1,7 +1,19 @@
1
+ 0.5.4
2
+ =====
3
+ * Added support for windows paths
4
+ * Updated tests specs so that they can run on windows
5
+ * Updated gem dependencies so thay can install on ruby 2.2.x
6
+ * Removed overriden HashWithIndifferentAccess#convert_value.
7
+
8
+ 0.5.3
9
+ =====
10
+ * Removed .rvmrc (which was wrong anyway), in favor of .ruby-version and .ruby-gemset
11
+
1
12
  0.5.2
2
13
  =====
3
14
  * Fixed Typo
4
15
  * Updated from jrhorn424/rconfig (See github commit #0bc5f9741c1f066d0dee4aa40eccbf81ad7caf11)
16
+ * Removed
5
17
 
6
18
  0.5.1
7
19
  =====
data/Gemfile CHANGED
@@ -1,10 +1,13 @@
1
1
  source 'http://rubygems.org'
2
2
 
3
- gem 'activesupport', '> 3.0', :require => 'active_support'
3
+ gem 'activesupport', '~> 3.2', require: 'active_support'
4
+ gem 'json', '> 1.8.1'
4
5
 
5
6
  group :development do
7
+ gem 'rake', '~> 11.2'
8
+ gem 'rack', '~> 1.4.2'
6
9
  gem 'rspec', '> 2.3.0'
7
10
  gem 'bundler', '> 1.0.0'
8
11
  gem 'jeweler', '> 1.6.4'
9
- gem 'i18n', '> 0.6.0'
12
+ gem 'i18n'
10
13
  end
@@ -1,25 +1,27 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
- activesupport (3.1.1)
4
+ activesupport (3.2.22.4)
5
+ i18n (~> 0.6, >= 0.6.4)
5
6
  multi_json (~> 1.0)
6
- addressable (2.3.5)
7
+ addressable (2.4.0)
7
8
  builder (3.2.2)
9
+ descendants_tracker (0.0.4)
10
+ thread_safe (~> 0.3, >= 0.3.1)
8
11
  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)
12
+ faraday (0.9.2)
13
+ multipart-post (>= 1.2, < 3)
14
+ git (1.3.0)
15
+ github_api (0.14.5)
16
+ addressable (~> 2.4.0)
17
+ descendants_tracker (~> 0.0.4)
18
+ faraday (~> 0.8, < 0.10)
19
+ hashie (>= 3.4)
20
+ oauth2 (~> 1.0)
21
+ hashie (3.4.4)
22
+ highline (1.7.8)
23
+ i18n (0.7.0)
24
+ jeweler (2.1.1)
23
25
  builder
24
26
  bundler (>= 1.0)
25
27
  git (>= 1.2.5)
@@ -28,34 +30,51 @@ GEM
28
30
  nokogiri (>= 1.5.10)
29
31
  rake
30
32
  rdoc
31
- json (1.8.1)
32
- mini_portile (0.5.2)
33
- multi_json (1.1.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)
33
+ semver
34
+ json (2.0.2)
35
+ jwt (1.5.4)
36
+ mini_portile2 (2.1.0)
37
+ multi_json (1.12.1)
38
+ multi_xml (0.5.5)
39
+ multipart-post (2.0.0)
40
+ nokogiri (1.6.8)
41
+ mini_portile2 (~> 2.1.0)
42
+ pkg-config (~> 1.1.7)
43
+ oauth2 (1.2.0)
44
+ faraday (>= 0.8, < 0.10)
45
+ jwt (~> 1.0)
46
+ multi_json (~> 1.3)
47
+ multi_xml (~> 0.5)
48
+ rack (>= 1.2, < 3)
49
+ pkg-config (1.1.7)
50
+ rack (1.4.7)
51
+ rake (11.2.2)
52
+ rdoc (4.1.0)
53
+ rspec (3.5.0)
54
+ rspec-core (~> 3.5.0)
55
+ rspec-expectations (~> 3.5.0)
56
+ rspec-mocks (~> 3.5.0)
57
+ rspec-core (3.5.2)
58
+ rspec-support (~> 3.5.0)
59
+ rspec-expectations (3.5.0)
60
+ diff-lcs (>= 1.2.0, < 2.0)
61
+ rspec-support (~> 3.5.0)
62
+ rspec-mocks (3.5.0)
63
+ diff-lcs (>= 1.2.0, < 2.0)
64
+ rspec-support (~> 3.5.0)
65
+ rspec-support (3.5.0)
66
+ semver (1.0.1)
67
+ thread_safe (0.3.5)
52
68
 
53
69
  PLATFORMS
54
70
  ruby
55
71
 
56
72
  DEPENDENCIES
57
- activesupport (> 3.0)
73
+ activesupport (~> 3.2)
58
74
  bundler (> 1.0.0)
59
- i18n (> 0.6.0)
75
+ i18n
60
76
  jeweler (> 1.6.4)
77
+ json (> 1.8.1)
78
+ rack (~> 1.4.2)
79
+ rake (~> 11.2)
61
80
  rspec (> 2.3.0)
@@ -1,3 +1,4 @@
1
+ dogs
1
2
 
2
3
  = RConfig
3
4
 
@@ -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.5.2'
68
+ VERSION = '0.5.4'
69
69
 
70
70
  autoload :Socket, 'socket'
71
71
  autoload :YAML, 'yaml'
@@ -76,12 +76,5 @@ module RConfig
76
76
 
77
77
  protected
78
78
 
79
- ##
80
- # Override HashWithIndifferentAccess#convert_value
81
- # return instance of Config for Hash values.
82
- def convert_value(value, options = {})
83
- value.is_a?(Hash) ? self.class.new(value).freeze : super
84
- end
85
-
86
79
  end # class Config
87
80
  end
@@ -30,13 +30,21 @@ module RConfig
30
30
  ##
31
31
  # If the paths are made up of a delimited string, then parse out the
32
32
  # individual paths. Verify that each path is valid.
33
+ #
34
+ # - If windows path separators are ';' and '!'
35
+ # - otherwise the path separators are ';' and ':'
36
+ #
37
+ # This is necessary so windows paths can be correctly processed
33
38
  def parse_load_paths(paths)
39
+
34
40
  if paths.is_a? String
35
- path_sep = (paths =~ /;/) ? ';' : ':'
36
- paths = paths.split(/#{path_sep}+/)
41
+ path_separators = get_path_separators
42
+ paths = paths.split(/#{path_separators}+/)
37
43
  end
44
+
38
45
  raise ArgumentError, "Path(s) must be a String or an Array [#{paths.inspect}]" unless paths.is_a? Array
39
46
  raise ArgumentError, "Must provide at least one load path: [#{paths.inspect}]" if paths.empty?
47
+
40
48
  paths.each do |dir|
41
49
  dir = CONFIG_ROOT if dir == 'CONFIG_ROOT'
42
50
  raise InvalidLoadPathError, "This directory is invalid: [#{dir.inspect}]" unless Dir.exists?(dir)
@@ -51,5 +59,20 @@ module RConfig
51
59
  not load_paths.blank?
52
60
  end
53
61
 
62
+
63
+ private
64
+
65
+ def get_path_separators
66
+ is_windows = Gem.win_platform?
67
+ if is_windows
68
+ path_sep = (paths =~ /;/) ? ';' : '!'
69
+ else
70
+ path_sep = (paths =~ /;/) ? ';' : ':'
71
+ end
72
+
73
+ path_sep
74
+
75
+ end
76
+
54
77
  end
55
78
  end
@@ -24,12 +24,15 @@ 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.2'
28
+ s.add_dependency 'json', '> 1.8.1'
28
29
 
29
30
  # 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'
33
- s.add_development_dependency 'i18n'
31
+ s.add_development_dependency 'rake', '~> 11.2'
32
+ s.add_development_dependency 'rack', '~> 1.4.2'
33
+ s.add_development_dependency 'rspec', '> 2.3.0'
34
+ s.add_development_dependency 'bundler', '> 1.0.0'
35
+ s.add_development_dependency 'jeweler', '> 1.6.4'
36
+ s.add_development_dependency 'i18n'
34
37
  end
35
38
 
@@ -8,7 +8,7 @@ describe RConfig do
8
8
  context 'load paths' do
9
9
  it 'should have a valid load path' do
10
10
  RConfig.load_paths.should_not be_blank
11
- RConfig.load_paths.all?{|path| File.exists?(path) }.should be_true
11
+ RConfig.load_paths.all?{|path| File.exists?(path) }.should be_truthy
12
12
  end
13
13
 
14
14
  it 'should allow multiple load paths' do
@@ -13,17 +13,17 @@ describe RConfig do
13
13
 
14
14
  it 'should reload if reload enabled' do
15
15
  RConfig.enable_reload = true
16
- RConfig.reload.should be_true
16
+ RConfig.reload.should be_truthy
17
17
  end
18
18
 
19
19
  it 'should not reload if reload disabled' do
20
20
  RConfig.enable_reload = false
21
- RConfig.reload.should be_false
21
+ RConfig.reload.should be_falsey
22
22
  end
23
23
 
24
24
  it 'should reload if forced' do
25
25
  RConfig.enable_reload = false
26
- RConfig.reload(true).should be_true
26
+ RConfig.reload(true).should be_truthy
27
27
  end
28
28
 
29
29
  it 'should flush cache on reload' do
@@ -5,9 +5,10 @@ CONF_DIR = File.join(ROOT_DIR, 'config')
5
5
  ENV['CONFIG_ENV'] = 'test'
6
6
 
7
7
  # Host-specific config to test cascade logic
8
- cascade_host_file = "spec/config/cascade2_#{Socket.gethostname}.yml"
8
+ cascade_host_file = File.join(File.dirname(__FILE__),'config',"cascade2_#{Socket.gethostname}.yml")
9
9
  unless File.exist?(cascade_host_file)
10
- %x[ cp spec/config/cascade2_host.yml #{cascade_host_file}]
10
+ cascade_original_file = File.join(File.dirname(__FILE__),'config','cascade2_host.yml')
11
+ FileUtils.copy(cascade_original_file, cascade_host_file)
11
12
  end
12
13
 
13
14
  # Loads the rconfig library
metadata CHANGED
@@ -1,83 +1,125 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rconfig
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.4
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-21 00:00:00.000000000 Z
11
+ date: 2016-08-22 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: '3.0'
19
+ version: '3.2'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>'
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '3.0'
26
+ version: '3.2'
27
+ - !ruby/object:Gem::Dependency
28
+ name: json
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">"
32
+ - !ruby/object:Gem::Version
33
+ version: 1.8.1
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">"
39
+ - !ruby/object:Gem::Version
40
+ version: 1.8.1
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '11.2'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '11.2'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rack
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: 1.4.2
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: 1.4.2
27
69
  - !ruby/object:Gem::Dependency
28
70
  name: rspec
29
71
  requirement: !ruby/object:Gem::Requirement
30
72
  requirements:
31
- - - '>'
73
+ - - ">"
32
74
  - !ruby/object:Gem::Version
33
75
  version: 2.3.0
34
76
  type: :development
35
77
  prerelease: false
36
78
  version_requirements: !ruby/object:Gem::Requirement
37
79
  requirements:
38
- - - '>'
80
+ - - ">"
39
81
  - !ruby/object:Gem::Version
40
82
  version: 2.3.0
41
83
  - !ruby/object:Gem::Dependency
42
84
  name: bundler
43
85
  requirement: !ruby/object:Gem::Requirement
44
86
  requirements:
45
- - - '>'
87
+ - - ">"
46
88
  - !ruby/object:Gem::Version
47
89
  version: 1.0.0
48
90
  type: :development
49
91
  prerelease: false
50
92
  version_requirements: !ruby/object:Gem::Requirement
51
93
  requirements:
52
- - - '>'
94
+ - - ">"
53
95
  - !ruby/object:Gem::Version
54
96
  version: 1.0.0
55
97
  - !ruby/object:Gem::Dependency
56
98
  name: jeweler
57
99
  requirement: !ruby/object:Gem::Requirement
58
100
  requirements:
59
- - - '>'
101
+ - - ">"
60
102
  - !ruby/object:Gem::Version
61
103
  version: 1.6.4
62
104
  type: :development
63
105
  prerelease: false
64
106
  version_requirements: !ruby/object:Gem::Requirement
65
107
  requirements:
66
- - - '>'
108
+ - - ">"
67
109
  - !ruby/object:Gem::Version
68
110
  version: 1.6.4
69
111
  - !ruby/object:Gem::Dependency
70
112
  name: i18n
71
113
  requirement: !ruby/object:Gem::Requirement
72
114
  requirements:
73
- - - '>='
115
+ - - ">="
74
116
  - !ruby/object:Gem::Version
75
117
  version: '0'
76
118
  type: :development
77
119
  prerelease: false
78
120
  version_requirements: !ruby/object:Gem::Requirement
79
121
  requirements:
80
- - - '>='
122
+ - - ">="
81
123
  - !ruby/object:Gem::Version
82
124
  version: '0'
83
125
  description: Configuration management library for Ruby applications.
@@ -87,9 +129,10 @@ executables: []
87
129
  extensions: []
88
130
  extra_rdoc_files: []
89
131
  files:
90
- - .gitignore
91
- - .rspec
92
- - .rvmrc
132
+ - ".gitignore"
133
+ - ".rspec"
134
+ - ".ruby-gemset"
135
+ - ".ruby-version"
93
136
  - ChangeLog
94
137
  - Credits
95
138
  - Gemfile
@@ -194,17 +237,17 @@ require_paths:
194
237
  - lib
195
238
  required_ruby_version: !ruby/object:Gem::Requirement
196
239
  requirements:
197
- - - '>='
240
+ - - ">="
198
241
  - !ruby/object:Gem::Version
199
242
  version: '0'
200
243
  required_rubygems_version: !ruby/object:Gem::Requirement
201
244
  requirements:
202
- - - '>='
245
+ - - ">="
203
246
  - !ruby/object:Gem::Version
204
247
  version: '0'
205
248
  requirements: []
206
249
  rubyforge_project:
207
- rubygems_version: 2.2.2
250
+ rubygems_version: 2.4.3
208
251
  signing_key:
209
252
  specification_version: 4
210
253
  summary: The complete solution for Ruby Configuration Management. RConfig is a Ruby
data/.rvmrc DELETED
@@ -1 +0,0 @@
1
- rvm use 2.0.0-p247@socialpro --create