arturop-hydra 0.24.0 → 0.25.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,10 @@
1
1
  = Hydra
2
2
 
3
- Spread your tests over processors and/or multiple machines to test your code faster.
3
+ Spread your tests over processors and/or multiple machines to test your code faster.
4
+
5
+ Ruby 1.8 and 1.9*
6
+
7
+ \* Install gem 'test-unit' if using Ruby 1.9
4
8
 
5
9
  == Description
6
10
 
data/Rakefile CHANGED
@@ -7,13 +7,13 @@ begin
7
7
  gem.name = "arturop-hydra"
8
8
  gem.summary = %Q{Distributed testing toolkit}
9
9
  gem.description = %Q{Spread your tests over multiple machines to test your code faster.}
10
- gem.email = "arturotd08@yahoo.ca"
11
- gem.homepage = "http://github.com/nulogy/hydra"
12
- gem.authors = ["Nick Gauthier", "Justin Fitzsimmons", "Victor Savkin", "Arturo Pie"]
10
+ gem.email = "nick@smartlogicsolutions.com"
11
+ gem.homepage = "https://github.com/arturopie/hydra"
12
+ gem.authors = ["Nick Gauthier", "Arturo Pie"]
13
13
  gem.add_development_dependency "shoulda", "= 2.10.3"
14
14
  gem.add_development_dependency "rspec", "= 2.0.0.beta.19"
15
- gem.add_development_dependency "cucumber", "= 1.1.4"
16
- gem.add_development_dependency "therubyracer", "= 0.9.9"
15
+ gem.add_development_dependency "cucumber", "= 0.9.2"
16
+ gem.add_development_dependency "therubyracer", "= 0.7.4"
17
17
  end
18
18
  Jeweler::GemcutterTasks.new
19
19
  rescue LoadError
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.24.0
1
+ 0.25.0
@@ -4,14 +4,14 @@
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
- s.name = "nulogy-hydra"
8
- s.version = "0.24.0"
7
+ s.name = "arturop-hydra"
8
+ s.version = "0.25.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Nick Gauthier", "Justin Fitzsimmons", "Victor Savkin", "Arturo Pie"]
12
- s.date = "2012-02-15"
11
+ s.authors = ["Nick Gauthier", "Arturo Pie"]
12
+ s.date = "2012-03-08"
13
13
  s.description = "Spread your tests over multiple machines to test your code faster."
14
- s.email = "engineering@nulogy.com"
14
+ s.email = "nick@smartlogicsolutions.com"
15
15
  s.extra_rdoc_files = [
16
16
  "LICENSE",
17
17
  "README.rdoc",
@@ -24,6 +24,7 @@ Gem::Specification.new do |s|
24
24
  "Rakefile",
25
25
  "TODO",
26
26
  "VERSION",
27
+ "arturop-hydra.gemspec",
27
28
  "caliper.yml",
28
29
  "hydra-icon-64x64.png",
29
30
  "hydra.gemspec",
@@ -48,7 +49,6 @@ Gem::Specification.new do |s|
48
49
  "lib/hydra/message/worker_messages.rb",
49
50
  "lib/hydra/messaging_io.rb",
50
51
  "lib/hydra/pipe.rb",
51
- "lib/hydra/proxy_config.rb",
52
52
  "lib/hydra/runner.rb",
53
53
  "lib/hydra/runner_listener/abstract.rb",
54
54
  "lib/hydra/safe_fork.rb",
@@ -58,13 +58,10 @@ Gem::Specification.new do |s|
58
58
  "lib/hydra/stdio.rb",
59
59
  "lib/hydra/sync.rb",
60
60
  "lib/hydra/tasks.rb",
61
- "lib/hydra/threadsafe_io.rb",
62
61
  "lib/hydra/tmpdir.rb",
63
62
  "lib/hydra/trace.rb",
64
63
  "lib/hydra/worker.rb",
65
- "nulogy-hydra.gemspec",
66
64
  "test/fixtures/assert_true.rb",
67
- "test/fixtures/bad_proxy_config.yml",
68
65
  "test/fixtures/config.yml",
69
66
  "test/fixtures/conflicting.rb",
70
67
  "test/fixtures/features/step_definitions.rb",
@@ -76,8 +73,6 @@ Gem::Specification.new do |s|
76
73
  "test/fixtures/json_data.json",
77
74
  "test/fixtures/many_outputs_to_console.rb",
78
75
  "test/fixtures/master_listeners.rb",
79
- "test/fixtures/proxy_config.yml",
80
- "test/fixtures/proxy_config_http.yml",
81
76
  "test/fixtures/runner_listeners.rb",
82
77
  "test/fixtures/slow.rb",
83
78
  "test/fixtures/sync_test.rb",
@@ -89,7 +84,6 @@ Gem::Specification.new do |s|
89
84
  "test/master_test.rb",
90
85
  "test/message_test.rb",
91
86
  "test/pipe_test.rb",
92
- "test/proxy_config_test.rb",
93
87
  "test/runner_test.rb",
94
88
  "test/ssh_test.rb",
95
89
  "test/sync_test.rb",
@@ -97,7 +91,7 @@ Gem::Specification.new do |s|
97
91
  "test/test_helper.rb",
98
92
  "test/worker_test.rb"
99
93
  ]
