webbynode 1.0.3.beta → 1.0.3.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.

data/Manifest CHANGED
@@ -39,6 +39,7 @@ lib/webbynode/commands/restart.rb
39
39
  lib/webbynode/commands/start.rb
40
40
  lib/webbynode/commands/stop.rb
41
41
  lib/webbynode/commands/tasks.rb
42
+ lib/webbynode/commands/user.rb
42
43
  lib/webbynode/commands/version.rb
43
44
  lib/webbynode/commands/webbies.rb
44
45
  lib/webbynode/engines/all.rb
@@ -61,6 +62,7 @@ lib/webbynode/remote_executor.rb
61
62
  lib/webbynode/server.rb
62
63
  lib/webbynode/ssh.rb
63
64
  lib/webbynode/ssh_keys.rb
65
+ lib/webbynode/trial.rb
64
66
  lib/webbynode/updater.rb
65
67
  spec/fixtures/aliases
66
68
  spec/fixtures/api/credentials
@@ -87,6 +89,7 @@ spec/fixtures/git/status/clean
87
89
  spec/fixtures/git/status/dirty
88
90
  spec/fixtures/pushand
89
91
  spec/fixtures/settings.py
92
+ spec/fixtures/trial/user_add
90
93
  spec/spec_helper.rb
91
94
  spec/webbynode/api_client_spec.rb
92
95
  spec/webbynode/application_spec.rb
@@ -105,6 +108,7 @@ spec/webbynode/commands/open_spec.rb
105
108
  spec/webbynode/commands/push_spec.rb
106
109
  spec/webbynode/commands/remote_spec.rb
107
110
  spec/webbynode/commands/tasks_spec.rb
111
+ spec/webbynode/commands/user_spec.rb
108
112
  spec/webbynode/commands/version_spec.rb
109
113
  spec/webbynode/commands/webbies_spec.rb
110
114
  spec/webbynode/engines/django_spec.rb
@@ -124,4 +128,5 @@ spec/webbynode/push_and_spec.rb
124
128
  spec/webbynode/remote_executor_spec.rb
125
129
  spec/webbynode/server_spec.rb
126
130
  spec/webbynode/ssh_spec.rb
131
+ spec/webbynode/trial_spec.rb
127
132
  webbynode.gemspec
data/Rakefile CHANGED
@@ -4,7 +4,7 @@ require 'rake/testtask'
4
4
 
5
5
  require 'echoe'
6
6
 
7
- Echoe.new('webbynode', '1.0.3.beta') do |p|
7
+ Echoe.new('webbynode', '1.0.3.beta1') do |p|
8
8
  p.description = "Webbynode Deployment Gem"
9
9
  p.url = "http://webbynode.com"
10
10
  p.author = "Felipe Coury"
@@ -1,5 +1,3 @@
1
- require 'httparty'
2
-
3
1
  module Webbynode
4
2
  class ApiClient
5
3
  include HTTParty
@@ -200,12 +200,12 @@ module Webbynode
200
200
  end
201
201
 
202
202
  def server
203
- @server ||= Webbynode::Server.new(git.parse_remote_ip)
203
+ @server ||= Webbynode::Server.new(git.parse_remote_ip, git.remote_user, git.remote_port)
204
204
  end
205
205
 
206
206
  def remote_executor
207
207
  git.parse_remote_ip
208
- @remote_executor ||= Webbynode::RemoteExecutor.new(git.remote_ip, git.remote_port)
208
+ @remote_executor ||= Webbynode::RemoteExecutor.new(git.remote_ip, git.remote_user, git.remote_port)
209
209
  end
210
210
 
211
211
  def pushand
@@ -6,96 +6,151 @@ module Webbynode::Commands
6
6
  option :adddns, "Creates the DNS entries for the domain"
7
7
  option :port, "Specifies an alternate SSH port to connect to Webby", :validate => :integer
8
8
  option :engine, "Sets the application engine for the app", :validate => { :in => ['php', 'rack', 'rails', 'rails3'] }
9
+ option :trial, "Initializes this app for Rapp Trial"
9
10
 
10
11
  def execute
11
12
  unless params.any?
12
13
  io.log help
13
14
  return
14
15
  end
16
+
17
+ io.log "Webbynode Rapp - http://rapp.webbynode.com"
15
18
 
16
- check_prerequisites
17
-
18
- webby = param(:webby)
19
- app_name = io.app_name
20
- git_present = git.present?
19
+ @overwrite = false
21
20
 
22
- if option(:dns)
23
- dns_entry = "#{option(:dns)}"
24
- else
25
- dns_entry = app_name
26
- end
21
+ check_prerequisites
22
+ check_initialized
23
+
24
+ @webby = param(:webby)
25
+ @app_name = io.app_name
26
+ @git_present = git.present?
27
+ @dns_entry = option(:dns) ? "#{option(:dns)}" : @app_name
27
28
 
28
- if git_present and !git.clean?
29
- raise CommandError,
30
- "Cannot initialize: git has pending changes. Execute a git commit or add changes to .gitignore and try again."
31
- end
29
+ handle_trial
32
30
 
33
- io.log "Initializing application #{app_name} #{dns_entry ? "with dns #{dns_entry}" : ""}", :start
31
+ check_git_clean if @git_present
34
32
 
35
- detect_engine
33
+ io.log "Initializing application #{@app_name} #{@dns_entry ? "with dns #{@dns_entry}" : ""}", :start
36
34
 
37
- webby_ip = get_ip(webby)
35
+ detect_engine
38
36
 
39
37
  io.log ""
40
38
  io.log "Initializing directory structure..."
41
39
 
42
- if pushand_exists = io.file_exists?(".pushand")
43
- io.log ""
44
- io.log "It seems this application was initialized before."
45
- overwrite = ask('Do you want to initialize it again (y/n)?').downcase == 'y'
46
- end
40
+ create_pushand
41
+ create_webbynode_tree
42
+ create_git_commit unless @git_present
43
+ create_git_remote
47
44
 
48
- if overwrite || !pushand_exists
49
- io.log ""
50
- io.create_file(".pushand", "#! /bin/bash\nphd $0 #{app_name} #{dns_entry}\n", true)
51
- end
45
+ handle_dns option(:dns) if option(:adddns)
46
+
47
+ io.log "Application #{@app_name} ready for Rapid Deployment", :finish
48
+
49
+ rescue Webbynode::InvalidAuthentication
50
+ io.log "Could not connect to webby: invalid authentication.", true
52
51
 
