rubish 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/test/test_dev.rb ADDED
@@ -0,0 +1,50 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # note that report of assertions count is
4
+ # zero. Probably because we are doing assert in
5
+ # workspace rather than Test
6
+
7
+ require File.dirname(__FILE__) + '/../lib/rubish'
8
+ require 'rubygems'
9
+ require 'test/unit'
10
+ gem 'thoughtbot-shoulda'
11
+ require 'shoulda'
12
+
13
+ TEST_DIR = File.expand_path(File.dirname(__FILE__)) + "/tmp"
14
+
15
+ Rubish.new_session
16
+ WS = Rubish.session.current_workspace
17
+ WS.extend Test::Unit::Assertions
18
+
19
+ def setup_tmp
20
+ WS.eval {
21
+ rm(:rf, TEST_DIR).exec if File.exist?(TEST_DIR)
22
+ mkdir(TEST_DIR).exec
23
+ cd TEST_DIR
24
+ }
25
+ end
26
+
27
+ setup_tmp
28
+
29
+ TUT = Test::Unit::TestCase
30
+
31
+
32
+ class Rubish::Test < TUT
33
+ def setup
34
+ setup_tmp
35
+ end
36
+
37
+ module Helper
38
+ class << self
39
+ def created_ios
40
+ set1 = Set.new
41
+ set2 = Set.new
42
+ ObjectSpace.each_object(IO) { |o| set1 << o }
43
+ yield
44
+ ObjectSpace.each_object(IO) { |o| set2 << o }
45
+ set2 - set1).to
46
+ end
47
+ end
48
+ end
49
+
50
+ end
metadata ADDED
@@ -0,0 +1,81 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rubish
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Howard Yeh
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-11-30 00:00:00 -08:00
13
+ default_executable: rubish
14
+ dependencies: []
15
+
16
+ description: Ruby Interactive Shell
17
+ email: hayeah@gmail.com
18
+ executables:
19
+ - rubish
20
+ extensions: []
21
+
22
+ extra_rdoc_files:
23
+ - LICENSE
24
+ files:
25
+ - LICENSE
26
+ - README.markdown
27
+ - README.textile
28
+ - Rakefile
29
+ - VERSION.yml
30
+ - bin/rubish
31
+ - lib/rubish.rb
32
+ - lib/rubish/awk.rb
33
+ - lib/rubish/batch_executable.rb
34
+ - lib/rubish/command.rb
35
+ - lib/rubish/command_builder.rb
36
+ - lib/rubish/context.rb
37
+ - lib/rubish/executable.rb
38
+ - lib/rubish/job.rb
39
+ - lib/rubish/job_control.rb
40
+ - lib/rubish/pipe.rb
41
+ - lib/rubish/repl.rb
42
+ - lib/rubish/sed.rb
43
+ - lib/rubish/streamer.rb
44
+ - lib/rubish/stub.rb
45
+ - lib/rubish/unix_executable.rb
46
+ - lib/rubish/workspace.rb
47
+ - test/slowcat.rb
48
+ - test/test.rb
49
+ - test/test_dev.rb
50
+ has_rdoc: true
51
+ homepage: http://github.com/hayeah/rubish
52
+ licenses: []
53
+
54
+ post_install_message:
55
+ rdoc_options:
56
+ - --charset=UTF-8
57
+ require_paths:
58
+ - lib
59
+ required_ruby_version: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - ">="
62
+ - !ruby/object:Gem::Version
63
+ version: "0"
64
+ version:
65
+ required_rubygems_version: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: "0"
70
+ version:
71
+ requirements: []
72
+
73
+ rubyforge_project:
74
+ rubygems_version: 1.3.5
75
+ signing_key:
76
+ specification_version: 3
77
+ summary: Ruby Interactive Shell
78
+ test_files:
79
+ - test/test.rb
80
+ - test/test_dev.rb
81
+ - test/slowcat.rb