spork-riot 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,12 @@
1
+ spork-riot
2
+ ==========
3
+
4
+ Primitive Riot runner for [Spork](https://github.com/sporkrb/spork).
5
+
6
+
7
+ Usage
8
+ -----
9
+
10
+ gem 'spork-riot', :git => 'git://github.com/alfredc/spork-riot.git'
11
+ spork riot --bootstrap
12
+ testdrb [test folder or file]
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env ruby
2
+ require 'drb'
3
+
4
+ DRb.start_service
5
+ exit_code = DRbObject.new_with_uri("druby://127.0.0.1:8988").run(ARGV, $stderr, $stdout)
6
+
7
+ exit(exit_code || false)
@@ -0,0 +1,28 @@
1
+ class Spork::TestFramework::Riot < Spork::TestFramework
2
+ DEFAULT_PORT = 8988
3
+ HELPER_FILE = File.join(Dir.pwd, "test/teststrap.rb")
4
+
5
+ def run_tests(argv, stderr, stdout)
6
+ $LOAD_PATH << "test" << "."
7
+
8
+ paths, opts = parse_options(argv)
9
+
10
+ paths.each do |path|
11
+ if File.directory?(path)
12
+ Dir["#{path.chomp('/')}/**/*_test.rb"].each { |f| require f }
13
+ else
14
+ require path
15
+ end
16
+ end
17
+
18
+ ::Riot.run.success?
19
+ end
20
+
21
+ def parse_options(argv)
22
+ paths, opts = argv.slice_before("--").to_a
23
+ paths ||= []
24
+ opts ||= []
25
+ opts.shift
26
+ [paths, opts]
27
+ end
28
+ end
metadata ADDED
@@ -0,0 +1,60 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: spork-riot
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Alfred Chan
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-06-20 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: spork
16
+ requirement: &73052020 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *73052020
25
+ description: Spork plugin to enable Riot support.
26
+ email:
27
+ - alfredwchan@gmail.com
28
+ executables:
29
+ - testdrb
30
+ extensions: []
31
+ extra_rdoc_files: []
32
+ files:
33
+ - README.md
34
+ - bin/testdrb
35
+ - lib/spork/test_framework/riot.rb
36
+ homepage: https://github.com/alfredc/spork-riot
37
+ licenses: []
38
+ post_install_message:
39
+ rdoc_options: []
40
+ require_paths:
41
+ - lib
42
+ required_ruby_version: !ruby/object:Gem::Requirement
43
+ none: false
44
+ requirements:
45
+ - - ! '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ required_rubygems_version: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ requirements: []
55
+ rubyforge_project:
56
+ rubygems_version: 1.8.10
57
+ signing_key:
58
+ specification_version: 3
59
+ summary: Riot runner for Spork
60
+ test_files: []