socialcast 1.4.1 → 1.4.2

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: 82602e601c3be7e153ca4d78c65782789bef82bf
4
- data.tar.gz: 77a7d5f8085671489933fade466119bb95b43b4f
3
+ metadata.gz: a1e73324643d9559aa52afa6e128643b7633aa9f
4
+ data.tar.gz: 9594f2774497866ea74faa91f596758655972f9a
5
5
  SHA512:
6
- metadata.gz: 41187fea849aa3f2906e8d875612509fa85259494347e0f65505037204dec7e3383a580010702d3e1a081688764659a739b45e66a3325a28ae0dc49991cadf3a
7
- data.tar.gz: 9ec9a6cd3b61ec459c1c067c847a3f5878a5bbdc83d7188b1377749db3eae28cefdf44d7f9648c38661b931f66469b7cb9ffeb0732cdcc18834f86405856a753
6
+ metadata.gz: 02ae41942ac8021207672118962b2facf57507618de4990b5ec02e230bc9936bd3fccae6eacf2502ab03f8e7b55e8a10478ecd92ca6f10910300fc92a717cc90
7
+ data.tar.gz: b638b5772ac11eb8fc719355b95699618656e65767ebb503402aa56b6465183bfc6a34a63b730df50debb3e6af02f8d6c5a0f3baacd3fd252f7225aa034077a7
@@ -0,0 +1,16 @@
1
+ module NetLdapPatches
2
+ module Connection
3
+ module NextMsgid
4
+ INITIAL_MSGID_ENV_VAR = 'NET_LDAP_INITIAL_MSGID'
5
+ def next_msgid
6
+ # avoids using the msgid range 128-255 by starting the msgid counter at 300
7
+ # otherwise certain versions and/or configurations of Microsoft's Active Directory will
8
+ # return Error Searching: invalid response-type in search: 24 and halt the mirroring process
9
+ @msgid ||= ENV.key?(INITIAL_MSGID_ENV_VAR) ? ENV[INITIAL_MSGID_ENV_VAR].to_i : 300
10
+ @msgid += 1
11
+ end
12
+ end
13
+ end
14
+ end
15
+
16
+ Net::LDAP::Connection.prepend NetLdapPatches::Connection::NextMsgid
@@ -9,6 +9,7 @@ require_relative 'socialcast/command_line/provision_photo'
9
9
  require_relative 'socialcast/command_line/message'
10
10
  require_relative 'socialcast/command_line/cli'
11
11
  require_relative 'socialcast/command_line/version'
12
+ require_relative 'net_ldap_patches/connection/next_msgid'
12
13
 
13
14
  module Socialcast
14
15
  module CommandLine
@@ -1,5 +1,5 @@
1
1
  module Socialcast
2
2
  module CommandLine
3
- VERSION = '1.4.1'
3
+ VERSION = '1.4.2'
4
4
  end
5
5
  end
@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
19
19
  s.add_runtime_dependency 'json', '~> 1.4', '>= 1.4.6'
20
20
  s.add_runtime_dependency 'thor', '~> 0.14', '>= 0.14.6'
21
21
  s.add_runtime_dependency 'highline', '~> 1.6', '>= 1.6.2'
22
- s.add_runtime_dependency 'socialcast-net-ldap', '~> 0.1', '>= 0.1.6'
22
+ s.add_runtime_dependency 'net-ldap', '~> 0.15', '>= 0.15.0'
23
23
  s.add_runtime_dependency 'activesupport', '>= 4.0'
24
24
  s.add_runtime_dependency 'builder', '~> 3.1'
25
25
  s.add_development_dependency 'rspec', '~> 3.3'
@@ -0,0 +1,14 @@
1
+ require 'spec_helper'
2
+
3
+ describe NetLdapPatches::Connection::NextMsgid do
4
+ describe '#next_msgid' do
5
+ context 'when ENV["NET_LDAP_INITIAL_MSGID"] is not present' do
6
+ it { expect(Net::LDAP::Connection.new.next_msgid).to eq 301 }
7
+ end
8
+ context 'when ENV["NET_LDAP_INITIAL_MSGID"] is present' do
9
+ before { ENV['NET_LDAP_INITIAL_MSGID'] = '5' }
10
+ after { ENV.delete 'NET_LDAP_INITIAL_MSGID' }
11
+ it { expect(Net::LDAP::Connection.new.next_msgid).to eq 6 }
12
+ end
13
+ end
14
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: socialcast
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.1
4
+ version: 1.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Sonnek
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2016-12-05 00:00:00.000000000 Z
13
+ date: 2017-02-07 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rest-client
@@ -87,25 +87,25 @@ dependencies:
87
87
  - !ruby/object:Gem::Version
88
88
  version: 1.6.2
89
89
  - !ruby/object:Gem::Dependency
90
- name: socialcast-net-ldap
90
+ name: net-ldap
91
91
  requirement: !ruby/object:Gem::Requirement
92
92
  requirements:
93
93
  - - "~>"
94
94
  - !ruby/object:Gem::Version
95
- version: '0.1'
95
+ version: '0.15'
96
96
  - - ">="
97
97
  - !ruby/object:Gem::Version
98
- version: 0.1.6
98
+ version: 0.15.0
99
99
  type: :runtime
100
100
  prerelease: false
101
101
  version_requirements: !ruby/object:Gem::Requirement
102
102
  requirements:
103
103
  - - "~>"
104
104
  - !ruby/object:Gem::Version
105
- version: '0.1'
105
+ version: '0.15'
106
106
  - - ">="
107
107
  - !ruby/object:Gem::Version
108
- version: 0.1.6
108
+ version: 0.15.0
109
109
  - !ruby/object:Gem::Dependency
110
110
  name: activesupport
111
111
  requirement: !ruby/object:Gem::Requirement
@@ -217,6 +217,7 @@ files:
217
217
  - Rakefile
218
218
  - bin/socialcast
219
219
  - config/ldap.yml
220
+ - lib/net_ldap_patches/connection/next_msgid.rb
220
221
  - lib/socialcast.rb
221
222
  - lib/socialcast/command_line/authenticate.rb
222
223
  - lib/socialcast/command_line/cli.rb
@@ -254,6 +255,7 @@ files:
254
255
  - spec/fixtures/test_images/test-jpg-image.jpg
255
256
  - spec/fixtures/test_images/test-png-image.png
256
257
  - spec/fixtures/test_images/test-tiff-image.tiff
258
+ - spec/net_ldap_patches/connection/next_msgid_spec.rb
257
259
  - spec/socialcast/command_line/authenticate_spec.rb
258
260
  - spec/socialcast/command_line/cli_spec.rb
259
261
  - spec/socialcast/command_line/ldap_connector_spec.rb
@@ -281,7 +283,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
281
283
  version: '0'
282
284
  requirements: []
283
285
  rubyforge_project: socialcast
284
- rubygems_version: 2.5.1
286
+ rubygems_version: 2.6.10
285
287
  signing_key:
286
288
  specification_version: 4
287
289
  summary: command line interface to socialcast api
@@ -313,6 +315,7 @@ test_files:
313
315
  - spec/fixtures/test_images/test-jpg-image.jpg
314
316
  - spec/fixtures/test_images/test-png-image.png
315
317
  - spec/fixtures/test_images/test-tiff-image.tiff
318
+ - spec/net_ldap_patches/connection/next_msgid_spec.rb
316
319
  - spec/socialcast/command_line/authenticate_spec.rb
317
320
  - spec/socialcast/command_line/cli_spec.rb
318
321
  - spec/socialcast/command_line/ldap_connector_spec.rb