webbynode 1.0.5.3 → 1.1.0.beta1

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.

Files changed (63) hide show
  1. data/.autotest +1 -0
  2. data/.bundle/config +2 -0
  3. data/.gitignore +4 -0
  4. data/.rvmrc +1 -0
  5. data/.travis.yml +9 -0
  6. data/Gemfile +1 -20
  7. data/Gemfile.lock +43 -50
  8. data/Manifest +0 -1
  9. data/Rakefile +1 -45
  10. data/bin/webbynode +0 -0
  11. data/bin/wn +0 -0
  12. data/lib/webbynode/api_client.rb +35 -63
  13. data/lib/webbynode/command.rb +2 -1
  14. data/lib/webbynode/commands/accounts.rb +11 -8
  15. data/lib/webbynode/commands/change_dns.rb +1 -1
  16. data/lib/webbynode/commands/database.rb +7 -7
  17. data/lib/webbynode/commands/dns_aliases.rb +6 -6
  18. data/lib/webbynode/commands/{guides.rb → docs.rb} +3 -2
  19. data/lib/webbynode/commands/help.rb +3 -3
  20. data/lib/webbynode/commands/init.rb +16 -16
  21. data/lib/webbynode/commands/push.rb +7 -7
  22. data/lib/webbynode/commands/remote.rb +1 -1
  23. data/lib/webbynode/commands/settings.rb +1 -1
  24. data/lib/webbynode/commands/tasks.rb +3 -3
  25. data/lib/webbynode/commands/user.rb +5 -5
  26. data/lib/webbynode/commands/version.rb +1 -1
  27. data/lib/webbynode/commands/webbies.rb +17 -22
  28. data/lib/webbynode/manager2_api_client.rb +94 -0
  29. data/lib/webbynode/manager_api_client.rb +94 -0
  30. data/lib/webbynode/models/webby.rb +3 -0
  31. data/lib/webbynode/notify.rb +1 -1
  32. data/lib/webbynode/server.rb +1 -1
  33. data/lib/webbynode/updater.rb +28 -8
  34. data/lib/webbynode/version.rb +8 -0
  35. data/lib/webbynode.rb +5 -5
  36. data/script/console +10 -0
  37. data/script/destroy +14 -0
  38. data/script/generate +14 -0
  39. data/spec/fixtures/manager2/webbies +11 -0
  40. data/spec/fixtures/manager2/webbies_unauthorized +10 -0
  41. data/spec/fixtures/manager2/zones +11 -0
  42. data/spec/fixtures/manager2/zones_a_record +11 -0
  43. data/spec/fixtures/manager2/zones_a_record_error +10 -0
  44. data/spec/fixtures/manager2/zones_new_zone +11 -0
  45. data/spec/spec_helper.rb +1 -0
  46. data/spec/webbynode/api_client_spec.rb +15 -128
  47. data/spec/webbynode/command_spec.rb +6 -0
  48. data/spec/webbynode/commands/accounts_spec.rb +10 -4
  49. data/spec/webbynode/commands/apps_spec.rb +1 -0
  50. data/spec/webbynode/commands/database_spec.rb +4 -1
  51. data/spec/webbynode/commands/{guides_spec.rb → docs_spec.rb} +2 -2
  52. data/spec/webbynode/commands/init_spec.rb +27 -64
  53. data/spec/webbynode/commands/push_spec.rb +29 -15
  54. data/spec/webbynode/commands/remote_spec.rb +2 -0
  55. data/spec/webbynode/commands/version_spec.rb +1 -1
  56. data/spec/webbynode/commands/webbies_spec.rb +17 -2
  57. data/spec/webbynode/manager2_api_client_spec.rb +127 -0
  58. data/spec/webbynode/manager_api_client_spec.rb +136 -0
  59. data/webbynode.gemspec +30 -49
  60. metadata +297 -127
  61. data/PostInstall.txt +0 -45
  62. data/changelog.rdoc +0 -437
  63. data/cucumber.yml.old +0 -1