100
- s.homepage = "http://github.com/nulogy/hydra"
94
+ s.homepage = "https://github.com/arturopie/hydra"
101
95
  s.require_paths = ["lib"]
102
96
  s.rubygems_version = "1.8.15"
103
97
  s.summary = "Distributed testing toolkit"
@@ -108,19 +102,19 @@ Gem::Specification.new do |s|
108
102
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
109
103
  s.add_development_dependency(%q<shoulda>, ["= 2.10.3"])
110
104
  s.add_development_dependency(%q<rspec>, ["= 2.0.0.beta.19"])
111
- s.add_development_dependency(%q<cucumber>, ["= 1.1.4"])
112
- s.add_development_dependency(%q<therubyracer>, ["= 0.9.9"])
105
+ s.add_development_dependency(%q<cucumber>, ["= 0.9.2"])
106
+ s.add_development_dependency(%q<therubyracer>, ["= 0.7.4"])
113
107
  else
114
108
  s.add_dependency(%q<shoulda>, ["= 2.10.3"])
115
109
  s.add_dependency(%q<rspec>, ["= 2.0.0.beta.19"])
116
- s.add_dependency(%q<cucumber>, ["= 1.1.4"])
117
- s.add_dependency(%q<therubyracer>, ["= 0.9.9"])
110
+ s.add_dependency(%q<cucumber>, ["= 0.9.2"])
111
+ s.add_dependency(%q<therubyracer>, ["= 0.7.4"])
118
112
  end
119
113
  else
120
114
  s.add_dependency(%q<shoulda>, ["= 2.10.3"])
121
115
  s.add_dependency(%q<rspec>, ["= 2.0.0.beta.19"])
122
- s.add_dependency(%q<cucumber>, ["= 1.1.4"])
123
- s.add_dependency(%q<therubyracer>, ["= 0.9.9"])
116
+ s.add_dependency(%q<cucumber>, ["= 0.9.2"])
117
+ s.add_dependency(%q<therubyracer>, ["= 0.7.4"])
124
118
  end
125
119
  end
126
120
 
@@ -1,113 +1,101 @@
1
1
  # Generated by jeweler
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
- s.name = %q{hydra}
8
- s.version = "0.23.2"
7
+ s.name = "hydra"
8
+ s.version = "0.23.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Nick Gauthier"]
12
- s.date = %q{2010-11-03}
13
- s.description = %q{Spread your tests over multiple machines to test your code faster.}
14
- s.email = %q{nick@smartlogicsolutions.com}
11
+ s.authors = ["Nick Gauthier", "Arturo Pie"]
12
+ s.date = "2012-03-08"
13
+ s.description = "Spread your tests over multiple machines to test your code faster."
14
+ s.email = "nick@smartlogicsolutions.com"
15
15
  s.extra_rdoc_files = [
16
16
  "LICENSE",
17
- "README.rdoc",
18
- "TODO"
17
+ "README.rdoc",
18
+ "TODO"
19
19
  ]
