csd 0.1.11 → 0.1.12

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 CHANGED
@@ -1 +1 @@
1
- 0.1.11
1
+ 0.1.12
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{csd}
8
- s.version = "0.1.11"
8
+ s.version = "0.1.12"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Technology Transfer Alliance Team"]
@@ -46,8 +46,11 @@ Gem::Specification.new do |s|
46
46
  "lib/csd/application/minisip/component/x264.rb",
47
47
  "lib/csd/application/minisip/error.rb",
48
48
  "lib/csd/application/minisip/options/common.rb",
49
+ "lib/csd/application/minisip/options/common_defaults.rb",
49
50
  "lib/csd/application/minisip/options/compile.rb",
51
+ "lib/csd/application/minisip/options/compile_defaults.rb",
50
52
  "lib/csd/application/minisip/options/package.rb",
53
+ "lib/csd/application/minisip/options/package_defaults.rb",
51
54
  "lib/csd/application/minisip/phonebook_example.rb",
52
55
  "lib/csd/application/minisip/unix.rb",
53
56
  "lib/csd/application/minisip/unix/darwin.rb",
data/lib/csd.rb CHANGED
@@ -31,7 +31,7 @@ module CSD
31
31
  if !Applications.current and ARGV.include?('update')
32
32
  # Updating the AI
33
33
  UI.info "Updating the AI to the newest version".green.bold
34
- Cmd.run "sudo gem update csd", :announce_pwd => false, :verbose => true
34
+ Cmd.run "sudo gem update csd --no-ri --no-rdoc", :announce_pwd => false, :verbose => true
35
35
  exit # The only smooth status code 0 exit in this whole application :)
36
36
  else
37
37
  choose_application unless Applications.current
@@ -71,7 +71,7 @@ module CSD
71
71
  file = Dir[File.join(Path.packages, "Deck*#{archflag}*.deb")]
72
72
  UI.debug "#{self.class} identified these applicable packages: #{file.join(', ')}"
73
73
  UI.info "Installing Debian packages".green.bold
74
- Cmd.run "sudo apt-get install #{DEBIAN_DEPENDENCIES} --yes", :announce_pwd => false
74
+ Cmd.run "sudo apt-get install #{DEBIAN_DEPENDENCIES.join(' ')} --yes", :announce_pwd => false
75
75
  Cmd.run "sudo dpkg -i #{file.first || '[DRIVER FILE FOR THIS ARCHITECTURE]'}", :announce_pwd => false
76
76
  end
77
77
 
@@ -44,12 +44,12 @@ 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
- options_dir = File.join(Path.applications, name, 'options')
48
- common_file = File.join(options_dir, "common.rb")
49
- specific_file = File.join(options_dir, "#{action}.rb")
50
- common_options = File.file?(common_file) ? File.read(common_file) : ''
51
- specific_options = File.file?(specific_file) ? File.read(specific_file) : ''
52
- specific_options + common_options
47
+ result = ''
48
+ ["common_defaults.rb", "common.rb", "#{action}_defaults.rb", "#{action}.rb"].each do |filename|
49
+ file = File.join(Path.applications, name, 'options', filename)
50
+ result += File.file?(file) ? File.read(file) : ''
51
+ end
52
+ result
53
53
  end
54
54
 
55
55
  protected
@@ -112,7 +112,7 @@ module CSD
112
112
  Path.dirlist = Pathname.new File.join('/', 'usr', 'share', 'aclocal', 'dirlist')
113
113
  if !Path.dirlist.file? and Gem::Platform.local.debian?
114
114
  UI.info "Fixing broken Debian aclocal path".green.bold
115
- Path.new_dirlist = Pathname.new File.join(Dir.mktmpdir, 'dirlist')
115
+ Path.new_dirlist = Pathname.new File.join(Dir.work, 'dirlist')
116
116
  Cmd.touch_and_replace_content Path.new_dirlist, '/usr/local/share/aclocal'
117
117
  Cmd.run "sudo mv #{Path.new_dirlist} #{Path.dirlist}", :announce_pwd => false
