webbynode 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of webbynode might be problematic. Click here for more details.

data/Manifest CHANGED
@@ -7,6 +7,7 @@ Rakefile
7
7
  assets/webbynode.png
8
8
  bin/webbynode
9
9
  bin/wn
10
+ changelog.rdoc
10
11
  cucumber.yml
11
12
  devver.rake
12
13
  features/bootstrap.feature
@@ -39,6 +40,7 @@ lib/webbynode/commands/stop.rb
39
40
  lib/webbynode/commands/tasks.rb
40
41
  lib/webbynode/commands/version.rb
41
42
  lib/webbynode/commands/webbies.rb
43
+ lib/webbynode/gemfile.rb
42
44
  lib/webbynode/git.rb
43
45
  lib/webbynode/io.rb
44
46
  lib/webbynode/notify.rb
@@ -87,6 +89,7 @@ spec/webbynode/commands/remote_spec.rb
87
89
  spec/webbynode/commands/tasks_spec.rb
88
90
  spec/webbynode/commands/version_spec.rb
89
91
  spec/webbynode/commands/webbies_spec.rb
92
+ spec/webbynode/gemfile_spec.rb
90
93
  spec/webbynode/git_spec.rb
91
94
  spec/webbynode/io_spec.rb
92
95
  spec/webbynode/option_spec.rb
@@ -94,3 +97,4 @@ spec/webbynode/parameter_spec.rb
94
97
  spec/webbynode/push_and_spec.rb
95
98
  spec/webbynode/remote_executor_spec.rb
96
99
  spec/webbynode/server_spec.rb
100
+ webbynode.gemspec
data/Rakefile CHANGED
@@ -4,13 +4,14 @@ require 'rake/testtask'
4
4
 
5
5
  require 'echoe'
6
6
 
7
- Echoe.new('webbynode', '0.2.3') do |p|
7
+ Echoe.new('webbynode', '0.2.4') do |p|
8
8
  p.description = "Webbynode Deployment Gem"
9
9
  p.url = "http://webbynode.com"
10
10
  p.author = "Felipe Coury"
11
11
  p.email = "felipe@webbynode.com"
12
12
  p.ignore_pattern = ["tmp/*", "script/*"]
