webbynode 0.1.1 → 0.1.2

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
@@ -6,8 +6,6 @@ README.rdoc
6
6
  Rakefile
7
7
  bin/webbynode
8
8
  lib/wn.rb
9
- oldRakefile
10
9
  test/test_helper.rb
11
10
  test/test_webbynode.rb
12
11
  test/test_wn.rb
13
- webbynode.gemspec
data/Rakefile CHANGED
@@ -4,7 +4,7 @@ require 'rake/testtask'
4
4
 
5
5
  require 'echoe'
6
6
 
7
- Echoe.new('webbynode', '0.1.1') do |p|
7
+ Echoe.new('webbynode', '0.1.2') do |p|
8
8
  p.description = "Webbynode Deployment Gem"
9
9
  p.url = "http://webbynode.com"
10
10
  p.author = "Felipe Coury"
data/lib/wn.rb CHANGED
@@ -35,7 +35,7 @@ module Wn
35
35
 
36
36
  def init
37
37
  if params.size < 1
38
- out "usage: wn init webby_ip [host]"
38
+ out "usage: webbynode init webby_ip [host]"
39
39
  return
40
40
  end
41
41
 
@@ -77,7 +77,7 @@ EOS
77
77
  end
78
78
 
79
79
  def app_name
80
- Dir.pwd.split("/").last
80
+ Dir.pwd.split("/").last.gsub(/\./, "_")
81
81
  end
82
82
 
83
83
  def dir_exists(dir)
data/test/test_helper.rb CHANGED
@@ -1,3 +1,4 @@
1
+ require 'rubygems'
1
2
  require 'stringio'
2
3
  require 'shoulda'
3
4
  require 'matchy'
data/test/test_wn.rb CHANGED
@@ -123,14 +123,15 @@ class TestWn < Test::Unit::TestCase
123
123
  context "Init command" do
124
124
  should "require one arguments" do
125
125
  app = command("init")
126
- app.expects(:out).with("usage: wn init webby_ip [host]")
126
+ app.expects(:out).with("usage: webbynode init webby_ip [host]")
127
127
  app.run
128
128
  end
129
129
 
130
130
  should "create .gitignore" do
131
131
  app = command("init 2.2.2.2 teste.myserver.com")
132
132
  app.expects(:out).with("Creating .gitignore file...")
133
- app.expects(:dir_exists).with(".git").returns(true)
133
+ app.expects(:dir_exists).with(".git").times(2).returns(true)
134
+ app.expects(:out).with("Adding Webbynode remote host to git...")
134
135
  app.expects(:file_exists).with(".pushand").returns(true)
135
136
  app.expects(:file_exists).with(".gitignore").returns(false)
136
137
  app.expects(:create_file).with(".gitignore", <<EOS)
