cmc-oncilla-wizard 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +17 -0
- data/.rvmrc +2 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +29 -0
- data/Rakefile +1 -0
- data/bin/cmc-oncilla-wizard +5 -0
- data/cmc-oncilla-wizard.gemspec +21 -0
- data/lib/cmc-oncilla-wizard.rb +9 -0
- data/lib/cmc-oncilla-wizard/cli.rb +25 -0
- data/lib/cmc-oncilla-wizard/config.rb +20 -0
- data/lib/cmc-oncilla-wizard/version.rb +7 -0
- data/lib/cmc-oncilla-wizard/wizard.rb +57 -0
- metadata +75 -0
data/.gitignore
ADDED
data/.rvmrc
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2013 Alexandre Tuleu
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# Cmc::Oncilla::Wizard
|
2
|
+
|
3
|
+
Oncilla project wizard for the Computational Motor Control lectures
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
gem 'cmc-oncilla-wizard'
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
$ bundle
|
14
|
+
|
15
|
+
Or install it yourself as:
|
16
|
+
|
17
|
+
$ gem install cmc-oncilla-wizard
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
|
21
|
+
cmc-oncilla-wizard create my_project
|
22
|
+
|
23
|
+
## Contributing
|
24
|
+
|
25
|
+
1. Fork it
|
26
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
27
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
28
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
29
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'cmc-oncilla-wizard/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |gem|
|
7
|
+
gem.name = "cmc-oncilla-wizard"
|
8
|
+
gem.version = Cmc::Oncilla::Wizard::VERSION
|
9
|
+
gem.authors = ["Alexandre Tuleu"]
|
10
|
+
gem.email = ["alexandre.tuleu.2005@polytechnique.org"]
|
11
|
+
gem.description = "Oncilla project wizard for CMC EPFL course"
|
12
|
+
gem.summary = "Oncilla project wizard for CMC EPFL course"
|
13
|
+
gem.homepage = "https://github.com/biorob/cmc-oncilla-wizard"
|
14
|
+
|
15
|
+
gem.add_dependency("thor")
|
16
|
+
|
17
|
+
gem.files = `git ls-files`.split($/)
|
18
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
19
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
20
|
+
gem.require_paths = ["lib"]
|
21
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'cmc-oncilla-wizard/version'
|
2
|
+
require 'cmc-oncilla-wizard/wizard'
|
3
|
+
require 'thor'
|
4
|
+
|
5
|
+
module Cmc
|
6
|
+
module Oncilla
|
7
|
+
module Wizard
|
8
|
+
class Cli < Thor
|
9
|
+
|
10
|
+
|
11
|
+
desc "version" , "print the current version number"
|
12
|
+
def version
|
13
|
+
puts "cmc-oncilla-wizard #{VERSION}"
|
14
|
+
end
|
15
|
+
|
16
|
+
desc "create PATH", "creates a new project directory at PATH"
|
17
|
+
def create path
|
18
|
+
w = Wizard.new
|
19
|
+
w.create path
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module Cmc
|
2
|
+
module Oncilla
|
3
|
+
@MIRROR="http://biorob2.epfl.ch/users/tuleu/ubuntu"
|
4
|
+
@PATH='pool/testing/libo/liboncilla-webots'
|
5
|
+
@VERSION='0.2.0~rc1'
|
6
|
+
|
7
|
+
def self.archive_filename
|
8
|
+
"liboncilla-webots_#{@VERSION}.orig.tar.gz"
|
9
|
+
end
|
10
|
+
|
11
|
+
def self.archive_extracted_name
|
12
|
+
"liboncilla-webots-#{@VERSION}"
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.archive_url
|
16
|
+
"#{@MIRROR}/#{@PATH}/#{self.archive_filename}"
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
require 'cmc-oncilla-wizard/config'
|
2
|
+
|
3
|
+
|
4
|
+
module Cmc
|
5
|
+
module Oncilla
|
6
|
+
module Wizard
|
7
|
+
class Wizard
|
8
|
+
|
9
|
+
def create path
|
10
|
+
|
11
|
+
path = File.expand_path path
|
12
|
+
test_path path
|
13
|
+
|
14
|
+
dir = Dir.mktmpdir
|
15
|
+
Dir.chdir(dir) do
|
16
|
+
create_private path
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
|
21
|
+
private
|
22
|
+
|
23
|
+
def system_raise cmd
|
24
|
+
system cmd
|
25
|
+
raise RuntimeError "'#{cmd}' failed" unless $? == 0
|
26
|
+
end
|
27
|
+
|
28
|
+
def test_path path
|
29
|
+
if File.exists?(path) and not File.directory?(path)
|
30
|
+
raise RuntimeError "#{path} is a file"
|
31
|
+
end
|
32
|
+
if File.directory?(path) && Dir.entries(path).size > 2
|
33
|
+
raise RuntimeError "#{path} is a non-empty dir"
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
def create_private path
|
38
|
+
Dir.mkdir path unless File.directory? path
|
39
|
+
system_raise "wget #{Cmc::Oncilla.archive_url}"
|
40
|
+
system_raise "tar xvf #{Cmc::Oncilla.archive_filename}"
|
41
|
+
subdir=Cmc::Oncilla.archive_extracted_name
|
42
|
+
|
43
|
+
directories=['worlds','plugins','config']
|
44
|
+
directories.each do |d|
|
45
|
+
system_raise "cp -r #{subdir}/webots-data/#{d} #{path}"
|
46
|
+
end
|
47
|
+
|
48
|
+
Dir.chdir File.join(path,'plugins/physics/liboncilla-webots-plugin') do
|
49
|
+
system_raise "make"
|
50
|
+
end
|
51
|
+
|
52
|
+
end
|
53
|
+
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
metadata
ADDED
@@ -0,0 +1,75 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: cmc-oncilla-wizard
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Alexandre Tuleu
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2013-02-20 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: thor
|
16
|
+
requirement: !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: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
30
|
+
description: Oncilla project wizard for CMC EPFL course
|
31
|
+
email:
|
32
|
+
- alexandre.tuleu.2005@polytechnique.org
|
33
|
+
executables:
|
34
|
+
- cmc-oncilla-wizard
|
35
|
+
extensions: []
|
36
|
+
extra_rdoc_files: []
|
37
|
+
files:
|
38
|
+
- .gitignore
|
39
|
+
- .rvmrc
|
40
|
+
- Gemfile
|
41
|
+
- LICENSE.txt
|
42
|
+
- README.md
|
43
|
+
- Rakefile
|
44
|
+
- bin/cmc-oncilla-wizard
|
45
|
+
- cmc-oncilla-wizard.gemspec
|
46
|
+
- lib/cmc-oncilla-wizard.rb
|
47
|
+
- lib/cmc-oncilla-wizard/cli.rb
|
48
|
+
- lib/cmc-oncilla-wizard/config.rb
|
49
|
+
- lib/cmc-oncilla-wizard/version.rb
|
50
|
+
- lib/cmc-oncilla-wizard/wizard.rb
|
51
|
+
homepage: https://github.com/biorob/cmc-oncilla-wizard
|
52
|
+
licenses: []
|
53
|
+
post_install_message:
|
54
|
+
rdoc_options: []
|
55
|
+
require_paths:
|
56
|
+
- lib
|
57
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
58
|
+
none: false
|
59
|
+
requirements:
|
60
|
+
- - ! '>='
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '0'
|
63
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
64
|
+
none: false
|
65
|
+
requirements:
|
66
|
+
- - ! '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
requirements: []
|
70
|
+
rubyforge_project:
|
71
|
+
rubygems_version: 1.8.24
|
72
|
+
signing_key:
|
73
|
+
specification_version: 3
|
74
|
+
summary: Oncilla project wizard for CMC EPFL course
|
75
|
+
test_files: []
|