118
118
  end
@@ -37,7 +37,7 @@ Categories=Application;Internet;Network;Chat;AudioVideo}
37
37
  return if Path.minisip_gnome_pixmap.file? and Path.minisip_desktop_entry.file?
38
38
  UI.info "Installing Gnome menu item".green.bold
39
39
  Cmd.run("sudo cp #{Path.minisip_gnome_png} #{Path.minisip_gnome_pixmap}", :announce_pwd => false)
40
- Path.new_desktop_entry = Pathname.new File.join(Dir.mktmpdir, 'minisip.desktop')
40
+ Path.new_desktop_entry = Pathname.new File.join(Dir.work, 'minisip.desktop')
41
41
  Cmd.touch_and_replace_content Path.new_desktop_entry, DESKTOP_ENTRY, :internal => true
42
42
  Cmd.run "sudo mv #{Path.new_desktop_entry} #{Path.minisip_desktop_entry}", :announce_pwd => false
43
43
  end
@@ -2,12 +2,10 @@
2
2
 
3
3
  opts.headline 'WORKING DIRECTORY OPTIONS'.green.bold
4
4
 
5
- self.temp = true
6
5
  opts.on("--no-temp", "Use a subdirectory in the current directory as working directory and not /tmp.") do |value|
7
6
  self.temp = value
8
7
  end
9
8
 
10
- self.work_dir = nil
11
9
  opts.on("--work-dir [PATH]", "Defines and/or creates the working directory. This will override the --no-temp option.") do |value|
12
10
  self.work_dir = value
13
11
  end
@@ -0,0 +1,2 @@
1
+ self.temp = true
2
+ self.work_dir = nil
@@ -1,49 +1,40 @@
1
1
  # -*- encoding: UTF-8 -*-
2
2
  # This file gets eval'ed by the global options parser in lib/csd/options_parser
3
3
 
4
- self.this_user = false
5
4
  opts.on("--this-user","Compile MiniSIP only for the current user (enforces the --no-temp option)") do |value|
6
5
  self.this_user = value
7
6
  end
8
7
 
9
- self.apt_get = true
10
8
  opts.on("--no-apt-get","Don't run any apt-get commands") do |value|
11
9
  self.apt_get = value
12
10
  end
13
11
 
14
- self.ffmpeg_first = false
15
12
  opts.on("--force-ffmpeg","Do not remove FFmpeg before compiling MiniSIP and compile FFmpeg before MiniSIP") do |value|
16
13
  self.ffmpeg_first = value
17
14
  end
18
15
 
19
- self.github_tar = false
20
16
  opts.on("--github-tar","Instead of fetching git repositories from Github, use tarball downloads") do |value|
21
17
  self.github_tar = value
22
18
  end
23
19
 
24
- self.branch = nil
25
20
  opts.on('--branch BRANCH', 'Choose another branch than `master´ when downloading the source code') do |lib|
26
21
  self.branch = value
27
22
  end
28
23
 
29
24
  opts.headline 'MINISIP LIBRARY OPTIONS'.green.bold
30
25
 
31
- self.bootstrap = true
32
26
  opts.on("--no-bootstrap","Don't run the bootstrap command on any MiniSIP library") do |value|
33
27
  self.bootstrap = value
34
28
  end
35
29
 
36
- self.configure = true
37
30
  opts.on("--no-configure","Don't run the configure command on any MiniSIP library") do |value|
38
31
  self.configure = value
39
32
  end
40
33
 
41
- self.make = true
42
34
  opts.on("--no-make","Don't run the make command on any MiniSIP library") do |value|
43
35
  self.make = value
44
36
  end
45
37
 
46
- self.make_install = true
47
38
  opts.on("--no-make-install","Don't run the make install command on any MiniSIP library") do |value|
48
39
  self.make_install = value
49
40
  end
