obelisk 0.2.6 → 0.2.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/erb/extensions.ad.erb +3 -1
- data/lib/obelisk.rb +2 -10
- data/lib/obelisk/version.rb +1 -1
- data/test/test_erb.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e6ea51bc91fc69ada708a251d986a9663d59e51c
|
4
|
+
data.tar.gz: 10be28be4338ff91baa3579c43c7de4c82a4e0d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 75a30608ad3de13b49d6739f5246b643b9eae2ea5d0bc85dfeb726bdb387277908239ff5c3f2f842b0b5b8aa1256f08750c88d88414bca7ca642fe9f9d3408ca
|
7
|
+
data.tar.gz: b4b2df0172b915077214facaeae4e347e9a639e22f446d8ad5bd68d8476b3ff9f913eb50fb94d3a6864d0ff6831f2e3a5c5d8c55a2fb3999e0068304502799b2
|
data/erb/extensions.ad.erb
CHANGED
@@ -1,14 +1,16 @@
|
|
1
1
|
; This file is generated by Obelisk <%=Obelisk::VERSION %>
|
2
2
|
|
3
3
|
<% current_context = nil -%>
|
4
|
-
<% users.
|
4
|
+
<% users.sort_by{ |v| v[:context] }.each do |user| -%>
|
5
5
|
<% if current_context != user[:context] -%>
|
6
6
|
<% current_context = user[:context] -%>
|
7
7
|
[<%= current_context %>-ad-users]
|
8
8
|
|
9
9
|
<% end -%>
|
10
|
+
<% if user[:extension] -%>
|
10
11
|
exten => <%= user[:extension] %>,1,Dial(SIP/<%= user[:login] %>)
|
11
12
|
exten => <%= user[:extension] %>,hint,SIP/<%= user[:login] %>,CustomPresence:<%= user[:login] %>
|
13
|
+
<% end -%>
|
12
14
|
exten => <%= user[:login] %>,1,Dial(SIP/<%= user[:login] %>)
|
13
15
|
exten => <%= user[:login] %>,hint,SIP/<%= user[:login] %>,CustomPresence:<%= user[:login] %>
|
14
16
|
|
data/lib/obelisk.rb
CHANGED
@@ -19,7 +19,7 @@ module Obelisk
|
|
19
19
|
},
|
20
20
|
:mapping => {
|
21
21
|
samaccountname: :login,
|
22
|
-
|
22
|
+
admindescription: :secret,
|
23
23
|
facsimiletelephonenumber: :context,
|
24
24
|
ipphone: :extension,
|
25
25
|
pager: :callgroup,
|
@@ -66,18 +66,10 @@ module Obelisk
|
|
66
66
|
end
|
67
67
|
end
|
68
68
|
system $conf[:asterisk_restart_command] if up && params[:restart]
|
69
|
-
|
69
|
+
puts("Update database is deprecated") if params[:updb]
|
70
70
|
up
|
71
71
|
end
|
72
72
|
|
73
|
-
def self.update_rails_db(users)
|
74
|
-
users.each { |u| u.delete :secret }
|
75
|
-
c = Curl::Easy.http_post $conf[:obelisk_portal_update_url], JSON.dump(users) do |curl|
|
76
|
-
curl.headers['Accept'] = 'application/json'
|
77
|
-
curl.headers['Content-Type'] = 'application/json'
|
78
|
-
end
|
79
|
-
end
|
80
|
-
|
81
73
|
def self.get_ad_users(ou = nil)
|
82
74
|
load_conf
|
83
75
|
settings = {
|
data/lib/obelisk/version.rb
CHANGED
data/test/test_erb.rb
CHANGED
@@ -12,7 +12,7 @@ class ErbTestCase < Test::Unit::TestCase
|
|
12
12
|
assert ! Obelisk.make_erb_conf(:conf_dir => dir)
|
13
13
|
assert Obelisk.make_erb_conf :conf_dir => dir, :force => true
|
14
14
|
assert ! Obelisk.make_erb_conf(:conf_dir => dir)
|
15
|
-
|
15
|
+
puts %x(cat #{dir}/*)
|
16
16
|
ensure
|
17
17
|
File.delete *Dir[File.expand_path "*", dir]
|
18
18
|
Dir.rmdir dir
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: obelisk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- goredar
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-02-
|
11
|
+
date: 2015-02-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|