13
13
  p.dependencies = [
14
+ ['bundler', '>=0.9.26'],
14
15
  ['net-ssh', '>=2.0.20'],
15
16
  ['highline', '>=1.5.2'],
16
17
  ['httparty', '>=0.4.5'],
data/changelog.rdoc ADDED
@@ -0,0 +1,354 @@
1
+ = CHANGELOG
2
+
3
+ == 2010-06-24 Felipe Coury
4
+
5
+ * Rails 3 autodetection
6
+ * Small typo on Gemfile error message
7
+ * Uses bundler to check for sqlite3-ruby dependency in Gemfile. If found, issues an error message with proper instructions. Closes #6.
8
+ * Fixed version command
9
+ * Stops tracking db/schema.rb and config/database.yml if there is an existing git repo. Closes #7. Doesn't allow init to run if current app in on a dirty git state.
10
+
11
+ == 2010-06-23 Felipe Coury
12
+
13
+ * Adds db/schema.rb and config/database.yml to .gitignore. Closes #7.
14
+
15
+ == 2010-03-28 Felipe Coury
16
+
17
+ * When init is run for a second time, offers the user the possibility to overwrite settings. Gemspec Bumped to 0.2.3.
18
+
19
+ == 2010-03-16 Felipe Coury
20
+
21
+ * If .gitconfig has a pair and a section with same name, an error was thrown. Fixes #5.
22
+
23
+ == 2010-02-25 Felipe Coury
24
+
25
+ * Fixed small problem with FileUtils
26
+
27
+ == 2010-02-16 Felipe Coury
28
+
29
+ * Moved dependencies up
30
+ * Fixed dependencies to include net-ssh and highline
31
+
32
+ == 2010-02-06 Felipe Coury
33
+
34
+ * Fixed spec error on api_client_spec
35
+
36
+ == 2010-02-05 Felipe Coury
37
+
38
+ * Fixed install message.
39
+ * Improved log messages
40
+ * Added `webbies' command
41
+
42
+ == 2010-02-03 Felipe Coury
43
+
44
+ * When user doesn't pick a DNS, uses application name as DNS (for app_name.webbyapp.com). Fixed commands summary to less than 80 chars. Improved feedback messages.
45
+ * Added command `add_backup' to configure backup to S3
46
+ * Keep setting about deployment on a single properties file called .webbynode/settings
47
+
48
+ == 2010-02-02 Felipe Coury
49
+
50
+ * Changing DNS is only allowed if git has no pending changes. Now it creates a new git commit with the change.
51
+ * Fixed the error message when an unkown option is provided and added generic --help option (same as wn help <cmd>)
52
+ * Doesn't allow user to push when application has changes pending, unless the --dirty option is provided.
53
+ * Checks if file exists
54
+ * Checks if file exists
55
+
56
+ == 2010-02-01 Felipe Coury
57
+
58
+ * Uses git to delete the alias
59
+ * Removes DNS_ALIAS from git as well
60
+ * Removes the alias when changing DNS
61
+ * Better handling of DNS entries. Uses Domainatrix to set www and blank A records when needed.
62
+ * Initializes .webbynode directory structure
63
+ * Initial steps of the `webbies' command
64
+ * Made the installation message shorter and pointing to the Guides page
65
+ * Improved output from commands
66
+ * Added change_dns to webbynode.rb
67
+ * Added option to create a file with executable permissions
68
+ * Added change_dns command
69
+ * Validations were raising exceptions instead of providing the user with an error message.
70
+ * Manifest
71
+ * Improved formatting and text of help messages.
72
+ * Removed legacy files commands and helpers
73
+
74
+ == 2010-02-01 Michael van Rooijen
75
+
76
+ * Updated the install message.
77
+ * made the yes? no? command more readable.
78
+ * downcase yes? and no? methods to make it more fail proof.
79
+ * Forgot to add an exit method. No error will be raised when a non existent command is passed in as an argument.
80
+ * When running the help command with no arguments, will default to 'help commands' so a list of available commands will be displayed.
81
+ * Fixed GrowlNotify detection bug.
82
+
83
+ == 2010-01-31 Felipe Coury
84
+
85
+ * Manifest
86
+ * Shows available commands when no arguments give. Large room for improvement on formatting.
87
+ * Added summary for alias
88
+ * Added 'help commands' and summary to all commands
89
+ * Added summary for Config command and some aliases
90
+ * Added config command.
91
+ * Uses CommandError when we need to provide feedback to the user
92
+ * Handles Unauthorized errors on the Command base class
93
+ * Bumped version to 0.2.0
94
+ * Removed debug leftover
95
+ * Added a warning when the DNS is already setup and using init with --dns option.
96
+ * Merge branch 'master' of github.com:meskyanichi/webbynode
97
+ * Added --engine option to init command and fixed Mocha warning.
98
+ * Fixed API token checking
99
+
100
+ == 2010-01-31 Michael van Rooijen
101
+
102
+ * Added confirmation for when a user invokes the start/stop/restart commands.
103
+ * Fixed incorrect status.
104
+ * Merge branch 'master' of github.com:meskyanichi/webbynode
105
+ * Added Start Stop Restart commands.
106
+
107
+ == 2010-01-30 Felipe Coury
108
+
109
+ * Creates the DNS entry when option --dns is passed to wn init
110
+ * Added error handling for the API email and token (when it's wrong, not provided) during interactive or loaded from file session
111
+ * Checks if Webby exists on init command. Reports a different error when the user mispelled the Webby name and when the user doesn't have any Webby on his account.
112
+
113
+ == 2010-01-29 Michael van Rooijen
114
+
115
+ * Cleaned up code and renamed all "server" to "webby" because we're cool like that.
116
+ * Adjusted the SSH class to log a friendly message, instead of an ugly raised error, to the user when the authentication fails even after providing a password. Also when the server could not be found / is offline, another friendly message will be displayed. This should globally fix the remote/connection ugly error stuff for all commands. (afaik!)
117
+ * Updated push spec.
118
+ * Added a friendly message incase the application has not been deployed to the webby.
119
+ * Slightly adjusted the Push command for cleaner code and nicer user feedback through log/growl.
120
+ * Fixed the message for the delete command.
121
+ * Changes the message the user sees when adding a local ssh key to the webby.
122
+ * Removed the global validation method that only applies to the remote command.
123
+ * Added Easter Egg when pushand isn't present!
124
+ * Removed DS_Store file and added it to gitignore..
125
+ * Merge branch 'master' of github.com:meskyanichi/webbynode
126
+ * Added Growl Notifications to Webbynode Gem for users that have it installed.
127
+
128
+ == 2010-01-28 Felipe Coury
129
+
130
+ * Added über simple validation for Options and Parameters. Applied validation rules for tasks command.
131
+ * Manifest
132
+ * Added `delete' command and improved `push'
133
+ * Additional spec for Array parameters
134
+ * Added `summary' option to Commands
135
+ * Removed commented out left overs
136
+
137
+ == 2010-01-28 Michael van Rooijen
138
+
139
+ * displays a friendly message when no aliases have been set.
140
+ * When an official Webbynode command is not found, the gem will attempt to read the aliases file and see if an alias has been set up for the specified command. If so, it will extract the command and execute it on the remote server from the application root.
141
+ * Added a method that can extract the command from a given alias.
142
+ * Added some custom validations for Alias command for determining if the provided command is blank or already exists. Will display a friendly message to the user if so in both cases.
143
+ * You can now display the list of available aliases by calling: wn aliases show. A list of aliases will now be shown after each add or remove action.
144
+ * You can now also remove aliases with the alias command.
145
+ * Base functionality has been added for adding aliases.
146
+ * Base setup for Aliases Command.
147
+
148
+ == 2010-01-27 Felipe Coury
149
+
150
+ * Array parameters allowed in any position
151
+ * Merge branch 'master' of github.com:meskyanichi/webbynode
152
+ * Merge branch 'master' of github.com:meskyanichi/webbynode
153
+ * Tests array params
154
+ * Avoid using map &:method to be 1.8.6 compatible
155
+ * Manifest. Gem starts to work again, thanks to integration testing :)
156
+ * Added first cucumber feature
157
+ * Improved command parsing and added `help' command
158
+
159
+ == 2010-01-27 Michael van Rooijen
160
+
161
+ * Fixed issue with the webbynode addkey command. Now properly executes.
162
+ * Added two more RSpec tests for Push Command.
163
+ * Removed the arguments for the Tasks initializer, as they are no longer required.
164
+ * Added Push Command.
165
+ * Added a new method to the Task class. Made a few methods public.
166
+ * made some adjustments to various stuff. base setup for push.
167
+ * Added version command.
168
+ * Changed back to Array parameter type.
169
+ * Fixed issues for Tasks. All tests pass again.
170
+ * current issues commit
171
+ * Removed before_create and after_create.
172
+ * Adjusted some tests based on the changes that had to be made to fix the issues.
173
+ * Restructured the server class. the ip attr never got set and it could never connect to the webby through the remote_executor method.
174
+ * Fixed output problem. Had to add an echo parameter which wasn't available.
175
+ * removed .webbynode
176
+
177
+ == 2010-01-26 Felipe Coury
178
+
179
+ * It's the commands revolution! Run for your lives!
180
+ * Fixed failing errors
181
+ * Merge branch 'master' of github.com:meskyanichi/webbynode
182
+ * Added support for capturing stdout (puts) and performing assertions after testings that emit output.
183
+
184
+ == 2010-01-26 Michael van Rooijen
185
+
186
+ * Fixed the final issues with the tasks command. Should now work properly. Init command should now create a .webbynode folder as well. Tasks folder and files will be automatically created by the Tasks command when needed.
187
+ * Merge branch 'master' of github.com:meskyanichi/webbynode
188
+ * pointless commit. but i wanted to merge
189
+ * Added a Webbynode::DirectoryNotFound exception class. requires_initialization! now also confirms the existence of .webbynode folder. Task command will no longer attempt to create a .webbynode folder since this should already exist, and is being confirmed initially before performing any actions.
190
+ * Added more tests for the opposite of the creation of files and folders for the tasks command.
191
+ * Ensures the availability of the .webbynode/tasks folder and task files within this folder.
192
+ * Updated tasks to output a message, telling the user that he has not yet set up any tasks.
193
+ * Renamed selected_file/selected_tasks to session_file/session_tasks.
194
+ * Added show method for Tasks
195
+ * Added remove command for Tasks.
196
+
197
+ == 2010-01-25 Felipe Coury
198
+
199
+ * Fixed Rakefile
200
+ * Added devver.rake
201
+ * Added jcode require to use each_char
202
+ * Merge branch 'master' of github.com:meskyanichi/webbynode
203
+ * Added support for command descriptor methods to allow dynamic help and validation
204
+
205
+ == 2010-01-25 Michael van Rooijen
206
+
207
+ * Base ability to add tasks. No official file / folder structure creation.
208
+ * Merge branch 'master' of github.com:meskyanichi/webbynode
209
+ * Base setup for Tasks
210
+ * Added help command. An RSpec test and commented out a lot of Helpers, left in only 4. Requiring them from webbynode.rb to be included inside other Webbynode classes.
211
+
212
+ == 2010-01-24 Felipe Coury
213
+
214
+ * Added ApiClient specs and added option to give Webby name when using `init' command.
215
+ * Using RSpec in a better way - using `double' instead of `mock' and using let(:var) for initializing doubles and reusable vars.
216
+ * Added support for DNS parameter to `init' command.
217
+
218
+ == 2010-01-23 Michael van Rooijen
219
+
220
+ * Fixed remaining test.
221
+ * Lots of adjustments. One test pending. Cannot figure out how to bypass the SSH conncetion.
222
+
223
+ == 2010-01-22 Felipe Coury
224
+
225
+ * Fixed commit success detection
226
+ * Fixed create_from_template to allow giving another name for the template
227
+ * Refactoring of command interaction, extracted validation if webbynode was initialized, added PushAnd class.
228
+ * Manifest
229
+ * Added pending specs for Init command. Should be complete now.
230
+ * Uses older RSpec versions-compatible matcher `should raise_error' instead of `should raise_exception'.
231
+ * Merge branch 'bdd'
232
+ * Making commands inherit from Webbynode::Command and changed slightly Remote command to conform to the base class.
233
+ * Extract Webbynode::Application to it's own source and broken down into Application and Command classes. Added matching specs.
234
+ * Merge branch 'bdd' of github.com:meskyanichi/webbynode into bdd
235
+ * Making commands adhere to a common interface to apply an ancestor Webbynode::Command soon.
236
+ * Specs for parsing parameters and options.
237
+ * Merge branch 'bdd' of git@github.com:meskyanichi/webbynode into bdd
238
+ * Added application_spec and improved command parsing.
239
+ * Improved existing specs and added new spec for Webbynode::Application
240
+ * Changed specs folder hierarchy to match lib/'s
241
+ * Improved spec descriptions and grouping. Added pending specs for `init' command.
242
+ * Added commands to Webbynode::Commands namespace and fixed tests accordingly
243
+ * Added helper classes and specs for them
244
+
245
+ == 2010-01-22 Michael van Rooijen
246
+
247
+ * Re-Manifest
248
+ * Cleaned some stuff up for readability. Added a test for providing an ip to the remote executor.
249
+ * Added more methods to Git class. webbynode_remote? and parse_remote_ip.
250
+ * Merge branch 'bdd' of github.com:meskyanichi/webbynode into bdd
251
+ * Added Git Config Parser
252
+ * Added another test for remote command
253
+ * Refactored the before do using a helper method that loads them all.
254
+ * Added more tests for remote command.
255
+ * moved remote_spec to spec/webbynode/commands
256
+ * Merge branch 'bdd' of github.com:meskyanichi/webbynode into bdd
257
+ * Started working on Remote Command.
258
+
259
+ == 2010-01-21 Felipe Coury
260
+
261
+ * More BDD.
262
+ * Renamed commands_spec into init_command_spec.
263
+ * DRYed out failure git specs
264
+ * Added commit and generic test for general git failures.
265
+ * Improved git specs.
266
+ * Rewrote `init' command completely using BDD.
267
+ * Specs for init command
268
+
269
+ == 2010-01-21 Michael van Rooijen
270
+
271
+ * Small spec expression for readability change.
272
+
273
+ == 2010-01-20 Felipe Coury
274
+
275
+ * Manifest
276
+ * Added better SSH support for asynchronous executions. Tests are broken!
277
+ * Initial Webbynode Commit
278
+ * Fixed tests
279
+ * Merge branch 'master' of github.com:meskyanichi/webbynode
280
+ * Commiting broken classes to merge upstream
281
+
282
+ == 2010-01-19 Felipe Coury
283
+
284
+ * Added `< /dev/null' to the command to be executed. This causes the input handler to exhaust, making every input fail, preventing from hanging ;)
285
+ * Aliases webbynode to wn
286
+ * Updated Manifest. Removed outermost `describes' from specs (they didn't make sense). Fixed `webby init' with no params (temporary fix) and `webbynode init <webby-name>' now works.
287
+ * Initial Webbynode Commit
288
+ * Splitted specs into multiple, specialized and smaller _spec files
289
+ * Regenerated Manifest
290
+ * Fixed ramaining `Wn::' usage to `Webbynode::'
291
+ * Merge branch 'master' of github.com:meskyanichi/webbynode
292
+ * Added support for `init' command with Webby name (as opposed to IP) Added support for Webbynode API interaction Added prompt for API email/token when ~/.webbynode is absent
293
+ * Added support for Webbynode API, with input for email and token when file absent. Added dependency of HTTParty gem.
294
+ * Run Code Run doesn't seem to like .count for arrays :)
295
+ * Removed test/ folder
296
+ * Added remote command to PostInstall.txt
297
+ * Command `addkey' should call `run_remote_command' and not `remote_command'. Fixed tests.
298
+ * Lazily initializes remote_ip and remote_app_name.
299
+ * Fixed addkey command -- it doesn't need the IP, since we already get it from .git/config.
300
+ * Added `addkey' command
301
+ * Added named_options for allowing things like `wn command --options1=abc --option2'
302
+
303
+ == 2010-01-19 Michael van Rooijen
304
+
305
+ * Fixed RSpec tests
306
+ * Renamed the method: require_application_environment! to requires_application_environment\!
307
+ * Ensures that the remote command gets invoked inside a webbynode initialized application. Will display a friendly message if this is not the case. This method is resuable for other commands.
308
+ * Added a version command that returns the current version of the webbynode gem.
309
+ * Updated the post install message.
310
+ * Updated the help screen.
311
+ * Renamed all shorts 'Wn' and 'App' to Webbynode and Application.
312
+ * Merge branch 'master' of github.com:meskyanichi/webbynode
313
+ * Now displays a nice message when trying to issue a remote command on the webby when the application has not yet been deployed.
314
+ * Updated Help Screen
315
+ * Updated comment for Felipe
316
+ * Updated RSpec test. Updated @Felipe comment.
317
+ * Fixed regular expression to match the host correctly and parse the IP. Added note for Felipe.
318
+ * Fixing net ssh remote
319
+ * Fixed tests and finished 'remote command' implementation
320
+
321
+ == 2010-01-18 Felipe Coury
322
+
323
+ * First attempt to extract the Webby IP from the "webbynode" git remote.
324
+
325
+ == 2010-01-18 Michael van Rooijen
326
+
327
+ * Updated manifest file
328
+ * Added more Rspec tests and set up the initial 'remote' command.
329
+ * Initial commit
330
+ * Added more Rspec tests for Init and all tests pass thus far. Going to implement Remote next.
331
+ * Moved the Webbynode require statement into the Spec Helper file
332
+ * Cleaned up Rspec by moving git configuration into fixtures and added a helper method to read fixtures.
333
+ * Added RSpec tests for the push command. Added some comments. Fixed previous tests
334
+ * Finished initial rspec setup for the init command
335
+ * Added a help file and rspec tests
336
+ * Adding initial structure changes
337
+
338
+ == 2010-01-17 Felipe Coury
339
+
340
+ * Added Roadmap
341
+
342
+ == 2010-01-15 Felipe Coury
343
+
344
+ * Manifest
345
+ * Bumped version
346
+
347
+ == 2010-01-10 Felipe Coury
348
+
349
+ * More README
350
+ * Added more info about requirements
351
+ * Fixed README
352
+ * Removed pkg and fixed some tests
353
+ * Initial commit
354
+
@@ -1,4 +1,5 @@
1
1
  config/database.yml
2
2
  log/*
3
3
  tmp/*
4
- db/*.sqlite3
4
+ db/*.sqlite3
5
+ db/schema.rb
@@ -184,6 +184,10 @@ module Webbynode
184
184
  help.join("\n")
185
185
  end
186
186
 
187
+ def gemfile
188
+ @@gemfile ||= Webbynode::Gemfile.new
189
+ end
190
+
187
191
  def io
188
192
  @@io ||= Webbynode::Io.new
189
193
  end
@@ -12,8 +12,11 @@ module Webbynode::Commands
12
12
  return
13
13
  end
14
14
 
15
- webby = param(:webby)
16
- app_name = io.app_name
15
+ check_gemfile
16
+
17
+ webby = param(:webby)
18
+ app_name = io.app_name
19
+ git_present = git.present?
17
20
 
18
21
  if param(:dns)
19
22
  dns_entry = "#{param(:dns)}"
@@ -21,6 +24,11 @@ module Webbynode::Commands
21
24
  dns_entry = app_name
22
25
  end
23
26
 
27
+ if git_present and !git.clean?
28
+ raise CommandError,
29
+ "Cannot initialize: git has pending changes. Execute a git commit or add changes to .gitignore and try again."
30
+ end
31
+
24
32
  io.log "Initializing application #{app_name} #{dns_entry ? "with dns #{dns_entry}" : ""}", :start
25
33
 
26
34
  if webby =~ /\b(?:\d{1,3}\.){3}\d{1,3}\b/
@@ -41,7 +49,14 @@ module Webbynode::Commands
41
49
  end
42
50
 
43
51
  io.log "Initializing directory structure...", :action
44
- git.add_git_ignore unless io.file_exists?(".gitignore")
52
+ git.remove("config/database.yml") if git.tracks?("config/database.yml")
53
+ git.remove("db/schema.rb") if git.tracks?("db/schema.rb")
54
+
55
+ if io.file_exists?(".gitignore")
56
+ git.add_to_git_ignore("config/database.yml", "db/schema.rb")
57
+ else
58
+ git.add_git_ignore
59
+ end
45
60
 
46
61
  unless io.file_exists?(".pushand")
47
62
  io.create_file(".pushand", "#! /bin/bash\nphd $0 #{app_name} #{dns_entry}\n", true)
@@ -55,9 +70,9 @@ module Webbynode::Commands
55
70
  io.create_file(".webbynode/config", "")
56
71
  end
57
72
 
58
- io.add_setting("engine", option(:engine)) if option(:engine)
73
+ detect_engine
59
74
 
60
- unless git.present?
75
+ unless git_present
61
76
  io.log "Initializing git and applying initial commit...", :action
62
77
  git.init
63
78
  git.add "."
@@ -70,6 +85,12 @@ module Webbynode::Commands
70
85
  end
71
86
  end
72
87
 
88
+ if !git.remote_exists?('webbynode') and git_present
89
+ io.log "Commiting Webbynode changes...", :action
90
+ git.add "."
91
+ git.commit2 "[Webbynode] Rapid App Deployment Initialization"
92
+ end
93
+
73
94
  io.log "Adding webbynode as git remote...", :action
74
95
  git.add_remote "webbynode", webby_ip, app_name
75
96
 
@@ -79,5 +100,65 @@ module Webbynode::Commands
79
100
  rescue Webbynode::GitRemoteAlreadyExistsError
80
101
  io.log "Application already initialized.", true
81
102
  end
103
+
104
+ private
105
+
106
+ def detect_engine
107
+ unless engine = option(:engine)
108
+ if rails3?
109
+ io.log "Detected Rails 3 application...", :action
110
+ engine = "rails3"
111
+ end
112
+ end
113
+
114
+ io.add_setting "engine", engine if engine
115
+ end
116
+
117
+ def rails3?
118
+ io.file_exists?("script/rails")
119
+ end
120
+
121
+ def check_gemfile
122
+ return unless gemfile.present?
123
+
124
+ dependencies = gemfile.dependencies(:without => [:development, :test])
125
+ if dependencies.include? 'sqlite3-ruby'
126
+ raise CommandError, <<-EOS
127
+
128
+ Gemfile dependency problem.
129
+
130
+ The following gem dependency was found in your Gemfile:
131
+
132
+ gem 'sqlite3-ruby', :require => 'sqlite3'
133
+
134
+ This dependency will cause an error in production when using Passenger. We recommend you remove it.
135
+ Also, be sure to define the database driver gem for the database type you are using in production (either the mysql or the pg gem).
136
+
137
+ gem 'mysql'
138
+
139
+ -or-
140
+
141
+ gem 'pg'
142
+
143
+ If you would like to use SQLite3 in your development and test environments,
144
+ you may do so by wrapping the gem definition inside the :test and :development groups.
145
+
146
+ group :test do
147
+ gem 'sqlite3-ruby', :require => 'sqlite3'
148
+ end
149
+
150
+ -or-
151
+
152
+ group :development do
153
+ gem 'sqlite3-ruby', :require => 'sqlite3'
154
+ end
155
+
156
+ To learn more about this issue, visit:
157
+
158
+ http://guides.webbynode.com/articles/rapidapps/rails3warning.html
159
+
160
+ EOS
161
+ end
162
+ end
82
163
  end
83
164
  end
@@ -2,7 +2,7 @@ module Webbynode::Commands
2
2
  class Version < Webbynode::Command
3
3
  summary "Displays current version of Webbynode Gem"
4
4
  def execute
5
- io.log("Rapid Deployment Gem v#{Webbynode::VERSION}", true)
5
+ io.log "Rapid Deployment Gem v#{Webbynode::VERSION}", :quiet_start
6
6
  end
7
7
  end
8
8
  end
@@ -0,0 +1,26 @@
1
+ require 'bundler'
2
+
3
+ module Webbynode
4
+ class Gemfile
5
+ def present?
6
+ io.file_exists?("Gemfile")
7
+ end
8
+
9
+ def dependencies(args={})
10
+ excluded_groups = (args[:without] || []).map { |g| g.to_sym }
11
+
12
+ dependencies = Bundler.definition.dependencies
13
+ dependencies.reject! do |d|
14
+ d.groups.any? { |g| excluded_groups.include? g }
15
+ end
16
+
17
+ dependencies.map &:name
18
+ end
19
+
20
+ private
21
+
22
+ def io
23
+ @@io ||= Io.new
24
+ end
25
+ end
26
+ end
data/lib/webbynode/git.rb CHANGED
@@ -37,6 +37,10 @@ module Webbynode
37
37
  io.create_from_template(".gitignore", "gitignore")
38
38
  end
39
39
 
40
+ def add_to_git_ignore(*entries)
41
+ entries.each { |e| io.add_line ".gitignore", e }
42
+ end
43
+
40
44
  def add(what)
41
45
  exec "git add #{what}"
42
46
  end
@@ -61,6 +65,19 @@ module Webbynode
61
65
  end
62
66
  end
63
67
 
68
+ def tracks?(file)
69
+ io.exec2("git ls-files #{file} --error-unmatch") != 1
70
+ end
71
+
72
+ def remove(file)
73
+ io.exec2("git rm --cached #{file}") == 0
74
+ end
75
+
76
+ def commit2(comments)
77
+ comments.gsub! /"/, '\"'
78
+ io.exec2("git commit -m \"#{comments}\"") == 0
79
+ end
80
+
64
81
  def commit(comments)
65
82
  comments.gsub! /"/, '\"'
66
83
  exec("git commit -m \"#{comments}\"") do |output|
@@ -115,7 +132,7 @@ module Webbynode
115
132
  def exec(cmd, &blk)
116
133
  handle_output io.exec(cmd), &blk
117
134
  end
118
-
135
+
119
136
  def handle_output(output, &blk)
120
137
  raise GitNotRepoError, output if output =~ /Not a git repository/
121
138
 
data/lib/webbynode/io.rb CHANGED
@@ -17,6 +17,11 @@ module Webbynode
17
17
  `#{s}#{redirect_stderr ? " 2>&1" : ""}`
