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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a619dba560b040a28d4ed9f73a5ff5b424c6d851
4
- data.tar.gz: c9a3e06b5ac8e017b6dd72aa4cd2887706e7a274
3
+ metadata.gz: e6ea51bc91fc69ada708a251d986a9663d59e51c
4
+ data.tar.gz: 10be28be4338ff91baa3579c43c7de4c82a4e0d5
5
5
  SHA512:
6
- metadata.gz: 04e5aeca2a7bba77becd166e77d99935ecc98fa76246813a0930822d306819645084f6bc64a452979d7c7f23dfd016d19cafddb5ca2a5826d446ae1c744ae861
7
- data.tar.gz: ed4234835a139953299d028a5d2bb3c6cbf24fb76cf03792e78c5f6bcecd72144c8907aee4eac525a70cb175f323b5f96a37a38a3d5cf5f9c05d6625965fbb32
6
+ metadata.gz: 75a30608ad3de13b49d6739f5246b643b9eae2ea5d0bc85dfeb726bdb387277908239ff5c3f2f842b0b5b8aa1256f08750c88d88414bca7ca642fe9f9d3408ca
7
+ data.tar.gz: b4b2df0172b915077214facaeae4e347e9a639e22f446d8ad5bd68d8476b3ff9f913eb50fb94d3a6864d0ff6831f2e3a5c5d8c55a2fb3999e0068304502799b2
@@ -1,14 +1,16 @@
1
1
  ; This file is generated by Obelisk <%=Obelisk::VERSION %>
2
2
 
3
3
  <% current_context = nil -%>
4
- <% users.sort { |a, b| a[:context] <=> b[:context] }.each do |user| -%>
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
 
@@ -19,7 +19,7 @@ module Obelisk
19
19
  },
20
20
  :mapping => {
21
21
  samaccountname: :login,
22
- info: :secret,
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
- update_rails_db all_users.reject { |u| u[:name].include? "Test User" } if up && params[:updb]
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 = {
@@ -1,3 +1,3 @@
1
1
  module Obelisk
2
- VERSION = "0.2.6"
2
+ VERSION = "0.2.7"
3
3
  end
@@ -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
- #puts %x(cat #{dir}/*)
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.6
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-03 00:00:00.000000000 Z
11
+ date: 2015-02-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler