torquespec 0.3.5 → 0.3.6
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +2 -1
- data/lib/torquespec/daemon.rb +8 -1
- data/lib/torquespec/deployment_descriptor.rb +1 -0
- data/lib/torquespec/version.rb +1 -1
- data/spec/injection_spec.rb +22 -0
- metadata +83 -64
data/Gemfile
CHANGED
data/lib/torquespec/daemon.rb
CHANGED
@@ -1,14 +1,18 @@
|
|
1
1
|
require 'torquespec'
|
2
2
|
require 'rspec/core'
|
3
3
|
require 'drb'
|
4
|
+
require 'torquebox-core'
|
4
5
|
|
5
6
|
module TorqueSpec
|
6
7
|
class Daemon
|
7
8
|
|
9
|
+
include TorqueBox::Injectors
|
10
|
+
|
8
11
|
def initialize(opts={})
|
9
12
|
puts "daemon: create opts=#{opts.inspect}"
|
10
13
|
dir = opts['pwd'].to_s
|
11
14
|
raise "The 'pwd' option must contain a valid directory name" if dir.empty? || !File.exist?(dir)
|
15
|
+
@analyzer = inject( 'runtime-injection-analyzer' )
|
12
16
|
Dir.chdir( dir ) do
|
13
17
|
RSpec::Core::Runner.disable_autorun! # avoid a bunch of at_exit finalizer errors
|
14
18
|
@options = RSpec::Core::ConfigurationOptions.new( opts['argv'].to_a )
|
@@ -40,6 +44,9 @@ module TorqueSpec
|
|
40
44
|
example_group = @world.example_groups.inject([]) {|all,g| all + g.descendants}.find do |group|
|
41
45
|
group.name.split("::").last == simple_name && group.description == alien.description
|
42
46
|
end
|
47
|
+
example_group.descendant_filtered_examples.each do |example|
|
48
|
+
@analyzer.analyze_and_inject( example.instance_eval {@example_block} )
|
49
|
+
end
|
43
50
|
example_group.run( reporter )
|
44
51
|
end
|
45
52
|
|
@@ -67,7 +74,7 @@ module TorqueSpec
|
|
67
74
|
rescue DRb::DRbConnError
|
68
75
|
# Overcome DRb.start_service() race condition
|
69
76
|
raise unless (attempts-=1) > 0
|
70
|
-
sleep(0.
|
77
|
+
sleep(0.4)
|
71
78
|
retry
|
72
79
|
ensure
|
73
80
|
DRb.stop_service
|
data/lib/torquespec/version.rb
CHANGED
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'torquespec'
|
2
|
+
require 'torquebox-core'
|
3
|
+
require 'jruby'
|
4
|
+
JRuby.objectspace = true
|
5
|
+
|
6
|
+
remote_describe "injection tests" do
|
7
|
+
|
8
|
+
include TorqueBox::Injectors
|
9
|
+
|
10
|
+
deploy <<-END.gsub(/^ {4}/,'')
|
11
|
+
queues:
|
12
|
+
tweets:
|
13
|
+
END
|
14
|
+
|
15
|
+
it "should work" do
|
16
|
+
queue = inject_queue('tweets')
|
17
|
+
queue.publish('bar')
|
18
|
+
queue.receive.should == 'bar'
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
22
|
+
|
metadata
CHANGED
@@ -1,41 +1,52 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: torquespec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
4
|
+
hash: 31
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 3
|
9
|
+
- 6
|
10
|
+
version: 0.3.6
|
6
11
|
platform: ruby
|
7
12
|
authors:
|
8
|
-
|
9
|
-
|
13
|
+
- Jim Crossley
|
14
|
+
- Bob McWhirter
|
10
15
|
autorequire:
|
11
16
|
bindir: bin
|
12
17
|
cert_chain: []
|
13
18
|
|
14
|
-
date: 2011-06-
|
19
|
+
date: 2011-06-17 00:00:00 -04:00
|
15
20
|
default_executable:
|
16
21
|
dependencies:
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
22
|
+
- !ruby/object:Gem::Dependency
|
23
|
+
name: rspec
|
24
|
+
prerelease: false
|
25
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
26
|
+
none: false
|
27
|
+
requirements:
|
28
|
+
- - ">="
|
29
|
+
- !ruby/object:Gem::Version
|
30
|
+
hash: 3
|
31
|
+
segments:
|
32
|
+
- 0
|
33
|
+
version: "0"
|
34
|
+
type: :runtime
|
35
|
+
version_requirements: *id001
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: json
|
38
|
+
prerelease: false
|
39
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
40
|
+
none: false
|
41
|
+
requirements:
|
42
|
+
- - ">="
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
hash: 3
|
45
|
+
segments:
|
46
|
+
- 0
|
47
|
+
version: "0"
|
48
|
+
type: :runtime
|
49
|
+
version_requirements: *id002
|
39
50
|
description: Write integration tests around the deployment of your app to a real JBoss app server
|
40
51
|
email: team@projectodd.org
|
41
52
|
executables: []
|
@@ -45,30 +56,31 @@ extensions: []
|
|
45
56
|
extra_rdoc_files: []
|
46
57
|
|
47
58
|
files:
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
59
|
+
- .gitignore
|
60
|
+
- Gemfile
|
61
|
+
- README.org
|
62
|
+
- Rakefile
|
63
|
+
- apps/empty/torquebox.yml
|
64
|
+
- apps/node-info.war
|
65
|
+
- apps/simple.knob
|
66
|
+
- apps/simple/config.ru
|
67
|
+
- lib/rspec/core/torquespec-extensions.rb
|
68
|
+
- lib/torque_spec/daemon.rb
|
69
|
+
- lib/torquespec.rb
|
70
|
+
- lib/torquespec/as6.rb
|
71
|
+
- lib/torquespec/as7.rb
|
72
|
+
- lib/torquespec/daemon.rb
|
73
|
+
- lib/torquespec/deployment_descriptor.rb
|
74
|
+
- lib/torquespec/server.rb
|
75
|
+
- lib/torquespec/torquespec.rb
|
76
|
+
- lib/torquespec/version.rb
|
77
|
+
- spec/empty_spec.rb
|
78
|
+
- spec/guard_spec.rb
|
79
|
+
- spec/hello_world_spec.rb
|
80
|
+
- spec/injection_spec.rb
|
81
|
+
- spec/nested_remote_spec.rb
|
82
|
+
- spec/remote_spec.rb
|
83
|
+
- torquespec.gemspec
|
72
84
|
has_rdoc: true
|
73
85
|
homepage: http://github.com/torquebox/torquespec
|
74
86
|
licenses: []
|
@@ -77,29 +89,36 @@ post_install_message:
|
|
77
89
|
rdoc_options: []
|
78
90
|
|
79
91
|
require_paths:
|
80
|
-
|
92
|
+
- lib
|
81
93
|
required_ruby_version: !ruby/object:Gem::Requirement
|
82
94
|
none: false
|
83
95
|
requirements:
|
84
|
-
|
85
|
-
|
86
|
-
|
96
|
+
- - ">="
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
hash: 3
|
99
|
+
segments:
|
100
|
+
- 0
|
101
|
+
version: "0"
|
87
102
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
88
103
|
none: false
|
89
104
|
requirements:
|
90
|
-
|
91
|
-
|
92
|
-
|
105
|
+
- - ">="
|
106
|
+
- !ruby/object:Gem::Version
|
107
|
+
hash: 3
|
108
|
+
segments:
|
109
|
+
- 0
|
110
|
+
version: "0"
|
93
111
|
requirements: []
|
94
112
|
|
95
113
|
rubyforge_project: torquespec
|
96
|
-
rubygems_version: 1.
|
114
|
+
rubygems_version: 1.3.7
|
97
115
|
signing_key:
|
98
116
|
specification_version: 3
|
99
117
|
summary: Deploy TorqueBox knobs to a running JBoss instance
|
100
118
|
test_files:
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
119
|
+
- spec/empty_spec.rb
|
120
|
+
- spec/guard_spec.rb
|
121
|
+
- spec/hello_world_spec.rb
|
122
|
+
- spec/injection_spec.rb
|
123
|
+
- spec/nested_remote_spec.rb
|
124
|
+
- spec/remote_spec.rb
|