18
18
  end
19
19
 
20
+ def exec2(s, redirect_stderr=true)
21
+ `#{s}#{redirect_stderr ? " 2>&1" : ""}`
22
+ $?
23
+ end
24
+
20
25
  def directory?(s)
21
26
  File.directory?(s)
22
27
  end
@@ -115,6 +120,11 @@ module Webbynode
115
120
  create_file(file, contents)
116
121
  end
117
122
 
123
+ def add_line(file, line)
124
+ return if File.read(file) =~ /^#{line}$/
125
+ File.open(file, 'a') { |f| f.puts line }
126
+ end
127
+
118
128
  def properties(s)
119
129
  (@properties||={})[s] = Properties.new(s)
120
130
  end
data/lib/webbynode.rb CHANGED
@@ -12,6 +12,7 @@ require File.join(File.dirname(__FILE__), 'webbynode', 'git')
12
12
  require File.join(File.dirname(__FILE__), 'webbynode', 'ssh')
13
13
  require File.join(File.dirname(__FILE__), 'webbynode', 'server')
14
14
  require File.join(File.dirname(__FILE__), 'webbynode', 'push_and')
15
+ require File.join(File.dirname(__FILE__), 'webbynode', 'gemfile')
15
16
  require File.join(File.dirname(__FILE__), 'webbynode', 'command')
16
17
  require File.join(File.dirname(__FILE__), 'webbynode', 'option')
17
18
  require File.join(File.dirname(__FILE__), 'webbynode', 'parameter')
@@ -39,7 +40,7 @@ require File.join(File.dirname(__FILE__), 'webbynode', 'commands', 'version')
39
40
  require File.join(File.dirname(__FILE__), 'webbynode', 'application')
40
41
 
41
42
  module Webbynode
42
- VERSION = '0.1.2'
43
+ VERSION = '0.2.4'
43
44
  end
44
45
 
45
46
  class Array
@@ -2,11 +2,13 @@
2
2
  require File.join(File.expand_path(File.dirname(__FILE__)), '../..', 'spec_helper')
3
3
 
4
4
  describe Webbynode::Commands::Init do
5
- let(:git_handler) { double("dummy_git_handler").as_null_object }
6
- let(:io_handler) { double("dummy_io_handler").as_null_object }
5
+ let(:git_handler) { double("git").as_null_object }
6
+ let(:io_handler) { double("io").as_null_object }
7
+ let(:gemfile) { double("gemfile").as_null_object.tap { |g| g.stub!(:present?).and_return(false) } }
7
8
 
8
9
  def create_init(ip="4.3.2.1", host=nil, extra=[])
9
10
  @command = Webbynode::Commands::Init.new(ip, host, *extra)
11
+ @command.stub!(:gemfile).and_return(gemfile)
10
12
  @command.should_receive(:git).any_number_of_times.and_return(git_handler)
