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 CHANGED
@@ -4,5 +4,6 @@ source "http://rubygems.org"
4
4
  gemspec
5
5
 
6
6
  group :development, :test do
7
- gem 'torquebox-server', "~> 2.x.incremental.00"
7
+ gem 'torquebox'
8
8
  end
9
+
@@ -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.2)
77
+ sleep(0.4)
71
78
  retry
72
79
  ensure
73
80
  DRb.stop_service
@@ -53,6 +53,7 @@ module TorqueSpec
53
53
  end
54
54
  yaml['ruby'] ||= {}
55
55
  yaml['ruby']['version'] ||= RUBY_VERSION[0,3]
56
+ # yaml['ruby']['compile_mode'] ||= 'off'
56
57
  if original != yaml
57
58
  File.open( path, 'w' ) do |file|
58
59
  YAML.dump( yaml, file )
@@ -1,3 +1,3 @@
1
1
  module TorqueSpec
2
- VERSION = "0.3.5"
2
+ VERSION = "0.3.6"
3
3
  end
@@ -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
- prerelease:
5
- version: 0.3.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
- - Jim Crossley
9
- - Bob McWhirter
13
+ - Jim Crossley
14
+ - Bob McWhirter
10
15
  autorequire:
11
16
  bindir: bin
12
17
  cert_chain: []
13
18
 
14
- date: 2011-06-15 00:00:00 -04:00
19
+ date: 2011-06-17 00:00:00 -04:00
15
20
  default_executable:
16
21
  dependencies:
17
- - !ruby/object:Gem::Dependency
18
- name: rspec
19
- prerelease: false
20
- requirement: &id001 !ruby/object:Gem::Requirement
21
- none: false
22
- requirements:
23
- - - ">="
24
- - !ruby/object:Gem::Version
25
- version: "0"
26
- type: :runtime
27
- version_requirements: *id001
28
- - !ruby/object:Gem::Dependency
29
- name: json
30
- prerelease: false
31
- requirement: &id002 !ruby/object:Gem::Requirement
32
- none: false
33
- requirements:
34
- - - ">="
35
- - !ruby/object:Gem::Version
36
- version: "0"
37
- type: :runtime
38
- version_requirements: *id002
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
- - .gitignore
49
- - Gemfile
50
- - README.org
51
- - Rakefile
52
- - apps/empty/torquebox.yml
53
- - apps/node-info.war
54
- - apps/simple.knob
55
- - apps/simple/config.ru
56
- - lib/rspec/core/torquespec-extensions.rb
57
- - lib/torque_spec/daemon.rb
58
- - lib/torquespec.rb
59
- - lib/torquespec/as6.rb
60
- - lib/torquespec/as7.rb
61
- - lib/torquespec/daemon.rb
62
- - lib/torquespec/deployment_descriptor.rb
63
- - lib/torquespec/server.rb
64
- - lib/torquespec/torquespec.rb
65
- - lib/torquespec/version.rb
66
- - spec/empty_spec.rb
67
- - spec/guard_spec.rb
68
- - spec/hello_world_spec.rb
69
- - spec/nested_remote_spec.rb
70
- - spec/remote_spec.rb
71
- - torquespec.gemspec
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
- - lib
92
+ - lib
81
93
  required_ruby_version: !ruby/object:Gem::Requirement
82
94
  none: false
83
95
  requirements:
84
- - - ">="
85
- - !ruby/object:Gem::Version
86
- version: "0"
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
- - !ruby/object:Gem::Version
92
- version: "0"
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.5.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
- - spec/empty_spec.rb
102
- - spec/guard_spec.rb
103
- - spec/hello_world_spec.rb
104
- - spec/nested_remote_spec.rb
105
- - spec/remote_spec.rb
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