53
- create_webbynode_tree
52
+ rescue Webbynode::PermissionError
53
+ io.log "Could not create an SSH key: permission error.", true
54
54
 
55
- unless git_present
56
- io.log "Initializing git and applying initial commit..."
57
- git.init
58
- git.add "."
59
- git.commit "Initial commit"
55
+ rescue Webbynode::GitRemoteAlreadyExistsError
56
+ io.log "Application already initialized."
57
+ end
58
+
59
+ private
60
+
61
+ def check_git_clean
62
+ unless git.clean?
63
+ raise CommandError,
64
+ "Cannot initialize: git has pending changes. Execute a git commit or add changes to .gitignore and try again."
60
65
  end
66
+ end
67
+
68
+ def check_initialized
69
+ return unless pushand_exists?
70
+
71
+ io.log ""
72
+ io.log "It seems this application was initialized before."
61
73
 
62
- if git.remote_exists?('webbynode')
63
- io.log ""
64
- io.log "Webbynode git integration already initialized."
65
- if overwrite || ask('Do you want to overwrite the current settings (y/n)?').downcase == 'y'
66
- git.delete_remote('webbynode')
74
+ unless ask('Do you want to initialize it again (y/n)?').downcase == 'y'
75
+ puts ""
76
+ raise CommandError, 'Initialization aborted.'
77
+ end
78
+
79
+ @overwrite = true
80
+ end
81
+
82
+ def handle_trial
83
+ unless option(:trial)
84
+ @webby_ip = get_ip(@webby)
85
+ @git_user = "git"
86
+ else
87
+ @webby_ip = "trial.webbyapp.com"
88
+ @git_user = io.general_settings['rapp_username']
89
+
90
+ unless @git_user
91
+ @git_user = ask('Enter your Rapp trial user: ')
92
+ io.add_general_setting 'rapp_username', @git_user
67
93
  end
68
- io.log ""
94
+
95
+ @git_home = "/home/#{@git_user}"
69
96
  end
97
+ end
98
+
99
+ def pushand_exists?
100
+ io.file_exists?(".pushand")
101
+ end
102
+
103
+ def create_pushand
104
+ return if pushand_exists? && !@overwrite
105
+
106
+ io.log ""
107
+ io.create_file(".pushand", "#! /bin/bash\nphd $0 #{@app_name} #{@dns_entry}\n", true)
108
+ end
109
+
110
+ def create_git_commit
111
+ io.log "Initializing git and applying initial commit..."
112
+ git.init
113
+ git.add "."
114
+ git.commit "Initial commit"
115
+ end
116
+
117
+ def delete_remote
118
+ return unless git.remote_exists?('webbynode')
70
119
 
71
- if overwrite or (!git.remote_exists?('webbynode') and git_present)
120
+ io.log ""
121
+ io.log "Webbynode git integration already initialized."
122
+ if @overwrite || ask('Do you want to overwrite the current settings (y/n)?').downcase == 'y'
123
+ git.delete_remote('webbynode')
124
+ end
125
+ io.log ""
126
+ end
127
+
128
+ def commit_changes
129
+ if @overwrite or (!git.remote_exists?('webbynode') and @git_present)
72
130
  io.log "Commiting Webbynode changes..."
73
131
  git.add "."
74
132
  git.commit2 "[Webbynode] Rapid App Deployment Reinitialization"
75
133
  end
76
-
134
+ end
135
+
136
+ def add_remote
77
137
  io.log "Adding webbynode as git remote..."
78
- options = ["webbynode", webby_ip, app_name]
79
- options << option(:port).to_i if option(:port)
80
-
81
- Webbynode::Server.new(webby_ip).add_ssh_key LocalSshKey, nil
138
+ options = {}
139
+ options[:port] = option(:port).to_i if option(:port)
140
+ options[:home] = @git_home if @git_home
82
141
 
83
- git.add_remote *options
84
-
85
- handle_dns option(:dns) if option(:adddns)
86
-
87
- io.log "Application #{app_name} ready for Rapid Deployment", :finish
88
- rescue Webbynode::InvalidAuthentication
89
- io.log "Could not connect to webby: invalid authentication.", true
142
+ params = [@git_user, "webbynode", @webby_ip, @app_name, options]
90
143
 
91
- rescue Webbynode::PermissionError
92
- io.log "Could not create an SSH key: permission error.", true
144
+ Webbynode::Server.new(@webby_ip, @git_user, option(:port) || 22).add_ssh_key LocalSshKey, nil
93
145
 
94
- rescue Webbynode::GitRemoteAlreadyExistsError
95
- io.log "Application already initialized."
146
+ git.add_remote *params
96
147
  end
97
148
 
98
- private
149
+ def create_git_remote
150
+ delete_remote
151
+ commit_changes
152
+ add_remote
153
+ end
99
154
 
100
155
  def get_ip(webby)
101
156
  return webby if webby =~ /\b(?:\d{1,3}\.){3}\d{1,3}\b/