11
13
  @command.should_receive(:io).any_number_of_times.and_return(io_handler)
12
14
  end
@@ -17,9 +19,32 @@ describe Webbynode::Commands::Init do
17
19
  git_handler.stub!(:remote_exists?).and_return(false)
18
20
  end
19
21
 
22
+ context "Gemfile checking" do
23
+ context "when present" do
24
+ it "complains if there is a sqlite3-ruby dependency outside of development and test groups" do
25
+ gemfile.should_receive(:present?).and_return(true)
26
+ gemfile.should_receive(:dependencies).and_return(['sqlite3-ruby', 'mysql'])
27
+
28
+ lambda { @command.execute }.should raise_error(Webbynode::Command::CommandError)
29
+ end
30
+ end
31
+ end
32
+
33
+ context "Rails3 auto detection" do
34
+ context "when script/rails is present" do
35
+ it "makes engine=rails3 implicitly" do
36
+ io_handler.stub!(:file_exists?).with("script/rails").and_return(true)
37
+ io_handler.should_receive(:add_setting).with("engine", "rails3")
38
+
39
+ @command.run
40
+ end
41
+ end
42
+ end
43
+
20
44
  context "when already initialized" do
21
45
  it "keep the same remotes when answer is no to overwriting" do
22
46
  command = Webbynode::Commands::Init.new("10.0.1.1")
47
+ command.stub!(:gemfile).and_return(gemfile)
23
48
  command.should_receive(:git).any_number_of_times.and_return(git_handler)
24
49
  command.should_receive(:ask).with("Webbynode already initialized. Do you want to overwrite the current settings (y/n)?").once.ordered.and_return("n")
25
50
 
@@ -32,6 +57,7 @@ describe Webbynode::Commands::Init do
32
57
 
33
58
  it "delete webbynode remote when answer is yes to overwriting" do
34
59
  command = Webbynode::Commands::Init.new("10.0.1.1")
60
+ command.stub!(:gemfile).and_return(gemfile)
35
61
  command.should_receive(:git).any_number_of_times.and_return(git_handler)
36
62
  command.should_receive(:ask).with("Webbynode already initialized. Do you want to overwrite the current settings (y/n)?").once.ordered.and_return("y")
37
63
 
@@ -47,6 +73,7 @@ describe Webbynode::Commands::Init do
47
73
  it "should create the .webbynode/engine file" do
48
74
  command = Webbynode::Commands::Init.new("10.0.1.1", "--engine=php")
49
75
  command.option(:engine).should == 'php'
76
+ command.stub!(:gemfile).and_return(gemfile)
50
77
  command.should_receive(:git).any_number_of_times.and_return(git_handler)
51
78
  command.should_receive(:io).any_number_of_times.and_return(io_handler)
52
79
 
@@ -60,6 +87,7 @@ describe Webbynode::Commands::Init do
60
87
 
61
88
  def create_init(ip="4.3.2.1", host=nil, extra=[])
62
89
  @command = Webbynode::Commands::Init.new(ip, host, *extra)
90
+ @command.stub!(:gemfile).and_return(gemfile)
63
91
  @command.should_receive(:git).any_number_of_times.and_return(git_handler)
64
92
  end
65
93
 
@@ -259,6 +287,51 @@ describe Webbynode::Commands::Init do
259
287
  end
260
288
  end
261
289
 
290
+ context "when .gitignore is present" do
291
+ context "when config/database.yml is already tracked by git" do
292
+ it "stops tracking config/database.yml" do
293
+ git_handler.should_receive(:tracks?).with("config/database.yml").and_return(true)
294
+ git_handler.should_receive(:remove).with("config/database.yml")
295
+
296
+ @command.run
297
+ end
298
+ end
299
+
300
+ context "when config/database.yml is not tracked by git" do
301
+ it "doesn't stop tracking config/database.yml" do
302
+ git_handler.should_receive(:tracks?).with("config/database.yml").and_return(false)
303
+ git_handler.should_receive(:remove).with("config/database.yml").never
304
+
305
+ @command.run
306
+ end
307
+ end
308
+
309
+ context "when db/schema.rb is already tracked by git" do
310
+ it "stops tracking db/schema.rb" do
311
+ git_handler.should_receive(:tracks?).with("db/schema.rb").and_return(true)
312
+ git_handler.should_receive(:remove).with("db/schema.rb")
313
+
314
+ @command.run
315
+ end
316
+ end
317
+
318
+ context "when db/schema.rb is not tracked by git" do
319
+ it "doesn't stop tracking db/schema.rb" do
320
+ git_handler.should_receive(:tracks?).with("db/schema.rb").and_return(false)
321
+ git_handler.should_receive(:remove).with("db/schema.rb").never
322
+
323
+ @command.run
324
+ end
325
+ end
326
+
327
+ it "adds config/database.yml to .gitconfig" do
328
+ io_handler.should_receive(:file_exists?).with(".gitignore").and_return(true)
329
+ git_handler.should_receive(:add_to_git_ignore).with("config/database.yml", "db/schema.rb")
330
+
331
+ @command.run
332
+ end
333
+ end
334
+
262
335
  context "when .webbynode is not present" do
263
336
  it "should create the .webbynode system folder and stub files" do
264
337
  io_handler.should_receive(:directory?).with(".webbynode").and_return(false)
@@ -329,9 +402,31 @@ describe Webbynode::Commands::Init do
329
402
  end
330
403
 
331
404
  context "when git repo is initialized" do
332
- it "should not create a commit" do
405
+ it "complains if git is in a dirty state" do
406
+ git_handler.should_receive(:present?).and_return(true)
407
+ git_handler.should_receive(:clean?).and_return(false)
408
+
409
+ lambda { @command.execute }.should raise_error(Webbynode::Command::CommandError,
410
+ "Cannot initialize: git has pending changes. Execute a git commit or add changes to .gitignore and try again.")
411
+ end
412
+
413
+ it "shows that a commit is being added" do
414
+ io_handler.should_receive(:log).with("Commiting Webbynode changes...", :action)
415
+ git_handler.should_receive(:present?).and_return(true)
416
+
417
+ @command.run
418
+ end
419
+
420
+ it "adds pending changes" do
421
+ git_handler.should_receive(:present?).and_return(true)
422
+ git_handler.should_receive(:add).with(".")
423
+
424
+ @command.run
425
+ end
426
+
427
+ it "commits the changes" do
333
428
  git_handler.should_receive(:present?).and_return(true)
334
- git_handler.should_receive(:commit).never
429
+ git_handler.should_receive(:commit2).with("[Webbynode] Rapid App Deployment Initialization")
335
430
 
336
431
  @command.run
337
432
  end
@@ -11,7 +11,7 @@ describe Webbynode::Commands::Version do
11
11
  end
12
12
 
13
13
  it "should return the version of the gem" do
14
- io.should_receive(:log).with("Rapid Deployment Gem v#{Webbynode::VERSION}", true)
14
+ io.should_receive(:log).with("Rapid Deployment Gem v#{Webbynode::VERSION}", :quiet_start)
15
15
  version.execute
16
16
  end
17
17
 
