daddye / do Goto Github PK
View Code? Open in Web Editor NEWDO - IT! is a thin framework useful to manage remote servers through ssh.
Home Page: https://github.com/DAddYE/do
DO - IT! is a thin framework useful to manage remote servers through ssh.
Home Page: https://github.com/DAddYE/do
kernel/delta/kernel.rb:79:in mkdir (method_missing)' /Users/jjuarez/.rvm/gems/rbx-master/gems/do-0.0.2/lib/do/common.rb:35:in
script'
/Users/jjuarez/.rvm/gems/rbx-master/gems/rake-0.9.2/lib/rake/task.rb:205:in execute' kernel/bootstrap/array.rb:76:in
each'
/Users/jjuarez/.rvm/gems/rbx-master/gems/rake-0.9.2/lib/rake/task.rb:200:in execute' /Users/jjuarez/.rvm/gems/rbx-master/gems/rake-0.9.2/lib/rake/task.rb:158:in
invoke_with_call_chain'
/Users/jjuarez/.rvm/rubies/rbx-master/lib/monitor.rb:191:in synchronize (mon_synchronize)' /Users/jjuarez/.rvm/gems/rbx-master/gems/rake-0.9.2/lib/rake/task.rb:151:in
invoke_with_call_chain'
/Users/jjuarez/.rvm/gems/rbx-master/gems/rake-0.9.2/lib/rake/task.rb:144:in invoke' /Users/jjuarez/.rvm/gems/rbx-master/gems/rake-0.9.2/lib/rake/application.rb:112:in
invoke_task'
/Users/jjuarez/.rvm/gems/rbx-master/gems/rake-0.9.2/lib/rake/application.rb:90:in top_level' kernel/bootstrap/array.rb:76:in
each'
/Users/jjuarez/.rvm/gems/rbx-master/gems/rake-0.9.2/lib/rake/application.rb:90:in top_level' /Users/jjuarez/.rvm/gems/rbx-master/gems/rake-0.9.2/lib/rake/application.rb:129:in
standard_exception_handling'
/Users/jjuarez/.rvm/gems/rbx-master/gems/rake-0.9.2/lib/rake/application.rb:84:in top_level' /Users/jjuarez/.rvm/gems/rbx-master/gems/do-0.0.2/bin/doit:30:in
script'
kernel/common/kernel.rb:732:in load' /Users/jjuarez/.rvm/gems/rbx-master/bin/doit:19:in
script'
kernel/delta/codeloader.rb:65:in load_script' kernel/delta/codeloader.rb:90:in
load_script'
kernel/loader.rb:618:in script' kernel/loader.rb:762:in
main'
Tasks: TOP => setup
Hi Davide,
I attempted to run a task using run_task method inside another task. Both tasks use the download
method to get data from remote server. After returning from the inner task back to the outer task, download
method is undefined in the outer task. Running pwd
commands shows that the outer task is performed locally from that point on, not on the remote server. Tested on versions 0.1.4 and 0.2.0.h, same results for both. Here's a simple testing code to show the problem:
namespace :test do
task :outer, on: :remote do
run 'pwd'
puts 'downloading test1'
download '/tmp/test1', 'test1'
puts 'downloaded test1'
run_task :'test:inner'
run 'pwd'
puts 'downloading test3'
download '/tmp/test3', 'test3'
puts 'downloaded test3'
end
task :inner, on: :remote do
run 'pwd'
puts 'downloading test2'
download '/tmp/test2', 'test2'
puts 'downloaded test2'
end
end
After running test:outer, this is the output:
downloading test1
root@arya ~ # pwd
/root
root@arya ~ # sending: /tmp/test1 (100%)
downloaded test1
downloading test2
root@arya ~ # pwd
/root
root@arya ~ # sending: /tmp/test2 (100%)
downloaded test2
downloading test3
do@local ~ # pwd
/home/jistr/projects/archive/narubi/narubi_servers_tasks
/home/jistr/projects/archive/narubi/narubi_servers_tasks/vendor/ruby/1.9.1/gems/do-0.2.0.h/lib/do/commands.rb:155:in `method_missing': undefined method `download' for DO::Commands:Module (NoMethodError)
from /home/jistr/projects/archive/narubi/narubi_servers_tasks/vendor/ruby/1.9.1/gems/do-0.2.0.h/lib/do/commands.rb:86:in `block (2 levels) in load_recipe'
from /home/jistr/projects/archive/narubi/narubi_servers_tasks/vendor/ruby/1.9.1/gems/do-0.2.0.h/lib/do/commands.rb:112:in `call'
from /home/jistr/projects/archive/narubi/narubi_servers_tasks/vendor/ruby/1.9.1/gems/do-0.2.0.h/lib/do/commands.rb:112:in `block in server'
from /home/jistr/projects/archive/narubi/narubi_servers_tasks/vendor/ruby/1.9.1/gems/do-0.2.0.h/lib/do/tasks.rb:61:in `call'
from /home/jistr/projects/archive/narubi/narubi_servers_tasks/vendor/ruby/1.9.1/gems/do-0.2.0.h/lib/do/tasks.rb:61:in `block in task_run'
from /home/jistr/projects/archive/narubi/narubi_servers_tasks/vendor/ruby/1.9.1/gems/do-0.2.0.h/lib/do/tasks.rb:56:in `each'
from /home/jistr/projects/archive/narubi/narubi_servers_tasks/vendor/ruby/1.9.1/gems/do-0.2.0.h/lib/do/tasks.rb:56:in `task_run'
from /home/jistr/projects/archive/narubi/narubi_servers_tasks/vendor/ruby/1.9.1/gems/do-0.2.0.h/lib/do/cli.rb:7:in `start'
from /home/jistr/projects/archive/narubi/narubi_servers_tasks/vendor/ruby/1.9.1/gems/do-0.2.0.h/bin/doit:6:in `<top (required)>'
from /home/jistr/projects/archive/narubi/narubi_servers_tasks/vendor/ruby/1.9.1/bin/doit:19:in `load'
from /home/jistr/projects/archive/narubi/narubi_servers_tasks/vendor/ruby/1.9.1/bin/doit:19:in `<main>'
I cannot use simple task dependency in this case, in my real scenario I need to run the inner task in a loop, each time with different options, that's why I use run_task.
Is the gem able to handle SSH using MAC address instead of hostname?
Anybody worked on this?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.