livecd 0.8 → 0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (6) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +1 -0
  3. data/README.md +1 -0
  4. data/bin/livecd +1 -0
  5. data/lib/livecd.rb +6 -5
  6. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 94798cb320642151064f720ee1b0a8bfce011bbc
4
- data.tar.gz: 6fb32c65c7d3f7a647e7a2f33d06885c55878007
3
+ metadata.gz: 5c62cf761e37cb8f7f3c8a2fd254129d33968530
4
+ data.tar.gz: 36e22fcd7e174cea2d6869254ef565e2e4589838
5
5
  SHA512:
6
- metadata.gz: 7cf73a0b32f8e93bf90617ab8e0f6465e00a40412b466714b0bfb4ffac2d5e8daf8bddfdd1e81652fa9b9e5a19d2e1a1c6bae05df3cdec6350f0a33ffcd98198
7
- data.tar.gz: 08578b09c77d95ec54cd9693cf67232dea1f70a22183fa5bb6009b22bd70bac7e969431d194ce1c1d5faf5f19bdabb81c3b445de861bbb6514deaa7fcaf2ddcf
6
+ metadata.gz: 85f5f3b0981fff6b3a914cfe8529fb7f812ab9c40fe697292e120423e316f18b1517709ff93042d9adc72ae5ce4b7933fe38fb54b13b804bf2be37bd46b065b0
7
+ data.tar.gz: fcfef52712babd1a8884241bbb425cc776e00f9238a568be67285b810683508f752c794ccb79ee7195c12ea4c5062cedba3661c40bd3517657520b1cbfa67140
data/CHANGELOG CHANGED
@@ -1,3 +1,4 @@
1
+ 0.9: made virtual machine memory configurable
1
2
  0.8: fixed bug where sometimes machines aren't removed the first time you run stop
2
3
  0.7: added installation instructions + published on rubygems
3
4
  0.6: added rake and ci (skeleton)
data/README.md CHANGED
@@ -1,5 +1,6 @@
1
1
  livecd
2
2
  ======
3
+ [![Gem Version](https://badge.fury.io/rb/livecd.png)](http://badge.fury.io/rb/livecd)
3
4
  [![Build Status](https://travis-ci.org/arlimus/livecd.png)](https://travis-ci.org/arlimus/livecd)
4
5
 
5
6
  Run a livecd quickly and easily. Uses virtualbox for magic.
data/bin/livecd CHANGED
@@ -7,6 +7,7 @@ class LivecdCLI < Thor
7
7
  include Livecd
8
8
 
9
9
  desc "start <mycd.iso>", "start the iso livecd"
10
+ option :memory, type: :numeric, banner: 'how much memory the vm should get'
10
11
  def start(file)
11
12
  iso = File::expand_path( file )
12
13
  run_iso(iso, options)
@@ -1,6 +1,6 @@
1
1
 
2
2
  module Livecd
3
- VERSION = '0.8'
3
+ VERSION = '0.9'
4
4
  VM_PREFIX = 'livecd-'
5
5
 
6
6
  def list_vms
@@ -62,20 +62,21 @@ module Livecd
62
62
  def run_iso( iso, opts )
63
63
  name = find_name_for iso
64
64
  puts "starting vm #{name} (#{iso})"
65
- start_vm id(name), iso, opts[:headless]
65
+ start_vm id(name), iso, opts
66
66
  end
67
67
 
68
68
  private
69
69
 
70
- def start_vm( name_id, iso, headless = false )
70
+ def start_vm( name_id, iso, opts )
71
+ ram = (opts[:memory].nil?) ? '' : "--memory #{opts[:memory]}"
71
72
  # create the new vm
72
73
  `vboxmanage createvm --name #{name_id} --register`
73
- `vboxmanage modifyvm #{name_id} --ostype "Other"`
74
+ `vboxmanage modifyvm #{name_id} --ostype "Other" #{ram}`
74
75
  `vboxmanage storagectl #{name_id} --name "IDE Controller" --add ide --bootable on`
75
76
  `vboxmanage storageattach #{name_id} --storagectl "IDE Controller" --port 0 --device 1 --type dvddrive --medium "#{iso}"`
76
77
  `vboxmanage modifyvm #{name_id} --nic1 nat`
77
78
  `vboxmanage modifyvm #{name_id} --nic2 hostonly --hostonlyadapter2 vboxnet0`
78
- hl = (headless) ? '--type headless' : ''
79
+ hl = (opts[:headless]) ? '--type headless' : ''
79
80
  `vboxmanage startvm #{name_id} #{hl}`
80
81
  end
81
82
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: livecd
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.8'
4
+ version: '0.9'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dominik Richter
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-06-06 00:00:00.000000000 Z
11
+ date: 2013-06-14 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: run livecds easily
14
14
  email: dominik.richter@googlemail.com