@@ -0,0 +1,52 @@
1
+ # Load Spec Helper
2
+ require File.join(File.expand_path(File.dirname(__FILE__)), '..', 'spec_helper')
3
+
4
+ describe Webbynode::Gemfile do
5
+ let(:io) { double("dummy_io_handler").as_null_object }
6
+
7
+ subject {
8
+ Webbynode::Gemfile.new.tap do |gemfile|
9
+ gemfile.stub!(:io).and_return(io)
10
+ end
11
+ }
12
+
13
+ describe "#present?" do
14
+ it "is true when Gemfile exists" do
15
+ io.should_receive(:file_exists?).with("Gemfile").and_return(true)
16
+ subject.should be_present
17
+ end
18
+
19
+ it "is false when Gemfile doesn't exist" do
20
+ io.should_receive(:file_exists?).with("Gemfile").and_return(false)
21
+ subject.should_not be_present
22
+ end
23
+ end
24
+
25
+ describe "#dependencies" do
26
+ it "filters out groups if present" do
27
+ dep1 = stub("dep1")
28
+ dep1.stub!(:name).and_return('dep1')
29
+ dep1.stub!(:groups).and_return([:default])
30
+
31
+ dep2 = stub("dep2")
32
+ dep2.stub!(:name).and_return('dep2')
33
+ dep2.stub!(:groups).and_return([:development])
34
+
35
+ dep3 = stub("dep3")
36
+ dep3.stub!(:name).and_return('dep3')
37
+ dep3.stub!(:groups).and_return([:test])
38
+
39
+ dep3 = stub("dep4")
40
+ dep3.stub!(:name).and_return('dep4')
41
+ dep3.stub!(:groups).and_return([:default, :test])
42
+
43
+ definitions = double("definitions")
44
+ dependencies = [dep1, dep2, dep3]
45
+
46
+ Bundler.should_receive(:definition).and_return(definitions)
47
+ definitions.should_receive(:dependencies).and_return(dependencies)
48
+
49
+ subject.dependencies(:without => ['development', 'test']).should == ['dep1']
50
+ end
51
+ end
52
+ end
@@ -123,6 +123,51 @@ describe Webbynode::Git do
123
123
  end
124
124
  end
125
125
 
126
+ describe '#check_git_ignore' do
127
+ context "when config/database.yml is absent" do
128
+ it "adds the line to .gitignore" do
129
+ io = double("io")
130
+ io.should_receive(:add_line).with(".gitignore", "config/database.yml")
131
+ io.should_receive(:add_line).with(".gitignore", "db/schema.rb")
132
+
133
+ git = Webbynode::Git.new
134
+ git.stub(:io).and_return(io)
135
+ git.add_to_git_ignore("config/database.yml", "db/schema.rb")
136
+ end
137
+ end
138
+ end
139
+
140
+ describe '#remove' do
141
+ it 'untrack file in git' do
142
+ io = double("git rm --cached db/schema.rb")
143
+ io.should_receive(:exec2).with("git rm --cached db/schema.rb").and_return(0)
144
+
145
+ git = Webbynode::Git.new
146
+ git.stub(:io).and_return(io)
147
+ git.remove("db/schema.rb").should be_true
148
+ end
149
+ end
150
+
151
+ describe '#tracks?' do
152
+ it 'returns false if git ls-files command returns 1' do
153
+ io = double("io")
154
+ io.should_receive(:exec2).with("git ls-files db/schema.rb --error-unmatch").and_return(1)
155
+
156
+ git = Webbynode::Git.new
157
+ git.stub(:io).and_return(io)
158
+ git.tracks?("db/schema.rb").should be_false
159
+ end
160
+
161
+ it 'returns true if git ls-files command returns something different than 1' do
162
+ io = double("io")
163
+ io.should_receive(:exec2).with("git ls-files db/schema.rb --error-unmatch").and_return(0)
164
+
165
+ git = Webbynode::Git.new
166
+ git.stub(:io).and_return(io)
167
+ git.tracks?("db/schema.rb").should be_true
168
+ end
169
+ end
170
+
126
171
  describe "#init" do
127
172
  context "when successful" do
128
173
  it "should return true" do
@@ -116,6 +116,32 @@ describe Webbynode::Io do
116
116
  end
117
117
  end
118
118
 
119
+ describe '#add_line' do
120
+ context "when line doesn't exist yet" do
121
+ it "adds one line to a file" do
122
+ file = stub('file')
123
+
124
+ File.should_receive(:read).with('.gitignore').and_return('')
125
+
126
+ File.should_receive(:open).with('.gitignore', 'a').and_yield(file)
127
+ file.should_receive(:puts).with('new_line')
128
+
129
+ io = Webbynode::Io.new
130
+ io.add_line '.gitignore', 'new_line'
131
+ end
132
+ end
133
+
134
+ context 'when line exists' do
135
+ it "doesn't add the line again" do
136
+ File.should_receive(:read).with('.gitignore').and_return('new_line')
137
+ File.should_receive(:open).with('.gitignore', 'a').never
138
+
139
+ io = Webbynode::Io.new
140
+ io.add_line '.gitignore', 'new_line'
141
+ end
142
+ end
143
+ end
144
+
119
145
  describe '#create_file' do
120
146
  it "should create a file with specified contents" do
121
147
  file = double("File")
data/webbynode.gemspec CHANGED
@@ -2,16 +2,16 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{webbynode}
5
- s.version = "0.2.3"
5
+ s.version = "0.2.4"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Felipe Coury"]
9
- s.date = %q{2010-03-28}
9
+ s.date = %q{2010-06-24}
10
10
  s.description = %q{Webbynode Deployment Gem}
11
11
  s.email = %q{felipe@webbynode.com}
12
12
  s.executables = ["webbynode", "wn"]
