whiskey_disk 0.6.11 → 0.6.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. data/CHANGELOG +8 -0
  2. data/README.markdown +2 -1
  3. data/Rakefile +4 -0
  4. data/VERSION +1 -1
  5. data/lib/whiskey_disk.rb +1 -1
  6. data/spec/spec_helper.rb +4 -0
  7. data/spec/whiskey_disk_spec.rb +2 -2
  8. data/whiskey_disk.gemspec +1 -54
  9. metadata +3 -56
  10. data/scenarios/git_repositories/config.git/HEAD +0 -1
  11. data/scenarios/git_repositories/config.git/config +0 -5
  12. data/scenarios/git_repositories/config.git/description +0 -1
  13. data/scenarios/git_repositories/config.git/git-daemon-export-ok +0 -0
  14. data/scenarios/git_repositories/config.git/hooks/applypatch-msg.sample +0 -15
  15. data/scenarios/git_repositories/config.git/hooks/commit-msg.sample +0 -24
  16. data/scenarios/git_repositories/config.git/hooks/post-commit.sample +0 -8
  17. data/scenarios/git_repositories/config.git/hooks/post-receive.sample +0 -15
  18. data/scenarios/git_repositories/config.git/hooks/post-update.sample +0 -8
  19. data/scenarios/git_repositories/config.git/hooks/pre-applypatch.sample +0 -14
  20. data/scenarios/git_repositories/config.git/hooks/pre-commit.sample +0 -46
  21. data/scenarios/git_repositories/config.git/hooks/pre-rebase.sample +0 -169
  22. data/scenarios/git_repositories/config.git/hooks/prepare-commit-msg.sample +0 -36
  23. data/scenarios/git_repositories/config.git/hooks/update.sample +0 -128
  24. data/scenarios/git_repositories/config.git/info/exclude +0 -6
  25. data/scenarios/git_repositories/config.git/objects/17/6bf54cf17d1d1c24556dc059c4144a5df230e8 +0 -0
  26. data/scenarios/git_repositories/config.git/objects/20/e9ff3feaa8ede30f707e5f1b4356e3c02bb7ec +0 -0
  27. data/scenarios/git_repositories/config.git/objects/45/117b1c775f0de415478dbf08ed9d667ab17d13 +0 -0
  28. data/scenarios/git_repositories/config.git/objects/71/eb5df52676e8e6efba471050b46978173af110 +0 -1
  29. data/scenarios/git_repositories/config.git/objects/d1/0bcd51fec41f854001e4d61f99d9e282a695d3 +0 -0
  30. data/scenarios/git_repositories/config.git/objects/e6/b02c66ad632e6b8535c4630cb8fe07732a72fc +0 -0
  31. data/scenarios/git_repositories/config.git/objects/f9/49d5d8a4f12c91471e34d4e277239c35ebd10d +0 -0
  32. data/scenarios/git_repositories/config.git/refs/heads/master +0 -1
  33. data/scenarios/git_repositories/project.git/HEAD +0 -1
  34. data/scenarios/git_repositories/project.git/config +0 -5
  35. data/scenarios/git_repositories/project.git/description +0 -1
  36. data/scenarios/git_repositories/project.git/git-daemon-export-ok +0 -0
  37. data/scenarios/git_repositories/project.git/hooks/applypatch-msg.sample +0 -15
  38. data/scenarios/git_repositories/project.git/hooks/commit-msg.sample +0 -24
  39. data/scenarios/git_repositories/project.git/hooks/post-commit.sample +0 -8
  40. data/scenarios/git_repositories/project.git/hooks/post-receive.sample +0 -15
  41. data/scenarios/git_repositories/project.git/hooks/post-update.sample +0 -8
  42. data/scenarios/git_repositories/project.git/hooks/pre-applypatch.sample +0 -14
  43. data/scenarios/git_repositories/project.git/hooks/pre-commit.sample +0 -46
  44. data/scenarios/git_repositories/project.git/hooks/pre-rebase.sample +0 -169
  45. data/scenarios/git_repositories/project.git/hooks/prepare-commit-msg.sample +0 -36
  46. data/scenarios/git_repositories/project.git/hooks/update.sample +0 -128
  47. data/scenarios/git_repositories/project.git/info/exclude +0 -6
  48. data/scenarios/git_repositories/project.git/objects/20/1c7641c2e42b0b904e5c1f793489d8b858e4da +0 -2
  49. data/scenarios/git_repositories/project.git/objects/80/26076649ceccbe96a6292f2432652f08483035 +0 -0
  50. data/scenarios/git_repositories/project.git/objects/ef/2a88894d5421920b9dfe67a9a4d8043830e62e +0 -0
  51. data/scenarios/git_repositories/project.git/refs/heads/master +0 -1
  52. data/scenarios/invalid/deploy.yml +0 -1
  53. data/scenarios/local/deploy.yml +0 -16
  54. data/scenarios/remote/deploy.yml +0 -5
  55. data/spec/integration/deployment_failures_spec.rb +0 -106
  56. data/spec/integration/invalid_configuration_spec.rb +0 -39
  57. data/spec/integration/local_deployments_spec.rb +0 -230
  58. data/spec/integration/remote_deployments_spec.rb +0 -54