@@ -0,0 +1,94 @@
1
+ module Webbynode::Commands
2
+ class User < Webbynode::Command
3
+ summary "Manages Rapp Trial user"
4
+ parameter :action, 'Action to perform', :validate => { :in => ['add', 'remove', 'show', 'password']}
5
+
6
+ def execute
7
+ io.log "Rapp Trial - http://rapp.webbynode.com"
8
+ io.log ""
9
+
10
+ if user = io.general_settings['rapp_username']
11
+ io.log "User #{user} is already configured for Rapp Trial."
12
+ if ask('Do you want to overwrite this settings (y/n)?') != 'y'
13
+ io.log ""
14
+ io.log "Aborted."
15
+ return
16
+ end
17
+ end
18
+
19
+ io.log "Rapp Trial is a good way to try Webbynode's Rapp Engine without being a subscriber."
20
+ io.log "You can deploy your application and it will be online for up to 24 hours. We delete"
21
+ io.log "all applications at 2AM EST, but your user will remain valid."
22
+ io.log ""
23
+ io.log "Please enter your email below."
24
+ io.log ""
25
+
26
+ begin
27
+ email = ask('Email: ')
28
+ end until valid_email?(email)
29
+
30
+ io.log ""
31
+ io.log "Enter an username and password to start using Rapp Trial."
32
+ io.log ""
33
+
34
+ begin
35
+ user = ask(' Username: ')
36
+ end until valid_user?(user)
37
+
38
+ begin
39
+ begin
40
+ pass = ask('Choose a password: ') { |q| q.echo = "*" }
41
+ end until valid_pass?(pass)
42
+ conf = ask(' Enter it again: ') { |q| q.echo = "*" }
43
+ end until valid_conf?(pass, conf)
44
+
45
+ response = Webbynode::Trial.add_user(user, pass, email)
46
+
47
+ io.log ""
48
+
49
+ if response["success"]
50
+ io.add_general_setting "rapp_username", user
51
+ puts response["message"]
52
+ else
53
+ puts "ERROR: #{response["message"]}"
54
+ end
55
+ end
56
+
57
+ private
58
+
59
+ def valid_email?(email)
60
+ if email.nil? or email.empty?
61
+ io.log "Your email is required. Try again."
62
+ io.log ""
63
+
64
+ return false
65
+ end
66
+
67
+ return true if email =~ /^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$/
68
+
69
+ io.log "'#{email}' is not a valid email. Try again."
70
+ io.log ""
71
+ end
72
+
73
+ def valid_user?(user)
74
+ return true if user =~ /^[a-z0-9_-]{3,15}$/
75
+
76
+ io.log "Invalid user name. Use lowercase chars, numbers and underscore only. Length must be 3 to 15."
77
+ io.log ""
78
+ end
79
+
80
+ def valid_pass?(pass)
81
+ return true if pass =~ /^[A-Za-z]\w{5,}$/
82
+
83
+ io.log "Password must start with a letter and must have at least 6 characters. Try again."
84
+ io.log ""
85
+ end
86
+
87
+ def valid_conf?(pass, conf)
88
+ return true if pass == conf
89
+
90
+ io.log "Password doesn't match confirmation. Try again."
91
+ io.log ""
92
+ end
93
+ end
94
+ end
data/lib/webbynode/git.rb CHANGED
@@ -6,7 +6,7 @@ module Webbynode
6
6
  class GitRemoteCouldNotRemoveError < StandardError; end
7
7
 
8
8
  class Git
9
- attr_accessor :config, :remote_ip, :remote_port
9
+ attr_accessor :config, :remote_ip, :remote_port, :remote_user
10
10
 
11
11
  def present?
12
12
  io.directory?(".git")
@@ -45,10 +45,11 @@ module Webbynode
45
45
  exec "git add #{what}"
46
46
  end
47
47
 
48
- def add_remote(name, host, repo, port=22)
49
- home = RemoteExecutor.new(host, port).remote_home
48
+ def add_remote(user, name, host, repo, options={})
49
+ port = options[:port] || 22
50
+ home = options[:home] || RemoteExecutor.new(host, user, port).remote_home
50
51
 
51
- exec("git remote add #{name} ssh://git@#{host}:#{port}#{home}/#{repo}") do |output|
52
+ exec("git remote add #{name} ssh://#{user}@#{host}:#{port}#{home}/#{repo}") do |output|
52
53
  # raise an exception if remote already exists
53
54
  raise GitRemoteAlreadyExistsError, output if output =~ /remote \w+ already exists/
54
55
 
@@ -129,14 +130,20 @@ module Webbynode
129
130
 
130
131
  # new remote format
131
132
  if parse_remote_url =~ /^ssh:\/\/(\w+)@(.+)\/(.+)$/
133
+ @remote_user = $1
132
134
  if $2 =~ /(.*):(\d*)\/(.*)$/
133
135
  @remote_ip ||= $1
134
136
  @remote_port ||= $2.to_i
135
137
  @remote_home ||= "/#{$3}"
136
138
  end
137
139
  else
138
- @remote_ip ||= ($2 if @config["remote"]["webbynode"]["url"] =~ /^(\w+)@(.+):(.+)$/) if @config
139
- @remote_port ||= 22
140
+ if @config
141
+ if @config["remote"]["webbynode"]["url"] =~ /^(\w+)@(.+):(.+)$/
142
+ @remote_user ||= $1
143
+ @remote_ip ||= $2
144
+ end
145
+ @remote_port ||= 22
146
+ end
140
147
  end
141
148
 
142
149
  @remote_ip
@@ -1,14 +1,15 @@
1
1
  module Webbynode
2
2
  class RemoteExecutor
3
- attr_accessor :ip, :port
3
+ attr_accessor :ip, :user, :port
4
4
 
5
- def initialize(ip, port=nil)
5
+ def initialize(ip, user=nil, port=nil)
6
6
  @ip = ip
7
+ @user = user
7
8
  @port = port
8
9
  end
9
10
 
10
11
  def ssh
11
- @ssh ||= Ssh.new(ip, port)
12
+ @ssh ||= Ssh.new(ip, user, port)
12
13
  end
13
14
 
14
15
  def create_folder(folder)
@@ -4,11 +4,13 @@ module Webbynode
4
4
  class ApplicationNotDeployed < StandardError; end
5
5
 
6
6
  class Server
7
- attr_accessor :ip
7
+ attr_accessor :ip, :user, :port
8
8
 
9
- def initialize(ip)
10
- @ssh = Ssh.new(ip)
9
+ def initialize(ip, user, port)
10
+ @ssh = Ssh.new(ip, user, port)
11
11
  @ip = ip
12
+ @user = user
13
+ @port = port
12
14
  end
13
15
 
14
16
  def io
@@ -16,7 +18,7 @@ module Webbynode
16
18
  end
17
19
 
18
20
  def remote_executor
19
- @remote_executor ||= Webbynode::RemoteExecutor.new(ip)
21
+ @remote_executor ||= Webbynode::RemoteExecutor.new(ip, user, port)
20
22
  end
21
23
 
22
24
  def pushand
data/lib/webbynode/ssh.rb CHANGED
@@ -1,9 +1,10 @@
1
1
  module Webbynode
2
2
  class Ssh
3
- attr_accessor :remote_ip, :port
3
+ attr_accessor :remote_ip, :port, :user
4
4
 
5
- def initialize(remote_ip, port=22)
5
+ def initialize(remote_ip, user='git', port=22)
6
6
  @remote_ip = remote_ip
7
+ @user = user
7
8
  @port = port
8
9
  end
9
10
 
@@ -14,13 +15,13 @@ module Webbynode
14
15
  def connect
15
16
  raise "No IP given" unless @remote_ip
16
17
  @conn = nil if @conn and @conn.closed?
17
- @conn ||= Net::SSH.start(@remote_ip, 'git', :port => @port, :auth_methods => %w(publickey hostbased))
18
+ @conn ||= Net::SSH.start(@remote_ip, @user, :port => @port, :auth_methods => %w(publickey hostbased))
18
19
  rescue Net::SSH::AuthenticationFailed