data/changelog.rdoc DELETED
@@ -1,437 +0,0 @@
1
- = CHANGELOG
2
-
3
- == 2010-08-04 Felipe Coury
4
-
5
- * Properties class properly saves array values. Fixes #23
6
-
7
- == 2010-08-03 Felipe Coury
8
-
9
- * Fixed a failing test by pending it with explanatory message.
10
- * Fixed bug where database.yml was not being excluded from git.
11
-
12
- == 2010-07-28 Felipe Coury
13
-
14
- * Added Beanstalk
15
-
16
- == 2010-07-22 Felipe Coury
17
-
18
- * Fixed spelling in addons command
19
- * New installation message
20
-
21
- == 2010-07-21 Felipe Coury
22
-
23
- * Prevents errors if addons param is malformed
24
-
25
- == 2010-07-20 Felipe Coury
26
-
27
- * Added `wn open' command. Closes #22
28
- * Adds SSH key when initializing. Closes #15
29
- * Added support for addons. Closes #20
30
-
31
- == 2010-07-04 Felipe Coury
32
-
33
- * Error message when using Django engine and settings.py isn't found
34
- * Updated gemspec and Manifest
35
- * Now all commands work with an alternate SSH port when wn init --port=PORT is used. Fixed a small bug on options validation. Fixes #19
36
- * Handles connection refused when attempting to run commands
37
- * Changed AWS S3 back help text to point to the correct URL. Fixes #17
38
-
39
- == 2010-07-01 Felipe Coury
40
-
41
- * Bumped gem version to 0.2.5.beta2.
42
- * Added Django initialization code for handling .gitignore and settings.template.py creation.
43
- * Taken Rails-specific code out of init command.
44
- * Added prepare to Engine and extracted Gemfile detection code to Rails3 engine class.
45
- * Added engine_id, engine_name and git_excluded specs for engines
46
- * Invalid engine shows error message and triggers interactive engine selection.
47
- * Starting of Engine-specific preparation and validation code (WIP)
48
- * Refactoring on the Engine detection methods.
49
- * Engine detection refactoring (work in progress).
50
-
51
- == 2010-06-30 Felipe Coury
52
-
53
- * Fixed order of settings
54
- * Detects pontential problems before engine detection
55
- * Engine detection refactoring
56
- * Marked gem as 0.2.5.beta1. Closes #12. Closes #13.
57
-
58
- == 2010-06-29 Felipe Coury
59
-
60
- * Made webbynode gem compatible with Windows.
61
-
62
- == 2010-06-28 Felipe Coury
63
-
64
- * Merge commit '0.2.4.1'
65
- * Removed jcode as a dependency. Fixes #8.
66
- * Removed cucumber.yml for the time being
67
- * Improved wn init feedback
68
-
69
- == 2010-06-27 Felipe Coury
70
-
71
- * When user has only one Webby, assumes it when `init' command is used. When user has multiple Webbies and the param is omitted, shows a list of user's Webbies.
72
- * Removed features temporarily
73
- * Init command now takes DNS entry as an option (--dns=xyz) and started simplification of wn init, making the webby parameter optional if user only have one Webby.
74
- * Fixed option parsing to allow xyz.abc.def
75
- * Renamed feature for the time being
76
-
77
- == 2010-06-26 Felipe Coury
78
-
79
- * Rapp automatic updates support Command `wn apps' - lists all the current apps on a Webby Bumped Gem version
80
-
81
- == 2010-06-24 Felipe Coury
82
-
83
- * Added changelog
84
- * Rails 3 autodetection
85
- * Small typo on Gemfile error message
86
- * Uses bundler to check for sqlite3-ruby dependency in Gemfile. If found, issues an error message with proper instructions. Closes #6.
87
- * Fixed version command
88
- * 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.
89
-
90
- == 2010-06-24 Michael van Rooijen
91
-
92
- * Adjusted the Gemfile error text.
93
-
94
- == 2010-06-23 Felipe Coury
95
-
96
- * Adds db/schema.rb and config/database.yml to .gitignore. Closes #7.
97
-
98
- == 2010-03-28 Felipe Coury
99
-
100
- * When init is run for a second time, offers the user the possibility to overwrite settings. Gemspec Bumped to 0.2.3.
101
-
102
- == 2010-03-16 Felipe Coury
103
-
104
- * If .gitconfig has a pair and a section with same name, an error was thrown. Fixes #5.
105
-
106
- == 2010-02-25 Felipe Coury
107
-
108
- * Fixed small problem with FileUtils
109
-
110
- == 2010-02-16 Felipe Coury
111
-
112
- * Moved dependencies up
113
- * Fixed dependencies to include net-ssh and highline
114
-
115
- == 2010-02-06 Felipe Coury
116
-
117
- * Fixed spec error on api_client_spec
118
-
119
- == 2010-02-05 Felipe Coury
120
-
121
- * Fixed install message.
122
- * Improved log messages
123
- * Added `webbies' command
124
-
125
- == 2010-02-03 Felipe Coury
126
-
127
- * 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.
128
- * Added command `add_backup' to configure backup to S3
129
- * Keep setting about deployment on a single properties file called .webbynode/settings
130
-
131
- == 2010-02-02 Felipe Coury
132
-
133
- * Changing DNS is only allowed if git has no pending changes. Now it creates a new git commit with the change.
134
- * Fixed the error message when an unkown option is provided and added generic --help option (same as wn help <cmd>)
135
- * Doesn't allow user to push when application has changes pending, unless the --dirty option is provided.
136
- * Checks if file exists
137
- * Checks if file exists
138
-
139
- == 2010-02-01 Felipe Coury
140
-
141
- * Uses git to delete the alias
142
- * Removes DNS_ALIAS from git as well
143
- * Removes the alias when changing DNS
144
- * Better handling of DNS entries. Uses Domainatrix to set www and blank A records when needed.
145
- * Initializes .webbynode directory structure
146
- * Initial steps of the `webbies' command
147
- * Made the installation message shorter and pointing to the Guides page
148
- * Improved output from commands
149
- * Added change_dns to webbynode.rb
150
- * Added option to create a file with executable permissions
151
- * Added change_dns command
152
- * Validations were raising exceptions instead of providing the user with an error message.
153
- * Manifest
154
- * Improved formatting and text of help messages.
155
- * Removed legacy files commands and helpers
156
-
157
- == 2010-02-01 Michael van Rooijen
158
-
159
- * Updated the install message.
160
- * made the yes? no? command more readable.
161
- * downcase yes? and no? methods to make it more fail proof.
162
- * Forgot to add an exit method. No error will be raised when a non existent command is passed in as an argument.
163
- * When running the help command with no arguments, will default to 'help commands' so a list of available commands will be displayed.
164
- * Fixed GrowlNotify detection bug.
165
-
166
- == 2010-01-31 Felipe Coury
167
-
168
- * Manifest
169
- * Shows available commands when no arguments give. Large room for improvement on formatting.
170
- * Added summary for alias
171
- * Added 'help commands' and summary to all commands
172
- * Added summary for Config command and some aliases
173
- * Added config command.
174
- * Uses CommandError when we need to provide feedback to the user
175
- * Handles Unauthorized errors on the Command base class
176
- * Bumped version to 0.2.0
177
- * Removed debug leftover
178
- * Added a warning when the DNS is already setup and using init with --dns option.
179
- * Merge branch 'master' of github.com:meskyanichi/webbynode
180
- * Added --engine option to init command and fixed Mocha warning.
181
- * Fixed API token checking
182
-
183
- == 2010-01-31 Michael van Rooijen
184
-
185
- * Added confirmation for when a user invokes the start/stop/restart commands.
186
- * Fixed incorrect status.
187
- * Merge branch 'master' of github.com:meskyanichi/webbynode
188
- * Added Start Stop Restart commands.
189
-
190
- == 2010-01-30 Felipe Coury
191
-
192
- * Creates the DNS entry when option --dns is passed to wn init
193
- * Added error handling for the API email and token (when it's wrong, not provided) during interactive or loaded from file session
194
- * 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.
195
-
196
- == 2010-01-29 Michael van Rooijen
197
-
198
- * Cleaned up code and renamed all "server" to "webby" because we're cool like that.
199
- * 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!)
200
- * Updated push spec.
201
- * Added a friendly message incase the application has not been deployed to the webby.
202
- * Slightly adjusted the Push command for cleaner code and nicer user feedback through log/growl.
203
- * Fixed the message for the delete command.
204
- * Changes the message the user sees when adding a local ssh key to the webby.
205
- * Removed the global validation method that only applies to the remote command.
206
- * Added Easter Egg when pushand isn't present!
207
- * Removed DS_Store file and added it to gitignore..
208
- * Merge branch 'master' of github.com:meskyanichi/webbynode
209
- * Added Growl Notifications to Webbynode Gem for users that have it installed.
210
-
211
- == 2010-01-28 Felipe Coury
212
-
213
- * Added über simple validation for Options and Parameters. Applied validation rules for tasks command.
214
- * Manifest
215
- * Added `delete' command and improved `push'
216
- * Additional spec for Array parameters
217
- * Added `summary' option to Commands
218
- * Removed commented out left overs
219
-
220
- == 2010-01-28 Michael van Rooijen
221
-
222
- * displays a friendly message when no aliases have been set.
223
- * 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.
224
- * Added a method that can extract the command from a given alias.
225
- * 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.
226
- * 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.
227
- * You can now also remove aliases with the alias command.
228
- * Base functionality has been added for adding aliases.
229
- * Base setup for Aliases Command.
230
-
231
- == 2010-01-27 Felipe Coury
232
-
233
- * Array parameters allowed in any position
234
- * Merge branch 'master' of github.com:meskyanichi/webbynode
235
- * Merge branch 'master' of github.com:meskyanichi/webbynode
236
- * Tests array params
237
- * Avoid using map &:method to be 1.8.6 compatible
238
- * Manifest. Gem starts to work again, thanks to integration testing :)
239
- * Added first cucumber feature
240
- * Improved command parsing and added `help' command
241
-
242
- == 2010-01-27 Michael van Rooijen
243
-
244
- * Fixed issue with the webbynode addkey command. Now properly executes.
245
- * Added two more RSpec tests for Push Command.
246
- * Removed the arguments for the Tasks initializer, as they are no longer required.
247
- * Added Push Command.
248
- * Added a new method to the Task class. Made a few methods public.
249
- * made some adjustments to various stuff. base setup for push.
250
- * Added version command.
251
- * Changed back to Array parameter type.
252
- * Fixed issues for Tasks. All tests pass again.
253
- * current issues commit
254
- * Removed before_create and after_create.
255
- * Adjusted some tests based on the changes that had to be made to fix the issues.
256
- * Restructured the server class. the ip attr never got set and it could never connect to the webby through the remote_executor method.
257
- * Fixed output problem. Had to add an echo parameter which wasn't available.
258
- * removed .webbynode
259
-
260
- == 2010-01-26 Felipe Coury
261
-
262
- * It's the commands revolution! Run for your lives!
263
- * Fixed failing errors
264
- * Merge branch 'master' of github.com:meskyanichi/webbynode
265
- * Added support for capturing stdout (puts) and performing assertions after testings that emit output.
266
-
267
- == 2010-01-26 Michael van Rooijen
268
-
269
- * 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.
270
- * Merge branch 'master' of github.com:meskyanichi/webbynode
271
- * pointless commit. but i wanted to merge
272
- * 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.
273
- * Added more tests for the opposite of the creation of files and folders for the tasks command.
274
- * Ensures the availability of the .webbynode/tasks folder and task files within this folder.
275
- * Updated tasks to output a message, telling the user that he has not yet set up any tasks.
276
- * Renamed selected_file/selected_tasks to session_file/session_tasks.
277
- * Added show method for Tasks
278
- * Added remove command for Tasks.
279
-
280
- == 2010-01-25 Felipe Coury
281
-
282
- * Fixed Rakefile
283
- * Added devver.rake
284
- * Added jcode require to use each_char
285
- * Merge branch 'master' of github.com:meskyanichi/webbynode
286
- * Added support for command descriptor methods to allow dynamic help and validation
287
-
288
- == 2010-01-25 Michael van Rooijen
289
-
290
- * Base ability to add tasks. No official file / folder structure creation.
291
- * Merge branch 'master' of github.com:meskyanichi/webbynode
292
- * Base setup for Tasks
293
- * 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.
294
-
295
- == 2010-01-24 Felipe Coury
296
-
297
- * Added ApiClient specs and added option to give Webby name when using `init' command.
298
- * Using RSpec in a better way - using `double' instead of `mock' and using let(:var) for initializing doubles and reusable vars.
299
- * Added support for DNS parameter to `init' command.
300
-
301
- == 2010-01-23 Michael van Rooijen
302
-
303
- * Fixed remaining test.
304
- * Lots of adjustments. One test pending. Cannot figure out how to bypass the SSH conncetion.
305
-
306
- == 2010-01-22 Felipe Coury
307
-
308
- * Fixed commit success detection
309
- * Fixed create_from_template to allow giving another name for the template
310
- * Refactoring of command interaction, extracted validation if webbynode was initialized, added PushAnd class.
311
- * Manifest
312
- * Added pending specs for Init command. Should be complete now.
313
- * Uses older RSpec versions-compatible matcher `should raise_error' instead of `should raise_exception'.
314
- * Merge branch 'bdd'
315
- * Making commands inherit from Webbynode::Command and changed slightly Remote command to conform to the base class.
316
- * Extract Webbynode::Application to it's own source and broken down into Application and Command classes. Added matching specs.
317
- * Merge branch 'bdd' of github.com:meskyanichi/webbynode into bdd
318
- * Making commands adhere to a common interface to apply an ancestor Webbynode::Command soon.
319
- * Specs for parsing parameters and options.
320
- * Merge branch 'bdd' of git@github.com:meskyanichi/webbynode into bdd
321
- * Added application_spec and improved command parsing.
322
- * Improved existing specs and added new spec for Webbynode::Application
323
- * Changed specs folder hierarchy to match lib/'s
324
- * Improved spec descriptions and grouping. Added pending specs for `init' command.
325
- * Added commands to Webbynode::Commands namespace and fixed tests accordingly
326
- * Added helper classes and specs for them
327
-
328
- == 2010-01-22 Michael van Rooijen
329
-
330
- * Re-Manifest
331
- * Cleaned some stuff up for readability. Added a test for providing an ip to the remote executor.
332
- * Added more methods to Git class. webbynode_remote? and parse_remote_ip.
333
- * Merge branch 'bdd' of github.com:meskyanichi/webbynode into bdd
334
- * Added Git Config Parser
335
- * Added another test for remote command
336
- * Refactored the before do using a helper method that loads them all.
337
- * Added more tests for remote command.
338
- * moved remote_spec to spec/webbynode/commands
339
- * Merge branch 'bdd' of github.com:meskyanichi/webbynode into bdd
340
- * Started working on Remote Command.
341
-
342
- == 2010-01-21 Felipe Coury
343
-
344
- * More BDD.
345
- * Renamed commands_spec into init_command_spec.
346
- * DRYed out failure git specs
347
- * Added commit and generic test for general git failures.
348
- * Improved git specs.
349
- * Rewrote `init' command completely using BDD.
350
- * Specs for init command
351
-
352
- == 2010-01-21 Michael van Rooijen
353
-
354
- * Small spec expression for readability change.
355
-
356
- == 2010-01-20 Felipe Coury
357
-
358
- * Manifest
359
- * Added better SSH support for asynchronous executions. Tests are broken!
360
- * Initial Webbynode Commit
361
- * Fixed tests
362
- * Merge branch 'master' of github.com:meskyanichi/webbynode
363
- * Commiting broken classes to merge upstream
364
-
365
- == 2010-01-19 Felipe Coury
366
-
367
- * Added `< /dev/null' to the command to be executed. This causes the input handler to exhaust, making every input fail, preventing from hanging ;)
368
- * Aliases webbynode to wn
369
- * 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.
370
- * Initial Webbynode Commit
371
- * Splitted specs into multiple, specialized and smaller _spec files
372
- * Regenerated Manifest
373
- * Fixed ramaining `Wn::' usage to `Webbynode::'
374
- * Merge branch 'master' of github.com:meskyanichi/webbynode
375
- * 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
376
- * Added support for Webbynode API, with input for email and token when file absent. Added dependency of HTTParty gem.
377
- * Run Code Run doesn't seem to like .count for arrays :)
378
- * Removed test/ folder
379
- * Added remote command to PostInstall.txt
380
- * Command `addkey' should call `run_remote_command' and not `remote_command'. Fixed tests.
381
- * Lazily initializes remote_ip and remote_app_name.
382
- * Fixed addkey command -- it doesn't need the IP, since we already get it from .git/config.
383
- * Added `addkey' command
384
- * Added named_options for allowing things like `wn command --options1=abc --option2'
385
-
386
- == 2010-01-19 Michael van Rooijen
387
-
388
- * Fixed RSpec tests
389
- * Renamed the method: require_application_environment! to requires_application_environment\!
390
- * 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.
391
- * Added a version command that returns the current version of the webbynode gem.
392
- * Updated the post install message.
393
- * Updated the help screen.
394
- * Renamed all shorts 'Wn' and 'App' to Webbynode and Application.
395
- * Merge branch 'master' of github.com:meskyanichi/webbynode
396
- * Now displays a nice message when trying to issue a remote command on the webby when the application has not yet been deployed.
397
- * Updated Help Screen
398
- * Updated comment for Felipe
399
- * Updated RSpec test. Updated @Felipe comment.
400
- * Fixed regular expression to match the host correctly and parse the IP. Added note for Felipe.
401
- * Fixing net ssh remote
402
- * Fixed tests and finished 'remote command' implementation
403
-
404
- == 2010-01-18 Felipe Coury
405
-
406
- * First attempt to extract the Webby IP from the "webbynode" git remote.
407
-
408
- == 2010-01-18 Michael van Rooijen
409
-
410
- * Updated manifest file
411
- * Added more Rspec tests and set up the initial 'remote' command.
412
- * Initial commit
413
- * Added more Rspec tests for Init and all tests pass thus far. Going to implement Remote next.
414
- * Moved the Webbynode require statement into the Spec Helper file
415
- * Cleaned up Rspec by moving git configuration into fixtures and added a helper method to read fixtures.
416
- * Added RSpec tests for the push command. Added some comments. Fixed previous tests
417
- * Finished initial rspec setup for the init command
418
- * Added a help file and rspec tests
419
- * Adding initial structure changes
420
-
421
- == 2010-01-17 Felipe Coury
422
-
423
- * Added Roadmap
424
-
425
- == 2010-01-15 Felipe Coury
426
-
427
- * Manifest
428
- * Bumped version
429
-
430
- == 2010-01-10 Felipe Coury
431
-
432
- * More README
433
- * Added more info about requirements
434
- * Fixed README
435
- * Removed pkg and fixed some tests
436
- * Initial commit
437
-
data/cucumber.yml.old DELETED
@@ -1 +0,0 @@
1
- default: --format pretty features