@@ -1,16 +0,0 @@
1
- project:
2
- "local-default":
3
- deploy_to: "/tmp/wd-integration-target/destination/project"
4
- repository: "git://wd-git.example.com/project.git"
5
- "local-keyword":
6
- domain: "local"
7
- deploy_to: "/tmp/wd-integration-target/destination/project"
8
- repository: "git://wd-git.example.com/project.git"
9
- "local-user-domain":
10
- domain: "user@wd-app1.example.com"
11
- deploy_to: "/tmp/wd-integration-target/destination/project"
12
- repository: "git://wd-git.example.com/project.git"
13
- "local-domain":
14
- domain: "wd-app1.example.com"
15
- deploy_to: "/tmp/wd-integration-target/destination/project"
16
- repository: "git://wd-git.example.com/project.git"
@@ -1,5 +0,0 @@
1
- project:
2
- "remote":
3
- domain: "user@wd-app1.example.com"
4
- deploy_to: "/tmp/wd-integration-target/destination/project"
5
- repository: "git://wd-git.example.com/project.git"
@@ -1,106 +0,0 @@
1
- require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper.rb'))
2
- require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'lib', 'whiskey_disk'))
3
-
4
- integration_spec do
5
- describe 'when specified project cannot be found in the configuration' do
6
- before do
7
- setup_deployment_area
8
-
9
- @config = scenario_config('remote/deploy.yml')
10
- @args = "--path=#{@config} --to=bogus:remote"
11
- end
12
-
13
- describe 'and performing a setup' do
14
- it 'should not checkout a repository for the project to the target path' do
15
- run_setup(@args)
16
- File.exists?(deployed_file('bogus')).should == false
17
- end
18
-
19
- it 'should not checkout a repository for any project in the configuration file to the target path' do
20
- run_setup(@args)
21
- File.exists?(deployed_file('project')).should == false
22
- end
23
-
24
- it 'should include a helpful error message' do
25
- run_setup(@args)
26
- File.read(integration_log).should =~ /No configuration file defined data for project `bogus`/
27
- end
28
-
29
- it 'should exit with a false status' do
30
- run_setup(@args).should == false
31
- end
32
- end
33
-
34
- describe 'and performing a deployment' do
35
- before do
36
- checkout_repo('project')
37
- File.unlink(deployed_file('project/README')) # modify the deployed checkout
38
- end
39
-
40
- it 'should not checkout a repository for the project to the target path' do
41
- run_deploy(@args)
42
- File.exists?(deployed_file('bogus')).should == false
43
- end
44
-
45
- it 'should not update the repository for any project in the configuration file to the target path' do
46
- run_deploy(@args)
47
- File.exists?(deployed_file('project/README')).should == false
48
- end
49
-
50
- it 'should include a helpful error message' do
51
- run_deploy(@args)
52
- File.read(integration_log).should =~ /No configuration file defined data for project `bogus`/
53
- end
54
-
55
- it 'should exit with a false status' do
56
- run_deploy(@args).should == false
57
- end
58
- end
59
- end
60
-
61
- describe 'when specified environment cannot be found in the configuration' do
62
- before do
63
- setup_deployment_area
64
-
65
- @config = scenario_config('remote/deploy.yml')
66
- @args = "--path=#{@config} --to=project:bogus"
67
- end
68
-
69
- describe 'and performing a setup' do
70
- it 'should not checkout a repository for the project to the target path' do
71
- run_setup(@args)
72
- File.exists?(deployed_file('project')).should == false
73
- end
74
-
75
- it 'should include a helpful error message' do
76
- run_setup(@args)
77
- File.read(integration_log).should =~ /No configuration file defined data for project `project`, environment `bogus`/
78
- end
79
-
80
- it 'should exit with a false status' do
81
- run_setup(@args).should == false
82
- end
83
- end
84
-
85
- describe 'and performing a deployment' do
86
- before do
87
- checkout_repo('project')
88
- File.unlink(deployed_file('project/README')) # modify the deployed checkout
89
- end
90
-
91
- it 'should not update the repository for the project to the target path' do
92
- run_deploy(@args)
93
- File.exists?(deployed_file('project/README')).should == false
94
- end
95
-
96
- it 'should include a helpful error message' do
97
- run_deploy(@args)
98
- File.read(integration_log).should =~ /No configuration file defined data for project `project`, environment `bogus`/
99
- end
100
-
101
- it 'should exit with a false status' do
102
- run_deploy(@args).should == false
103
- end
104
- end
105
- end
106
- end
@@ -1,39 +0,0 @@
1
- require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper.rb'))
2
- require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'lib', 'whiskey_disk'))
3
-
4
- integration_spec do
5
- describe 'when an invalid configuration file is specified' do
6
- before do
7
- setup_deployment_area
8
- @config = scenario_config('invalid/deploy.yml')
9
- @args = "--path=#{@config} --to=project:invalid"
10
- end
11
-
12
- describe 'performing a setup' do
13
- it 'should exit with a false status' do
14
- run_setup(@args).should == false
15
- end
16
-
17
- it 'should not create a repo checkout' do
18
- run_setup(@args)
19
- File.exists?(deployed_file('project')).should == false
20
- end
21
- end
22
-
23
- describe 'performing a deployment' do
24
- before do
25
- checkout_repo('project')
26
- File.unlink(deployed_file('project/README')) # modify the deployed checkout
27
- end
28
-
29
- it 'should exit with a false status' do
30
- run_deploy(@args).should == false
31
- end
32
-
33
- it 'should not update a repo checkout' do
34
- run_deploy(@args)
35
- File.exists?(deployed_file('project/README')).should == false
36
- end
37
- end
38
- end
39
- end
@@ -1,230 +0,0 @@
1
- require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper.rb'))
2
- require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'lib', 'whiskey_disk'))
3
-
4
- integration_spec do
5
- describe 'when configured for a local deployment' do
6
- before do
7
- setup_deployment_area
8
- end
9
-
10
- describe 'when the configuration specifies no domain' do
11
- before do
12
- @config = scenario_config('local/deploy.yml')
13
- @args = "--path=#{@config} --to=project:local-default"
14
- end
15
-
16
- describe 'performing a setup' do
17
- it 'should perform a checkout of the repository to the target path' do
18
- run_setup(@args)
19
- File.exists?(deployed_file('project/README')).should == true
20
- end
21
-
22
- it 'should report the local setup as successful' do
23
- run_setup(@args)
24
- File.read(integration_log).should =~ /local => succeeded/
25
- end
26
-
27
- it 'should exit with a true status' do
28
- run_setup(@args).should == true
29
- end
30
- end
31
-
32
- describe 'performing a deployment' do
33
- before do
34
- checkout_repo('project')
35
- File.unlink(deployed_file('project/README')) # modify the deployed checkout
36
- end
37
-
38
- it 'should update the checkout of the repository on the target path' do
39
- run_deploy(@args)
40
- File.exists?(deployed_file('project/README')).should == true
41
- end
42
-
43
- it 'should report the local deployment as successful' do
44
- run_deploy(@args)
45
- File.read(integration_log).should =~ /local => succeeded/
46
- end
47
-
48
- it 'should exit with a true status' do
49
- run_deploy(@args).should == true
50
- end
51
- end
52
- end
53
-
54
- describe 'when the configuration specifies a single domain via the "local" keyword' do
55
- before do
56
- @config = scenario_config('local/deploy.yml')
57
- @args = "--path=#{@config} --to=project:local-keyword"
58
- end
59
-
60
- describe 'performing a setup' do
61
- it 'should perform a checkout of the repository to the target path' do
62
- run_setup(@args)
63
- File.exists?(deployed_file('project/README')).should == true
64
- end
65
-
66
- it 'should report the local setup as successful' do
67
- run_setup(@args)
68
- File.read(integration_log).should =~ /local => succeeded/
69
- end
70
-
71
- it 'should exit with a true status' do
72
- run_setup(@args).should == true
73
- end
74
- end
75
-
76
- describe 'performing a deployment' do
77
- before do
78
- checkout_repo('project')
79
- File.unlink(deployed_file('project/README')) # modify the deployed checkout
80
- end
81
-
82
- it 'should update the checkout of the repository on the target path' do
83
- run_deploy(@args)
84
- File.exists?(deployed_file('project/README')).should == true
85
- end
86
-
87
- it 'should report the local deployment as successful' do
88
- run_deploy(@args)
89
- File.read(integration_log).should =~ /local => succeeded/
90
- end
91
-
92
- it 'should exit with a true status' do
93
- run_deploy(@args).should == true
94
- end
95
- end
96
- end
97
-
98
- describe 'when the configuration specifies a single domain specified as user@domain, using --only=domain' do
99
- before do
100
- @config = scenario_config('local/deploy.yml')
101
- @args = "--path=#{@config} --to=project:local-user-domain --only=wd-app1.example.com"
102
- end
103
-
104
- describe 'performing a setup' do
105
- it 'should perform a checkout of the repository to the target path' do
106
- run_setup(@args)
107
- File.exists?(deployed_file('project/README')).should == true
108
- end
109
-
110
- it 'should report the named domain setup as successful' do
111
- run_setup(@args)
112
- File.read(integration_log).should =~ /wd-app1\.example\.com => succeeded/
113
- end
114
-
115
- it 'should exit with a true status' do
116
- run_setup(@args).should == true
117
- end
118
- end
119
-
120
- describe 'performing a deployment' do
121
- before do
122
- checkout_repo('project')
123
- File.unlink(deployed_file('project/README')) # modify the deployed checkout
124
- end
125
-
126
- it 'should update the checkout of the repository on the target path' do
127
- run_deploy(@args)
128
- File.exists?(deployed_file('project/README')).should == true
129
- end
130
-
131
- it 'should report the named domain deployment as successful' do
132
- run_deploy(@args)
133
- File.read(integration_log).should =~ /wd-app1\.example\.com => succeeded/
134
- end
135
-
136
- it 'should exit with a true status' do
137
- run_deploy(@args).should == true
138
- end
139
- end
140
- end
141
-
142
- describe 'when the configuration specifies a single domain without username, using --only=domain' do
143
- before do
144
- @config = scenario_config('local/deploy.yml')
145
- @args = "--path=#{@config} --to=project:local-domain --only=wd-app1.example.com"
146
- end
147
-
148
- describe 'performing a setup' do
149
- it 'should perform a checkout of the repository to the target path' do
150
- run_setup(@args)
151
- File.exists?(deployed_file('project/README')).should == true
152
- end
153
-
154
- it 'should report the named domain setup as successful' do
155
- run_setup(@args)
156
- File.read(integration_log).should =~ /wd-app1\.example\.com => succeeded/
157
- end
158
-
159
- it 'should exit with a true status' do
160
- run_setup(@args).should == true
161
- end
162
- end
163
-
164
- describe 'performing a deployment' do
165
- before do
166
- checkout_repo('project')
167
- File.unlink(deployed_file('project/README')) # modify the deployed checkout
168
- end
169
-
170
- it 'should update the checkout of the repository on the target path' do
171
- run_deploy(@args)
172
- File.exists?(deployed_file('project/README')).should == true
173
- end
174
-
175
- it 'should report the named domain deployment as successful' do
176
- run_deploy(@args)
177
- File.read(integration_log).should =~ /wd-app1\.example\.com => succeeded/
178
- end
179
-
180
- it 'should exit with a true status' do
181
- run_deploy(@args).should == true
182
- end
183
- end
184
- end
185
-
186
- describe 'when the configuration specifies a single domain which does not match the --only domain' do
187
- before do
188
- @config = scenario_config('local/deploy.yml')
189
- @args = "--path=#{@config} --to=project:local-domain --only=wd-app2.example.com"
190
- end
191
-
192
- describe 'performing a setup' do
193
- it 'should not perform a checkout of the repository to the target path' do
194
- run_setup(@args)
195
- File.exists?(deployed_file('project/README')).should == false
196
- end
197
-
198
- it 'should report that there were no deployments' do
199
- run_setup(@args)
200
- File.read(integration_log).should =~ /No deployments/
201
- end
202
-
203
- it 'should exit with a true status' do
204
- run_setup(@args).should == true
205
- end
206
- end
207
-
208
- describe 'performing a deployment' do
209
- before do
210
- checkout_repo('project')
211
- File.unlink(deployed_file('project/README')) # modify the deployed checkout
212
- end
213
-
214
- it 'should not update the checkout of the repository on the target path' do
215
- run_deploy(@args)
216
- File.exists?(deployed_file('project/README')).should == false
217
- end
218
-
219
- it 'should report that there were no deployments' do
220
- run_deploy(@args)
221
- File.read(integration_log).should =~ /No deployments/
222
- end
223
-
224
- it 'should exit with a true status' do
225
- run_deploy(@args).should == true
226
- end
227
- end
228
- end
229
- end
230
- end
@@ -1,54 +0,0 @@
1
- require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper.rb'))
2
- require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'lib', 'whiskey_disk'))
3
-
4
- integration_spec do
5
- describe 'when configured for a remote deployment' do
6
- before do
7
- setup_deployment_area
8
- end
9
-
10
- describe 'with a single remote domain' do
11
- before do
12
- @config = scenario_config('remote/deploy.yml')
13
- @args = "--path=#{@config} --to=project:remote"
14
- end
15
-
16
- describe 'performing a setup' do
17
- it 'should perform a checkout of the repository to the target path' do
18
- run_setup(@args)
19
- File.exists?(deployed_file('project/README')).should == true
20
- end
21
-
22
- it 'should report the remote setup as successful' do
23
- run_setup(@args)
24
- File.read(integration_log).should =~ /wd-app1.example.com => succeeded/
25
- end
26
-
27
- it 'should exit with a true status' do
28
- run_setup(@args).should == true
29
- end
30
- end
31
-
32
- describe 'performing a deployment' do
33
- before do
34
- checkout_repo('project')
35
- File.unlink(deployed_file('project/README')) # modify the deployed checkout
36
- end
37
-
38
- it 'should update the checkout of the repository on the target path' do
39
- run_deploy(@args)
40
- File.exists?(deployed_file('project/README')).should == true
41
- end
42
-
43
- it 'should report the remote deployment as successful' do
44
- run_deploy(@args)
45
- File.read(integration_log).should =~ /wd-app1.example.com => succeeded/
46
- end
47
-
48
- it 'should exit with a true status' do
49
- run_deploy(@args).should == true
50
- end
51
- end
52
- end
53
- end
54
- end