19
20
  HighLine.track_eof = false
20
21
 
21
22
  begin
22
- @password ||= ask("Enter your deployment password for #{@remote_ip}: ") { |q| q.echo = '' }
23
- @conn ||= Net::SSH.start(@remote_ip, 'git', :port => @port, :password => @password)
23
+ @password ||= ask("Enter your deployment password for #{@user}@#{@remote_ip}: ") { |q| q.echo = '' }
24
+ @conn ||= Net::SSH.start(@remote_ip, @user, :port => @port, :password => @password)
24
25
  rescue Net::SSH::AuthenticationFailed
25
26
  io.log "Could not connect to server: invalid authentication."
26
27
  exit
@@ -0,0 +1,11 @@
1
+ module Webbynode
2
+ class Trial
3
+ include HTTParty
4
+ base_uri "http://trial.webbyapp.com"
5
+ format :yaml
6
+
7
+ def self.add_user(user, password, email)
8
+ put('/users', :body => { :username => user, :password => password, :email => email })
9
+ end
10
+ end
11
+ end
data/lib/webbynode.rb CHANGED
@@ -2,6 +2,7 @@ $:.unshift(File.dirname(__FILE__)) unless
2
2
  $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
3
3
 
4
4
  require 'rubygems'
5
+ require 'httparty'
5
6
  require 'domainatrix'
6
7
  require 'net/ssh'
7
8
  require 'highline/import'
@@ -20,6 +21,7 @@ require File.join(File.dirname(__FILE__), 'webbynode', 'api_client')
20
21
  require File.join(File.dirname(__FILE__), 'webbynode', 'remote_executor')
21
22
  require File.join(File.dirname(__FILE__), 'webbynode', 'notify')
22
23
  require File.join(File.dirname(__FILE__), 'webbynode', 'updater')
24
+ require File.join(File.dirname(__FILE__), 'webbynode', 'trial')
23
25
  require File.join(File.dirname(__FILE__), 'webbynode', 'properties')
24
26
  require File.join(File.dirname(__FILE__), 'webbynode', 'attribute_accessors')
25
27
  require File.join(File.dirname(__FILE__), 'webbynode', 'engines', 'engine')
@@ -49,10 +51,11 @@ require File.join(File.dirname(__FILE__), 'webbynode', 'commands', 'help')
49
51
  require File.join(File.dirname(__FILE__), 'webbynode', 'commands', 'open')
50
52
  require File.join(File.dirname(__FILE__), 'webbynode', 'commands', 'webbies')
51
53
  require File.join(File.dirname(__FILE__), 'webbynode', 'commands', 'version')
54
+ require File.join(File.dirname(__FILE__), 'webbynode', 'commands', 'user')
52
55
  require File.join(File.dirname(__FILE__), 'webbynode', 'application')
53
56
 
54
57
  module Webbynode
55
- VERSION = '1.0.3.beta'
58
+ VERSION = '1.0.3.beta1'
56
59
  end
57
60
 
58
61
  class Array
@@ -0,0 +1,9 @@
1
+ HTTP/1.1 200 OK
2
+ Content-Type: text/html
3
+ Connection: keep-alive
4
+ Status: 200
5
+ X-Powered-By: Phusion Passenger (mod_rails/mod_rack) 2.2.15
6
+ Content-Length: 50
7
+ Server: nginx/0.7.67 + Phusion Passenger 2.2.15 (mod_rails/mod_rack)
8
+
9
+ { success: true, message: 'User fcoury created' }
@@ -44,6 +44,41 @@ describe Webbynode::Commands::Init do
44
44
  end
45
45
  end
46
46
 
47
+ describe 'in trial mode' do
48
+ subject do
49
+ Webbynode::Commands::Init.new('--trial').tap do |cmd|
50
+ cmd.stub!(:git).and_return(git_handler)
51
+ cmd.stub!(:io).and_return(io_handler)
52
+ cmd.stub!(:api).and_return(api)
53
+ end
54
+ end
55
+
56
+ before(:each) do
57
+ subject.stub(:check_git_clean)
58
+ subject.stub(:detect_engine)
59
+ end
60
+
61
+ it "uses rapp_username when found" do
62
+ io_handler.should_receive(:general_settings).and_return({ 'rapp_username' => 'user' })
63
+ io_handler.should_receive(:app_name).and_return('trial_app')
64
+ git_handler.should_receive(:add_remote).with('user', 'webbynode', 'trial.webbyapp.com', 'trial_app', :home => '/home/user')
65
+
66
+ subject.should_receive(:get_ip).never
67
+ subject.run
68
+ end
69
+
70
+ it "asks for trial username when not found" do
71
+ io_handler.should_receive(:general_settings).and_return({})
72
+ io_handler.should_receive(:app_name).and_return('trial_app')
73
+ subject.should_receive(:ask).with('Enter your Rapp trial user: ').and_return('user')
74
+ io_handler.should_receive(:add_general_setting).with('rapp_username', 'user')
75
+ git_handler.should_receive(:add_remote).with('user', 'webbynode', 'trial.webbyapp.com', 'trial_app', :home => '/home/user')
76
+
77
+ subject.should_receive(:get_ip).never
78
+ subject.run
79
+ end
80
+ end
81
+
47
82
  describe 'using alternate port' do
48
83
  subject do
49
84
  Webbynode::Commands::Init.new('2.1.2.3', '--port=2020').tap do |cmd|
@@ -56,7 +91,7 @@ describe Webbynode::Commands::Init do
56
91
  io_handler.stub!(:file_exists?).with(".pushand").and_return(false)
57
92
 
58
93
  git_handler.stub!(:present?).and_return(:false)
59
- git_handler.should_receive(:add_remote).with("webbynode", "2.1.2.3", anything(), 2020)
94
+ git_handler.should_receive(:add_remote).with("git", "webbynode", "2.1.2.3", anything(), :port => 2020)
60
95
 
61
96
  subject.stub!(:git).and_return(git_handler)
62
97
  subject.stub!(:detect_engine).and_return(Webbynode::Engines::Rails)
@@ -233,7 +268,7 @@ describe Webbynode::Commands::Init do
233
268
 
234
269
  context "Deployment webby" do
235
270
  it "is detected automatically if user only have one Webby" do
236
- git_handler.should_receive(:add_remote).with("webbynode", "201.81.121.201", anything())
271
+ git_handler.should_receive(:add_remote).with("git", "webbynode", "201.81.121.201", anything(), {})
237
272
 