@@ -0,0 +1,10 @@
1
+ self.this_user = false
2
+ self.apt_get = true
3
+ self.ffmpeg_first = false
4
+ self.github_tar = false
5
+ self.branch = nil
6
+ self.bootstrap = true
7
+ self.configure = true
8
+ self.make = true
9
+ self.make_install = true
10
+ self.only = nil
@@ -2,7 +2,6 @@
2
2
  # This file gets eval'ed by the global options parser in lib/csd/rb
3
3
  # TODO: There must be a nicer solution for this.
4
4
 
5
- self.path = nil
6
5
  opts.on("--path [PATH]",
7
6
  "Defines the working directory manually.") do |value|
8
7
  self.path = value
@@ -0,0 +1,2 @@
1
+ self.path = nil
2
+ self.only = nil
@@ -11,7 +11,7 @@ module CSD
11
11
  </name>
12
12
  <contact>
13
13
  <name>
14
- TTA HDVC
14
+ HDVC Clients
15
15
  </name>
16
16
  <pop>
17
17
  <desc>
@@ -42,7 +42,7 @@ module CSD
42
42
  Client4
43
43
  </desc>
44
44
  <uri>
45
- ip:client4@carenet-se.se
45
+ sip:client4@carenet-se.se
46
46
  </uri>
47
47
  </pop>
48
48
  <pop>
@@ -50,15 +50,15 @@ module CSD
50
50
  Client5
51
51
  </desc>
52
52
  <uri>
53
- ip:client5@carenet-se.se
53
+ sip:client5@carenet-se.se
54
54
  </uri>
55
55
  </pop>
56
56
  <pop>
57
57
  <desc>
58
- Clien6
58
+ Client6
59
59
  </desc>
60
60
  <uri>
61
- ip:client6@carenet-se.se
61
+ sip:client6@carenet-se.se
62
62
  </uri>
63
63
  </pop>
64
64
  </contact>
@@ -68,12 +68,20 @@ module CSD
68
68
  </name>
69
69
  <pop>
70
70
  <desc>
71
- Reflector
71
+ Multiparty Conference Room
72
72
  </desc>
73
73
  <uri>
74
74
  sip:mcu@carenet-se.se
75
75
  </uri>
76
76
  </pop>
77
+ <pop>
78
+ <desc>
79
+ Carenet Support Hotline
80
+ </desc>
81
+ <uri>
82
+ sip:uri@carenet-se.se
83
+ </uri>
84
+ </pop>
77
85
  </contact>
78
86
  <contact>
79
87
  <name>
@@ -87,11 +95,6 @@ module CSD
87
95
  sip:tandberg1@carenet-se.se
88
96
  </uri>
89
97
  </pop>
90
- </contact>
91
- <contact>
92
- <name>
93
- Tandberg
94
- </name>
95
98
  <pop>
96
99
  <desc>
97
100
  Tandberg Client2
@@ -16,7 +16,7 @@ module CSD
16
16
  if Path.giomm_header_backup.file? and !Options.reveal
17
17
  UI.warn "giomm-2.4 seems to be fixed already, I won't touch it now. Delete #{Path.giomm_header_backup.enquote} to enforce it."
18
18
  else
19
- Path.new_giomm_header = File.join(Dir.mktmpdir, 'giomm.h')
19
+ Path.new_giomm_header = File.join(Dir.work, 'giomm.h')
20
20
  Cmd.copy(Path.giomm_header, Path.new_giomm_header)
21
21
  Cmd.replace Path.new_giomm_header do |r|
22
22
  r.replace '#include <giomm/socket.h>', "/* ----- AI COMMENTING OUT START ----- \n#include <giomm/socket.h>"
@@ -122,9 +122,9 @@ module CSD
122
122
  opts.on("-s", "--silent","Don't show any output") do |value|
123
123
  self.silent = value
124
124
  end
125
- #opts.on_tail("-a", "--developer", "Activating advanced AI functionality (developers only)") do |value|
126
- # self.developer = value
127
- #end
125
+ opts.on_tail("-a", "--developer", "Show information only relevant to AI and MiniSIP developers") do |value|
126
+ self.developer = value
127
+ end
128
128
  opts.on_tail("-h", "--help", "Show detailed help (regarding the given ACTION and APPLICATION)") do |value|
