whiskey_disk 0.6.10 → 0.6.11

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,9 +1,13 @@
1
1
 
2
+ 0.6.11 / 2011-02-18
3
+ ==================
4
+
5
+ * Generate an error message when we can't find --to proj/env in a config
6
+ * Fixing typo in an integration spec's example text
7
+
2
8
  0.6.10 / 2011-02-08
3
9
  ==================
4
10
 
5
- * bump version to 0.6.10
6
- * Merge branch 'feature/improved-integration-specs' into develop
7
11
  * reorganizing integration specs
8
12
  * adding a quick README on how to run integration specs
9
13
  * adding a remote deployment integration spec
@@ -13,50 +17,29 @@
13
17
  * fixing 'unit@' --only local deployment WD.remote? bug
14
18
  * Adding initial integration spec suite
15
19
  * save +x chmod state to bin/wd
16
- * Merge branch 'develop' of git.ogtastic.com:whiskey_disk into develop
17
- * Merge branch 'hotfix/cd-before-post-scripts' into develop
18
20
  * adding --only support to wd binary
19
21
  * an ENV['only'] domain should deploy locally
20
22
  * adding support for ENV['none'] to WhiskeyDisk, ::Config
21
- * updating README to document upcoming --only / ENV['only'] functionality
22
23
  * WD.fetch now iterates over all domains, local or remote
23
24
  * reorganizing specs
24
25
  * make it an error for a domain to appear more than once in a given project/target
25
26
  * changing internal :domain representation
26
27
  * WhiskeyDisk.remote? now takes a domain argument
27
- * README updates for specifying local deployments via "local" domain
28
- * added tl;dr quickstart section to README
29
- * Merge branch 'feature/enable_pulling_deploy.yml_from_url' into develop
30
- * updating README to describe using --path URLs
31
28
  * can now specify path to deploy.yml info using an URL
32
- * Merge branch 'feature/move_todo_to_pivotal_tracker' into develop
33
- * removing TODO.txt
34
- * updating README to point to PT project instead of old TODO.txt file
35
29
 
36
30
  0.6.4 / 2011-01-26
37
31
  ==================
38
32
 
39
33
  * bugfix: cd to deploy_to path before running post_{setup,deploy}_script
40
- * update gemspec
41
- * Version bump to 0.6.4
42
34
 
43
35
  0.6.3 / 2011-01-13
44
36
  ==================
45
37
 
46
38
  * adding support for config_target in deploy.yml
47
- * updating README for upcoming config_target support
48
- * bumping version to 0.6.3
49
39
 
50
40
  0.6.2 / 2010-12-23
51
41
  ==================
52
42
 
53
- * bumping version to 0.6.2
54
- * Merge branch 'feature/support-domain-roles' into develop
55
- * updating README to document new roles functionality
56
- * even more README tweaks
57
- * more README tweaks
58
- * adding lib/tasks/deploy.rake example to README
59
- * refreshing gemspec
60
43
  * update multiple deployment example to use roles
61
44
  * new wd_role command for checking membership in a role from shell scripts
62
45
  * adding #role? method in whiskey_disk/helpers for role-based rake tasks
@@ -72,12 +55,9 @@
72
55
  0.6.0 / 2010-12-22
73
56
  ==================
74
57
 
75
- * Version bump to 0.6.0
76
- * Merge branch 'feature/multiple-domain-support' into develop
77
58
  * adding a set of multi-domain examples
78
59
  * adding a local deployment example
79
60
  * updating output summary to be more readable
80
- * updating README to document multi-domain deployments
81
61
  * rake exit statuses reflect overall deployment/setup success
82
62
  * adding WhiskeyDisk.success? method
83
63
  * We now summarize runs, both local and remote.
@@ -91,11 +71,7 @@
91
71
  0.5.4
92
72
  ==================
93
73
 
94
- * Merge branch 'release/0.5.4' into develop
95
- * bump gemspec for 0.5.4 release
96
- * Version bump to 0.5.4
97
74
  * Removing Jeweler warning from Rakefile
98
- * Merge branch 'feature/reduce-mocking-code-in-tests' into develop
99
75
  * eliminating more stubbing specs from config_spec
100
76
  * Removing more stub! calls from config specs
101
77
  * removing YAML.load exception stub
@@ -115,11 +91,6 @@
115
91
  0.5.3
116
92
  ==================
117
93
 
118
- * Merge branch 'release/0.5.3' into develop
119
- * updating gemspec for 0.5.3
120
- * updating Contributors section of README
121
- * Version bump to 0.5.3
122
- * Merge branch 'feature/merge-pull-request-2' into develop
123
94
  * Cosmetic and naming change in new config method
124
95
  * fixing spec example description
125
96
  * Reworking the config to append project name overrides to the env, since everything else is dependent thereupon
@@ -129,44 +100,21 @@
129
100
  0.5.2
130
101
  ==================
131
102
 