238
273
  subject.stub!(:detect_engine).and_return(Webbynode::Engines::Rails)
239
274
  subject.run
@@ -274,7 +309,7 @@ describe Webbynode::Commands::Init do
274
309
  subject.should_receive(:ask).with("Which Webby do you want to deploy to:", Integer).and_return(2)
275
310
 
276
311
  io_handler.should_receive(:log).with("Set deployment Webby to webby2.")
277
- git_handler.should_receive(:add_remote).with("webbynode", "67.53.31.2", anything())
312
+ git_handler.should_receive(:add_remote).with("git", "webbynode", "67.53.31.2", anything(), {})
278
313
 
279
314
  subject.stub!(:detect_engine).and_return(Webbynode::Engines::Rails)
280
315
  subject.run
@@ -292,7 +327,7 @@ describe Webbynode::Commands::Init do
292
327
  end
293
328
 
294
329
  it "doesn't ask if user already agreed to reinitialize" do
295
- io_handler.should_receive(:file_exists?).with(".pushand").and_return(true)
330
+ subject.stub!(:pushand_exists?).and_return(true)
296
331
  io_handler.should_receive(:app_name).any_number_of_times.and_return("mah_app")
297
332
  io_handler.should_receive(:create_file).with(".pushand", "#! /bin/bash\nphd $0 mah_app mah_app\n", true)
298
333
 
@@ -518,7 +553,7 @@ describe Webbynode::Commands::Init do
518
553
 
519
554
  io_handler.should_receive(:app_name).any_number_of_times.and_return("my_app")
520
555
  git_handler.should_receive(:present?).and_return(false)
521
- git_handler.should_receive(:add_remote).with("webbynode", "1.2.3.4", "my_app")
556
+ git_handler.should_receive(:add_remote).with("git", "webbynode", "1.2.3.4", "my_app", {})
522
557
 
523
558
  create_init("my_webby_name")
524
559
  @command.stub!(:api).and_return(api)
@@ -528,7 +563,7 @@ describe Webbynode::Commands::Init do
528
563
 
529
564
  context "determining host" do
530
565
  it "should assume host is app's name when not given" do
531
- io_handler.should_receive(:file_exists?).with(".pushand").and_return(false)
566
+ @command.should_receive(:pushand_exists?).any_number_of_times.and_return(false)
532
567
  io_handler.should_receive(:app_name).any_number_of_times.and_return("application_name")
533
568
  io_handler.should_receive(:create_file).with(".pushand", "#! /bin/bash\nphd $0 application_name application_name\n", true)
534
569
 
@@ -562,7 +597,7 @@ describe Webbynode::Commands::Init do
562
597
 
563
598
  before(:each) do
564
599
  git.stub(:remote_exists?).and_return(false)
565
- io.should_receive(:file_exists?).with('.pushand').and_return(false)
600
+ subject.should_receive(:pushand_exists?).any_number_of_times.and_return(false)
566
601
  end
567
602
 
568
603
  it "creates the .webbynode system folder and stub files" do
@@ -597,16 +632,16 @@ describe Webbynode::Commands::Init do
597
632
  end
598
633
 
599
634
  it "isn't replaced if user answers no" do
600
- io_handler.should_receive(:file_exists?).with(".pushand").and_return(true)
601
- io_handler.should_receive(:create_file).with(".pushand").never
635
+ @command.stub(:pushand_exists?).and_return(true)
636
+ # io_handler.should_receive(:create_file).with(".pushand").never
602
637
  io_handler.should_receive(:log).with("It seems this application was initialized before.")
603
638
  @command.should_receive(:ask).with("Do you want to initialize it again (y/n)?").once.ordered.and_return("n")
604
639
 
605
- @command.run
640
+ lambda { @command.execute }.should raise_error(Webbynode::Command::CommandError)
606
641
  end
607
642
 
608
643
  it "is replaced if user answers yes" do
609
- io_handler.should_receive(:file_exists?).with(".pushand").and_return(true)
644
+ @command.stub(:pushand_exists?).and_return(true)
610
645
  io_handler.should_receive(:app_name).any_number_of_times.and_return("mah_app")
611
646
  io_handler.should_receive(:create_file).with(".pushand", "#! /bin/bash\nphd $0 mah_app mah_app\n", true)
612
647
 
@@ -635,7 +670,7 @@ describe Webbynode::Commands::Init do
635
670
  it "should add a new remote" do
636
671
  io_handler.should_receive(:app_name).any_number_of_times.and_return("my_app")
637
672
  git_handler.should_receive(:present?).and_return(false)
638
- git_handler.should_receive(:add_remote).with("webbynode", "4.3.2.1", "my_app")
673
+ git_handler.should_receive(:add_remote).with("git", "webbynode", "4.3.2.1", "my_app", {})
639
674
 
640
675
  @command.run
641
676
  end
@@ -0,0 +1,37 @@
1
+ # Load Spec Helper
2
+ require File.join(File.expand_path(File.dirname(__FILE__)), '../..', 'spec_helper')
3
+
4
+ describe Webbynode::Commands::User do
5
+ context 'add action' do
6
+ let(:io) { double('Io').as_null_object }
7
+
8
+ subject do
9
+ Webbynode::Commands::User.new('add').tap do |cmd|
10
+ cmd.stub!(:io).and_return(io)
11
+ end
12
+ end
13
+
14
+ it "creates the user" do
15
+ io.should_receive(:general_settings).and_return({})
16
+ io.should_receive(:add_general_setting).with('rapp_username', 'fcoury')
17
+
18
+ FakeWeb.register_uri(:put, "http://trial.webbyapp.com/users",
19
+ :email => 'fcoury@me.com', :username => 'fcoury', :password => 'secret',
20
+ :response => read_fixture('trial/user_add'))
21
+
22
+ subject.should_receive(:ask).with('Email: ').and_return('fcoury@me.com')
23
+ subject.should_receive(:ask).with(' Username: ').and_return('fcoury')
24
+ subject.should_receive(:ask).with('Choose a password: ').and_return('secret')
25
+ subject.should_receive(:ask).with(' Enter it again: ').and_return('secret')
26
+ subject.run
27
+ end
28
+
29
+ it "checks for existing user first" do
30
+ io.should_receive(:general_settings).and_return({ 'rapp_username' => 'fcoury' })
31
+ io.should_receive(:log).with('User fcoury is already configured for Rapp Trial.')
32
+ io.should_receive(:log).with('Aborted.')
33
+ subject.should_receive(:ask).with('Do you want to overwrite this settings (y/n)?').and_return('n')
34
+ subject.run
35
+ end
36
+ end
37
+ end
@@ -195,14 +195,21 @@ describe Webbynode::Git do
195
195
 
