autotest-clear 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
data/.autotest ADDED
@@ -0,0 +1,24 @@
1
+ # -*- ruby -*-
2
+
3
+ require 'autotest/restart'
4
+ require './lib/autotest/clear'
5
+
6
+ # Autotest.add_hook :initialize do |at|
7
+ # at.extra_files << "../some/external/dependency.rb"
8
+ #
9
+ # at.libs << ":../some/external"
10
+ #
11
+ # at.add_exception 'vendor'
12
+ #
13
+ # at.add_mapping(/dependency.rb/) do |f, _|
14
+ # at.files_matching(/test_.*rb$/)
15
+ # end
16
+ #
17
+ # %w(TestA TestB).each do |klass|
18
+ # at.extra_class_map[klass] = "test/test_misc.rb"
19
+ # end
20
+ # end
21
+
22
+ # Autotest.add_hook :run_command do |at|
23
+ # system "rake build"
24
+ # end
data/.gemtest ADDED
File without changes
data/.gitignore ADDED
@@ -0,0 +1 @@
1
+ *.sw[op]
data/History.txt ADDED
@@ -0,0 +1,6 @@
1
+ === 1.0.0 / 2012-03-03
2
+
3
+ * 1 major enhancement
4
+
5
+ * Birthday!
6
+
data/Manifest.txt ADDED
@@ -0,0 +1,8 @@
1
+ .autotest
2
+ .gitignore
3
+ History.txt
4
+ Manifest.txt
5
+ README.rdoc
6
+ Rakefile
7
+ lib/autotest/clear.rb
8
+ test/test_autotest_clear.rb
data/README.rdoc ADDED
@@ -0,0 +1,54 @@
1
+ = autotest-clear
2
+
3
+ * https://github.com/bhenderson/autotest-clear
4
+
5
+ == DESCRIPTION:
6
+
7
+ Clears the terminal for every autotest run. Inspired from autotest-growl[http://www.bitcetera.com/en/products/autotest-growl]
8
+
9
+ == FEATURES/PROBLEMS:
10
+
11
+ * Sometimes autotest will restart with no matching files and so it will clear[https://github.com/seattlerb/zentest/pull/15] the screen and not run anything.
12
+
13
+ == SYNOPSIS:
14
+
15
+ require 'autotest/clear'
16
+ Autotest::Clear.clear_terminal = false # to disable
17
+
18
+ == INSTALL:
19
+
20
+ * gem install autotest-clear
21
+
22
+ == DEVELOPERS:
23
+
24
+ After checking out the source, run:
25
+
26
+ $ rake newb
27
+
28
+ This task will install any missing dependencies, run the tests/specs,
29
+ and generate the RDoc.
30
+
31
+ == LICENSE:
32
+
33
+ (The MIT License)
34
+
35
+ Copyright (c) 2012 bhenderson
36
+
37
+ Permission is hereby granted, free of charge, to any person obtaining
38
+ a copy of this software and associated documentation files (the
39
+ 'Software'), to deal in the Software without restriction, including
40
+ without limitation the rights to use, copy, modify, merge, publish,
41
+ distribute, sublicense, and/or sell copies of the Software, and to
42
+ permit persons to whom the Software is furnished to do so, subject to
43
+ the following conditions:
44
+
45
+ The above copyright notice and this permission notice shall be
46
+ included in all copies or substantial portions of the Software.
47
+
48
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
49
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
50
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
51
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
52
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
53
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
54
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile ADDED
@@ -0,0 +1,22 @@
1
+ # -*- ruby -*-
2
+
3
+ require 'rubygems'
4
+ require 'hoe'
5
+
6
+ # Hoe.plugin :compiler
7
+ # Hoe.plugin :gem_prelude_sucks
8
+ # Hoe.plugin :inline
9
+ # Hoe.plugin :isolate
10
+ # Hoe.plugin :minitest
11
+ # Hoe.plugin :racc
12
+ # Hoe.plugin :rubyforge
13
+
14
+ Hoe.spec 'autotest-clear' do
15
+ developer 'Brian Henderson', 'bhenderson@attinteractive.com'
16
+
17
+ self.readme_file = "README.rdoc"
18
+
19
+ self.testlib = :minitest
20
+ end
21
+
22
+ # vim: syntax=ruby
@@ -0,0 +1,20 @@
1
+ module Autotest::Clear
2
+ VERSION = '1.0.0'
3
+
4
+ CLEAR = "\e[2J\e[f"
5
+ LINE = "\n"*2 + '-'*80 + "\n"*2
6
+
7
+ def self.clear_terminal= val
8
+ @@clear_terminal = val
9
+ end
10
+ self.clear_terminal = true
11
+
12
+ ##
13
+ # From autotest/growl
14
+ # Set the label and clear the terminal.
15
+ Autotest.add_hook :run_command do
16
+ print LINE
17
+ print CLEAR if @@clear_terminal
18
+ false
19
+ end
20
+ end
@@ -0,0 +1,8 @@
1
+ require "minitest/autorun"
2
+
3
+ class TestAutotest; end
4
+ class TestAutotest::TestClear < MiniTest::Unit::TestCase
5
+ def test_sanity
6
+ flunk
7
+ end
8
+ end
metadata ADDED
@@ -0,0 +1,82 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: autotest-clear
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Brian Henderson
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-03-03 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rdoc
16
+ requirement: &70143020002860 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: '3.10'
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: *70143020002860
25
+ - !ruby/object:Gem::Dependency
26
+ name: hoe
27
+ requirement: &70143020001320 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ~>
31
+ - !ruby/object:Gem::Version
32
+ version: '2.15'
33
+ type: :development
34
+ prerelease: false
35
+ version_requirements: *70143020001320
36
+ description: Clears the terminal for every autotest run. Inspired from autotest-growl[http://www.bitcetera.com/en/products/autotest-growl]
37
+ email:
38
+ - bhenderson@attinteractive.com
39
+ executables: []
40
+ extensions: []
41
+ extra_rdoc_files:
42
+ - History.txt
43
+ - Manifest.txt
44
+ - README.rdoc
45
+ files:
46
+ - .autotest
47
+ - .gitignore
48
+ - History.txt
49
+ - Manifest.txt
50
+ - README.rdoc
51
+ - Rakefile
52
+ - lib/autotest/clear.rb
53
+ - test/test_autotest_clear.rb
54
+ - .gemtest
55
+ homepage: https://github.com/bhenderson/autotest-clear
56
+ licenses: []
57
+ post_install_message:
58
+ rdoc_options:
59
+ - --main
60
+ - README.rdoc
61
+ require_paths:
62
+ - lib
63
+ required_ruby_version: !ruby/object:Gem::Requirement
64
+ none: false
65
+ requirements:
66
+ - - ! '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ required_rubygems_version: !ruby/object:Gem::Requirement
70
+ none: false
71
+ requirements:
72
+ - - ! '>='
73
+ - !ruby/object:Gem::Version
74
+ version: '0'
75
+ requirements: []
76
+ rubyforge_project: autotest-clear
77
+ rubygems_version: 1.8.17
78
+ signing_key:
79
+ specification_version: 3
80
+ summary: Clears the terminal for every autotest run
81
+ test_files:
82
+ - test/test_autotest_clear.rb