simsim 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/Rakefile +1 -1
  2. data/VERSION +1 -1
  3. data/bin/simsim +4 -12
  4. metadata +3 -3
data/Rakefile CHANGED
@@ -10,7 +10,7 @@ begin
10
10
  gem.email = "priteau@gmail.com"
11
11
  gem.homepage = "http://github.com/priteau/simsim"
12
12
  gem.authors = ["Pierre Riteau"]
13
- gem.add_dependency("restfully", '>= 0.3.1')
13
+ gem.add_dependency("restfully", '>= 0.4.1')
14
14
  # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
15
15
  end
16
16
  Jeweler::GemcutterTasks.new
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.2
data/bin/simsim CHANGED
@@ -5,7 +5,6 @@ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
5
5
  require 'erb'
6
6
  require 'optparse'
7
7
  require 'restfully'
8
- require 'yaml'
9
8
 
10
9
  @options = {}
11
10
  option_parser = OptionParser.new do |opts|
@@ -15,7 +14,7 @@ option_parser = OptionParser.new do |opts|
15
14
  @options[:access] = a
16
15
  end
17
16
  opts.on('-c=', '--config=', 'Sets the various options based on a custom YAML configuration file') do |c|
18
- @options[:config] = c
17
+ @options[:configuration_file] = c
19
18
  end
20
19
  opts.on_tail('-h', '--help', 'Show this message') do
21
20
  STDERR.puts opts
@@ -25,25 +24,18 @@ end
25
24
  option_parser.parse!
26
25
 
27
26
  @access_site = @options[:access]
28
- if @access_site.nil? || @options[:config].nil?
27
+ if @access_site.nil? || @options[:configuration_file].nil?
29
28
  STDERR.puts "error: --access and --config options are required"
30
29
  STDERR.puts option_parser
31
30
  exit 1
32
31
  end
33
32
 
34
- if (config_filename = @options.delete(:config)) && File.exists?(File.expand_path(config_filename))
35
- config = YAML.load_file(File.expand_path(config_filename))
36
- @base_uri = config.delete('base_uri') || @base_uri
37
- @root_path = config.delete('root_path') || @root_path
38
- @options.merge!(config)
39
- end
40
-
41
33
  @sites = Hash.new { |hash, key| hash[key] = Array.new }
42
34
 
43
- Restfully::Session.new(@options.merge(:root_path => @root_path, :base_uri => @base_uri)) do |grid, session|
35
+ Restfully::Session.new(@options.merge(:base_uri => @base_uri)) do |grid, session|
44
36
  grid.sites.each do |site|
45
37
  site.clusters.each do |cluster|
46
- @sites[site.uid].push(cluster.uid)
38
+ @sites[site['uid']].push(cluster['uid'])
47
39
  end
48
40
  end
49
41
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simsim
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pierre Riteau
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-10-28 00:00:00 +01:00
12
+ date: 2009-11-16 00:00:00 +01:00
13
13
  default_executable: simsim
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -20,7 +20,7 @@ dependencies:
20
20
  requirements:
21
21
  - - ">="
22
22
  - !ruby/object:Gem::Version
23
- version: 0.3.1
23
+ version: 0.4.1
24
24
  version:
25
25
  description: simsim generates an ssh_config file allowing to easily connect from your workstation to all compute nodes in Grid'5000. Since it is based on an ERB template, the generated ssh_config can be customized at will.
26
26
  email: priteau@gmail.com