autotest-mac 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/History.txt +6 -0
  2. data/PostInstall.txt +28 -22
  3. data/Rakefile +2 -2
  4. data/lib/autotest-mac.rb +24 -14
  5. metadata +4 -4
data/History.txt CHANGED
@@ -1,3 +1,9 @@
1
+ == 0.1.1 2009-05-25
2
+
3
+ * Bugfix release "the day after"
4
+ * Allow hooks to cascade
5
+ * Exclude .DS_Store and ._* files
6
+
1
7
  == 0.1.0 2009-05-24
2
8
 
3
9
  * Initial release
data/PostInstall.txt CHANGED
@@ -1,24 +1,30 @@
1
1
 
2
- In order to use autotest-mac, the following line has to be added to the top
3
- of your ~/.autotest file:
4
-
5
- require 'autotest-mac'
6
-
7
- Make sure Growl is installed on your computer. You can download it from:
8
-
9
- http://growl.info
10
-
11
- A glitch in Growl 1.1.4 on Mac OS X 10.5 randomly prevents some notifications
12
- from being displayed. A workaround is built into autotest-mac, however, you
13
- have to perform some additional steps to make it work:
14
-
15
- Open “System Preferences -> Growl -> Network" and set the checkboxes "Listen
16
- for incoming notifications" and "Allow remote application registration”. Once
17
- the first notification has been displayed, you can unset the latter checkbox
18
- again.
19
-
20
- For more information, feedback and bug submissions, please visit:
21
-
22
- See http://www.bitcetera.com/products/mac-autotest
23
-
2
+ +--------------------------------------------------------------------------+
3
+ | |
4
+ | In order to use autotest-mac, the following line has to be added to |
5
+ | the top of your ~/.autotest file: |
6
+ | |
7
+ | require 'autotest-mac' |
8
+ | |
9
+ | Make sure Growl is installed on your computer. Download it from: |
10
+ | |
11
+ | http://growl.info |
12
+ | |
13
+ | The growlnotify utility (located inside the Extras folder) must be |
14
+ | installed as well. |
15
+ | |
16
+ | A glitch in Growl 1.1.4 on Mac OS X 10.5 prevents notifications from |
17
+ | being displayed randomly. A workaround is built into autotest-mac, |
18
+ | however, you have to perform some additional steps to make it work: |
19
+ | |
20
+ | Open “System Preferences -> Growl -> Network" and set the checkboxes |
21
+ | "Listen for incoming notifications" and "Allow remote application |
22
+ | registration”. Once the first notification has been displayed, you |
23
+ | can unset the latter checkbox again. |
24
+ | |
25
+ | For more information, feedback and bug submissions, please visit: |
26
+ | |
27
+ | See http://www.bitcetera.com/products/mac-autotest |
28
+ | |
29
+ +--------------------------------------------------------------------------+
24
30
 
data/Rakefile CHANGED
@@ -6,9 +6,9 @@ $hoe = Hoe.new('autotest-mac', AutotestMac::VERSION) do |p|
6
6
  p.developer('Sven Schwyn', 'ruby@bitcetera.com')