@@ -139,6 +140,12 @@ log/*
139
140
  tmp/*
140
141
  db/*.sqlite3
141
142
  EOS
143
+
144
+ app.expects(:app_name).with().returns("teste.myserver.com")
145
+ app.expects(:sys_exec).with("git remote add webbynode git@2.2.2.2:teste_myserver_com")
146
+ app.expects(:sys_exec).with("git add .")
147
+ app.expects(:sys_exec).with("git commit -m \"Initial commit\"")
148
+
142
149
  app.run
143
150
 
144
151
  app = command("init 2.2.2.2")
@@ -178,7 +185,12 @@ EOS
178
185
  app = command("init 3.3.3.3")
179
186
 
180
187
  app.expects(:dir_exists).with(".git").returns(true)
181
- app.expects(:app_name).with().returns("myapp")
188
+ app.expects(:out).with("Adding Webbynode remote host to git...")
189
+ app.expects(:app_name).with().times(2).returns("myapp")
190
+
191
+ app.expects(:sys_exec).with("git remote add webbynode git@3.3.3.3:myapp")
192
+ app.expects(:sys_exec).with("git add .")
193
+ app.expects(:sys_exec).with("git commit -m \"Initial commit\"")
182
194
 
183
195
  app.expects(:out).with("Initializing deployment descriptor for myapp...")
184
196
  app.expects(:file_exists).with(".gitignore").returns(true)
@@ -193,10 +205,14 @@ EOS
193
205
 
194
206
  should "tell the app has already been initialized" do
195
207
  app = command("init 5.5.5.5 teste.myserver.com")
196
- app.expects(:dir_exists).with(".git").returns(true)
208
+ app.expects(:dir_exists).times(2).with(".git").returns(true)
197
209
  app.expects(:file_exists).with(".pushand").returns(true)
198
210
  app.expects(:file_exists).with(".gitignore").returns(true)
199
211
  app.expects(:create_file).never
212
+
213
+ app.expects(:sys_exec).with("git remote add webbynode git@5.5.5.5:webbynode")
214
+ app.expects(:sys_exec).with("git add .")
215
+ app.expects(:sys_exec).with("git commit -m \"Initial commit\"")
200
216
  app.run
201
217
  end
202
218
  end
data/webbynode.gemspec CHANGED
@@ -2,17 +2,17 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{webbynode}
5
- s.version = "0.1.1"
5
+ s.version = "0.1.2"
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-01-11}
9
+ s.date = %q{2010-01-15}
10
10
  s.default_executable = %q{webbynode}
11
11
  s.description = %q{Webbynode Deployment Gem}
12
12
  s.email = %q{felipe@webbynode.com}
13
13
  s.executables = ["webbynode"]
14
14
  s.extra_rdoc_files = ["README.rdoc", "bin/webbynode", "lib/wn.rb"]
15
- s.files = ["History.txt", "Manifest", "Manifest.txt", "PostInstall.txt", "README.rdoc", "Rakefile", "bin/webbynode", "lib/wn.rb", "oldRakefile", "test/test_helper.rb", "test/test_webbynode.rb", "test/test_wn.rb", "webbynode.gemspec"]
15
+ s.files = ["History.txt", "Manifest", "Manifest.txt", "PostInstall.txt", "README.rdoc", "Rakefile", "bin/webbynode", "lib/wn.rb", "test/test_helper.rb", "test/test_webbynode.rb", "test/test_wn.rb", "webbynode.gemspec"]
16
16
  s.homepage = %q{http://webbynode.com}
17
17
  s.post_install_message = %q{ -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
18
18
  Webbynode deployment gem
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webbynode
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felipe Coury
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-01-11 00:00:00 -02:00
12
+ date: 2010-01-15 00:00:00 -02:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -32,7 +32,6 @@ files:
32
32
  - Rakefile
33
33
  - bin/webbynode
34
34
  - lib/wn.rb
35
- - oldRakefile
36
35
  - test/test_helper.rb
37
36
  - test/test_webbynode.rb
38
37
  - test/test_wn.rb
data/oldRakefile DELETED
@@ -1,26 +0,0 @@
1
- require 'rubygems'
2
- gem 'hoe', '>= 2.1.0'
3
- require 'hoe'
4
- require 'fileutils'
5
- require './lib/wn'
6
-
7
- Hoe.plugin :newgem
8
- # Hoe.plugin :website
9
- # Hoe.plugin :cucumberfeatures
10
-
11
- # Generate all the Rake tasks
12
- # Run 'rake -T' to see list of generated tasks (from gem root directory)
13
- $hoe = Hoe.spec 'wn' do
14
- self.developer 'Felipe Coury', 'felipe@webbynode.com'
15
- self.post_install_message = 'PostInstall.txt' # TODO remove if post-install message not required
16
- self.rubyforge_name = self.name # TODO this is default value
17
- # self.extra_deps = [['activesupport','>= 2.0.2']]
18
-
19
- end
20
-
21
- require 'newgem/tasks'
22
- Dir['tasks/**/*.rake'].each { |t| load t }
23
-
24
- # TODO - want other tests/tasks run by default? Add them to the list
25
- # remove_task :default
26
- # task :default => [:spec, :features]