132
- * Merge branch 'release/0.5.2' into develop
133
- * updating gemspec for version 0.5.2
134
- * Bumping version to 0.5.2
135
- * Merge branch 'feature/ensure_target_needs_no_ruby' into develop
136
- * Updating TODO list
137
- * Updating README
138
- * Merge branch 'feature/make_check_a_wd_option' into develop
139
- * Updating TODO list
140
103
  * Adding --check flag to wd command-line script
141
- * Updating README with --check changes
142
- * Merge branch 'feature/use_shallow_clone_on_setup' into develop
143
- * Updating TODO list
144
- * Adding lightning talk info to README
145
104
  * Making shallow clones on initial setup
146
105
 
147
106
  0.5.0
148
107
  ==================
149
108
 
150
- * Merge branch 'release/0.5.0' into develop
151
- * updating gemspec for 0.5.0
152
- * Version bump to 0.5.0
153
- * Merge branch 'feature/alternate-hook-mechanism' into develop
154
- * TODO list updates
155
109
  * Make the rake test task do right by bacon
156
110
  * Adding post_setup_script support
157
111
  * Adding post_deploy_script support
158
112
  * Reordering specs for post-setup/deployment tasks
159
- * Updating README for post_*_script functionality
160
- * TODO file updates
161
113
 
162
114
  0.4.5
163
115
  ==================
164
116
 
165
- * Merge branch 'release/0.4.5' into develop
166
- * new gemspec for 0.4.5 release
167
- * Version bump to 0.4.5
168
117
  * ENV settings now available to rake when searching for tasks
169
- * Merge branch 'feature/refactor-methods' into develop
170
118
  * refactoring common code for rake tasks
171
119
  * further refactoring of clone_repository
172
120
  * refactoring update checkout methods
@@ -176,68 +124,38 @@
176
124
  0.4.4
177
125
  ==================
178
126
 
179
- * Merge branch 'release/0.4.4' into develop
180
- * 0.4.4 gemspec
181
- * Version bump to 0.4.4
182
- * Merge branch 'feature/readme-updates' into develop
183
- * TODO list tweakage
184
127
  * README updates
185
128
 
186
129
  0.4.3
187
130
  ==================
188
131
 
189
- * Merge branch 'release/0.4.3' into develop
190
- * updating gemspec
191
- * Version bump to 0.4.3
192
- * Updating TODO
193
132
  * Smarter setups
194
- * TODO updates
195
133
 
196
134
  0.4.2
197
135
  ==================
198
136
 
199
- * Version bump to 0.4.2
200
137
  * Taking a different approach to rake task detection
201
138
 
202
139
  0.4.1
203
140
  ==================
204
141
 
205
- * bumping gemspec
206
- * Version bump to 0.4.1
207
142
  * Fixing post_* hook edge case
208
- * More README updates
209
- * updating README
210
143
 
211
144
  0.4.0
212
145
  ==================
213
146
 
214
- * updated gemspec
215
- * adding staleness check docs to README
216
- * Version bump to 0.4.0
217
147
  * Make the staleness check actually work with bash.
218
148
  * Adding "else" block to provide feedback when not stale
219
149
  * More complete implementation of staleness checks
220
150
  * Removing earlier abortive implementation of staleness checking
221
151
  * Support for staleness checks
222
152
  * Adding first pass at conditional staleness checks
223
- * updating TODO list
224
- * README note about post_* rake task dependencies
225
153
 
226
154
  0.3.1
227
155
  ==================
228
156
 
229
- * updated gemspec
230
- * Version bump to 0.3.1
231
157
  * No longer require a Rakefile when --path isn't used
232
158
  * We no longer do per-target config file overrides
233
159
  * Don't run post_{setup,deploy} rake tasks without a deployed Rakefile
234
- * use 'target' instead of 'environment' in README
235
160
  * encoding < and >
236
- * more README tweaks
237
- * readme formatting tweak
238
- * make sure README.markdown is displayed on install
239
- * new and improved README
240
- * adding a simple deploy.yml example to the README
241
- * add link to live presentation to README
242
161
  * adding a check flag for use with staleness checks
243
- * english spike of staleness check in todo file
data/README.markdown CHANGED
@@ -767,6 +767,7 @@ to see what we have in mind for the near future.
767
767
  ### Contributors ###
768
768
 
769
769
  - Rick Bradley (rick@rickbradley.com, github:rick)
770
+ - Alex Sharp (ajsharp@gmail.com) - issues, real-world usage cases, design feedback
770
771
  - Jeremy Holland (jeremy@jeremypholland.com, github:therubyneck): feature/bugfix contributions
771
772
  - Kevin Barnes (@vinbarnes), Yossef Mendellsohn (cardioid) for design help and proofreading
772
773
  - Cristi Balan (evilchelu) for feedback and proofreading
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.10
1
+ 0.6.11
@@ -171,8 +171,8 @@ class WhiskeyDisk
171
171
  end