7
7
  p.summary = %q{Mac OS X only set of improvements for ZenTest's autotest.}
8
8
  p.description = %q{ZenTest's autotest relies on filesystem polling to detect modifications in source code files. This is both CPU expensive and unnecessary on Mac OS X 10.5 or higher which comes with the very efficient FSEvent core service for this purpose. This extension teaches autotest to use FSEvent and furthermore hooks autotest up to Growl for displaying the test results.}
9
- p.url = %q{http://www.bitcetera.com/en/products/autotest-mac}
9
+ p.url = %q{http://www.bitcetera.com/products/autotest-mac}
10
10
  p.changes = p.paragraphs_of("History.txt", 0..1).join("\n\n")
11
- p.post_install_message = 'PostInstall.txt'
11
+ p.post_install_message = File.read('PostInstall.txt')
12
12
  p.rubyforge_name = p.name
13
13
  p.extra_deps = [
14
14
  ['ZenTest','>= 4.0.0'],
data/lib/autotest-mac.rb CHANGED
@@ -4,13 +4,14 @@ $:.unshift(File.dirname(__FILE__)) unless
4
4
  $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
5
5
 
6
6
  unless RUBY_PLATFORM =~ /darwin/
7
- puts "The autotest-mac gem is for Mac OS X only and thus useless on this platform."
7
+ puts "The autotest-mac gem is for Mac OS X only and thus useless on"
8
+ puts "this platform. Please uninstall it and try again."
8
9
  exit 1
9
10
  end
10
11
 
11
12
  module AutotestMac
12
13
 
13
- VERSION = '0.1.0'
14
+ VERSION = '0.1.1'
14
15
  GEM_DIR = File.expand_path(File.join(File.dirname(__FILE__), '..'))
15
16
 
16
17
  module Autotest::Growl
@@ -29,6 +30,7 @@ module AutotestMac
29
30
  @run_scenarios = false
30
31
  print "\n"*2 + '-'*80 + "\n"*2
31
32
  print "\e[2J\e[f" # clear the terminal
33
+ false
32
34
  end
33
35
 
34
36
  ##
@@ -48,6 +50,7 @@ module AutotestMac
48
50
  @run_scenarios = true
49
51
  end
50
52
  end
53
+ false
51
54
  end
52
55
 
53
56
  # FIXME: This is a temporary workaround until Cucumber is properly integrated!
@@ -66,24 +69,31 @@ module AutotestMac
66
69
  end
67
70
  end
68
71
  end
72
+ false
69
73
  end
70
74
 
71
75
  end
72
76
 
73
- ##
74
- # Add some exceptions
75
- Autotest.add_hook :initialize do |autotest|
76
- %w{.svn .hg .git vendor}.each {|exception| autotest.add_exception(exception) }
77
- end
77
+ module Autotest::Mac
78
78
 
79
- ##
80
- # Use FSEvent if possible
81
- Autotest.add_hook :waiting do |autotest|
82
- if RUBY_PLATFORM.sub(/^.*?darwin(\d+)$/, '\1').to_i >= 9 # Darwin 9 alias Mac OS X 10.5 or above only
83
- `#{File.join(GEM_DIR, 'fsevent', 'fsevent_sleep')} '#{Dir.pwd}' 2>&1`
84
- else
85
- puts "\nautotest-mac: FSEvent not available, falling back to filesystem polling."
79
+ ##
80
+ # Add some exceptions
81
+ Autotest.add_hook :initialize do |autotest|
82
+ %w{.git .svn .hg .DS_Store ._* vendor}.each {|exception| autotest.add_exception(exception) }
83
+ false
86
84
  end
85
+
86
+ ##
87
+ # Use FSEvent if possible
88
+ Autotest.add_hook :waiting do |autotest|
89
+ if RUBY_PLATFORM.sub(/^.*?darwin(\d+)$/, '\1').to_i >= 9 # Darwin 9 alias Mac OS X 10.5 or above only
90
+ `#{File.join(GEM_DIR, 'fsevent', 'fsevent_sleep')} '#{Dir.pwd}' 2>&1`
91
+ else
92
+ puts "\nautotest-mac: FSEvent not available, falling back to filesystem polling."
93
+ end
94
+ false
95
+ end
96
+
87
97
  end
88
98
 
89
99
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autotest-mac
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sven Schwyn
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-05-26 00:00:00 +02:00
12
+ date: 2009-05-27 00:00:00 +02:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -74,10 +74,10 @@ files:
74
74
  - spec/spec_helper.rb
75
75
  - tasks/rspec.rake
76
76
  has_rdoc: true
77
- homepage: http://www.bitcetera.com/en/products/autotest-mac
77
+ homepage: http://www.bitcetera.com/products/autotest-mac
78
78
  licenses: []
79
79
 
80
- post_install_message: PostInstall.txt
80
+ post_install_message: "\n +--------------------------------------------------------------------------+\n | |\n | In order to use autotest-mac, the following line has to be added to |\n | the top of your ~/.autotest file: |\n | |\n | require 'autotest-mac' |\n | |\n | Make sure Growl is installed on your computer. Download it from: |\n | |\n | http://growl.info |\n | |\n | The growlnotify utility (located inside the Extras folder) must be |\n | installed as well. |\n | |\n | A glitch in Growl 1.1.4 on Mac OS X 10.5 prevents notifications from |\n | being displayed randomly. A workaround is built into autotest-mac, |\n | however, you have to perform some additional steps to make it work: |\n | |\n | Open \xE2\x80\x9CSystem Preferences -> Growl -> Network\" and set the checkboxes |\n | \"Listen for incoming notifications\" and \"Allow remote application |\n | registration\xE2\x80\x9D. Once the first notification has been displayed, you |\n | can unset the latter checkbox again. |\n | |\n | For more information, feedback and bug submissions, please visit: |\n | |\n | See http://www.bitcetera.com/products/mac-autotest |\n | |\n +--------------------------------------------------------------------------+\n\n"
81
81
  rdoc_options:
82
82
  - --main
83
83
  - README.rdoc