196
196
  describe "#add_remote" do
197
197
  before(:each) do
198
- re.should_receive(:remote_home).and_return('/var/rapp')
198
+ re.stub(:remote_home).and_return('/var/rapp')
199
199
  end
200
200
 
201
201
  it "connects to the remote IP to get home folder" do
202
- Webbynode::RemoteExecutor.should_receive(:new).with("1.2.3.4", 389).and_return(re)
202
+ Webbynode::RemoteExecutor.should_receive(:new).with("1.2.3.4", "git", 389).and_return(re)
203
203
 
204
204
  subject.should_receive(:exec).with("git remote add webbynode ssh://git@1.2.3.4:389/var/rapp/the_repo")
205
- subject.add_remote("webbynode", "1.2.3.4", "the_repo", 389)
205
+ subject.add_remote("git", "webbynode", "1.2.3.4", "the_repo", :port => 389)
206
+ end
207
+
208
+ it "doesn't connect when home is specified" do
209
+ Webbynode::RemoteExecutor.should_receive(:new).never
210
+
211
+ subject.should_receive(:exec).with("git remote add webbynode ssh://git@1.2.3.4:389/home/user/the_repo")
212
+ subject.add_remote("git", "webbynode", "1.2.3.4", "the_repo", :port => 389, :home => "/home/user")
206
213
  end
207
214
 
208
215
  context "when successfull" do
@@ -211,23 +218,23 @@ describe Webbynode::Git do
211
218
  io_handler.should_receive(:exec).with("git remote add webbynode ssh://git@1.2.3.4:22/var/rapp/the_repo").and_return("")
212
219
 
213
220
  subject.should_receive(:io).and_return(io_handler)
214
- subject.add_remote("webbynode", "1.2.3.4", "the_repo").should be_true
221
+ subject.add_remote("git", "webbynode", "1.2.3.4", "the_repo").should be_true
215
222
  end
216
223
  end
217
224
 
218
225
  context "when unsuccessfull" do
219
226
  it "should raise exception if not a git repo" do
220
- should_raise_notgitrepo("git remote add other ssh://git@5.6.7.8:22/var/rapp/a_repo") { |git| git.add_remote("other", "5.6.7.8", "a_repo") }
227
+ should_raise_notgitrepo("git remote add other ssh://git@5.6.7.8:22/var/rapp/a_repo") { |git| git.add_remote("git", "other", "5.6.7.8", "a_repo") }
221
228
  end
222
229
 
223
230
  it "should return raise exception if the remote already exists" do
224
231
  should_raise(Webbynode::GitRemoteAlreadyExistsError, "git remote add other ssh://git@5.6.7.8:22/var/rapp/a_repo") { |git|
225
- git.add_remote("other", "5.6.7.8", "a_repo")
232
+ git.add_remote("git", "other", "5.6.7.8", "a_repo")
226
233
  }
227
234
  end
228
235
 
229
236
  it "should raise a generic Git error when another error occurs" do
230
- should_raise_giterror("git remote add other ssh://git@5.6.7.8:22/var/rapp/a_repo") { |git| git.add_remote("other", "5.6.7.8", "a_repo") }
237
+ should_raise_giterror("git remote add other ssh://git@5.6.7.8:22/var/rapp/a_repo") { |git| git.add_remote("git", "other", "5.6.7.8", "a_repo") }
231
238
  end
232
239
  end
233
240
  end
@@ -433,6 +440,7 @@ describe Webbynode::Git do
433
440
  git.config.should_not be_empty
434
441
  git.remote_ip.should eql('1.2.3.4')
435
442
  git.remote_port.should eql(22)
443
+ git.remote_user.should eql('git')
436
444
  end
437
445
  end
438
446
 
@@ -446,6 +454,7 @@ describe Webbynode::Git do
446
454
  git.config.should_not be_empty
447
455
  git.remote_ip.should eql('1.2.3.4')
448
456
  git.remote_port.should eql(122)
457
+ git.remote_user.should eql('git')
449
458
  end
450
459
  end
451
460
  end
@@ -10,12 +10,12 @@ describe Webbynode::RemoteExecutor do
10
10
  end
11
11
 
12
12
  describe "#new" do
13
- subject { Webbynode::RemoteExecutor.new("2.1.2.2", 2020) }
13
+ subject { Webbynode::RemoteExecutor.new("2.1.2.2", 'user', 2020) }
14
14
 
15
15
  its(:port) { should == 2020 }
16
16
 
17
17
  it "takes an optional port as parameter" do
18
- Webbynode::Ssh.should_receive(:new).with("2.1.2.2", 2020).and_return(ssh)
18
+ Webbynode::Ssh.should_receive(:new).with("2.1.2.2", 'user', 2020).and_return(ssh)
19
19
  subject.exec "hello mom", false, false
20
20
  end
21
21
  end
@@ -3,11 +3,21 @@ require File.join(File.expand_path(File.dirname(__FILE__)), '..', 'spec_helper')
3
3
 
4
4
  describe Webbynode::Server do
5
5
  it "should have an Io instance" do
6
- Webbynode::Server.new("1.2.3.4").io.class.should == Webbynode::Io
6
+ Webbynode::Server.new("1.2.3.4", "git", 22).io.class.should == Webbynode::Io
7
7
  end
8
8
 
9
9
  it "should have a RemoteExecutor instance" do
10
- Webbynode::Server.new("1.2.3.4").remote_executor.class.should == Webbynode::RemoteExecutor
10
+ Webbynode::Server.new("1.2.3.4", "git", 22).remote_executor.class.should == Webbynode::RemoteExecutor
11
+ end
12
+
13
+ describe '#new' do
14
+ it "creates an SSH connection with proper settings" do
15
+ Webbynode::Ssh.should_receive(:new).with("1.2.3.4", "git", 22)
16
+ server = Webbynode::Server.new("1.2.3.4", "git", 22)
17
+ server.ip.should == "1.2.3.4"
18
+ server.user.should == "git"
19
+ server.port.should == 22
20
+ end
11
21
  end
12
22
 
13
23
  describe "#add_ssh_key" do
@@ -21,7 +31,7 @@ describe Webbynode::Server do
21
31
  @pushand = mock("PushAnd")
