castanaut 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +4 -0
- data/lib/castanaut/exceptions.rb +7 -0
- data/lib/castanaut/movie.rb +8 -3
- data/lib/castanaut/os/mac_os_x.rb +1 -1
- data/lib/castanaut/os/mac_os_x_legacy.rb +2 -2
- data/lib/castanaut.rb +1 -1
- data/test/movie_test.rb +1 -1
- metadata +17 -6
data/History.txt
CHANGED
data/lib/castanaut/exceptions.rb
CHANGED
@@ -37,6 +37,13 @@ module Castanaut
|
|
37
37
|
# Allows you to skip the rest of a perform block (therefore usually
|
38
38
|
# raised if some condition fails). See Movie#skip for the shorthand.
|
39
39
|
class SkipError < CastanautError
|
40
|
+
def initialize(options = {})
|
41
|
+
@quiet = true if options[:quiet]
|
42
|
+
end
|
43
|
+
|
44
|
+
def quiet?
|
45
|
+
@quiet ? true : false
|
46
|
+
end
|
40
47
|
end
|
41
48
|
|
42
49
|
end
|
data/lib/castanaut/movie.rb
CHANGED
@@ -122,7 +122,7 @@ module Castanaut
|
|
122
122
|
def perform(label)
|
123
123
|
yield
|
124
124
|
rescue Castanaut::Exceptions::SkipError => e
|
125
|
-
puts "Skipping remaining directions in '#{label}'"
|
125
|
+
puts "Skipping remaining directions in '#{label}'" unless e.quiet?
|
126
126
|
end
|
127
127
|
|
128
128
|
|
@@ -136,8 +136,13 @@ module Castanaut
|
|
136
136
|
#
|
137
137
|
# end
|
138
138
|
#
|
139
|
-
|
140
|
-
|
139
|
+
# Options:
|
140
|
+
#
|
141
|
+
# :quiet - does not print message about the skip to STDOUT.
|
142
|
+
#
|
143
|
+
#
|
144
|
+
def skip(options = {})
|
145
|
+
raise Castanaut::Exceptions::SkipError.new(options)
|
141
146
|
end
|
142
147
|
|
143
148
|
|
@@ -19,7 +19,7 @@ module Castanaut; module OS; module MacOSX
|
|
19
19
|
# Returns true if the current platform is Mac OS X 10.5 or greater.
|
20
20
|
#
|
21
21
|
def self.platform_supported?
|
22
|
-
vers = `/usr/bin/sw_vers -productVersion`.match(/10\.(\d)
|
22
|
+
vers = `/usr/bin/sw_vers -productVersion`.match(/10\.(\d)/)
|
23
23
|
vers[1].to_i >= 5
|
24
24
|
rescue
|
25
25
|
false
|
@@ -21,10 +21,10 @@ module Castanaut; module OS; module MacOSX
|
|
21
21
|
register("Mac OS X 10.4")
|
22
22
|
|
23
23
|
|
24
|
-
# Returns true if the current platform is Mac OS X 10.
|
24
|
+
# Returns true if the current platform is Mac OS X 10.4.
|
25
25
|
#
|
26
26
|
def self.platform_supported?
|
27
|
-
vers = `/usr/bin/sw_vers -productVersion`.match(/10\.(\d)
|
27
|
+
vers = `/usr/bin/sw_vers -productVersion`.match(/10\.(\d)/)
|
28
28
|
vers[1].to_i == 4
|
29
29
|
rescue
|
30
30
|
false
|
data/lib/castanaut.rb
CHANGED
data/test/movie_test.rb
CHANGED
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 1
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 1.1.
|
8
|
+
- 1
|
9
|
+
version: 1.1.1
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Joseph Pearson
|
@@ -14,10 +14,21 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date:
|
17
|
+
date: 2011-08-13 00:00:00 +10:00
|
18
18
|
default_executable:
|
19
|
-
dependencies:
|
20
|
-
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
21
|
+
name: rake
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ">="
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
segments:
|
28
|
+
- 0
|
29
|
+
version: "0"
|
30
|
+
type: :development
|
31
|
+
version_requirements: *id001
|
21
32
|
description: Castanaut lets you write executable scripts for screencasts.
|
22
33
|
email: joseph@inventivelabs.com.au
|
23
34
|
executables:
|
@@ -83,7 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
83
94
|
version: "0"
|
84
95
|
requirements: []
|
85
96
|
|
86
|
-
rubyforge_project:
|
97
|
+
rubyforge_project: nowarning
|
87
98
|
rubygems_version: 1.3.6
|
88
99
|
signing_key:
|
89
100
|
specification_version: 3
|