20
20
  s.files = [
21
21
  ".document",
22
- ".gitignore",
23
- "LICENSE",
24
- "README.rdoc",
25
- "Rakefile",
26
- "TODO",
27
- "VERSION",
28
- "caliper.yml",
29
- "hydra-icon-64x64.png",
30
- "hydra.gemspec",
31
- "hydra_gray.png",
32
- "lib/hydra.rb",
33
- "lib/hydra/cucumber/formatter.rb",
34
- "lib/hydra/hash.rb",
35
- "lib/hydra/js/lint.js",
36
- "lib/hydra/listener/abstract.rb",
37
- "lib/hydra/listener/minimal_output.rb",
38
- "lib/hydra/listener/notifier.rb",
39
- "lib/hydra/listener/progress_bar.rb",
40
- "lib/hydra/listener/report_generator.rb",
41
- "lib/hydra/master.rb",
42
- "lib/hydra/message.rb",
43
- "lib/hydra/message/master_messages.rb",
44
- "lib/hydra/message/runner_messages.rb",
45
- "lib/hydra/message/worker_messages.rb",
46
- "lib/hydra/messaging_io.rb",
47
- "lib/hydra/pipe.rb",
48
- "lib/hydra/runner.rb",
49
- "lib/hydra/safe_fork.rb",
50
- "lib/hydra/spec/autorun_override.rb",
51
- "lib/hydra/spec/hydra_formatter.rb",
52
- "lib/hydra/ssh.rb",
53
- "lib/hydra/stdio.rb",
54
- "lib/hydra/sync.rb",
55
- "lib/hydra/tasks.rb",
56
- "lib/hydra/tmpdir.rb",
57
- "lib/hydra/trace.rb",
58
- "lib/hydra/worker.rb",
59
- "test/fixtures/assert_true.rb",
60
- "test/fixtures/config.yml",
61
- "test/fixtures/conflicting.rb",
62
- "test/fixtures/features/step_definitions.rb",
63
- "test/fixtures/features/write_alternate_file.feature",
64
- "test/fixtures/features/write_file.feature",
65
- "test/fixtures/hello_world.rb",
66
- "test/fixtures/js_file.js",
67
- "test/fixtures/json_data.json",
68
- "test/fixtures/slow.rb",
69
- "test/fixtures/sync_test.rb",
70
- "test/fixtures/write_file.rb",
71
- "test/fixtures/write_file_alternate_spec.rb",
72
- "test/fixtures/write_file_spec.rb",
73
- "test/fixtures/write_file_with_pending_spec.rb",
74
- "test/master_test.rb",
75
- "test/message_test.rb",
76
- "test/pipe_test.rb",
77
- "test/runner_test.rb",
78
- "test/ssh_test.rb",
79
- "test/sync_test.rb",
80
- "test/test_helper.rb",
81
- "test/worker_test.rb"
82
- ]
83
- s.homepage = %q{http://github.com/ngauthier/hydra}
84
- s.rdoc_options = ["--charset=UTF-8"]
85
- s.require_paths = ["lib"]
86
- s.rubygems_version = %q{1.3.7}
87
- s.summary = %q{Distributed testing toolkit}
88
- s.test_files = [
22
+ "LICENSE",
23
+ "README.rdoc",
24
+ "Rakefile",
25
+ "TODO",
26
+ "VERSION",
27
+ "caliper.yml",
28
+ "hydra-icon-64x64.png",
29
+ "hydra.gemspec",
30
+ "hydra_gray.png",
31
+ "lib/hydra.rb",
32
+ "lib/hydra/cucumber/formatter.rb",
33
+ "lib/hydra/cucumber/partial_html.rb",
34
+ "lib/hydra/hash.rb",
35
+ "lib/hydra/js/lint.js",
36
+ "lib/hydra/listener/abstract.rb",
37
+ "lib/hydra/listener/cucumber.css",
38
+ "lib/hydra/listener/cucumber_html_report.rb",
39
+ "lib/hydra/listener/jquery-min.js",
40
+ "lib/hydra/listener/minimal_output.rb",
41
+ "lib/hydra/listener/notifier.rb",
42
+ "lib/hydra/listener/progress_bar.rb",
43
+ "lib/hydra/listener/report_generator.rb",
44
+ "lib/hydra/master.rb",
45
+ "lib/hydra/message.rb",
46
+ "lib/hydra/message/master_messages.rb",
47
+ "lib/hydra/message/runner_messages.rb",
48
+ "lib/hydra/message/worker_messages.rb",
49
+ "lib/hydra/messaging_io.rb",
50
+ "lib/hydra/pipe.rb",
51
+ "lib/hydra/runner.rb",
52
+ "lib/hydra/runner_listener/abstract.rb",
53
+ "lib/hydra/safe_fork.rb",
54
+ "lib/hydra/spec/autorun_override.rb",
55
+ "lib/hydra/spec/hydra_formatter.rb",
56
+ "lib/hydra/ssh.rb",
57
+ "lib/hydra/stdio.rb",
58
+ "lib/hydra/sync.rb",
59
+ "lib/hydra/tasks.rb",
60
+ "lib/hydra/tmpdir.rb",
61
+ "lib/hydra/trace.rb",
62
+ "lib/hydra/worker.rb",
63
+ "test/fixtures/assert_true.rb",
64
+ "test/fixtures/config.yml",
65
+ "test/fixtures/conflicting.rb",
66
+ "test/fixtures/features/step_definitions.rb",
67
+ "test/fixtures/features/write_alternate_file.feature",
68
+ "test/fixtures/features/write_file.feature",
69
+ "test/fixtures/hello_world.rb",
70
+ "test/fixtures/hydra_worker_init.rb",
71
+ "test/fixtures/js_file.js",
72
+ "test/fixtures/json_data.json",
73
+ "test/fixtures/many_outputs_to_console.rb",
74
+ "test/fixtures/master_listeners.rb",
75
+ "test/fixtures/runner_listeners.rb",
76
+ "test/fixtures/slow.rb",
77
+ "test/fixtures/sync_test.rb",
78
+ "test/fixtures/task_test_config.yml",
79
+ "test/fixtures/write_file.rb",
80
+ "test/fixtures/write_file_alternate_spec.rb",
81
+ "test/fixtures/write_file_spec.rb",
82
+ "test/fixtures/write_file_with_pending_spec.rb",
83
+ "test/master_test.rb",
84
+ "test/message_test.rb",
89
85
  "test/pipe_test.rb",
90
- "test/sync_test.rb",
91
- "test/ssh_test.rb",
92
- "test/fixtures/write_file_alternate_spec.rb",
93
- "test/fixtures/sync_test.rb",
94
- "test/fixtures/hello_world.rb",
95
- "test/fixtures/features/step_definitions.rb",
96
- "test/fixtures/assert_true.rb",
97
- "test/fixtures/slow.rb",
98
- "test/fixtures/write_file_spec.rb",
99
- "test/fixtures/conflicting.rb",
100
- "test/fixtures/write_file_with_pending_spec.rb",
101
- "test/fixtures/write_file.rb",
102
- "test/message_test.rb",
103
- "test/test_helper.rb",
104
- "test/master_test.rb",
105
- "test/runner_test.rb",
106
- "test/worker_test.rb"
86
+ "test/runner_test.rb",
87
+ "test/ssh_test.rb",
88
+ "test/sync_test.rb",
89
+ "test/task_test.rb",
90
+ "test/test_helper.rb",
91
+ "test/worker_test.rb"
107
92
  ]
93
+ s.homepage = "https://github.com/arturopie/hydra"
94
+ s.require_paths = ["lib"]
95
+ s.rubygems_version = "1.8.15"
96
+ s.summary = "Distributed testing toolkit"
108
97
 
109
98
  if s.respond_to? :specification_version then
110
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
111
99
  s.specification_version = 3
112
100
 
113
101
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
@@ -1,10 +1,8 @@
1
1
  require 'hydra/hash'
2
2
  require 'open3'
3
3
  require 'hydra/tmpdir'
4
- require 'hydra/proxy_config'
5
4
  require 'erb'
6
5
  require 'yaml'
7
- require 'hydra/threadsafe_io'
8
6
 
9
7
  module Hydra #:nodoc:
10
8
  # Hydra class responsible for delegate work down to workers.
@@ -36,9 +34,6 @@ module Hydra #:nodoc:
36
34
  # * :autosort
37
35
  # * Set to false to disable automatic sorting by historical run-time per file
38
36
  def initialize(opts = { })
39
-
40
- $stdout = ThreadsafeIO.new($stdout)
41
-
42
37
  opts.stringify_keys!
43
38
  config_file = opts.delete('config') { nil }
44
39
  if config_file
@@ -50,7 +45,7 @@ module Hydra #:nodoc:
50
45
  end
51
46
 
52
47
  begin
53
- config_yml = ProxyConfig.load(config_erb)
48
+ config_yml = YAML::load(config_erb)
54
49
  rescue StandardError => e
55
50
  raise(YmlLoadError,"config file was found, but could not be parsed.\n#{$!.inspect}")
56
51
  end
@@ -227,7 +227,7 @@ module Hydra #:nodoc:
227
227
  }
