solutious-rudy 0.5.1 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES.txt +19 -1
- data/README.rdoc +66 -35
- data/Rakefile +1 -0
- data/Rudyfile +97 -6
- data/bin/ird +7 -4
- data/bin/rudy +120 -212
- data/bin/rudy-ec2 +240 -0
- data/bin/rudy-s3 +76 -0
- data/bin/rudy-sdb +67 -0
- data/lib/annoy.rb +61 -18
- data/lib/console.rb +10 -5
- data/lib/rudy/aws/ec2/address.rb +76 -40
- data/lib/rudy/aws/ec2/group.rb +138 -78
- data/lib/rudy/aws/ec2/image.rb +134 -12
- data/lib/rudy/aws/ec2/instance.rb +116 -89
- data/lib/rudy/aws/ec2/keypair.rb +26 -14
- data/lib/rudy/aws/ec2/snapshot.rb +23 -12
- data/lib/rudy/aws/ec2/volume.rb +198 -202
- data/lib/rudy/aws/ec2/zone.rb +77 -0
- data/lib/rudy/aws/ec2.rb +56 -25
- data/lib/rudy/aws/s3.rb +54 -0
- data/lib/rudy/aws/sdb/error.rb +46 -0
- data/lib/rudy/aws/sdb.rb +298 -0
- data/lib/rudy/aws.rb +29 -57
- data/lib/rudy/{metadata/backup.rb → backup.rb} +8 -8
- data/lib/rudy/cli/aws/ec2/addresses.rb +105 -0
- data/lib/rudy/cli/aws/ec2/candy.rb +208 -0
- data/lib/rudy/cli/aws/ec2/groups.rb +121 -0
- data/lib/rudy/cli/aws/ec2/images.rb +196 -0
- data/lib/rudy/cli/aws/ec2/instances.rb +194 -0
- data/lib/rudy/cli/aws/ec2/keypairs.rb +53 -0
- data/lib/rudy/cli/aws/ec2/snapshots.rb +49 -0
- data/lib/rudy/cli/aws/ec2/volumes.rb +104 -0
- data/lib/rudy/cli/aws/ec2/zones.rb +22 -0
- data/lib/rudy/cli/aws/s3/buckets.rb +50 -0
- data/lib/rudy/cli/aws/s3/store.rb +22 -0
- data/lib/rudy/cli/aws/sdb/domains.rb +41 -0
- data/lib/rudy/cli/{deploy.rb → candy.rb} +2 -6
- data/lib/rudy/cli/config.rb +25 -20
- data/lib/rudy/cli/disks.rb +18 -108
- data/lib/rudy/cli/machines.rb +94 -0
- data/lib/rudy/cli/routines.rb +47 -70
- data/lib/rudy/cli.rb +104 -89
- data/lib/rudy/config/objects.rb +5 -43
- data/lib/rudy/config.rb +8 -24
- data/lib/rudy/disks.rb +248 -0
- data/lib/rudy/global.rb +121 -0
- data/lib/rudy/huxtable.rb +232 -147
- data/lib/rudy/machines.rb +245 -0
- data/lib/rudy/metadata.rb +136 -0
- data/lib/rudy/routines/helpers/diskhelper.rb +101 -0
- data/lib/rudy/routines/helpers/scripthelper.rb +91 -0
- data/lib/rudy/routines/release.rb +27 -8
- data/lib/rudy/routines/shutdown.rb +47 -32
- data/lib/rudy/routines/startup.rb +47 -37
- data/lib/rudy/routines.rb +30 -37
- data/lib/rudy/scm/svn.rb +1 -1
- data/lib/rudy/utils.rb +262 -4
- data/lib/rudy.rb +76 -248
- data/lib/storable.rb +19 -16
- data/lib/sysinfo.rb +1 -1
- data/rudy.gemspec +88 -68
- data/support/rudy-ec2-startup +5 -5
- data/test/05_config/00_setup_test.rb +3 -7
- data/test/20_sdb/00_setup_test.rb +2 -17
- data/test/20_sdb/10_domains_test.rb +18 -16
- data/test/25_ec2/00_setup_test.rb +5 -10
- data/test/25_ec2/10_keypairs_test.rb +13 -5
- data/test/25_ec2/20_groups_test.rb +48 -56
- data/test/25_ec2/30_addresses_test.rb +13 -10
- data/test/25_ec2/40_volumes_test.rb +11 -8
- data/test/25_ec2/50_snapshots_test.rb +17 -12
- data/test/26_ec2_instances/00_setup_test.rb +3 -8
- data/test/26_ec2_instances/10_instances_test.rb +21 -19
- data/test/30_sdb_metadata/00_setup_test.rb +2 -9
- data/test/30_sdb_metadata/10_disks_test.rb +47 -37
- data/test/30_sdb_metadata/20_backups_test.rb +9 -9
- data/test/helper.rb +5 -3
- data/vendor/highline-1.5.1/CHANGELOG +222 -0
- data/vendor/highline-1.5.1/INSTALL +35 -0
- data/vendor/highline-1.5.1/LICENSE +7 -0
- data/vendor/highline-1.5.1/README +63 -0
- data/vendor/highline-1.5.1/Rakefile +82 -0
- data/vendor/highline-1.5.1/TODO +6 -0
- data/vendor/highline-1.5.1/examples/ansi_colors.rb +38 -0
- data/vendor/highline-1.5.1/examples/asking_for_arrays.rb +18 -0
- data/vendor/highline-1.5.1/examples/basic_usage.rb +75 -0
- data/vendor/highline-1.5.1/examples/color_scheme.rb +32 -0
- data/vendor/highline-1.5.1/examples/limit.rb +12 -0
- data/vendor/highline-1.5.1/examples/menus.rb +65 -0
- data/vendor/highline-1.5.1/examples/overwrite.rb +19 -0
- data/vendor/highline-1.5.1/examples/page_and_wrap.rb +322 -0
- data/vendor/highline-1.5.1/examples/password.rb +7 -0
- data/vendor/highline-1.5.1/examples/trapping_eof.rb +22 -0
- data/vendor/highline-1.5.1/examples/using_readline.rb +17 -0
- data/vendor/highline-1.5.1/lib/highline/color_scheme.rb +120 -0
- data/vendor/highline-1.5.1/lib/highline/compatibility.rb +17 -0
- data/vendor/highline-1.5.1/lib/highline/import.rb +43 -0
- data/vendor/highline-1.5.1/lib/highline/menu.rb +395 -0
- data/vendor/highline-1.5.1/lib/highline/question.rb +463 -0
- data/vendor/highline-1.5.1/lib/highline/system_extensions.rb +193 -0
- data/vendor/highline-1.5.1/lib/highline.rb +758 -0
- data/vendor/highline-1.5.1/setup.rb +1360 -0
- data/vendor/highline-1.5.1/test/tc_color_scheme.rb +56 -0
- data/vendor/highline-1.5.1/test/tc_highline.rb +823 -0
- data/vendor/highline-1.5.1/test/tc_import.rb +54 -0
- data/vendor/highline-1.5.1/test/tc_menu.rb +429 -0
- data/vendor/highline-1.5.1/test/ts_all.rb +15 -0
- metadata +81 -69
- data/lib/aws_sdb/error.rb +0 -42
- data/lib/aws_sdb/service.rb +0 -215
- data/lib/aws_sdb.rb +0 -3
- data/lib/rudy/aws/simpledb.rb +0 -71
- data/lib/rudy/cli/addresses.rb +0 -85
- data/lib/rudy/cli/backups.rb +0 -175
- data/lib/rudy/cli/domains.rb +0 -17
- data/lib/rudy/cli/groups.rb +0 -77
- data/lib/rudy/cli/images.rb +0 -111
- data/lib/rudy/cli/instances.rb +0 -142
- data/lib/rudy/cli/keypairs.rb +0 -47
- data/lib/rudy/cli/manager.rb +0 -51
- data/lib/rudy/cli/release.rb +0 -174
- data/lib/rudy/cli/volumes.rb +0 -121
- data/lib/rudy/command/addresses.rb +0 -69
- data/lib/rudy/command/backups.rb +0 -65
- data/lib/rudy/command/disks-old.rb +0 -322
- data/lib/rudy/command/disks.rb +0 -9
- data/lib/rudy/command/domains.rb +0 -34
- data/lib/rudy/command/groups.rb +0 -118
- data/lib/rudy/command/instances.rb +0 -278
- data/lib/rudy/command/keypairs.rb +0 -149
- data/lib/rudy/command/manager.rb +0 -65
- data/lib/rudy/command/volumes.rb +0 -127
- data/lib/rudy/metadata/disk.rb +0 -149
- data/lib/rudy/metadata/machine.rb +0 -34
- data/lib/rudy/routines/disk_handler.rb +0 -190
- data/lib/rudy/routines/script_runner.rb +0 -65
- data/test/50_commands/00_setup_test.rb +0 -11
- data/test/50_commands/10_keypairs_test.rb +0 -79
- data/test/50_commands/20_groups_test.rb +0 -77
- data/test/50_commands/40_volumes_test.rb +0 -55
- data/test/50_commands/50_instances_test.rb +0 -110
- data/tryouts/console_tryout.rb +0 -91
- data/tryouts/disks.rb +0 -55
- data/tryouts/nested_methods.rb +0 -36
- data/tryouts/session_tryout.rb +0 -46
@@ -0,0 +1,56 @@
|
|
1
|
+
#!/usr/local/bin/ruby -w
|
2
|
+
|
3
|
+
# tc_color_scheme.rb
|
4
|
+
#
|
5
|
+
# Created by Jeremy Hinegardner on 2007-01-24.
|
6
|
+
# Copyright 2007 Jeremy Hinegardner. All rights reserved.
|
7
|
+
#
|
8
|
+
# This is Free Software. See LICENSE and COPYING for details.
|
9
|
+
|
10
|
+
require "test/unit"
|
11
|
+
|
12
|
+
require "highline"
|
13
|
+
require "stringio"
|
14
|
+
|
15
|
+
class TestColorScheme < Test::Unit::TestCase
|
16
|
+
def setup
|
17
|
+
@input = StringIO.new
|
18
|
+
@output = StringIO.new
|
19
|
+
@terminal = HighLine.new(@input, @output)
|
20
|
+
|
21
|
+
@old_color_scheme = HighLine.color_scheme
|
22
|
+
end
|
23
|
+
|
24
|
+
def teardown
|
25
|
+
HighLine.color_scheme = @old_color_scheme
|
26
|
+
end
|
27
|
+
|
28
|
+
def test_using_color_scheme
|
29
|
+
assert_equal(false,HighLine.using_color_scheme?)
|
30
|
+
|
31
|
+
HighLine.color_scheme = HighLine::ColorScheme.new
|
32
|
+
assert_equal(true,HighLine.using_color_scheme?)
|
33
|
+
end
|
34
|
+
|
35
|
+
def test_scheme
|
36
|
+
HighLine.color_scheme = HighLine::SampleColorScheme.new
|
37
|
+
|
38
|
+
@terminal.say("This should be <%= color('warning yellow', :warning) %>.")
|
39
|
+
assert_equal("This should be \e[1m\e[33mwarning yellow\e[0m.\n",@output.string)
|
40
|
+
@output.rewind
|
41
|
+
|
42
|
+
@terminal.say("This should be <%= color('warning yellow', 'warning') %>.")
|
43
|
+
assert_equal("This should be \e[1m\e[33mwarning yellow\e[0m.\n",@output.string)
|
44
|
+
@output.rewind
|
45
|
+
|
46
|
+
@terminal.say("This should be <%= color('warning yellow', 'WarNing') %>.")
|
47
|
+
assert_equal("This should be \e[1m\e[33mwarning yellow\e[0m.\n",@output.string)
|
48
|
+
@output.rewind
|
49
|
+
|
50
|
+
# turn it back off, should raise an exception
|
51
|
+
HighLine.color_scheme = @old_color_scheme
|
52
|
+
assert_raises(NameError) {
|
53
|
+
@terminal.say("This should be <%= color('nothing at all', :error) %>.")
|
54
|
+
}
|
55
|
+
end
|
56
|
+
end
|