129
129
  self.help = value
130
130
  end
@@ -6,39 +6,19 @@ class TestMinisip < Test::Unit::TestCase
6
6
  include CSD
7
7
  include Application::Minisip::Component
8
8
 
9
- context "The MiniSIP instance" do
10
-
9
+ context "MiniSIP's" do
10
+
11
11
  setup do
12
- ARGV.clear
13
12
  Options.clear
14
- ARGV.push(@name)
15
- Applications.current
16
- @app = Application::Minisip::Base.new
17
- end
18
-
19
- should "respond to a valid action" do
20
- assert @app.respond_to?(:compile)
13
+ @default_minisip_options = Application::Minisip.options
21
14
  end
22
-
23
- context "in the whole workflow" do
24
-
25
- setup do
26
- Options.clear
27
- end
28
15
 
29
- should "remove the working directory when in root installation mode and using tmp" do
30
- Options.this_user = false
31
- Options.temp = true
32
-
33
-
34
- end
16
+ context "Core component" do
35
17
 
36
- end # context "in the whole workflow"
37
-
38
- context "in the Core component" do
39
-
40
18
  setup do
41
- Options.clear
19
+ @base = Application::Minisip::Base.new
20
+ @base.define_relative_paths
21
+ #CSD.options.eval @default_minisip_options
42
22
  end
43
23
 
44
24
  should "know how to identify and sort a subset of internal MiniSIP libraries with --only" do
@@ -67,7 +47,7 @@ class TestMinisip < Test::Unit::TestCase
67
47
  assert_no_match /git pull/, out
68
48
  assert err.empty?
69
49
  end
70
-
50
+
71
51
  should "know how to checkout a particular branch of the source code" do
72
52
  Options.branch = 'cuttingedge'
73
53
  out, err = capture { Core.checkout }
@@ -75,13 +55,19 @@ class TestMinisip < Test::Unit::TestCase
75
55
  assert_match /git pull .+ cuttingedge/, out
76
56
  assert err.empty?
77
57
  end
78
-
58
+
79
59
  should "use sudo make install instead of make install by default" do
80
60
  Options.make_install = true
81
61
  out, err = capture { Core.compile }
82
62
  # TODO: This should be a more strict test
83
63
  assert_match /sudo make install/, out
84
64
  end
65
+
66
+ should "description" do
67
+ out, err = capture { Core.compile }
68
+ #puts out
69
+
70
+ end
85
71
 
86
72
  end # context "in theory"
87
73
 
@@ -97,8 +83,8 @@ class TestMinisip < Test::Unit::TestCase
97
83
 
98
84
  end # context "in practice"
99
85
 
100
- end # context "The Minisip Core component"
86
+ end # context "Core component"
101
87
 
102
- end # context "The MiniSIP instance"
88
+ end # context "MiniSIP's"
103
89
 
104
90
  end
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: 13
4
+ hash: 3
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 11
10
- version: 0.1.11
9
+ - 12
10
+ version: 0.1.12
11
11
  platform: ruby
12
12
  authors:
13
13
  - Technology Transfer Alliance Team
@@ -56,8 +56,11 @@ files:
56
56
  - lib/csd/application/minisip/component/x264.rb
57
57
  - lib/csd/application/minisip/error.rb
58
58
  - lib/csd/application/minisip/options/common.rb
59
+ - lib/csd/application/minisip/options/common_defaults.rb
59
60
  - lib/csd/application/minisip/options/compile.rb
61
+ - lib/csd/application/minisip/options/compile_defaults.rb
60
62
  - lib/csd/application/minisip/options/package.rb
63
+ - lib/csd/application/minisip/options/package_defaults.rb
61
64
  - lib/csd/application/minisip/phonebook_example.rb
62
65
  - lib/csd/application/minisip/unix.rb
63
66
  - lib/csd/application/minisip/unix/darwin.rb