Giter VIP home page Giter VIP logo

linecook's People

Contributors

thinkerbot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

linecook's Issues

Run parallel option

Currently 'linecook run' copies and runs scripts on servers in serial. An option should exist to run in parallel if desired.

vm tasks repeat unnecessarily

When you have the same vm declared twice in a config/ssh file, they will start twice. Duplicates need to be filtered out of each_host/each_vm_name iterators.

[config/ssh]
Host one   # [abox]
Port 2220

Host two   # [abox]
Port 2220

Leads to duplicates with (for example):

rake start

indent will mess up heredocs

For example:

[recipe/example.rb]
target.puts "# outdent"
indent do
  target.puts "# indent"
  heredoc do
    target.puts 'abc'
    target.puts 'xyz'
  end
end
target.puts "# outdent"

Produces:

# outdent
  # indent
  << HEREDOC_0
  abc
  xyz
  HEREDOC_0
# outdent

To solve this, perhaps add magic comments to turn on/off indent, a-la

    << HEREDOC_0 # :indent-off:
  abc
  xyz
  HEREDOC_0  # :indent-on:

Then strip out these processing instructions within indent if capture depth is 0 (ie right before the indent is written to the true output).

runlist requires EOL

Runlist files provided to 'linecook run' require an EOL, which is confusing.

[packages/bug.yml]
{}

[recipes/bug.rb]
target.puts "echo bug"

[recipes/bug_test.rb]
target.puts "echo bug test"

[runlist]
run
test

If runlist has a newline after 'test':

% linecook build bug
% linecook run bug --runlist runlist
bug
test

If runlist has no newline after 'test':

% linecook run bug --runlist runlist
bug

VirtualBox missing images

Sometimes images go missing in VirtualBox. This can interfere with linecook commands. Currently the workaround is to go into 'File' > 'Virtual Media Manager', manually find the missing snapshots (labeled with a red 'Hard Disk' error) and then remove them.

It would be great if there were an automated way to do the same. I've tried several approaches, including editing the xml file that I thought would define the VM (~/VirtualBox VMs/vmname/vmname.vbox) but this didn't work. Instead VirtualBox would regenerate the xml file and changes were lost.

Names option broke for 'linecook state'

Observe:

% cat config/ssh | grep bbox
% linecook state --names bbox
/Users/chiangs/.rvm/gems/ruby-1.8.6-p399@linecook/gems/linecook-1.1.0/lib/linecook/commands/vbox_command.rb:96:in `include?': can't convert nil into String (TypeError)

Cruft in 'linecook init'

The project currently generated by linecook init is not representative of the current system. Specifically the 'abox_test' recipe is cruft. The entire thing could use a cleanup.

Add a console

Make a recipe the context and have stdout be the target. There will be a trick figuring out when to evaluate -- repl won't work directly, you will need to determine if a statement is complete. Check IRB for how it's done.

linecook console

Allow missing package file to linecook build, etc.

If provided on the command line then assume a recipe with the same name. If no names, then use each host. Skip if there is no recipe (such that you can have hosts that do not build/run), but allow a flag to fail upon no recipe and/or require a package file... like --strict

linecook init cannot handle no args or '.'

Linecook init isn't smart enough to figure out it should generate in the pwd.

mkdir dir
cd dir
linecook init .
already exists: .../dir

Even worse:

linecook init
/Users/Simon/.rvm/gems/ruby-1.8.6-p399@chiangs/gems/linecook-1.1.0/lib/linecook/commands/command.rb:50:in `process': wrong number of arguments (0 for 1) (ArgumentError)
from /Users/Simon/.rvm/gems/ruby-1.8.6-p399@chiangs/gems/linecook-1.1.0/lib/linecook/commands/command.rb:50:in `call'
from /Users/Simon/.rvm/gems/ruby-1.8.6-p399@chiangs/gems/linecook-1.1.0/bin/linecook:60
from /Users/Simon/.rvm/gems/ruby-1.8.6-p399@chiangs/bin/linecook:19:in `load'
from /Users/Simon/.rvm/gems/ruby-1.8.6-p399@chiangs/bin/linecook:19

Allow nil target name to build without inclusion

This would be handy for compositions where the recipe builds other files but not a file itself. Allows a capture pattern to build a set of files without entering misc configs into the package file.

Better error for unconfigured vm

Currently an error like this gets raised when you execute a linecook vm command on a vm without a corresponding entry in config/ssh:

% linecook start bbox
/Users/chiangs/.rvm/gems/ruby-1.8.6-p399@linecook/gems/linecook-1.1.0/lib/linecook/commands/vbox_command.rb:96:in `include?': can't convert nil into String (TypeError)

This command would work if --names is specified as an option. There should be a better error message to identify that fact.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.