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 CHANGED
@@ -1,3 +1,7 @@
1
+ == 1.1.1 / 2011-08-13
2
+
3
+ * Now supports Mac OS X 10.7 (Lion).
4
+
1
5
  == 1.1.0 / 2010-02-26
2
6
 
3
7
  * Replaced the gem/rubyforge packaging cruft with a gemspec and rake task.
@@ -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
@@ -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
- def skip
140
- raise Castanaut::Exceptions::SkipError
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)\.\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.5 or greater.
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)\.\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
@@ -10,7 +10,7 @@ unless defined? Castanaut
10
10
  module Castanaut
11
11
 
12
12
  # :stopdoc:
13
- VERSION = '1.1.0'
13
+ VERSION = '1.1.1'
14
14
  LIBPATH = ::File.expand_path(::File.dirname(__FILE__)) + ::File::SEPARATOR
15
15
  PATH = ::File.dirname(LIBPATH) + ::File::SEPARATOR
16
16
 
data/test/movie_test.rb CHANGED
@@ -48,7 +48,7 @@ class MovieTest < Test::Unit::TestCase
48
48
  x = 1
49
49
  mov.perform("Something") {
50
50
  x = 3
51
- mov.skip
51
+ mov.skip(:quiet => true)
52
52
  x = 4
53
53
  }
54
54
  assert_equal(3, x)
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 1
8
- - 0
9
- version: 1.1.0
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: 2010-02-26 00:00:00 +11:00
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