22
32
  @pushand.as_null_object
23
33
 
24
- @server = Webbynode::Server.new("1.2.3.4")
34
+ @server = Webbynode::Server.new("1.2.3.4", "git", 22)
25
35
  @server.should_receive(:io).any_number_of_times.and_return(@io)
26
36
  @server.should_receive(:remote_executor).any_number_of_times.and_return(@re)
27
37
  @server.should_receive(:pushand).any_number_of_times.and_return(@pushand)
@@ -7,6 +7,7 @@ describe Webbynode::Ssh do
7
7
 
8
8
  describe '#port' do
9
9
  its(:port) { should == 22 }
10
+ its(:user) { should == 'git' }
10
11
  end
11
12
 
12
13
  describe '#connect' do
@@ -17,8 +18,8 @@ describe Webbynode::Ssh do
17
18
  end
18
19
  end
19
20
 
20
- context 'with no port' do
21
- subject { Webbynode::Ssh.new("2.2.12.12", 2020) }
21
+ context 'with a port' do
22
+ subject { Webbynode::Ssh.new("2.2.12.12", 'git', 2020) }
22
23
 
23
24
  describe '#port' do
24
25
  its(:port) { should == 2020 }
@@ -31,4 +32,21 @@ describe Webbynode::Ssh do
31
32
  end
32
33
  end
33
34
  end
35
+
36
+
37
+ context 'with a port' do
38
+ subject { Webbynode::Ssh.new("2.2.12.12", 'alternate') }
39
+
40
+ describe '#port' do
41
+ its(:user) { should == 'alternate' }
42
+ its(:port) { should == 22 }
43
+ end
44
+
45
+ describe '#connect' do
46
+ it 'calls start passing specified port' do
47
+ Net::SSH.should_receive(:start).with("2.2.12.12", 'alternate', hash_including(:port => 22))
48
+ subject.connect
49
+ end
50
+ end
51
+ end
34
52
  end
