svutil 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
data/.gemtest ADDED
File without changes
data/lib/svutil.rb CHANGED
@@ -6,5 +6,5 @@ require 'svutil/log'
6
6
  require 'svutil/process_manager'
7
7
 
8
8
  module SVUtil
9
- VERSION = '0.1.3'
9
+ VERSION = '0.1.4'
10
10
  end
data/lib/svutil/config.rb CHANGED
@@ -67,7 +67,9 @@ module SVUtil
67
67
  def init
68
68
  self.set do |c|
69
69
  process_options
70
- load_config_file
70
+ if File.exists?("settings") || self.config_file
71
+ load_config_file
72
+ end
71
73
  end
72
74
  end
73
75
 
data/test/test_config.rb CHANGED
@@ -49,6 +49,13 @@ class TestConfig < Test::Unit::TestCase
49
49
  assert_equal 'bar', Config.foo
50
50
  end
51
51
 
52
+ def test_load_config_file
53
+ Config.expects(:load_config_file).times(1)
54
+ Config.config_file = "test/settings"
55
+ Config.init
56
+ assert_equal 'bar', Config.foo
57
+ end
58
+
52
59
  # Command Line loses!
53
60
  def test_file_overide
54
61
  Config.expects(:validate).times(1)
@@ -56,7 +63,6 @@ class TestConfig < Test::Unit::TestCase
56
63
  Config.option_source = [ "-l", "logfile_set_on_cli" ]
57
64
  Config.init
58
65
  assert_equal "logfile_set_in_config_file", Config.log_file
59
-
60
66
  end
61
67
 
62
68
  def test_defaults
data/test/test_helper.rb CHANGED
@@ -1,3 +1,4 @@
1
+ require 'rubygems'
1
2
  require 'stringio'
2
3
  require 'test/unit'
3
4
  require 'mocha'
metadata CHANGED
@@ -1,62 +1,59 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: svutil
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 1
8
- - 3
9
- version: 0.1.3
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.4
5
+ prerelease:
10
6
  platform: ruby
11
- authors:
7
+ authors:
12
8
  - Daniel Draper
13
9
  autorequire:
14
10
  bindir: bin
15
11
  cert_chain: []
16
-
17
- date: 2011-02-08 00:00:00 +10:30
18
- default_executable:
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
12
+ date: 2011-12-16 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
21
15
  name: newgem
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
24
- requirements:
25
- - - ">="
26
- - !ruby/object:Gem::Version
27
- segments:
28
- - 1
29
- - 5
30
- - 3
16
+ requirement: &70109003953880 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
31
21
  version: 1.5.3
32
22
  type: :development
33
- version_requirements: *id001
34
- - !ruby/object:Gem::Dependency
23
+ prerelease: false
24
+ version_requirements: *70109003953880
25
+ - !ruby/object:Gem::Dependency
35
26
  name: hoe
27
+ requirement: &70109003952700 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ~>
31
+ - !ruby/object:Gem::Version
32
+ version: '2.12'
33
+ type: :development
36
34
  prerelease: false
37
- requirement: &id002 !ruby/object:Gem::Requirement
38
- requirements:
39
- - - ">="
40
- - !ruby/object:Gem::Version
41
- segments:
42
- - 2
43
- - 6
44
- - 0
45
- version: 2.6.0
35
+ version_requirements: *70109003952700
36
+ - !ruby/object:Gem::Dependency
37
+ name: rdoc
38
+ requirement: &70108999988520 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ~>
42
+ - !ruby/object:Gem::Version
43
+ version: '3.10'
46
44
  type: :development
47
- version_requirements: *id002
45
+ prerelease: false
46
+ version_requirements: *70108999988520
48
47
  description: A simple managed process builder for Ruby projects
49
- email:
48
+ email:
50
49
  - daniel@netfox.com
51
50
  executables: []
52
-
53
51
  extensions: []
54
-
55
- extra_rdoc_files:
52
+ extra_rdoc_files:
56
53
  - History.txt
57
54
  - Manifest.txt
58
55
  - PostInstall.txt
59
- files:
56
+ files:
60
57
  - History.txt
61
58
  - Manifest.txt
62
59
  - PostInstall.txt
@@ -68,38 +65,36 @@ files:
68
65
  - lib/svutil/process_manager.rb
69
66
  - test/test_helper.rb
70
67
  - test/test_svutil.rb
71
- has_rdoc: true
68
+ - test/test_config.rb
69
+ - test/test_defaults.rb
70
+ - .gemtest
72
71
  homepage: http://svutil.rubyforge.org
73
72
  licenses: []
74
-
75
73
  post_install_message: PostInstall.txt
76
- rdoc_options:
74
+ rdoc_options:
77
75
  - --main
78
76
  - README.rdoc
79
- require_paths:
77
+ require_paths:
80
78
  - lib
81
- required_ruby_version: !ruby/object:Gem::Requirement
82
- requirements:
83
- - - ">="
84
- - !ruby/object:Gem::Version
85
- segments:
86
- - 0
87
- version: "0"
88
- required_rubygems_version: !ruby/object:Gem::Requirement
89
- requirements:
90
- - - ">="
91
- - !ruby/object:Gem::Version
92
- segments:
93
- - 0
94
- version: "0"
79
+ required_ruby_version: !ruby/object:Gem::Requirement
80
+ none: false
81
+ requirements:
82
+ - - ! '>='
83
+ - !ruby/object:Gem::Version
84
+ version: '0'
85
+ required_rubygems_version: !ruby/object:Gem::Requirement
86
+ none: false
87
+ requirements:
88
+ - - ! '>='
89
+ - !ruby/object:Gem::Version
90
+ version: '0'
95
91
  requirements: []
96
-
97
92
  rubyforge_project: svutil
98
- rubygems_version: 1.3.6
93
+ rubygems_version: 1.8.6
99
94
  signing_key:
100
95
  specification_version: 3
101
96
  summary: Simple Process Builder for Ruby
102
- test_files:
97
+ test_files:
103
98
  - test/test_config.rb
104
99
  - test/test_defaults.rb
105
100
  - test/test_helper.rb