172
172
 
173
173
  def filter_data(data)
174
- current = data[project_name][environment_name]
175
- raise "No configuration file defined data for environment [#{environment_name}]" unless current
174
+ current = data[project_name][environment_name] rescue nil
175
+ raise "No configuration file defined data for project `#{project_name}`, environment `#{environment_name}`" unless current
176
176
 
177
177
  current.merge!({
178
178
  'environment' => environment_name,
@@ -0,0 +1,106 @@
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
@@ -40,7 +40,7 @@ integration_spec do
40
40
  File.exists?(deployed_file('project/README')).should == true
41
41
  end
42
42
 
43
- it 'should report the remoate deployment as successful' do
43
+ it 'should report the remote deployment as successful' do
44
44
  run_deploy(@args)
45
45
  File.read(integration_log).should =~ /wd-app1.example.com => succeeded/
46
46
  end
@@ -191,6 +191,11 @@ describe WhiskeyDisk::Config do
191
191
  set_config_url_response('production' => { 'repository' => 'b'}, 'staging' => staging)
192
192
  TestURLConfig.fetch['config_target'].should == 'testing'
193
193
  end
194
+
195
+ it 'should fail if the named target cannot be found' do
196
+ ENV['to'] = @env = 'bogus:thing'
197
+ lambda { TestURLConfig.fetch }.should.raise
198
+ end
194
199
  end
195
200
 
196
201
  describe 'and path specified is not an URL' do
@@ -203,7 +208,7 @@ describe WhiskeyDisk::Config do
203
208
  after do
204
209
  FileUtils.rm_rf(@path)
205
210
  end
206
-
211
+
207
212
  it 'should fail if the current environment cannot be determined' do
208
213
  ENV['to'] = nil
209
214
  lambda { WhiskeyDisk::Config.fetch }.should.raise
@@ -285,6 +290,11 @@ describe WhiskeyDisk::Config do
285
290
  write_config_file('production' => { 'repository' => 'b'}, 'staging' => staging)
286
291
  WhiskeyDisk::Config.fetch['config_target'].should == 'testing'
287
292
  end
293
+
294
+ it 'should fail if the named target cannot be found' do
295
+ ENV['to'] = @env = 'bogus:thing'
296
+ lambda { WhiskeyDisk::Config.fetch }.should.raise
297
+ end
288
298
  end
289
299
  end
290
300
 
data/whiskey_disk.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{whiskey_disk}
8
- s.version = "0.6.10"
8
+ s.version = "0.6.11"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Rick Bradley"]
12
- s.date = %q{2011-02-08}
12
+ s.date = %q{2011-02-20}
13
13
  s.description = %q{Opinionated gem for doing fast git-based server deployments.}
14
14
  s.email = %q{rick@rickbradley.com}
15
15
  s.executables = ["wd_role", "wd"]
@@ -87,6 +87,7 @@ Gem::Specification.new do |s|
87
87
  "spec/.bacon",
88
88
  "spec/init_spec.rb",
89
89
  "spec/install_spec.rb",
90
+ "spec/integration/deployment_failures_spec.rb",
90
91
  "spec/integration/invalid_configuration_spec.rb",
91
92
  "spec/integration/local_deployments_spec.rb",
92
93
  "spec/integration/remote_deployments_spec.rb",
@@ -107,6 +108,7 @@ Gem::Specification.new do |s|
107
108
  s.test_files = [
108
109
  "spec/init_spec.rb",
109
110
  "spec/install_spec.rb",
111
+ "spec/integration/deployment_failures_spec.rb",
110
112
  "spec/integration/invalid_configuration_spec.rb",
111
113
  "spec/integration/local_deployments_spec.rb",
112
114
  "spec/integration/remote_deployments_spec.rb",
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: whiskey_disk
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 17
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 6
9
- - 10
10
- version: 0.6.10
9
+ - 11
10
+ version: 0.6.11
11
11
  platform: ruby
12
12
  authors:
13
13
  - Rick Bradley
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-02-08 00:00:00 -06:00
18
+ date: 2011-02-20 00:00:00 -06:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -112,6 +112,7 @@ files:
112
112
  - spec/.bacon
113
113
  - spec/init_spec.rb
114
114
  - spec/install_spec.rb
115
+ - spec/integration/deployment_failures_spec.rb
115
116
  - spec/integration/invalid_configuration_spec.rb
116
117
  - spec/integration/local_deployments_spec.rb
117
118
  - spec/integration/remote_deployments_spec.rb
@@ -161,6 +162,7 @@ summary: embarrassingly fast deployments.
161
162
  test_files:
162
163
  - spec/init_spec.rb
163
164
  - spec/install_spec.rb
165
+ - spec/integration/deployment_failures_spec.rb
164
166
  - spec/integration/invalid_configuration_spec.rb
165
167
  - spec/integration/local_deployments_spec.rb
166
168
  - spec/integration/remote_deployments_spec.rb