csd 0.1.12 → 0.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/csd.gemspec +1 -1
- data/lib/csd/application/default.rb +15 -4
- data/lib/csd/application/minisip/component/core.rb +2 -1
- data/lib/csd/options_parser.rb +4 -2
- data/test/application/test_minisip.rb +6 -7
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.13
|
data/csd.gemspec
CHANGED
@@ -44,12 +44,23 @@ module CSD
|
|
44
44
|
# If there are no files in myapplication/options, an empty +String+ is returned instead.
|
45
45
|
#
|
46
46
|
def options(action='')
|
47
|
-
result =
|
48
|
-
["
|
47
|
+
result = []
|
48
|
+
["common.rb", "#{action}.rb"].each do |filename|
|
49
49
|
file = File.join(Path.applications, name, 'options', filename)
|
50
|
-
result
|
50
|
+
result << File.read(file) if File.file?(file)
|
51
51
|
end
|
52
|
-
result
|
52
|
+
default_options + result.join("\n")
|
53
|
+
end
|
54
|
+
|
55
|
+
# Comes in handy for the test suite
|
56
|
+
#
|
57
|
+
def default_options(action='')
|
58
|
+
result = []
|
59
|
+
["common_defaults.rb", "#{action}_defaults.rb"].each do |filename|
|
60
|
+
file = File.join(Path.applications, name, 'options', filename)
|
61
|
+
result << File.read(file) if File.file?(file)
|
62
|
+
end
|
63
|
+
result.join("\n")
|
53
64
|
end
|
54
65
|
|
55
66
|
protected
|
@@ -48,7 +48,8 @@ module CSD
|
|
48
48
|
Cmd.run "sudo apt-get remove ffmpeg --yes", :announce_pwd => false
|
49
49
|
else
|
50
50
|
# On other linux distributions we don't know how to remove ffmpeg
|
51
|
-
|
51
|
+
UI.debug "MILESTONE: cannot-remove-ffmpeg"
|
52
|
+
raise Error::Minisip::Core::FFmpegInstalled, "Please remove ffmpeg from your system first, or run the #{CSD.executable} with --no-configure" unless Options.testmode
|
52
53
|
end
|
53
54
|
end
|
54
55
|
|
data/lib/csd/options_parser.rb
CHANGED
@@ -34,9 +34,9 @@ module CSD
|
|
34
34
|
end
|
35
35
|
end
|
36
36
|
|
37
|
-
def clear
|
37
|
+
def clear(additional_options='')
|
38
38
|
# Resetting all attributes to nil (because e.g. an application instance might have modified or added some).
|
39
|
-
super
|
39
|
+
super()
|
40
40
|
# First we define all valid actions and scopes
|
41
41
|
self.actions = []
|
42
42
|
self.scopes = []
|
@@ -53,6 +53,8 @@ module CSD
|
|
53
53
|
self.developer = false
|
54
54
|
# Shortcut to allow for debugging the options parser itself
|
55
55
|
self.debug = (ARGV.include?('--debug') or ARGV.include?('-d'))
|
56
|
+
# For our test suite we might want to inject more options here
|
57
|
+
eval additional_options
|
56
58
|
end
|
57
59
|
|
58
60
|
# Here we check for literals, i.e. "help", ACTION and APPLICATION.
|
@@ -10,15 +10,12 @@ class TestMinisip < Test::Unit::TestCase
|
|
10
10
|
|
11
11
|
setup do
|
12
12
|
Options.clear
|
13
|
-
@default_minisip_options = Application::Minisip.options
|
14
13
|
end
|
15
14
|
|
16
15
|
context "Core component" do
|
17
16
|
|
18
17
|
setup do
|
19
18
|
@base = Application::Minisip::Base.new
|
20
|
-
@base.define_relative_paths
|
21
|
-
#CSD.options.eval @default_minisip_options
|
22
19
|
end
|
23
20
|
|
24
21
|
should "know how to identify and sort a subset of internal MiniSIP libraries with --only" do
|
@@ -34,10 +31,12 @@ class TestMinisip < Test::Unit::TestCase
|
|
34
31
|
assert_equal %w{ libmutil minisip }, Core.libraries
|
35
32
|
end
|
36
33
|
|
37
|
-
context "in theory" do
|
34
|
+
context "in theory when compiling" do
|
38
35
|
|
39
36
|
setup do
|
40
37
|
Options.clear
|
38
|
+
@base.define_relative_paths
|
39
|
+
CSD.options.clear Application::Minisip.default_options('compile')
|
41
40
|
Options.reveal = true
|
42
41
|
end
|
43
42
|
|
@@ -63,13 +62,13 @@ class TestMinisip < Test::Unit::TestCase
|
|
63
62
|
assert_match /sudo make install/, out
|
64
63
|
end
|
65
64
|
|
66
|
-
should "
|
67
|
-
out, err = capture { Core.compile }
|
65
|
+
should "" do
|
66
|
+
#out, err = capture { Core.compile }
|
68
67
|
#puts out
|
69
68
|
|
70
69
|
end
|
71
70
|
|
72
|
-
end # context "in theory"
|
71
|
+
end # context "in theory when compiling"
|
73
72
|
|
74
73
|
context "in practice" do
|
75
74
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: csd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 1
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 13
|
10
|
+
version: 0.1.13
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Technology Transfer Alliance Team
|