228
228
  context['reportErrors'] = lambda{|js_errors|
229
229
  js_errors.each do |e|
230
- e = context.instance_variable_get("@to").rb(e)
230
+ e = V8::To.rb(e)
231
231
  errors << "\n\e[1;31mJSLINT: #{file}\e[0m"
232
232
  errors << " Error at line #{e['line'].to_i + 1} " +
233
233
  "character #{e['character'].to_i + 1}: \e[1;33m#{e['reason']}\e[0m"
@@ -60,7 +60,7 @@ module Hydra #:nodoc:
60
60
  opts.stringify_keys!
61
61
  config_file = opts.delete('config') { nil }
62
62
  if config_file
63
- opts.merge!(ProxyConfig.load(IO.read(config_file)).stringify_keys!)
63
+ opts.merge!(YAML.load_file(config_file).stringify_keys!)
64
64
  end
65
65
  @verbose = opts.fetch('verbose') { false }
66
66
  @sync = opts.fetch('sync') { {} }
@@ -2,6 +2,8 @@ require 'open3'
2
2
  module Hydra #:nodoc:
3
3
  # Hydra Task Common attributes and methods
4
4
  class Task
5
+ include Rake::DSL if defined?(Rake::DSL)
6
+
5
7
  # Name of the task. Default 'hydra'
6
8
  attr_accessor :name
7
9
 
@@ -130,6 +132,8 @@ module Hydra #:nodoc:
130
132
 
131
133
  start = Time.now if @show_time
132
134
 
135
+ puts '********************'
136
+ puts @options.inspect
133
137
  master = Hydra::Master.new(@opts)
134
138
 
135
139
  $stdout.puts "\nFinished in #{'%.6f' % (Time.now - start)} seconds." if @show_time
@@ -278,7 +282,7 @@ module Hydra #:nodoc:
278
282
  def define
279
283
  desc "Run #{@name} remotely on all workers"
280
284
  task "hydra:remote:#{@name}" do
281
- config = Hydra::ProxyConfig.load(IO.read(@config))
285
+ config = YAML.load_file(@config)
282
286
  environment = config.fetch('environment') { 'test' }
283
287
  workers = config.fetch('workers') { [] }
284
288
  workers = workers.select{|w| w['type'] == 'ssh'}
@@ -17,11 +17,6 @@ module Hydra #:nodoc:
17
17
  # Checks to ensure we're running verbosely.
18
18
  def trace(str)
19
19
  $stdout.write "#{Time.now.to_f} #{self.class._traceable_prefix}| #{str}\n" if @verbose
20
-
21
- prefix = self.class._traceable_prefix.upcase
22
- unless (prefix == 'MASTER' || prefix == 'SYNC')
23
- $stdout.write "\n"
24
- end
25
20
  end
26
21
  end
27
22
  end
@@ -23,7 +23,14 @@ module Hydra #:nodoc:
23
23
 
24
24
  load_worker_initializer
25
25
 
26
- eval_listeners(opts.fetch(:runner_listeners) { nil })
26
+ @runner_event_listeners = Array(opts.fetch(:runner_listeners) { nil })
27
+
28
+ @runner_event_listeners.select{|l| l.is_a? String}.each do |l|
29
+ @runner_event_listeners.delete_at(@runner_event_listeners.index(l))
30
+ listener = Array.wrap eval(l)
31
+
32
+ @runner_event_listeners << listener[0] if listener[0].is_a?(Hydra::RunnerListener::Abstract)
33
+ end
27
34
 
28
35
  @runner_log_file = opts.fetch(:runner_log_file) { nil }
29
36
 
@@ -38,7 +45,7 @@ module Hydra #:nodoc:
38
45
  def load_worker_initializer
39
46
  if File.exist?('./hydra_worker_init.rb')
40
47
  trace('Requiring hydra_worker_init.rb')
41
- require 'hydra_worker_init'
48
+ require './hydra_worker_init'
42
49
  else
43
50
  trace('hydra_worker_init.rb not present')
44
51
  end
@@ -162,15 +169,5 @@ module Hydra #:nodoc:
162
169
  end
163
170
  return idle_r
164
171
  end
165
-
166
- def eval_listeners runner_listeners
167
- @runner_event_listeners = Array(runner_listeners)
168
- @runner_event_listeners.select{|l| l.is_a? String}.each do |l|
169
- @runner_event_listeners.delete_at(@runner_event_listeners.index(l))
170
- listener = eval(l)
171
- @runner_event_listeners << listener if listener.is_a?(Hydra::RunnerListener::Abstract)
172
- @runner_event_listeners << listener[0] if listener.is_a?(Array) and listener[0].is_a?(Hydra::RunnerListener::Abstract)
173
- end
174
- end
175
172
  end
176
173
  end
metadata CHANGED
@@ -1,24 +1,22 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arturop-hydra
3
3
  version: !ruby/object:Gem::Version
4
- hash: 127
4
+ hash: 123
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 24
8
+ - 25
9
9
  - 0
10
- version: 0.24.0
10
+ version: 0.25.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Nick Gauthier
14
- - Justin Fitzsimmons
15
- - Victor Savkin
16
14
  - Arturo Pie
17
15
  autorequire:
18
16
  bindir: bin
19
17
  cert_chain: []
20
18
 
21
- date: 2012-02-15 00:00:00 Z
19
+ date: 2012-03-08 00:00:00 Z
22
20
  dependencies:
23
21
  - !ruby/object:Gem::Dependency
24
22
  name: shoulda
@@ -62,12 +60,12 @@ dependencies:
62
60
  requirements:
63
61
  - - "="
64
62
  - !ruby/object:Gem::Version
65
- hash: 27
63
+ hash: 63
66
64
  segments:
67
- - 1
68
- - 1
69
- - 4
70
- version: 1.1.4
65
+ - 0
66
+ - 9
67
+ - 2
68
+ version: 0.9.2
71
69
  type: :development
72
70
  version_requirements: *id003
73
71
  - !ruby/object:Gem::Dependency
@@ -78,16 +76,16 @@ dependencies:
78
76
  requirements:
79
77
  - - "="
80
78
  - !ruby/object:Gem::Version
81
- hash: 41
79
+ hash: 11
82
80
  segments:
83
81
  - 0
84
- - 9
85
- - 9
86
- version: 0.9.9
82
+ - 7
83
+ - 4
84
+ version: 0.7.4
87
85
  type: :development
88
86
  version_requirements: *id004
89
87
  description: Spread your tests over multiple machines to test your code faster.
90
- email: arturotd08@yahoo.ca
88
+ email: nick@smartlogicsolutions.com
91
89
  executables: []
92
90
 
93
91
  extensions: []
@@ -103,6 +101,7 @@ files:
103
101
  - Rakefile
104
102
  - TODO
105
103
  - VERSION
104
+ - arturop-hydra.gemspec
106
105
  - caliper.yml
107
106
  - hydra-icon-64x64.png
108
107
  - hydra.gemspec
@@ -127,7 +126,6 @@ files:
127
126
  - lib/hydra/message/worker_messages.rb
128
127
  - lib/hydra/messaging_io.rb
129
128
  - lib/hydra/pipe.rb
130
- - lib/hydra/proxy_config.rb
131
129
  - lib/hydra/runner.rb
132
130
  - lib/hydra/runner_listener/abstract.rb
133
131
  - lib/hydra/safe_fork.rb
@@ -137,13 +135,10 @@ files:
137
135
  - lib/hydra/stdio.rb
138
136
  - lib/hydra/sync.rb
139
137
  - lib/hydra/tasks.rb
140
- - lib/hydra/threadsafe_io.rb
141
138
  - lib/hydra/tmpdir.rb
142
139
  - lib/hydra/trace.rb
143
140
  - lib/hydra/worker.rb
144
- - nulogy-hydra.gemspec
145
141
  - test/fixtures/assert_true.rb
146
- - test/fixtures/bad_proxy_config.yml
147
142
  - test/fixtures/config.yml
148
143
  - test/fixtures/conflicting.rb
149
144
  - test/fixtures/features/step_definitions.rb
@@ -155,8 +150,6 @@ files:
155
150
  - test/fixtures/json_data.json
156
151
  - test/fixtures/many_outputs_to_console.rb
157
152
  - test/fixtures/master_listeners.rb
158
- - test/fixtures/proxy_config.yml
159
- - test/fixtures/proxy_config_http.yml
160
153
  - test/fixtures/runner_listeners.rb
161
154
  - test/fixtures/slow.rb
162
155
  - test/fixtures/sync_test.rb
@@ -168,14 +161,13 @@ files:
168
161
  - test/master_test.rb
169
162
  - test/message_test.rb
170
163
  - test/pipe_test.rb
171
- - test/proxy_config_test.rb
172
164
  - test/runner_test.rb
173
165
  - test/ssh_test.rb
174
166
  - test/sync_test.rb
175
167
  - test/task_test.rb
176
168
  - test/test_helper.rb
177
169
  - test/worker_test.rb
178
- homepage: http://github.com/nulogy/hydra
170
+ homepage: https://github.com/arturopie/hydra
179
171
  licenses: []
180
172
 
181
173
  post_install_message:
@@ -1,27 +0,0 @@
1
- require 'yaml'
2
- require 'net/http'
3
-
4
- module Hydra
5
- class UnknownProxyType < RuntimeError
6
-
7
- end
8
-
9
- class ProxyConfig
10
- def self.load(config_yml)
11
- config = YAML::load(config_yml)
12
- if config.has_key?('proxy')
13
- proxy_info = config['proxy']
14
- #only file supported so far
15
- if proxy_info['type'] == "file"
16
- YAML::load_file(proxy_info['path'])
17
- elsif proxy_info['type'] == "http"
18
- YAML::load(Net::HTTP.get(URI.parse(proxy_info['path'])))
19
- else
20
- raise UnknownProxyType.new("Proxy config file does not know what to do with type '#{proxy_info["type"]}'.")
21
- end
22
- else
23
- config
24
- end
25
- end
26
- end
27
- end
@@ -1,18 +0,0 @@
1
- require 'thread'
2
- require 'fcntl'
3
-
4
- module Hydra
5
- class ThreadsafeIO < IO
6
- def initialize(existing_io)
7
- fd = existing_io.fcntl(Fcntl::F_DUPFD)
8
- super(fd)
9
- @mutex = Mutex.new
10
- end
11
-
12
- def write(*args)
13
- @mutex.synchronize do
14
- super(*args)
15
- end
16
- end
17
- end
18
- end
@@ -1,4 +0,0 @@
1
- ---
2
- proxy:
3
- path: test/fixtures/config.yml
4
- type: fjoeaij
@@ -1,4 +0,0 @@
1
- ---
2
- proxy:
3
- path: test/fixtures/config.yml
4
- type: file
@@ -1,4 +0,0 @@
1
- ---
2
- proxy:
3
- path: http://mocked/url
4
- type: http
@@ -1,31 +0,0 @@
1
- require File.join(File.dirname(__FILE__), 'test_helper')
2
- require 'yaml'
3
- require 'hydra/proxy_config'
4
-
5
- class ProxyConfigTest < Test::Unit::TestCase
6
-
7
- context "proxy config" do
8
- should "fetch and parse yml from a file source" do
9
- assert_equal YAML::load_file("test/fixtures/config.yml"), Hydra::ProxyConfig.load(File.read("test/fixtures/proxy_config.yml"))
10
- end
11
- should "fetch and parse yml from a http source" do
12
- class Net::HTTP
13
- def self.get(path)
14
- return File.new("test/fixtures/config.yml", "r").read
15
- end
16
- end
17
- assert_equal YAML::load_file("test/fixtures/config.yml"), Hydra::ProxyConfig.load(File.read("test/fixtures/proxy_config_http.yml"))
18
- end
19
- should "raise exception when type is unknown" do
20
- assert_raise Hydra::UnknownProxyType do
21
- Hydra::ProxyConfig.load(File.read("test/fixtures/bad_proxy_config.yml"))
22
- end
23
- end
24
- end
25
-
26
- context "normal hydra config" do
27
- should "return unserialized configuration" do
28
- assert_equal YAML::load_file("test/fixtures/config.yml"), Hydra::ProxyConfig.load(File.read("test/fixtures/config.yml"))
29
- end
30
- end
31
- end