backup_jenkins 0.0.14 → 0.0.15

Sign up to get free protection for your applications and to get access to all the features.
@@ -50,6 +50,7 @@ module BackupJenkins
50
50
  end
51
51
 
52
52
  def copy_files
53
+ create_dir_and_copy(config_file)
53
54
  create_dir_and_copy(plugin_files)
54
55
  create_dir_and_copy(user_content_files)
55
56
  create_dir_and_copy(user_files)
@@ -76,6 +77,10 @@ module BackupJenkins
76
77
  "#{backup_directory}/#{file_name.gsub(%r{#{config.jenkins.home}}, "")}".gsub(%r{//}, '/')
77
78
  end
78
79
 
80
+ def config_file
81
+ Dir["#{config.jenkins.home}/config.xml"]
82
+ end
83
+
79
84
  def plugin_files
80
85
  Dir["#{config.jenkins.home}/plugins/*.jpi"] +
81
86
  Dir["#{config.jenkins.home}/plugins/*.jpi.pinned"] +
@@ -1,3 +1,3 @@
1
1
  module BackupJenkins
2
- VERSION = "0.0.14"
2
+ VERSION = "0.0.15"
3
3
  end
@@ -55,6 +55,7 @@ describe BackupJenkins::Backup do
55
55
 
56
56
  describe "#copy_files" do
57
57
  before do
58
+ subject.stub(:config_file).and_return("config_file")
58
59
  subject.stub(:plugin_files).and_return("plugin_files")
59
60
  subject.stub(:user_content_files).and_return("user_content_files")
60
61
  subject.stub(:user_files).and_return("user_files")
@@ -65,6 +66,7 @@ describe BackupJenkins::Backup do
65
66
 
66
67
  after { subject.send(:copy_files) }
67
68
 
69
+ it { subject.should_receive(:create_dir_and_copy).with("config_file") }
68
70
  it { subject.should_receive(:create_dir_and_copy).with("plugin_files") }
69
71
  it { subject.should_receive(:create_dir_and_copy).with("user_content_files") }
70
72
  it { subject.should_receive(:create_dir_and_copy).with("user_files") }
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.14
4
+ version: 0.0.15
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-27 00:00:00.000000000 Z
12
+ date: 2012-12-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: aws-sdk
16
- requirement: !ruby/object:Gem::Requirement
16
+ requirement: &33876820 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,15 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
27
- - - ! '>='
28
- - !ruby/object:Gem::Version
29
- version: '0'
24
+ version_requirements: *33876820
30
25
  - !ruby/object:Gem::Dependency
31
26
  name: hashie
32
- requirement: !ruby/object:Gem::Requirement
27
+ requirement: &33876400 !ruby/object:Gem::Requirement
33
28
  none: false
34
29
  requirements:
35
30
  - - ! '>='
@@ -37,15 +32,10 @@ dependencies:
37
32
  version: '0'
38
33
  type: :runtime
39
34
  prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - ! '>='
44
- - !ruby/object:Gem::Version
45
- version: '0'
35
+ version_requirements: *33876400
46
36
  - !ruby/object:Gem::Dependency
47
37
  name: command_line_helper
48
- requirement: !ruby/object:Gem::Requirement
38
+ requirement: &33875980 !ruby/object:Gem::Requirement
49
39
  none: false
50
40
  requirements:
51
41
  - - ! '>='
@@ -53,15 +43,10 @@ dependencies:
53
43
  version: '0'
54
44
  type: :runtime
55
45
  prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
- requirements:
59
- - - ! '>='
60
- - !ruby/object:Gem::Version
61
- version: '0'
46
+ version_requirements: *33875980
62
47
  - !ruby/object:Gem::Dependency
63
48
  name: rake
64
- requirement: !ruby/object:Gem::Requirement
49
+ requirement: &33875560 !ruby/object:Gem::Requirement
65
50
  none: false
66
51
  requirements:
67
52
  - - ! '>='
@@ -69,15 +54,10 @@ dependencies:
69
54
  version: '0'
70
55
  type: :development
71
56
  prerelease: false
72
- version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
- requirements:
75
- - - ! '>='
76
- - !ruby/object:Gem::Version
77
- version: '0'
57
+ version_requirements: *33875560
78
58
  - !ruby/object:Gem::Dependency
79
59
  name: guard
80
- requirement: !ruby/object:Gem::Requirement
60
+ requirement: &33875140 !ruby/object:Gem::Requirement
81
61
  none: false
82
62
  requirements:
83
63
  - - ! '>='
@@ -85,15 +65,10 @@ dependencies:
85
65
  version: '0'
86
66
  type: :development
87
67
  prerelease: false
88
- version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
- requirements:
91
- - - ! '>='
92
- - !ruby/object:Gem::Version
93
- version: '0'
68
+ version_requirements: *33875140
94
69
  - !ruby/object:Gem::Dependency
95
70
  name: guard-bundler
96
- requirement: !ruby/object:Gem::Requirement
71
+ requirement: &33874720 !ruby/object:Gem::Requirement
97
72
  none: false
98
73
  requirements:
99
74
  - - ! '>='
@@ -101,15 +76,10 @@ dependencies:
101
76
  version: '0'
102
77
  type: :development
103
78
  prerelease: false
104
- version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
- requirements:
107
- - - ! '>='
108
- - !ruby/object:Gem::Version
109
- version: '0'
79
+ version_requirements: *33874720
110
80
  - !ruby/object:Gem::Dependency
111
81
  name: guard-rspec
112
- requirement: !ruby/object:Gem::Requirement
82
+ requirement: &33874300 !ruby/object:Gem::Requirement
113
83
  none: false
114
84
  requirements:
115
85
  - - ! '>='
@@ -117,15 +87,10 @@ dependencies:
117
87
  version: '0'
118
88
  type: :development
119
89
  prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
- requirements:
123
- - - ! '>='
124
- - !ruby/object:Gem::Version
125
- version: '0'
90
+ version_requirements: *33874300
126
91
  - !ruby/object:Gem::Dependency
127
92
  name: terminal-notifier-guard
128
- requirement: !ruby/object:Gem::Requirement
93
+ requirement: &33873860 !ruby/object:Gem::Requirement
129
94
  none: false
130
95
  requirements:
131
96
  - - ! '>='
@@ -133,12 +98,7 @@ dependencies:
133
98
  version: '0'
134
99
  type: :development
135
100
  prerelease: false
136
- version_requirements: !ruby/object:Gem::Requirement
137
- none: false
138
- requirements:
139
- - - ! '>='
140
- - !ruby/object:Gem::Version
141
- version: '0'
101
+ version_requirements: *33873860
142
102
  description: Simple Jenkins config and plugin backup to S3
143
103
  email:
144
104
  - jcmuller@gmail.com
@@ -191,15 +151,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
191
151
  version: '0'
192
152
  requirements: []
193
153
  rubyforge_project:
194
- rubygems_version: 1.8.24
154
+ rubygems_version: 1.8.15
195
155
  signing_key:
196
156
  specification_version: 3
197
157
  summary: This gem allows you to get a backup instance of jenkins up and running pretty
198
158
  quickly
199
159
  test_files:
200
- - spec/lib/backup_jenkins/aws_spec.rb
160
+ - spec/lib/backup_jenkins/formatter_spec.rb
201
161
  - spec/lib/backup_jenkins/backup_spec.rb
202
162
  - spec/lib/backup_jenkins/cli_spec.rb
203
163
  - spec/lib/backup_jenkins/config_spec.rb
204
- - spec/lib/backup_jenkins/formatter_spec.rb
205
- has_rdoc:
164
+ - spec/lib/backup_jenkins/aws_spec.rb