openvibe-launcher 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ecd080800ee8f4b7320b743de59b3d5b7be42f0d
4
- data.tar.gz: 5e62f9d78f1c939b76f2626fd48cc24607743323
3
+ metadata.gz: 05744b0e6402c0b22fe133519b2ea1e206da0b7f
4
+ data.tar.gz: 5824ca6675a1f31bb4b875de14c13dd1ca1e6eaf
5
5
  SHA512:
6
- metadata.gz: b8bb37e46af52157b97aafdea365c604f6d80e18234c8f03f462eca054d73144d71db50d3446e788a300d164120256414f11bfc4487f359e08b18451af7cc9c2
7
- data.tar.gz: 53c0d0289a7eb98ffc58c198db3aae7811d1ce93e0ec0719ba99cc5bcc73189d41dfc900e281ffbc96e65ea4c185a4432e0d872b1780dc6cb132af27784af536
6
+ metadata.gz: 332a534bdf7b73cb1ffc2e94340826bb48858bbc1da5d81ec8bbd7e0723c493e2ac36381ba317fc6949500032c2f2e5c61e4e0a602c33e679e123f889f80c09e
7
+ data.tar.gz: 4bad1d5f55f0d1056bc804afad17c61b6b79b2196d8cefba451a7a2dee6c5642ea74caecdd55aed9149fbd625132edd072c43e85469a9c3a0e72de903e13588a
data/.document CHANGED
@@ -1,5 +1,5 @@
1
- lib/**/*.rb
2
- bin/*
3
- -
4
- features/**/*.feature
5
- LICENSE.txt
1
+ lib/**/*.rb
2
+ bin/*
3
+ -
4
+ features/**/*.feature
5
+ LICENSE.txt
data/Gemfile CHANGED
@@ -1,13 +1,13 @@
1
- source "http://rubygems.org"
2
- # Add dependencies required to use your gem here.
3
- # Example:
4
- # gem "activesupport", ">= 2.3.5"
5
-
6
- # Add dependencies to develop your gem here.
7
- # Include everything needed to run rake, tests, features, etc.
8
- group :development do
9
- gem "shoulda", ">= 0"
10
- gem "rdoc", "~> 3.12"
11
- gem "bundler", ">= 1.0.0"
12
- gem "jeweler", "~> 1.8.4"
13
- end
1
+ source "http://rubygems.org"
2
+ # Add dependencies required to use your gem here.
3
+ # Example:
4
+ # gem "activesupport", ">= 2.3.5"
5
+
6
+ # Add dependencies to develop your gem here.
7
+ # Include everything needed to run rake, tests, features, etc.
8
+ group :development do
9
+ gem "shoulda", ">= 0"
10
+ gem "rdoc", "~> 3.12"
11
+ gem "bundler", ">= 1.0.0"
12
+ gem "jeweler", "~> 1.8.4"
13
+ end
@@ -1,165 +1,165 @@
1
- GNU LESSER GENERAL PUBLIC LICENSE
2
- Version 3, 29 June 2007
3
-
4
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
5
- Everyone is permitted to copy and distribute verbatim copies
6
- of this license document, but changing it is not allowed.
7
-
8
-
9
- This version of the GNU Lesser General Public License incorporates
10
- the terms and conditions of version 3 of the GNU General Public
11
- License, supplemented by the additional permissions listed below.
12
-
13
- 0. Additional Definitions.
14
-
15
- As used herein, "this License" refers to version 3 of the GNU Lesser
16
- General Public License, and the "GNU GPL" refers to version 3 of the GNU
17
- General Public License.
18
-
19
- "The Library" refers to a covered work governed by this License,
20
- other than an Application or a Combined Work as defined below.
21
-
22
- An "Application" is any work that makes use of an interface provided
23
- by the Library, but which is not otherwise based on the Library.
24
- Defining a subclass of a class defined by the Library is deemed a mode
25
- of using an interface provided by the Library.
26
-
27
- A "Combined Work" is a work produced by combining or linking an
28
- Application with the Library. The particular version of the Library
29
- with which the Combined Work was made is also called the "Linked
30
- Version".
31
-
32
- The "Minimal Corresponding Source" for a Combined Work means the
33
- Corresponding Source for the Combined Work, excluding any source code
34
- for portions of the Combined Work that, considered in isolation, are
35
- based on the Application, and not on the Linked Version.
36
-
37
- The "Corresponding Application Code" for a Combined Work means the
38
- object code and/or source code for the Application, including any data
39
- and utility programs needed for reproducing the Combined Work from the
40
- Application, but excluding the System Libraries of the Combined Work.
41
-
42
- 1. Exception to Section 3 of the GNU GPL.
43
-
44
- You may convey a covered work under sections 3 and 4 of this License
45
- without being bound by section 3 of the GNU GPL.
46
-
47
- 2. Conveying Modified Versions.
48
-
49
- If you modify a copy of the Library, and, in your modifications, a
50
- facility refers to a function or data to be supplied by an Application
51
- that uses the facility (other than as an argument passed when the
52
- facility is invoked), then you may convey a copy of the modified
53
- version:
54
-
55
- a) under this License, provided that you make a good faith effort to
56
- ensure that, in the event an Application does not supply the
57
- function or data, the facility still operates, and performs
58
- whatever part of its purpose remains meaningful, or
59
-
60
- b) under the GNU GPL, with none of the additional permissions of
61
- this License applicable to that copy.
62
-
63
- 3. Object Code Incorporating Material from Library Header Files.
64
-
65
- The object code form of an Application may incorporate material from
66
- a header file that is part of the Library. You may convey such object
67
- code under terms of your choice, provided that, if the incorporated
68
- material is not limited to numerical parameters, data structure
69
- layouts and accessors, or small macros, inline functions and templates
70
- (ten or fewer lines in length), you do both of the following:
71
-
72
- a) Give prominent notice with each copy of the object code that the
73
- Library is used in it and that the Library and its use are
74
- covered by this License.
75
-
76
- b) Accompany the object code with a copy of the GNU GPL and this license
77
- document.
78
-
79
- 4. Combined Works.
80
-
81
- You may convey a Combined Work under terms of your choice that,
82
- taken together, effectively do not restrict modification of the
83
- portions of the Library contained in the Combined Work and reverse
84
- engineering for debugging such modifications, if you also do each of
85
- the following:
86
-
87
- a) Give prominent notice with each copy of the Combined Work that
88
- the Library is used in it and that the Library and its use are
89
- covered by this License.
90
-
91
- b) Accompany the Combined Work with a copy of the GNU GPL and this license
92
- document.
93
-
94
- c) For a Combined Work that displays copyright notices during
95
- execution, include the copyright notice for the Library among
96
- these notices, as well as a reference directing the user to the
97
- copies of the GNU GPL and this license document.
98
-
99
- d) Do one of the following:
100
-
101
- 0) Convey the Minimal Corresponding Source under the terms of this
102
- License, and the Corresponding Application Code in a form
103
- suitable for, and under terms that permit, the user to
104
- recombine or relink the Application with a modified version of
105
- the Linked Version to produce a modified Combined Work, in the
106
- manner specified by section 6 of the GNU GPL for conveying
107
- Corresponding Source.
108
-
109
- 1) Use a suitable shared library mechanism for linking with the
110
- Library. A suitable mechanism is one that (a) uses at run time
111
- a copy of the Library already present on the user's computer
112
- system, and (b) will operate properly with a modified version
113
- of the Library that is interface-compatible with the Linked
114
- Version.
115
-
116
- e) Provide Installation Information, but only if you would otherwise
117
- be required to provide such information under section 6 of the
118
- GNU GPL, and only to the extent that such information is
119
- necessary to install and execute a modified version of the
120
- Combined Work produced by recombining or relinking the
121
- Application with a modified version of the Linked Version. (If
122
- you use option 4d0, the Installation Information must accompany
123
- the Minimal Corresponding Source and Corresponding Application
124
- Code. If you use option 4d1, you must provide the Installation
125
- Information in the manner specified by section 6 of the GNU GPL
126
- for conveying Corresponding Source.)
127
-
128
- 5. Combined Libraries.
129
-
130
- You may place library facilities that are a work based on the
131
- Library side by side in a single library together with other library
132
- facilities that are not Applications and are not covered by this
133
- License, and convey such a combined library under terms of your
134
- choice, if you do both of the following:
135
-
136
- a) Accompany the combined library with a copy of the same work based
137
- on the Library, uncombined with any other library facilities,
138
- conveyed under the terms of this License.
139
-
140
- b) Give prominent notice with the combined library that part of it
141
- is a work based on the Library, and explaining where to find the
142
- accompanying uncombined form of the same work.
143
-
144
- 6. Revised Versions of the GNU Lesser General Public License.
145
-
146
- The Free Software Foundation may publish revised and/or new versions
147
- of the GNU Lesser General Public License from time to time. Such new
148
- versions will be similar in spirit to the present version, but may
149
- differ in detail to address new problems or concerns.
150
-
151
- Each version is given a distinguishing version number. If the
152
- Library as you received it specifies that a certain numbered version
153
- of the GNU Lesser General Public License "or any later version"
154
- applies to it, you have the option of following the terms and
155
- conditions either of that published version or of any later version
156
- published by the Free Software Foundation. If the Library as you
157
- received it does not specify a version number of the GNU Lesser
158
- General Public License, you may choose any version of the GNU Lesser
159
- General Public License ever published by the Free Software Foundation.
160
-
161
- If the Library as you received it specifies that a proxy can decide
162
- whether future versions of the GNU Lesser General Public License shall
163
- apply, that proxy's public statement of acceptance of any version is
164
- permanent authorization for you to choose that version for the
165
- Library.
1
+ GNU LESSER GENERAL PUBLIC LICENSE
2
+ Version 3, 29 June 2007
3
+
4
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
5
+ Everyone is permitted to copy and distribute verbatim copies
6
+ of this license document, but changing it is not allowed.
7
+
8
+
9
+ This version of the GNU Lesser General Public License incorporates
10
+ the terms and conditions of version 3 of the GNU General Public
11
+ License, supplemented by the additional permissions listed below.
12
+
13
+ 0. Additional Definitions.
14
+
15
+ As used herein, "this License" refers to version 3 of the GNU Lesser
16
+ General Public License, and the "GNU GPL" refers to version 3 of the GNU
17
+ General Public License.
18
+
19
+ "The Library" refers to a covered work governed by this License,
20
+ other than an Application or a Combined Work as defined below.
21
+
22
+ An "Application" is any work that makes use of an interface provided
23
+ by the Library, but which is not otherwise based on the Library.
24
+ Defining a subclass of a class defined by the Library is deemed a mode
25
+ of using an interface provided by the Library.
26
+
27
+ A "Combined Work" is a work produced by combining or linking an
28
+ Application with the Library. The particular version of the Library
29
+ with which the Combined Work was made is also called the "Linked
30
+ Version".
31
+
32
+ The "Minimal Corresponding Source" for a Combined Work means the
33
+ Corresponding Source for the Combined Work, excluding any source code
34
+ for portions of the Combined Work that, considered in isolation, are
35
+ based on the Application, and not on the Linked Version.
36
+
37
+ The "Corresponding Application Code" for a Combined Work means the
38
+ object code and/or source code for the Application, including any data
39
+ and utility programs needed for reproducing the Combined Work from the
40
+ Application, but excluding the System Libraries of the Combined Work.
41
+
42
+ 1. Exception to Section 3 of the GNU GPL.
43
+
44
+ You may convey a covered work under sections 3 and 4 of this License
45
+ without being bound by section 3 of the GNU GPL.
46
+
47
+ 2. Conveying Modified Versions.
48
+
49
+ If you modify a copy of the Library, and, in your modifications, a
50
+ facility refers to a function or data to be supplied by an Application
51
+ that uses the facility (other than as an argument passed when the
52
+ facility is invoked), then you may convey a copy of the modified
53
+ version:
54
+
55
+ a) under this License, provided that you make a good faith effort to
56
+ ensure that, in the event an Application does not supply the
57
+ function or data, the facility still operates, and performs
58
+ whatever part of its purpose remains meaningful, or
59
+
60
+ b) under the GNU GPL, with none of the additional permissions of
61
+ this License applicable to that copy.
62
+
63
+ 3. Object Code Incorporating Material from Library Header Files.
64
+
65
+ The object code form of an Application may incorporate material from
66
+ a header file that is part of the Library. You may convey such object
67
+ code under terms of your choice, provided that, if the incorporated
68
+ material is not limited to numerical parameters, data structure
69
+ layouts and accessors, or small macros, inline functions and templates
70
+ (ten or fewer lines in length), you do both of the following:
71
+
72
+ a) Give prominent notice with each copy of the object code that the
73
+ Library is used in it and that the Library and its use are
74
+ covered by this License.
75
+
76
+ b) Accompany the object code with a copy of the GNU GPL and this license
77
+ document.
78
+
79
+ 4. Combined Works.
80
+
81
+ You may convey a Combined Work under terms of your choice that,
82
+ taken together, effectively do not restrict modification of the
83
+ portions of the Library contained in the Combined Work and reverse
84
+ engineering for debugging such modifications, if you also do each of
85
+ the following:
86
+
87
+ a) Give prominent notice with each copy of the Combined Work that
88
+ the Library is used in it and that the Library and its use are
89
+ covered by this License.
90
+
91
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
92
+ document.
93
+
94
+ c) For a Combined Work that displays copyright notices during
95
+ execution, include the copyright notice for the Library among
96
+ these notices, as well as a reference directing the user to the
97
+ copies of the GNU GPL and this license document.
98
+
99
+ d) Do one of the following:
100
+
101
+ 0) Convey the Minimal Corresponding Source under the terms of this
102
+ License, and the Corresponding Application Code in a form
103
+ suitable for, and under terms that permit, the user to
104
+ recombine or relink the Application with a modified version of
105
+ the Linked Version to produce a modified Combined Work, in the
106
+ manner specified by section 6 of the GNU GPL for conveying
107
+ Corresponding Source.
108
+
109
+ 1) Use a suitable shared library mechanism for linking with the
110
+ Library. A suitable mechanism is one that (a) uses at run time
111
+ a copy of the Library already present on the user's computer
112
+ system, and (b) will operate properly with a modified version
113
+ of the Library that is interface-compatible with the Linked
114
+ Version.
115
+
116
+ e) Provide Installation Information, but only if you would otherwise
117
+ be required to provide such information under section 6 of the
118
+ GNU GPL, and only to the extent that such information is
119
+ necessary to install and execute a modified version of the
120
+ Combined Work produced by recombining or relinking the
121
+ Application with a modified version of the Linked Version. (If
122
+ you use option 4d0, the Installation Information must accompany
123
+ the Minimal Corresponding Source and Corresponding Application
124
+ Code. If you use option 4d1, you must provide the Installation
125
+ Information in the manner specified by section 6 of the GNU GPL
126
+ for conveying Corresponding Source.)
127
+
128
+ 5. Combined Libraries.
129
+
130
+ You may place library facilities that are a work based on the
131
+ Library side by side in a single library together with other library
132
+ facilities that are not Applications and are not covered by this
133
+ License, and convey such a combined library under terms of your
134
+ choice, if you do both of the following:
135
+
136
+ a) Accompany the combined library with a copy of the same work based
137
+ on the Library, uncombined with any other library facilities,
138
+ conveyed under the terms of this License.
139
+
140
+ b) Give prominent notice with the combined library that part of it
141
+ is a work based on the Library, and explaining where to find the
142
+ accompanying uncombined form of the same work.
143
+
144
+ 6. Revised Versions of the GNU Lesser General Public License.
145
+
146
+ The Free Software Foundation may publish revised and/or new versions
147
+ of the GNU Lesser General Public License from time to time. Such new
148
+ versions will be similar in spirit to the present version, but may
149
+ differ in detail to address new problems or concerns.
150
+
151
+ Each version is given a distinguishing version number. If the
152
+ Library as you received it specifies that a certain numbered version
153
+ of the GNU Lesser General Public License "or any later version"
154
+ applies to it, you have the option of following the terms and
155
+ conditions either of that published version or of any later version
156
+ published by the Free Software Foundation. If the Library as you
157
+ received it does not specify a version number of the GNU Lesser
158
+ General Public License, you may choose any version of the GNU Lesser
159
+ General Public License ever published by the Free Software Foundation.
160
+
161
+ If the Library as you received it specifies that a proxy can decide
162
+ whether future versions of the GNU Lesser General Public License shall
163
+ apply, that proxy's public statement of acceptance of any version is
164
+ permanent authorization for you to choose that version for the
165
+ Library.
data/README.md CHANGED
@@ -1,49 +1,49 @@
1
- # openvibe-launcher
2
-
3
- A launcher for openvibe, in ruby
4
-
5
- ### installation
6
-
7
- ```
8
- gem install openvibe-launcher
9
- ```
10
-
11
- ### usage
12
-
13
- ```ruby
14
- require 'openvibe-launcher'
15
-
16
- DESIGNER_PATH = "..." # path to the designer
17
- SCENARIO_PATH = "..." # path to the scenario
18
- MODE = "--play-fast" # optional
19
- OPTIONS = ["--no-gui","--no-session-management"] # optional
20
-
21
- openvibe = Openvibe::Launcher.new(DESIGNER_PATH,SCENARIO_PATH,MODE,OPTIONS)
22
-
23
- openvibe.start
24
- ```
25
- with MODE a string:
26
-
27
- * `--open`, by default
28
- * `--play`
29
- * `--play-fast`
30
-
31
- and OPTIONS an Array containing:
32
-
33
- * `--no-gui`
34
- * `--no-session-management`
35
-
36
- ## Contributing to openvibe-launcher
37
-
38
- * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
39
- * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
40
- * Fork the project.
41
- * Start a feature/bugfix branch.
42
- * Commit and push until you are happy with your contribution.
43
- * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
44
- * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
45
-
46
- ## Copyright
47
-
48
- Copyright (c) 2012 Alexandre Barachant. See LICENSE.txt for
49
- further details.
1
+ # openvibe-launcher
2
+
3
+ A launcher for openvibe, in ruby
4
+
5
+ ### installation
6
+
7
+ ```
8
+ gem install openvibe-launcher
9
+ ```
10
+
11
+ ### usage
12
+
13
+ ```ruby
14
+ require 'openvibe-launcher'
15
+
16
+ DESIGNER_PATH = "..." # path to the designer
17
+ SCENARIO_PATH = "..." # path to the scenario
18
+ MODE = "--play-fast" # optional
19
+ OPTIONS = ["--no-gui","--no-session-management"] # optional
20
+
21
+ openvibe = Openvibe::Launcher.new(DESIGNER_PATH,SCENARIO_PATH,MODE,OPTIONS)
22
+
23
+ openvibe.start
24
+ ```
25
+ with MODE a string:
26
+
27
+ * `--open`, by default
28
+ * `--play`
29
+ * `--play-fast`
30
+
31
+ and OPTIONS an Array containing:
32
+
33
+ * `--no-gui`
34
+ * `--no-session-management`
35
+
36
+ ## Contributing to openvibe-launcher
37
+
38
+ * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
39
+ * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
40
+ * Fork the project.
41
+ * Start a feature/bugfix branch.
42
+ * Commit and push until you are happy with your contribution.
43
+ * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
44
+ * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
45
+
46
+ ## Copyright
47
+
48
+ Copyright (c) 2012 Alexandre Barachant. See LICENSE.txt for
49
+ further details.
data/Rakefile CHANGED
@@ -1,47 +1,47 @@
1
- # encoding: utf-8
2
-
3
- require 'rubygems'
4
- require 'bundler'
5
- begin
6
- Bundler.setup(:default, :development)
7
- rescue Bundler::BundlerError => e
8
- $stderr.puts e.message
9
- $stderr.puts "Run `bundle install` to install missing gems"
10
- exit e.status_code
11
- end
12
-
13
- require 'rake'
14
-
15
- require 'jeweler'
16
- Jeweler::Tasks.new do |gem|
17
- # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
18
- gem.name = "openvibe-launcher"
19
- gem.homepage = "http://github.com/alexandrebarachant/openvibe-launcher"
20
- gem.license = "LGPL"
21
- gem.summary = %Q{launch openvibe designer}
22
- gem.description = %Q{A way to launch the openvibe designer in ruby}
23
- gem.email = "alexandre.barachant@gmail.com"
24
- gem.authors = ["Alexandre Barachant"]
25
- # dependencies defined in Gemfile
26
- end
27
- Jeweler::RubygemsDotOrgTasks.new
28
-
29
- require 'rake/testtask'
30
- Rake::TestTask.new(:test) do |test|
31
- test.libs << 'lib' << 'test'
32
- test.pattern = 'test/**/test_*.rb'
33
- test.verbose = true
34
- end
35
-
36
-
37
- task :default => :test
38
-
39
- require 'rdoc/task'
40
- Rake::RDocTask.new do |rdoc|
41
- version = File.exist?('VERSION') ? File.read('VERSION') : ""
42
-
43
- rdoc.rdoc_dir = 'rdoc'
44
- rdoc.title = "openvibe-launcher #{version}"
45
- rdoc.rdoc_files.include('README*')
46
- rdoc.rdoc_files.include('lib/**/*.rb')
47
- end
1
+ # encoding: utf-8
2
+
3
+ require 'rubygems'
4
+ require 'bundler'
5
+ begin
6
+ Bundler.setup(:default, :development)
7
+ rescue Bundler::BundlerError => e
8
+ $stderr.puts e.message
9
+ $stderr.puts "Run `bundle install` to install missing gems"
10
+ exit e.status_code
11
+ end
12
+
13
+ require 'rake'
14
+
15
+ require 'jeweler'
16
+ Jeweler::Tasks.new do |gem|
17
+ # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
18
+ gem.name = "openvibe-launcher"
19
+ gem.homepage = "http://github.com/alexandrebarachant/openvibe-launcher"
20
+ gem.license = "LGPL"
21
+ gem.summary = %Q{launch openvibe designer}
22
+ gem.description = %Q{A way to launch the openvibe designer in ruby}
23
+ gem.email = "alexandre.barachant@gmail.com"
24
+ gem.authors = ["Alexandre Barachant"]
25
+ # dependencies defined in Gemfile
26
+ end
27
+ Jeweler::RubygemsDotOrgTasks.new
28
+
29
+ require 'rake/testtask'
30
+ Rake::TestTask.new(:test) do |test|
31
+ test.libs << 'lib' << 'test'
32
+ test.pattern = 'test/**/test_*.rb'
33
+ test.verbose = true
34
+ end
35
+
36
+
37
+ task :default => :test
38
+
39
+ require 'rdoc/task'
40
+ Rake::RDocTask.new do |rdoc|
41
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
42
+
43
+ rdoc.rdoc_dir = 'rdoc'
44
+ rdoc.title = "openvibe-launcher #{version}"
45
+ rdoc.rdoc_files.include('README*')
46
+ rdoc.rdoc_files.include('lib/**/*.rb')
47
+ end
@@ -1,108 +1,112 @@
1
- # This file is part of Openvibe launcher.
2
- #
3
- # Openvibe launcher is free software: you can redistribute it and/or
4
- # modify it under the terms of the GNU LESSER General Public License
5
- # as published by the Free Software Foundation, either version 3 of
6
- # the License, or (at your option) any later version.
7
- #
8
- # Openvibe launcher is distributed in the hope that it will be useful,
9
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
- # GNU LESSER General Public License for more details.
12
- #
13
- # You should have received a copy of the GNU LESSER General Public License
14
- # along with Openvibe launcher. If not, see <http://www.gnu.org/licenses/>
15
-
16
- module Openvibe
17
- attr_reader :mode, :scenario, :options
18
- class Launcher
19
-
20
- def initialize(designer_path, scenario_ , mode_ = "--open", options_ = [""])
21
-
22
- # check if designer script exists
23
- if File.exists?(designer_path)
24
- @path = designer_path
25
- else
26
- Error.critical("Designer script #{designer_path} not found")
27
- end
28
-
29
- @options = Array.new
30
-
31
- # add scenario, mode and options
32
- self.scenario= scenario_
33
- self.mode= mode_
34
- self.options= options_
35
-
36
- end
37
-
38
- def start
39
- self.start!
40
- Process.waitpid(@pid)
41
- end
42
-
43
- def start!
44
- dir = File.dirname(@path)
45
- command = "#{@path} #{@mode} #{@scenario} #{@options.join(' ')}"
46
- @pid = spawn(@env || {},command,:out=> @out || STDOUT,:chdir => dir )
47
- Process.detach(@pid)
48
- end
49
-
50
- def play
51
- @mode = "--play"
52
- self.start
53
- end
54
-
55
- def playfast
56
- @mode = "--play-fast"
57
- self.start
58
- end
59
-
60
- def setEnv(hash)
61
- @env = hash
62
- end
63
-
64
- def setOutput(str)
65
- @out = str
66
- end
67
-
68
- # scenario accessor
69
- def scenario=(sc)
70
- if File.exists?(sc)
71
- @scenario = sc
72
- else
73
- Error.critical("Scenario File #{sc} not found")
74
- end
75
- end
76
-
77
- #mode accessor
78
- def mode=(mode)
79
- allowedmode = ["--open","--play","--play-fast"]
80
- if allowedmode.include?(mode)
81
- @mode = mode
82
- else
83
- Error.critical("mode #{mode} not allowed ! Choose one of the following : #{allowedmode.join(' , ')}.")
84
- end
85
- end
86
-
87
- #options accessor
88
- def options=(opt)
89
- allowedopt = ["--no-gui","--no-session-management",""]
90
- opt.each do |o|
91
- if allowedopt.include?(o)
92
- @options.push(o)
93
- else
94
- Error.critical("Option #{o} not allowed ! Choose one of the following : #{allowedopt.join(' , ')}.")
95
- end
96
- end
97
- end
98
-
99
- end
100
-
101
- class Error
102
- def self.critical(msg)
103
- puts msg
104
- Process.exit(0)
105
- end
106
- end
107
-
108
- end
1
+ # This file is part of Openvibe launcher.
2
+ #
3
+ # Openvibe launcher is free software: you can redistribute it and/or
4
+ # modify it under the terms of the GNU LESSER General Public License
5
+ # as published by the Free Software Foundation, either version 3 of
6
+ # the License, or (at your option) any later version.
7
+ #
8
+ # Openvibe launcher is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
+ # GNU LESSER General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU LESSER General Public License
14
+ # along with Openvibe launcher. If not, see <http://www.gnu.org/licenses/>
15
+
16
+ module Openvibe
17
+ attr_reader :mode, :scenario, :options
18
+ class Launcher
19
+
20
+ def initialize(designer_path, scenario_ , mode_ = "--open", options_ = [""])
21
+
22
+ # check if designer script exists
23
+ if File.exists?(designer_path)
24
+ @path = designer_path
25
+ else
26
+ Error.critical("Designer script #{designer_path} not found")
27
+ end
28
+
29
+ @options = Array.new
30
+ @prefix = nil
31
+ # add scenario, mode and options
32
+ self.scenario= scenario_
33
+ self.mode= mode_
34
+ self.options= options_
35
+
36
+ end
37
+
38
+ def start
39
+ self.start!
40
+ Process.waitpid(@pid)
41
+ end
42
+
43
+ def start!
44
+ dir = File.dirname(@path)
45
+ command = "#{@prefix} #{@path} #{@mode} #{@scenario} #{@options.join(' ')}"
46
+ @pid = spawn(@env || {},command,:out=> @out || STDOUT,:chdir => dir )
47
+ Process.detach(@pid)
48
+ end
49
+
50
+ def play
51
+ @mode = "--play"
52
+ self.start
53
+ end
54
+
55
+ def playfast
56
+ @mode = "--play-fast"
57
+ self.start
58
+ end
59
+
60
+ def setEnv(hash)
61
+ @env = hash
62
+ end
63
+
64
+ def setOutput(str)
65
+ @out = str
66
+ end
67
+
68
+ def setPrefix(str)
69
+ @prefix = str
70
+ end
71
+
72
+ # scenario accessor
73
+ def scenario=(sc)
74
+ if File.exists?(sc)
75
+ @scenario = sc
76
+ else
77
+ Error.critical("Scenario File #{sc} not found")
78
+ end
79
+ end
80
+
81
+ #mode accessor
82
+ def mode=(mode)
83
+ allowedmode = ["--open","--play","--play-fast"]
84
+ if allowedmode.include?(mode)
85
+ @mode = mode
86
+ else
87
+ Error.critical("mode #{mode} not allowed ! Choose one of the following : #{allowedmode.join(' , ')}.")
88
+ end
89
+ end
90
+
91
+ #options accessor
92
+ def options=(opt)
93
+ allowedopt = ["--no-gui","--no-session-management",""]
94
+ opt.each do |o|
95
+ if allowedopt.include?(o)
96
+ @options.push(o)
97
+ else
98
+ Error.critical("Option #{o} not allowed ! Choose one of the following : #{allowedopt.join(' , ')}.")
99
+ end
100
+ end
101
+ end
102
+
103
+ end
104
+
105
+ class Error
106
+ def self.critical(msg)
107
+ puts msg
108
+ Process.exit(0)
109
+ end
110
+ end
111
+
112
+ end
@@ -1,58 +1,58 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
- # -*- encoding: utf-8 -*-
5
-
6
- Gem::Specification.new do |s|
7
- s.name = "openvibe-launcher"
8
- s.version = "0.1.3"
9
-
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Alexandre Barachant"]
12
- s.date = "2015-05-05"
13
- s.description = "A way to launch the openvibe designer in ruby"
14
- s.email = "alexandre.barachant@gmail.com"
15
- s.extra_rdoc_files = [
16
- "LICENSE.txt",
17
- "README.md"
18
- ]
19
- s.files = [
20
- ".document",
21
- "Gemfile",
22
- "LICENSE.txt",
23
- "README.md",
24
- "Rakefile",
25
- "VERSION",
26
- "lib/openvibe-launcher.rb",
27
- "openvibe-launcher.gemspec",
28
- "test/helper.rb",
29
- "test/test_openvibe-launcher.rb"
30
- ]
31
- s.homepage = "http://github.com/alexandrebarachant/openvibe-launcher"
32
- s.licenses = ["LGPL"]
33
- s.require_paths = ["lib"]
34
- s.rubygems_version = "1.8.23"
35
- s.summary = "launch openvibe designer"
36
-
37
- if s.respond_to? :specification_version then
38
- s.specification_version = 3
39
-
40
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
41
- s.add_development_dependency(%q<shoulda>, [">= 0"])
42
- s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
43
- s.add_development_dependency(%q<bundler>, [">= 1.0.0"])
44
- s.add_development_dependency(%q<jeweler>, ["~> 1.8.4"])
45
- else
46
- s.add_dependency(%q<shoulda>, [">= 0"])
47
- s.add_dependency(%q<rdoc>, ["~> 3.12"])
48
- s.add_dependency(%q<bundler>, [">= 1.0.0"])
49
- s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
50
- end
51
- else
52
- s.add_dependency(%q<shoulda>, [">= 0"])
53
- s.add_dependency(%q<rdoc>, ["~> 3.12"])
54
- s.add_dependency(%q<bundler>, [">= 1.0.0"])
55
- s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
56
- end
57
- end
58
-
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = "openvibe-launcher"
8
+ s.version = "0.1.4"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Alexandre Barachant"]
12
+ s.date = "2015-05-05"
13
+ s.description = "A way to launch the openvibe designer in ruby"
14
+ s.email = "alexandre.barachant@gmail.com"
15
+ s.extra_rdoc_files = [
16
+ "LICENSE.txt",
17
+ "README.md"
18
+ ]
19
+ s.files = [
20
+ ".document",
21
+ "Gemfile",
22
+ "LICENSE.txt",
23
+ "README.md",
24
+ "Rakefile",
25
+ "VERSION",
26
+ "lib/openvibe-launcher.rb",
27
+ "openvibe-launcher.gemspec",
28
+ "test/helper.rb",
29
+ "test/test_openvibe-launcher.rb"
30
+ ]
31
+ s.homepage = "http://github.com/alexandrebarachant/openvibe-launcher"
32
+ s.licenses = ["LGPL"]
33
+ s.require_paths = ["lib"]
34
+ s.rubygems_version = "1.8.23"
35
+ s.summary = "launch openvibe designer"
36
+
37
+ if s.respond_to? :specification_version then
38
+ s.specification_version = 3
39
+
40
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
41
+ s.add_development_dependency(%q<shoulda>, [">= 0"])
42
+ s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
43
+ s.add_development_dependency(%q<bundler>, [">= 1.0.0"])
44
+ s.add_development_dependency(%q<jeweler>, ["~> 1.8.4"])
45
+ else
46
+ s.add_dependency(%q<shoulda>, [">= 0"])
47
+ s.add_dependency(%q<rdoc>, ["~> 3.12"])
48
+ s.add_dependency(%q<bundler>, [">= 1.0.0"])
49
+ s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
50
+ end
51
+ else
52
+ s.add_dependency(%q<shoulda>, [">= 0"])
53
+ s.add_dependency(%q<rdoc>, ["~> 3.12"])
54
+ s.add_dependency(%q<bundler>, [">= 1.0.0"])
55
+ s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
56
+ end
57
+ end
58
+
@@ -1,18 +1,18 @@
1
- require 'rubygems'
2
- require 'bundler'
3
- begin
4
- Bundler.setup(:default, :development)
5
- rescue Bundler::BundlerError => e
6
- $stderr.puts e.message
7
- $stderr.puts "Run `bundle install` to install missing gems"
8
- exit e.status_code
9
- end
10
- require 'test/unit'
11
- require 'shoulda'
12
-
13
- $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
14
- $LOAD_PATH.unshift(File.dirname(__FILE__))
15
- require 'openvibe-launcher'
16
-
17
- class Test::Unit::TestCase
18
- end
1
+ require 'rubygems'
2
+ require 'bundler'
3
+ begin
4
+ Bundler.setup(:default, :development)
5
+ rescue Bundler::BundlerError => e
6
+ $stderr.puts e.message
7
+ $stderr.puts "Run `bundle install` to install missing gems"
8
+ exit e.status_code
9
+ end
10
+ require 'test/unit'
11
+ require 'shoulda'
12
+
13
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
14
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
15
+ require 'openvibe-launcher'
16
+
17
+ class Test::Unit::TestCase
18
+ end
@@ -1,7 +1,7 @@
1
- require 'helper'
2
-
3
- class TestOpenvibeLauncher < Test::Unit::TestCase
4
- should "probably rename this file and start testing for real" do
5
- flunk "hey buddy, you should probably rename this file and start testing for real"
6
- end
7
- end
1
+ require 'helper'
2
+
3
+ class TestOpenvibeLauncher < Test::Unit::TestCase
4
+ should "probably rename this file and start testing for real" do
5
+ flunk "hey buddy, you should probably rename this file and start testing for real"
6
+ end
7
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openvibe-launcher
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexandre Barachant
@@ -14,56 +14,56 @@ dependencies:
14
14
  name: shoulda
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rdoc
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '3.12'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '3.12'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: 1.0.0
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: 1.0.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: jeweler
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: 1.8.4
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ~>
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: 1.8.4
69
69
  description: A way to launch the openvibe designer in ruby
@@ -74,7 +74,7 @@ extra_rdoc_files:
74
74
  - LICENSE.txt
75
75
  - README.md
76
76
  files:
77
- - .document
77
+ - ".document"
78
78
  - Gemfile
79
79
  - LICENSE.txt
80
80
  - README.md
@@ -94,17 +94,17 @@ require_paths:
94
94
  - lib
95
95
  required_ruby_version: !ruby/object:Gem::Requirement
96
96
  requirements:
97
- - - '>='
97
+ - - ">="
98
98
  - !ruby/object:Gem::Version
99
99
  version: '0'
100
100
  required_rubygems_version: !ruby/object:Gem::Requirement
101
101
  requirements:
102
- - - '>='
102
+ - - ">="
103
103
  - !ruby/object:Gem::Version
104
104
  version: '0'
105
105
  requirements: []
106
106
  rubyforge_project:
107
- rubygems_version: 2.0.14
107
+ rubygems_version: 2.2.3
108
108
  signing_key:
109
109
  specification_version: 3
110
110
  summary: launch openvibe designer