my_scripts 0.1.12 → 0.1.13

Sign up to get free protection for your applications and to get access to all the features.
data/HISTORY CHANGED
@@ -3,8 +3,6 @@
3
3
  * 1 major enhancement
4
4
  * Birthday!
5
5
 
6
- == 0.0.22 / 2010-04-12
7
-
8
6
  == 0.0.27 / 2010-04-13
9
7
 
10
8
  == 0.1.0 / 2010-04-13
@@ -16,10 +14,6 @@
16
14
 
17
15
  * Gitto: HISTORY message added
18
16
 
19
- == 0.1.2 / 2010-04-14
20
-
21
- * Gitto specs added
22
-
23
17
  == 0.1.3 / 2010-04-14
24
18
 
25
19
  * Gitto specs added
@@ -59,3 +53,8 @@
59
53
  == 0.1.12 / 2010-10-15
60
54
 
61
55
  * Rabbit reset added
56
+
57
+ == 0.1.13 / 2010-10-28
58
+
59
+ * Ansi script added
60
+
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.12
1
+ 0.1.13
data/bin/ansi ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require File.dirname(__FILE__) + '/../lib/my_scripts'
4
+
5
+ MyScripts::CLI.run :ansi, ARGV
@@ -0,0 +1,27 @@
1
+ module MyScripts
2
+ # This script should be used as a pipe to colorize ANSI output on Windows
3
+ # Use case is like this (provides colorized autotest output):
4
+ #
5
+ # > autotest | ansi
6
+ #
7
+ class Ansi < Script
8
+ VERSION = '0.0.1'
9
+
10
+ def initialize(name, cli, argv, argf)
11
+ require 'win32console'
12
+ @cli = cli
13
+ @io = Win32::Console::ANSI::IO.new()
14
+ super
15
+ end
16
+
17
+ def run
18
+ Signal.trap('INT', nil) # Ignores Interrupt (Ctrl-C) - it is used by autotest
19
+
20
+ until @cli.stdin.eof? do
21
+ line = @cli.stdin.gets
22
+ @io.puts line
23
+ end
24
+ @io.flush
25
+ end
26
+ end
27
+ end
data/tasks/spec.rake CHANGED
@@ -2,17 +2,14 @@ desc 'Alias to spec:spec'
2
2
  task :spec => 'spec:spec'
3
3
 
4
4
  namespace :spec do
5
- require 'spec/rake/spectask'
5
+ # require 'spec/rake/spectask'
6
+ require 'rspec/core/rake_task'
6
7
 
7
8
  desc "Run all specs"
8
- Spec::Rake::SpecTask.new(:spec) do |t|
9
- t.spec_opts = ['--options', %Q{"#{BASE_PATH}/spec/spec.opts"}]
10
- t.spec_files = FileList['spec/**/*_spec.rb']
11
- end
9
+ RSpec::Core::RakeTask.new(:spec){|task|}
12
10
 
13
11
  desc "Run specs with RCov"
14
- Spec::Rake::SpecTask.new(:rcov) do |t|
15
- t.spec_files = FileList['spec/**/*_spec.rb']
12
+ RSpec::Core::RakeTask.new(:rcov) do |t|
16
13
  t.rcov = true
17
14
  t.rcov_opts = ['--exclude', 'spec']
18
15
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: my_scripts
3
3
  version: !ruby/object:Gem::Version
4
- hash: 3
4
+ hash: 1
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 12
10
- version: 0.1.12
9
+ - 13
10
+ version: 0.1.13
11
11
  platform: ruby
12
12
  authors:
13
13
  - arvicco
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-10-15 00:00:00 +04:00
18
+ date: 2010-10-28 00:00:00 +04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -51,6 +51,7 @@ dependencies:
51
51
  description: Simple scripting framework
52
52
  email: arvitallian@gmail.com
53
53
  executables:
54
+ - ansi
54
55
  - bon
55
56
  - citi
56
57
  - gitto
@@ -65,6 +66,7 @@ extra_rdoc_files:
65
66
  - HISTORY
66
67
  - README.rdoc
67
68
  files:
69
+ - bin/ansi
68
70
  - bin/bon
69
71
  - bin/citi
70
72
  - bin/gitto
@@ -75,6 +77,7 @@ files:
75
77
  - lib/my_scripts/cli.rb
76
78
  - lib/my_scripts/extensions.rb
77
79
  - lib/my_scripts/script.rb
80
+ - lib/my_scripts/scripts/ansi.rb
78
81
  - lib/my_scripts/scripts/bon.rb
79
82
  - lib/my_scripts/scripts/citi.rb
80
83
  - lib/my_scripts/scripts/gitto.rb