@@ -0,0 +1,23 @@
1
+ # Load Spec Helper
2
+ require File.join(File.expand_path(File.dirname(__FILE__)), '..', 'spec_helper')
3
+
4
+ describe Webbynode::Trial do
5
+ describe 'class methods' do
6
+ subject do
7
+ Webbynode::Trial
8
+ end
9
+
10
+ describe '#add_user' do
11
+ it "creates a new user" do
12
+ FakeWeb.register_uri(:put, "http://trial.webbyapp.com/users",
13
+ :email => 'fcoury@me.com', :username => 'fcoury', :password => 'secret',
14
+ :response => read_fixture('trial/user_add'))
15
+
16
+ response = subject.add_user("fcoury", "secret", "fcoury@me.com")
17
+
18
+ response["success"].should be_true
19
+ response["message"].should == 'User fcoury created'
20
+ end
21
+ end
22
+ end
23
+ end
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 = "1.0.3.beta"
5
+ s.version = "1.0.3.beta1"
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-08-11}
9
+ s.date = %q{2010-08-18}
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/attribute_accessors.rb", "lib/webbynode/command.rb", "lib/webbynode/commands/add_backup.rb", "lib/webbynode/commands/add_key.rb", "lib/webbynode/commands/addons.rb", "lib/webbynode/commands/alias.rb", "lib/webbynode/commands/apps.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/open.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/engines/all.rb", "lib/webbynode/engines/django.rb", "lib/webbynode/engines/engine.rb", "lib/webbynode/engines/nodejs.rb", "lib/webbynode/engines/php.rb", "lib/webbynode/engines/rack.rb", "lib/webbynode/engines/rails.rb", "lib/webbynode/engines/rails3.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", "lib/webbynode/updater.rb"]
14
- s.files = ["Manifest", "PostInstall.txt", "README.rdoc", "Rakefile", "assets/webbynode.png", "bin/webbynode", "bin/wn", "changelog.rdoc", "cucumber.yml.old", "inactive_features/bootstrap.feature", "inactive_features/step_definitions/command_steps.rb", "inactive_features/support/env.rb", "inactive_features/support/hooks.rb", "inactive_features/support/io_features.rb", "inactive_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/attribute_accessors.rb", "lib/webbynode/command.rb", "lib/webbynode/commands/add_backup.rb", "lib/webbynode/commands/add_key.rb", "lib/webbynode/commands/addons.rb", "lib/webbynode/commands/alias.rb", "lib/webbynode/commands/apps.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/open.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/engines/all.rb", "lib/webbynode/engines/django.rb", "lib/webbynode/engines/engine.rb", "lib/webbynode/engines/nodejs.rb", "lib/webbynode/engines/php.rb", "lib/webbynode/engines/rack.rb", "lib/webbynode/engines/rails.rb", "lib/webbynode/engines/rails3.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", "lib/webbynode/updater.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/config/new_210.11.13.12", "spec/fixtures/git/config/new_67.23.79.31", "spec/fixtures/git/config/new_67.23.79.32", "spec/fixtures/git/config/new_config", "spec/fixtures/git/status/clean", "spec/fixtures/git/status/dirty", "spec/fixtures/pushand", "spec/fixtures/settings.py", "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/addons_spec.rb", "spec/webbynode/commands/alias_spec.rb", "spec/webbynode/commands/apps_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/open_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/engines/django_spec.rb", "spec/webbynode/engines/engine_spec.rb", "spec/webbynode/engines/nodejs_spec.rb", "spec/webbynode/engines/php_spec.rb", "spec/webbynode/engines/rack_spec.rb", "spec/webbynode/engines/rails3_spec.rb", "spec/webbynode/engines/rails_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/properties_spec.rb", "spec/webbynode/push_and_spec.rb", "spec/webbynode/remote_executor_spec.rb", "spec/webbynode/server_spec.rb", "spec/webbynode/ssh_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/attribute_accessors.rb", "lib/webbynode/command.rb", "lib/webbynode/commands/add_backup.rb", "lib/webbynode/commands/add_key.rb", "lib/webbynode/commands/addons.rb", "lib/webbynode/commands/alias.rb", "lib/webbynode/commands/apps.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/open.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/user.rb", "lib/webbynode/commands/version.rb", "lib/webbynode/commands/webbies.rb", "lib/webbynode/engines/all.rb", "lib/webbynode/engines/django.rb", "lib/webbynode/engines/engine.rb", "lib/webbynode/engines/nodejs.rb", "lib/webbynode/engines/php.rb", "lib/webbynode/engines/rack.rb", "lib/webbynode/engines/rails.rb", "lib/webbynode/engines/rails3.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", "lib/webbynode/trial.rb", "lib/webbynode/updater.rb"]
14
+ s.files = ["Manifest", "PostInstall.txt", "README.rdoc", "Rakefile", "assets/webbynode.png", "bin/webbynode", "bin/wn", "changelog.rdoc", "cucumber.yml.old", "inactive_features/bootstrap.feature", "inactive_features/step_definitions/command_steps.rb", "inactive_features/support/env.rb", "inactive_features/support/hooks.rb", "inactive_features/support/io_features.rb", "inactive_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/attribute_accessors.rb", "lib/webbynode/command.rb", "lib/webbynode/commands/add_backup.rb", "lib/webbynode/commands/add_key.rb", "lib/webbynode/commands/addons.rb", "lib/webbynode/commands/alias.rb", "lib/webbynode/commands/apps.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/open.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/user.rb", "lib/webbynode/commands/version.rb", "lib/webbynode/commands/webbies.rb", "lib/webbynode/engines/all.rb", "lib/webbynode/engines/django.rb", "lib/webbynode/engines/engine.rb", "lib/webbynode/engines/nodejs.rb", "lib/webbynode/engines/php.rb", "lib/webbynode/engines/rack.rb", "lib/webbynode/engines/rails.rb", "lib/webbynode/engines/rails3.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", "lib/webbynode/trial.rb", "lib/webbynode/updater.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/config/new_210.11.13.12", "spec/fixtures/git/config/new_67.23.79.31", "spec/fixtures/git/config/new_67.23.79.32", "spec/fixtures/git/config/new_config", "spec/fixtures/git/status/clean", "spec/fixtures/git/status/dirty", "spec/fixtures/pushand", "spec/fixtures/settings.py", "spec/fixtures/trial/user_add", "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/addons_spec.rb", "spec/webbynode/commands/alias_spec.rb", "spec/webbynode/commands/apps_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/open_spec.rb", "spec/webbynode/commands/push_spec.rb", "spec/webbynode/commands/remote_spec.rb", "spec/webbynode/commands/tasks_spec.rb", "spec/webbynode/commands/user_spec.rb", "spec/webbynode/commands/version_spec.rb", "spec/webbynode/commands/webbies_spec.rb", "spec/webbynode/engines/django_spec.rb", "spec/webbynode/engines/engine_spec.rb", "spec/webbynode/engines/nodejs_spec.rb", "spec/webbynode/engines/php_spec.rb", "spec/webbynode/engines/rack_spec.rb", "spec/webbynode/engines/rails3_spec.rb", "spec/webbynode/engines/rails_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/properties_spec.rb", "spec/webbynode/push_and_spec.rb", "spec/webbynode/remote_executor_spec.rb", "spec/webbynode/server_spec.rb", "spec/webbynode/ssh_spec.rb", "spec/webbynode/trial_spec.rb", "webbynode.gemspec"]
15
15
  s.homepage = %q{http://webbynode.com}
16
16
  s.post_install_message = %q{
17
17
  -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webbynode
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31098205
4
+ hash: -1848230063
5
5
  prerelease: true
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
9
  - 3
10
- - beta
11
- version: 1.0.3.beta
10
+ - beta1
11
+ version: 1.0.3.beta1
12
12
  platform: ruby
13
13
  authors:
14
14
  - Felipe Coury
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2010-08-11 00:00:00 -03:00
19
+ date: 2010-08-18 00:00:00 -03:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
@@ -152,6 +152,7 @@ extra_rdoc_files:
152
152
  - lib/webbynode/commands/start.rb
153
153
  - lib/webbynode/commands/stop.rb
154
154
  - lib/webbynode/commands/tasks.rb
155
+ - lib/webbynode/commands/user.rb
155
156
  - lib/webbynode/commands/version.rb
156
157
  - lib/webbynode/commands/webbies.rb
157
158
  - lib/webbynode/engines/all.rb
@@ -174,6 +175,7 @@ extra_rdoc_files:
174
175
  - lib/webbynode/server.rb
175
176
  - lib/webbynode/ssh.rb
176
177
  - lib/webbynode/ssh_keys.rb
178
+ - lib/webbynode/trial.rb
177
179
  - lib/webbynode/updater.rb
178
180
  files:
179
181
  - Manifest
@@ -217,6 +219,7 @@ files:
217
219
  - lib/webbynode/commands/start.rb
218
220
  - lib/webbynode/commands/stop.rb
219
221
  - lib/webbynode/commands/tasks.rb
222
+ - lib/webbynode/commands/user.rb
220
223
  - lib/webbynode/commands/version.rb
221
224
  - lib/webbynode/commands/webbies.rb
222
225
  - lib/webbynode/engines/all.rb
@@ -239,6 +242,7 @@ files:
239
242
  - lib/webbynode/server.rb
240
243
  - lib/webbynode/ssh.rb
241
244
  - lib/webbynode/ssh_keys.rb
245
+ - lib/webbynode/trial.rb
242
246
  - lib/webbynode/updater.rb
243
247
  - spec/fixtures/aliases
244
248
  - spec/fixtures/api/credentials
@@ -265,6 +269,7 @@ files:
265
269
  - spec/fixtures/git/status/dirty
266
270
  - spec/fixtures/pushand
267
271
  - spec/fixtures/settings.py
272
+ - spec/fixtures/trial/user_add
268
273
  - spec/spec_helper.rb
269
274
  - spec/webbynode/api_client_spec.rb
270
275
  - spec/webbynode/application_spec.rb
@@ -283,6 +288,7 @@ files:
283
288
  - spec/webbynode/commands/push_spec.rb
284
289
  - spec/webbynode/commands/remote_spec.rb
285
290
  - spec/webbynode/commands/tasks_spec.rb
291
+ - spec/webbynode/commands/user_spec.rb
286
292
  - spec/webbynode/commands/version_spec.rb
287
293
  - spec/webbynode/commands/webbies_spec.rb
288
294
  - spec/webbynode/engines/django_spec.rb
@@ -302,6 +308,7 @@ files:
302
308
  - spec/webbynode/remote_executor_spec.rb
303
309
  - spec/webbynode/server_spec.rb
304
310
  - spec/webbynode/ssh_spec.rb
311
+ - spec/webbynode/trial_spec.rb
305
312
  - webbynode.gemspec
306
313
  has_rdoc: true
307
314
  homepage: http://webbynode.com