This repository has been archived by the owner on Aug 6, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 34678a3
Showing
30 changed files
with
1,016 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
=== 0.0.1 2010-01-10 | ||
|
||
* 1 major enhancement: | ||
* Initial release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
History.txt | ||
Manifest.txt | ||
PostInstall.txt | ||
README.rdoc | ||
Rakefile | ||
lib/wn.rb | ||
script/console | ||
script/destroy | ||
script/generate | ||
test/test_helper.rb | ||
test/test_wn.rb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
-=-=-=-=-=-=-=-=-=-=-=-=-=-=- | ||
Webbynode deployment gem | ||
-=-=-=-=-=-=-=-=-=-=-=-=-=-=- | ||
|
||
This deployment engine is highly experimental and | ||
should be considered beta code for now. | ||
|
||
Commands: | ||
|
||
webbynode init Initializes the current app for deployment to a Webby | ||
webbynode push Deploys the current committed code to a Webby | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
= wn | ||
|
||
* http://github.com/#{github_username}/#{project_name} | ||
|
||
== DESCRIPTION: | ||
|
||
FIX (describe your package) | ||
|
||
== FEATURES/PROBLEMS: | ||
|
||
* FIX (list of features or problems) | ||
|
||
== SYNOPSIS: | ||
|
||
FIX (code sample of usage) | ||
|
||
== REQUIREMENTS: | ||
|
||
* FIX (list of requirements) | ||
|
||
== INSTALL: | ||
|
||
* FIX (sudo gem install, anything else) | ||
|
||
== LICENSE: | ||
|
||
(The MIT License) | ||
|
||
Copyright (c) 2010 FIXME full name | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining | ||
a copy of this software and associated documentation files (the | ||
'Software'), to deal in the Software without restriction, including | ||
without limitation the rights to use, copy, modify, merge, publish, | ||
distribute, sublicense, and/or sell copies of the Software, and to | ||
permit persons to whom the Software is furnished to do so, subject to | ||
the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be | ||
included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY | ||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, | ||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | ||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
require 'rubygems' | ||
require 'rake' | ||
require 'rake/testtask' | ||
|
||
require 'echoe' | ||
|
||
Echoe.new('webbynode', '0.1.0') do |p| | ||
p.description = "Webbynode Deployment Gem" | ||
p.url = "http://webbynode.com" | ||
p.author = "Felipe Coury" | ||
p.email = "felipe@webbynode.com" | ||
p.ignore_pattern = ["tmp/*", "script/*"] | ||
# p.dependencies = [ | ||
# ['activeresource','>= 2.3.4'], | ||
# ['activesupport','>= 2.3.4'], | ||
# ['rainbow', '>=1.0.4'], | ||
# ['highline', '>=1.5.1'], | ||
# ['httparty', '>=0.4.5'] | ||
# ] | ||
p.install_message = <<EOS | ||
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- | ||
Webbynode deployment gem | ||
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- | ||
This deployment engine is highly experimental and | ||
should be considered beta code for the time being. | ||
Commands: | ||
webbynode init Initializes the current app for deployment to a Webby | ||
webbynode push Deploys the current committed code to a Webby | ||
EOS | ||
end | ||
# | ||
# Rake::TestTask.new(:test_new) do |test| | ||
# test.libs << 'test' | ||
# test.ruby_opts << '-rubygems' | ||
# test.pattern = 'test/**/test_*.rb' | ||
# test.verbose = true | ||
# end | ||
|
||
require 'rcov/rcovtask' | ||
desc 'Measures test coverage using rcov' | ||
namespace :rcov do | ||
desc 'Output unit test coverage of plugin.' | ||
Rcov::RcovTask.new(:unit) do |rcov| | ||
rcov.libs << 'test' | ||
rcov.ruby_opts << '-rubygems' | ||
rcov.pattern = 'test/unit/**/test_*.rb' | ||
rcov.output_dir = 'rcov' | ||
rcov.verbose = true | ||
rcov.rcov_opts << '--exclude "gems/*"' | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env ruby | ||
$:.unshift File.dirname(__FILE__)+"/../lib" | ||
require 'rubygems' | ||
require 'wn' | ||
|
||
app = Wn::App.new(ARGV) | ||
app.run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
$:.unshift(File.dirname(__FILE__)) unless | ||
$:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__))) | ||
|
||
require 'pp' | ||
|
||
module Wn | ||
VERSION = '0.0.1' | ||
|
||
class App | ||
attr_accessor :command | ||
attr_accessor :params | ||
|
||
def initialize(command) | ||
parse command | ||
end | ||
|
||
def run | ||
send command | ||
end | ||
|
||
def parse(parts) | ||
@command = parts.shift | ||
@params = parts | ||
end | ||
|
||
def push | ||
unless dir_exists(".git") | ||
out "Not an application or missing initialization. Use 'webbynode init'." | ||
return | ||
end | ||
|
||
out "Publishing #{app_name} to Webbynode..." | ||
exec "git push webbynode master" | ||
end | ||
|
||
def init | ||
if params.size < 2 | ||
out "usage: wn init [webby_ip] [host]" | ||
return | ||
end | ||
|
||
webby_ip, host = *params | ||
|
||
unless dir_exists(".git") | ||
out "Initializing git repository..." | ||
git_init webby_ip | ||
end | ||
|
||
unless file_exists(".pushand") | ||
out "Initializing deployment descriptor for #{host}..." | ||
create_file ".pushand", "#! /bin/bash\nphd $0 #{host}\n" | ||
end | ||
|
||
unless file_exists(".gitignore") | ||
out "Creating .gitignore file..." | ||
create_file ".gitignore", <<EOS | ||
config/database.yml | ||
log/* | ||
tmp/* | ||
db/*.sqlite3 | ||
EOS | ||
end | ||
end | ||
|
||
def git_init(ip) | ||
exec "git init" | ||
|
||
exec "git remote add webbynode git@#{ip}:#{app_name}" | ||
|
||
exec "git add ." | ||
exec "git commit -m \"Initial commit\"" | ||
end | ||
|
||
def app_name | ||
Dir.pwd.split("/").last | ||
end | ||
|
||
def dir_exists(dir) | ||
File.directory?(dir) | ||
end | ||
|
||
def out(line) | ||
puts line | ||
end | ||
|
||
def file_exists(file) | ||
File.exists?(file) | ||
end | ||
|
||
def create_file(filename, contents) | ||
File.open(filename, "w") do |file| | ||
file.write(contents) | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
require 'rubygems' | ||
gem 'hoe', '>= 2.1.0' | ||
require 'hoe' | ||
require 'fileutils' | ||
require './lib/wn' | ||
|
||
Hoe.plugin :newgem | ||
# Hoe.plugin :website | ||
# Hoe.plugin :cucumberfeatures | ||
|
||
# Generate all the Rake tasks | ||
# Run 'rake -T' to see list of generated tasks (from gem root directory) | ||
$hoe = Hoe.spec 'wn' do | ||
self.developer 'Felipe Coury', 'felipe@webbynode.com' | ||
self.post_install_message = 'PostInstall.txt' # TODO remove if post-install message not required | ||
self.rubyforge_name = self.name # TODO this is default value | ||
# self.extra_deps = [['activesupport','>= 2.0.2']] | ||
|
||
end | ||
|
||
require 'newgem/tasks' | ||
Dir['tasks/**/*.rake'].each { |t| load t } | ||
|
||
# TODO - want other tests/tasks run by default? Add them to the list | ||
# remove_task :default | ||
# task :default => [:spec, :features] |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
=== 0.0.1 2010-01-10 | ||
|
||
* 1 major enhancement: | ||
* Initial release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
History.txt | ||
Manifest.txt | ||
PostInstall.txt | ||
README.rdoc | ||
Rakefile | ||
lib/wn.rb | ||
script/console | ||
script/destroy | ||
script/generate | ||
test/test_helper.rb | ||
test/test_wn.rb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
-=-=-=-=-=-=-=-=-=-=-=-=-=-=- | ||
Webbynode deployment gem | ||
-=-=-=-=-=-=-=-=-=-=-=-=-=-=- | ||
|
||
This deployment engine is highly experimental and | ||
should be considered beta code for now. | ||
|
||
Commands: | ||
|
||
webbynode init Initializes the current app for deployment to a Webby | ||
webbynode push Deploys the current committed code to a Webby | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
= wn | ||
|
||
* http://github.com/#{github_username}/#{project_name} | ||
|
||
== DESCRIPTION: | ||
|
||
FIX (describe your package) | ||
|
||
== FEATURES/PROBLEMS: | ||
|
||
* FIX (list of features or problems) | ||
|
||
== SYNOPSIS: | ||
|
||
FIX (code sample of usage) | ||
|
||
== REQUIREMENTS: | ||
|
||
* FIX (list of requirements) | ||
|
||
== INSTALL: | ||
|
||
* FIX (sudo gem install, anything else) | ||
|
||
== LICENSE: | ||
|
||
(The MIT License) | ||
|
||
Copyright (c) 2010 FIXME full name | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining | ||
a copy of this software and associated documentation files (the | ||
'Software'), to deal in the Software without restriction, including | ||
without limitation the rights to use, copy, modify, merge, publish, | ||
distribute, sublicense, and/or sell copies of the Software, and to | ||
permit persons to whom the Software is furnished to do so, subject to | ||
the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be | ||
included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY | ||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, | ||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | ||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
Oops, something went wrong.