backup_jenkins 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -0
- data/Guardfile +5 -0
- data/lib/backup_jenkins/config.rb +9 -1
- data/lib/backup_jenkins/version.rb +1 -1
- data/spec/lib/backup_jenkins/config_spec.rb +5 -0
- metadata +3 -3
data/Gemfile
CHANGED
data/Guardfile
CHANGED
@@ -1,6 +1,11 @@
|
|
1
1
|
# A sample Guardfile
|
2
2
|
# More info at https://github.com/guard/guard#readme
|
3
3
|
|
4
|
+
guard 'bundler' do
|
5
|
+
watch('Gemfile')
|
6
|
+
watch(/^.+\.gemspec/)
|
7
|
+
end
|
8
|
+
|
4
9
|
guard 'rspec' do
|
5
10
|
watch(%r{^spec/.+_spec\.rb$})
|
6
11
|
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
|
@@ -31,7 +31,7 @@ module BackupJenkins
|
|
31
31
|
YAML.load_file(config_file_path)
|
32
32
|
rescue Errno::ENOENT
|
33
33
|
STDERR.puts "Please create a config file in #{config_file_path}"
|
34
|
-
STDERR.puts "\nIt should look like:\n\n#{
|
34
|
+
STDERR.puts "\nIt should look like:\n\n#{config_file_example}"
|
35
35
|
|
36
36
|
exit 1
|
37
37
|
end
|
@@ -39,5 +39,13 @@ module BackupJenkins
|
|
39
39
|
def config_file_path
|
40
40
|
"#{ENV['HOME']}/.config/backup_jenkins/config.yml"
|
41
41
|
end
|
42
|
+
|
43
|
+
def config_file_example
|
44
|
+
File.read(config_file_example_path)
|
45
|
+
end
|
46
|
+
|
47
|
+
def config_file_example_path
|
48
|
+
File.expand_path('../../../config/config-example.yml', __FILE__)
|
49
|
+
end
|
42
50
|
end
|
43
51
|
end
|
@@ -50,4 +50,9 @@ describe BackupJenkins::Config do
|
|
50
50
|
expect{ subject.send(:config_file) }.to raise_error SystemExit
|
51
51
|
end
|
52
52
|
end
|
53
|
+
|
54
|
+
describe "#config_file_example" do
|
55
|
+
regexp = %r{backup_jenkins/config/config-example.yml$}
|
56
|
+
it { subject.send(:config_file_example_path).should =~ regexp }
|
57
|
+
end
|
53
58
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: backup_jenkins
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -119,7 +119,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
119
119
|
version: '0'
|
120
120
|
segments:
|
121
121
|
- 0
|
122
|
-
hash:
|
122
|
+
hash: 3137851251409289632
|
123
123
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
124
124
|
none: false
|
125
125
|
requirements:
|
@@ -128,7 +128,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
128
128
|
version: '0'
|
129
129
|
segments:
|
130
130
|
- 0
|
131
|
-
hash:
|
131
|
+
hash: 3137851251409289632
|
132
132
|
requirements: []
|
133
133
|
rubyforge_project:
|
134
134
|
rubygems_version: 1.8.24
|