13
- s.extra_rdoc_files = ["README.rdoc", "bin/webbynode", "bin/wn", "lib/templates/api_token", "lib/templates/backup", "lib/templates/gitignore", "lib/templates/help", "lib/webbynode.rb", "lib/webbynode/api_client.rb", "lib/webbynode/application.rb", "lib/webbynode/command.rb", "lib/webbynode/commands/add_backup.rb", "lib/webbynode/commands/add_key.rb", "lib/webbynode/commands/alias.rb", "lib/webbynode/commands/change_dns.rb", "lib/webbynode/commands/config.rb", "lib/webbynode/commands/delete.rb", "lib/webbynode/commands/help.rb", "lib/webbynode/commands/init.rb", "lib/webbynode/commands/push.rb", "lib/webbynode/commands/remote.rb", "lib/webbynode/commands/restart.rb", "lib/webbynode/commands/start.rb", "lib/webbynode/commands/stop.rb", "lib/webbynode/commands/tasks.rb", "lib/webbynode/commands/version.rb", "lib/webbynode/commands/webbies.rb", "lib/webbynode/git.rb", "lib/webbynode/io.rb", "lib/webbynode/notify.rb", "lib/webbynode/option.rb", "lib/webbynode/parameter.rb", "lib/webbynode/properties.rb", "lib/webbynode/push_and.rb", "lib/webbynode/remote_executor.rb", "lib/webbynode/server.rb", "lib/webbynode/ssh.rb", "lib/webbynode/ssh_keys.rb"]
14
- s.files = ["History.txt", "Manifest", "Manifest.txt", "PostInstall.txt", "README.rdoc", "Rakefile", "assets/webbynode.png", "bin/webbynode", "bin/wn", "cucumber.yml", "devver.rake", "features/bootstrap.feature", "features/step_definitions/command_steps.rb", "features/support/env.rb", "features/support/hooks.rb", "features/support/io_features.rb", "features/support/mocha.rb", "lib/templates/api_token", "lib/templates/backup", "lib/templates/gitignore", "lib/templates/help", "lib/webbynode.rb", "lib/webbynode/api_client.rb", "lib/webbynode/application.rb", "lib/webbynode/command.rb", "lib/webbynode/commands/add_backup.rb", "lib/webbynode/commands/add_key.rb", "lib/webbynode/commands/alias.rb", "lib/webbynode/commands/change_dns.rb", "lib/webbynode/commands/config.rb", "lib/webbynode/commands/delete.rb", "lib/webbynode/commands/help.rb", "lib/webbynode/commands/init.rb", "lib/webbynode/commands/push.rb", "lib/webbynode/commands/remote.rb", "lib/webbynode/commands/restart.rb", "lib/webbynode/commands/start.rb", "lib/webbynode/commands/stop.rb", "lib/webbynode/commands/tasks.rb", "lib/webbynode/commands/version.rb", "lib/webbynode/commands/webbies.rb", "lib/webbynode/git.rb", "lib/webbynode/io.rb", "lib/webbynode/notify.rb", "lib/webbynode/option.rb", "lib/webbynode/parameter.rb", "lib/webbynode/properties.rb", "lib/webbynode/push_and.rb", "lib/webbynode/remote_executor.rb", "lib/webbynode/server.rb", "lib/webbynode/ssh.rb", "lib/webbynode/ssh_keys.rb", "spec/fixtures/aliases", "spec/fixtures/api/credentials", "spec/fixtures/api/dns", "spec/fixtures/api/dns_a_record", "spec/fixtures/api/dns_a_record_already_exists", "spec/fixtures/api/dns_a_record_error", "spec/fixtures/api/dns_new_zone", "spec/fixtures/api/webbies", "spec/fixtures/api/webbies_unauthorized", "spec/fixtures/api/webby", "spec/fixtures/commands/tasks/after_push", "spec/fixtures/fixture_helpers", "spec/fixtures/git/config/210.11.13.12", "spec/fixtures/git/config/67.23.79.31", "spec/fixtures/git/config/67.23.79.32", "spec/fixtures/git/config/config", "spec/fixtures/git/config/config_5", "spec/fixtures/git/status/clean", "spec/fixtures/git/status/dirty", "spec/fixtures/pushand", "spec/spec_helper.rb", "spec/webbynode/api_client_spec.rb", "spec/webbynode/application_spec.rb", "spec/webbynode/command_spec.rb", "spec/webbynode/commands/add_backup_spec.rb", "spec/webbynode/commands/add_key_spec.rb", "spec/webbynode/commands/alias_spec.rb", "spec/webbynode/commands/change_dns_spec.rb", "spec/webbynode/commands/config_spec.rb", "spec/webbynode/commands/delete_spec.rb", "spec/webbynode/commands/help_spec.rb", "spec/webbynode/commands/init_spec.rb", "spec/webbynode/commands/push_spec.rb", "spec/webbynode/commands/remote_spec.rb", "spec/webbynode/commands/tasks_spec.rb", "spec/webbynode/commands/version_spec.rb", "spec/webbynode/commands/webbies_spec.rb", "spec/webbynode/git_spec.rb", "spec/webbynode/io_spec.rb", "spec/webbynode/option_spec.rb", "spec/webbynode/parameter_spec.rb", "spec/webbynode/push_and_spec.rb", "spec/webbynode/remote_executor_spec.rb", "spec/webbynode/server_spec.rb", "webbynode.gemspec"]
13
+ s.extra_rdoc_files = ["README.rdoc", "bin/webbynode", "bin/wn", "lib/templates/api_token", "lib/templates/backup", "lib/templates/gitignore", "lib/templates/help", "lib/webbynode.rb", "lib/webbynode/api_client.rb", "lib/webbynode/application.rb", "lib/webbynode/command.rb", "lib/webbynode/commands/add_backup.rb", "lib/webbynode/commands/add_key.rb", "lib/webbynode/commands/alias.rb", "lib/webbynode/commands/change_dns.rb", "lib/webbynode/commands/config.rb", "lib/webbynode/commands/delete.rb", "lib/webbynode/commands/help.rb", "lib/webbynode/commands/init.rb", "lib/webbynode/commands/push.rb", "lib/webbynode/commands/remote.rb", "lib/webbynode/commands/restart.rb", "lib/webbynode/commands/start.rb", "lib/webbynode/commands/stop.rb", "lib/webbynode/commands/tasks.rb", "lib/webbynode/commands/version.rb", "lib/webbynode/commands/webbies.rb", "lib/webbynode/gemfile.rb", "lib/webbynode/git.rb", "lib/webbynode/io.rb", "lib/webbynode/notify.rb", "lib/webbynode/option.rb", "lib/webbynode/parameter.rb", "lib/webbynode/properties.rb", "lib/webbynode/push_and.rb", "lib/webbynode/remote_executor.rb", "lib/webbynode/server.rb", "lib/webbynode/ssh.rb", "lib/webbynode/ssh_keys.rb"]
14
+ s.files = ["History.txt", "Manifest", "Manifest.txt", "PostInstall.txt", "README.rdoc", "Rakefile", "assets/webbynode.png", "bin/webbynode", "bin/wn", "changelog.rdoc", "cucumber.yml", "devver.rake", "features/bootstrap.feature", "features/step_definitions/command_steps.rb", "features/support/env.rb", "features/support/hooks.rb", "features/support/io_features.rb", "features/support/mocha.rb", "lib/templates/api_token", "lib/templates/backup", "lib/templates/gitignore", "lib/templates/help", "lib/webbynode.rb", "lib/webbynode/api_client.rb", "lib/webbynode/application.rb", "lib/webbynode/command.rb", "lib/webbynode/commands/add_backup.rb", "lib/webbynode/commands/add_key.rb", "lib/webbynode/commands/alias.rb", "lib/webbynode/commands/change_dns.rb", "lib/webbynode/commands/config.rb", "lib/webbynode/commands/delete.rb", "lib/webbynode/commands/help.rb", "lib/webbynode/commands/init.rb", "lib/webbynode/commands/push.rb", "lib/webbynode/commands/remote.rb", "lib/webbynode/commands/restart.rb", "lib/webbynode/commands/start.rb", "lib/webbynode/commands/stop.rb", "lib/webbynode/commands/tasks.rb", "lib/webbynode/commands/version.rb", "lib/webbynode/commands/webbies.rb", "lib/webbynode/gemfile.rb", "lib/webbynode/git.rb", "lib/webbynode/io.rb", "lib/webbynode/notify.rb", "lib/webbynode/option.rb", "lib/webbynode/parameter.rb", "lib/webbynode/properties.rb", "lib/webbynode/push_and.rb", "lib/webbynode/remote_executor.rb", "lib/webbynode/server.rb", "lib/webbynode/ssh.rb", "lib/webbynode/ssh_keys.rb", "spec/fixtures/aliases", "spec/fixtures/api/credentials", "spec/fixtures/api/dns", "spec/fixtures/api/dns_a_record", "spec/fixtures/api/dns_a_record_already_exists", "spec/fixtures/api/dns_a_record_error", "spec/fixtures/api/dns_new_zone", "spec/fixtures/api/webbies", "spec/fixtures/api/webbies_unauthorized", "spec/fixtures/api/webby", "spec/fixtures/commands/tasks/after_push", "spec/fixtures/fixture_helpers", "spec/fixtures/git/config/210.11.13.12", "spec/fixtures/git/config/67.23.79.31", "spec/fixtures/git/config/67.23.79.32", "spec/fixtures/git/config/config", "spec/fixtures/git/config/config_5", "spec/fixtures/git/status/clean", "spec/fixtures/git/status/dirty", "spec/fixtures/pushand", "spec/spec_helper.rb", "spec/webbynode/api_client_spec.rb", "spec/webbynode/application_spec.rb", "spec/webbynode/command_spec.rb", "spec/webbynode/commands/add_backup_spec.rb", "spec/webbynode/commands/add_key_spec.rb", "spec/webbynode/commands/alias_spec.rb", "spec/webbynode/commands/change_dns_spec.rb", "spec/webbynode/commands/config_spec.rb", "spec/webbynode/commands/delete_spec.rb", "spec/webbynode/commands/help_spec.rb", "spec/webbynode/commands/init_spec.rb", "spec/webbynode/commands/push_spec.rb", "spec/webbynode/commands/remote_spec.rb", "spec/webbynode/commands/tasks_spec.rb", "spec/webbynode/commands/version_spec.rb", "spec/webbynode/commands/webbies_spec.rb", "spec/webbynode/gemfile_spec.rb", "spec/webbynode/git_spec.rb", "spec/webbynode/io_spec.rb", "spec/webbynode/option_spec.rb", "spec/webbynode/parameter_spec.rb", "spec/webbynode/push_and_spec.rb", "spec/webbynode/remote_executor_spec.rb", "spec/webbynode/server_spec.rb", "webbynode.gemspec"]
15
15
  s.homepage = %q{http://webbynode.com}
16
16
  s.post_install_message = %q{
17
17
  -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
@@ -28,25 +28,28 @@ http://guides.webbynode.com/articles/rapidapps
28
28
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Webbynode", "--main", "README.rdoc"]
29
29
  s.require_paths = ["lib"]
30
30
  s.rubyforge_project = %q{webbynode}
31
- s.rubygems_version = %q{1.3.6}
31
+ s.rubygems_version = %q{1.3.7}
32
32
  s.summary = %q{Webbynode Deployment Gem}
33
33
 
34
34
  if s.respond_to? :specification_version then
35
35
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
36
36
  s.specification_version = 3
37
37
 
38
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
38
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
39
+ s.add_runtime_dependency(%q<bundler>, [">= 0.9.26"])
39
40
  s.add_runtime_dependency(%q<net-ssh>, [">= 2.0.20"])
40
41
  s.add_runtime_dependency(%q<highline>, [">= 1.5.2"])
41
42
  s.add_runtime_dependency(%q<httparty>, [">= 0.4.5"])
42
43
  s.add_runtime_dependency(%q<domainatrix>, [">= 0.0.7"])
43
44
  else
45
+ s.add_dependency(%q<bundler>, [">= 0.9.26"])
44
46
  s.add_dependency(%q<net-ssh>, [">= 2.0.20"])
45
47
  s.add_dependency(%q<highline>, [">= 1.5.2"])
46
48
  s.add_dependency(%q<httparty>, [">= 0.4.5"])
47
49
  s.add_dependency(%q<domainatrix>, [">= 0.0.7"])
48
50
  end
49
51
  else
52
+ s.add_dependency(%q<bundler>, [">= 0.9.26"])
50
53
  s.add_dependency(%q<net-ssh>, [">= 2.0.20"])
51
54
  s.add_dependency(%q<highline>, [">= 1.5.2"])
52
55
  s.add_dependency(%q<httparty>, [">= 0.4.5"])
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webbynode
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 31
4
5
  prerelease: false
5
6
  segments:
6
7
  - 0
7
8
  - 2
8
- - 3
9
- version: 0.2.3
9
+ - 4
10
+ version: 0.2.4
10
11
  platform: ruby
11
12
  authors:
12
13
  - Felipe Coury
@@ -14,65 +15,89 @@ autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2010-03-28 00:00:00 -03:00
18
+ date: 2010-06-24 00:00:00 -03:00
18
19
  default_executable:
19
20
  dependencies:
20
21
  - !ruby/object:Gem::Dependency
21
- name: net-ssh
22
+ name: bundler
22
23
  prerelease: false
23
24
  requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ hash: 15
30
+ segments:
31
+ - 0
32
+ - 9
33
+ - 26
34
+ version: 0.9.26
35
+ type: :runtime
36
+ version_requirements: *id001
37
+ - !ruby/object:Gem::Dependency
38
+ name: net-ssh
39
+ prerelease: false
40
+ requirement: &id002 !ruby/object:Gem::Requirement
41
+ none: false
24
42
  requirements:
25
43
  - - ">="
26
44
  - !ruby/object:Gem::Version
45
+ hash: 39
27
46
  segments:
28
47
  - 2
29
48
  - 0
30
49
  - 20
31
50
  version: 2.0.20
32
51
  type: :runtime
33
- version_requirements: *id001
52
+ version_requirements: *id002
34
53
  - !ruby/object:Gem::Dependency
35
54
  name: highline
36
55
  prerelease: false
37
- requirement: &id002 !ruby/object:Gem::Requirement
56
+ requirement: &id003 !ruby/object:Gem::Requirement
57
+ none: false
38
58
  requirements:
39
59
  - - ">="
40
60
  - !ruby/object:Gem::Version
61
+ hash: 7
41
62
  segments:
42
63
  - 1
43
64
  - 5
44
65
  - 2
45
66
  version: 1.5.2
46
67
  type: :runtime
47
- version_requirements: *id002
68
+ version_requirements: *id003
48
69
  - !ruby/object:Gem::Dependency
49
70
  name: httparty
50
71
  prerelease: false
51
- requirement: &id003 !ruby/object:Gem::Requirement
72
+ requirement: &id004 !ruby/object:Gem::Requirement
73
+ none: false
52
74
  requirements:
53
75
  - - ">="
54
76
  - !ruby/object:Gem::Version
77
+ hash: 5
55
78
  segments:
56
79
  - 0
57
80
  - 4
58
81
  - 5
59
82
  version: 0.4.5
60
83
  type: :runtime
61
- version_requirements: *id003
84
+ version_requirements: *id004
62
85
  - !ruby/object:Gem::Dependency
63
86
  name: domainatrix
64
87
  prerelease: false
65
- requirement: &id004 !ruby/object:Gem::Requirement
88
+ requirement: &id005 !ruby/object:Gem::Requirement
89
+ none: false
66
90
  requirements:
67
91
  - - ">="
68
92
  - !ruby/object:Gem::Version
93
+ hash: 17
69
94
  segments:
70
95
  - 0
71
96
  - 0
72
97
  - 7
73
98
  version: 0.0.7
74
99
  type: :runtime
75
- version_requirements: *id004
100
+ version_requirements: *id005
76
101
  description: Webbynode Deployment Gem
77
102
  email: felipe@webbynode.com
78
103
  executables:
@@ -108,6 +133,7 @@ extra_rdoc_files:
108
133
  - lib/webbynode/commands/tasks.rb
109
134
  - lib/webbynode/commands/version.rb
110
135
  - lib/webbynode/commands/webbies.rb
136
+ - lib/webbynode/gemfile.rb
111
137
  - lib/webbynode/git.rb
112
138
  - lib/webbynode/io.rb
113
139
  - lib/webbynode/notify.rb
@@ -129,6 +155,7 @@ files:
129
155
  - assets/webbynode.png
130
156
  - bin/webbynode
131
157
  - bin/wn
158
+ - changelog.rdoc
132
159
  - cucumber.yml
133
160
  - devver.rake
134
161
  - features/bootstrap.feature
@@ -161,6 +188,7 @@ files:
161
188
  - lib/webbynode/commands/tasks.rb
162
189
  - lib/webbynode/commands/version.rb
163
190
  - lib/webbynode/commands/webbies.rb
191
+ - lib/webbynode/gemfile.rb
164
192
  - lib/webbynode/git.rb
165
193
  - lib/webbynode/io.rb
166
194
  - lib/webbynode/notify.rb
@@ -209,6 +237,7 @@ files:
209
237
  - spec/webbynode/commands/tasks_spec.rb
210
238
  - spec/webbynode/commands/version_spec.rb
211
239
  - spec/webbynode/commands/webbies_spec.rb
240
+ - spec/webbynode/gemfile_spec.rb
212
241
  - spec/webbynode/git_spec.rb
213
242
  - spec/webbynode/io_spec.rb
214
243
  - spec/webbynode/option_spec.rb
@@ -243,16 +272,20 @@ rdoc_options:
243
272
  require_paths:
244
273
  - lib
245
274
  required_ruby_version: !ruby/object:Gem::Requirement
275
+ none: false
246
276
  requirements:
247
277
  - - ">="
248
278
  - !ruby/object:Gem::Version
279
+ hash: 3
249
280
  segments:
250
281
  - 0
251
282
  version: "0"
252
283
  required_rubygems_version: !ruby/object:Gem::Requirement
284
+ none: false
253
285
  requirements:
254
286
  - - ">="
255
287
  - !ruby/object:Gem::Version
288
+ hash: 11
256
289
  segments:
257
290
  - 1
258
291
  - 2
@@ -260,7 +293,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
260
293
  requirements: []
261
294
 
262
295
  rubyforge_project: webbynode
263
- rubygems_version: 1.3.6
296
+ rubygems_version: 1.3.7
264
297
  signing_key:
265
298
  specification_version: 3
266
299
  summary: Webbynode Deployment Gem