yus 1.0.4 → 1.0.5

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
- SHA1:
3
- metadata.gz: 38cfb069f12865442210784253c0249d165821e0
4
- data.tar.gz: 6eecec578892f50ba778fec5d7f696114466b48d
2
+ SHA256:
3
+ metadata.gz: dfb977cd1ed1ebb151cef54ef6133614d8827535f6398df0457608c8584f8665
4
+ data.tar.gz: 0c227d6c747fdebc0eb557eb884c0993966a3531dadd9d3bd9afd81296828b5a
5
5
  SHA512:
6
- metadata.gz: 1ebc69681b04a40e6cffe913d0bd2b66077e8e7897fe423b98d768ca6880e476987f1f5429e5fc3bda06f84907a97e119278a4c669182c1871568a13723f02d0
7
- data.tar.gz: 1eb5017b1700d163eca13caab60510a34fb1900044f7474e9e0e4c5c5791062a0ed9c3b3eabf6684474e2d063ed2f2091eb83ef0558c0c06ad14c945e3658409
6
+ metadata.gz: 362f4218ef3115d734a2d32ef9b7525615b8c445e7cc5ed970bbb99ccdcf17b3ce81761170a2c606a815ecb892e59527d7d93cc930c9b0f1ac7ed069984f370a
7
+ data.tar.gz: 725a1056b531b20e2e21172e306bbfd982e463d7a1819d576fbb60434bc7bb4c20e12e20a94808b999cd6c4402fc54bb734e81aeed040fffc3845c995515a3cf
@@ -1 +1 @@
1
- 2.3.1
1
+ 2.5.0
@@ -13,10 +13,7 @@ notifications:
13
13
  rvm:
14
14
  - ruby-head
15
15
  - 2.3.0
16
- - 2.2.3
17
- - 2.1.7
18
- - 1.8.7
16
+ - 2.5.0
19
17
  matrix:
20
18
  allow_failures:
21
19
  - rvm: ruby-head
22
- - rvm: 1.8.7
@@ -1,69 +1,64 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- yus (1.0.4)
4
+ yus (1.0.5)
5
5
  deprecated (= 2.0.1)
6
6
  highline
7
7
  needle
8
- odba
9
- pg (= 0.17.0)
8
+ odba (>= 1.1.6)
10
9
  rclconf
11
- ydbd-pg (>= 0.5.1)
12
- ydbi (>= 0.5.1)
13
10
 
14
11
  GEM
15
12
  remote: https://rubygems.org/
16
13
  specs:
17
- byebug (9.0.5)
18
- coderay (1.1.1)
14
+ byebug (11.0.1)
15
+ coderay (1.1.2)
19
16
  deprecated (2.0.1)
20
- diff-lcs (1.2.5)
21
- docile (1.1.5)
17
+ diff-lcs (1.3)
18
+ docile (1.3.1)
22
19
  flexmock (1.3.3)
23
- highline (1.7.8)
24
- json (2.0.1)
25
- method_source (0.8.2)
26
- minitest (5.9.0)
20
+ highline (2.0.1)
21
+ json (2.2.0)
22
+ method_source (0.9.2)
23
+ minitest (5.11.3)
27
24
  needle (1.3.0)
28
- odba (1.1.2)
29
- ydbd-pg (>= 0.5.1)
30
- ydbi (>= 0.5.1)
31
- pg (0.17.0)
32
- power_assert (0.3.0)
33
- pry (0.10.4)
25
+ odba (1.1.6)
26
+ ydbd-pg (>= 0.5.6)
27
+ ydbi (>= 0.5.6)
28
+ pg (1.1.4)
29
+ power_assert (1.1.3)
30
+ pry (0.12.2)
34
31
  coderay (~> 1.1.0)
35
- method_source (~> 0.8.1)
36
- slop (~> 3.4)
37
- pry-byebug (3.4.0)
38
- byebug (~> 9.0)
32
+ method_source (~> 0.9.0)
33
+ pry-byebug (3.7.0)
34
+ byebug (~> 11.0)
39
35
  pry (~> 0.10)
40
- rake (11.2.2)
36
+ rake (12.3.2)
41
37
  rclconf (1.0.0)
42
- rspec (3.5.0)
43
- rspec-core (~> 3.5.0)
44
- rspec-expectations (~> 3.5.0)
45
- rspec-mocks (~> 3.5.0)
46
- rspec-core (3.5.1)
47
- rspec-support (~> 3.5.0)
48
- rspec-expectations (3.5.0)
38
+ rspec (3.8.0)
39
+ rspec-core (~> 3.8.0)
40
+ rspec-expectations (~> 3.8.0)
41
+ rspec-mocks (~> 3.8.0)
42
+ rspec-core (3.8.0)
43
+ rspec-support (~> 3.8.0)
44
+ rspec-expectations (3.8.2)
49
45
  diff-lcs (>= 1.2.0, < 2.0)
50
- rspec-support (~> 3.5.0)
51
- rspec-mocks (3.5.0)
46
+ rspec-support (~> 3.8.0)
47
+ rspec-mocks (3.8.0)
52
48
  diff-lcs (>= 1.2.0, < 2.0)
53
- rspec-support (~> 3.5.0)
54
- rspec-support (3.5.0)
55
- simplecov (0.12.0)
56
- docile (~> 1.1.0)
49
+ rspec-support (~> 3.8.0)
50
+ rspec-support (3.8.0)
51
+ simplecov (0.16.1)
52
+ docile (~> 1.1)
57
53
  json (>= 1.8, < 3)
58
54
  simplecov-html (~> 0.10.0)
59
- simplecov-html (0.10.0)
60
- slop (3.6.0)
61
- test-unit (3.2.0)
55
+ simplecov-html (0.10.2)
56
+ test-unit (3.3.0)
62
57
  power_assert
63
- ydbd-pg (0.5.3)
58
+ ydbd-pg (0.5.6)
64
59
  pg
65
- ydbi (>= 0.5.0)
66
- ydbi (0.5.3)
60
+ ydbi (= 0.5.6)
61
+ ydbi (0.5.6)
67
62
  deprecated (= 2.0.1)
68
63
 
69
64
  PLATFORMS
@@ -81,4 +76,4 @@ DEPENDENCIES
81
76
  yus!
82
77
 
83
78
  BUNDLED WITH
84
- 1.12.5
79
+ 2.0.1
@@ -1,3 +1,9 @@
1
+ === 1.0.5 / 21.03.2019
2
+
3
+ * Requires at least ruby 2.3 and bundler 2.0
4
+ * Do not mention pg, ydbd-pg and ydbg in yus.gemspec as it is an indirect dependencies introduced odba
5
+
6
+
1
7
  === 1.0.4 / 11.07.2016
2
8
 
3
9
  * Added yus_migrate_to_utf_8
data/bin/yusd CHANGED
@@ -29,7 +29,7 @@ defaults = {
29
29
  'persistence' => 'odba',
30
30
  'root_name' => 'admin',
31
31
  'root_pass' => nil,
32
- 'server_url' => 'drbssl://localhost:9997',
32
+ 'server_url' => 'drbssl://127.0.0.1:9997',
33
33
  'session_timeout' => 300,
34
34
  'ssl_key' => File.expand_path('../data/yus.key',
35
35
  File.dirname(__FILE__)),
@@ -8,7 +8,7 @@ require 'pp'
8
8
  require 'yaml'
9
9
  require 'fileutils'
10
10
 
11
- begin
11
+ begin
12
12
  require 'encoding/character/utf-8'
13
13
  rescue LoadError
14
14
  end
@@ -25,7 +25,7 @@ module Yus
25
25
  end
26
26
  def affiliate(name, groupname)
27
27
  info("affiliate(name=#{name}, group=#{groupname})")
28
- @mutex.synchronize {
28
+ @mutex.synchronize {
29
29
  allow_or_fail('edit', 'yus.entities')
30
30
  user = find_or_fail(name)
31
31
  group = find_or_fail(groupname)
@@ -58,7 +58,7 @@ module Yus
58
58
  def create_entity(name, valid_until=nil, valid_from=Time.now)
59
59
  info("create_entity(name=#{name}, valid_until=#{valid_until}, valid_from=#{valid_from})")
60
60
  entity = nil
61
- @mutex.synchronize {
61
+ @mutex.synchronize {
62
62
  allow_or_fail('edit', 'yus.entities')
63
63
  if(@needle.persistence.find_entity(name))
64
64
  debug("create_entity: Duplicate Name: '#{name}'")
@@ -84,7 +84,7 @@ module Yus
84
84
  end
85
85
  def disaffiliate(name, groupname)
86
86
  info("disaffiliate(name=#{name}, group=#{groupname})")
87
- @mutex.synchronize {
87
+ @mutex.synchronize {
88
88
  allow_or_fail('edit', 'yus.entities')
89
89
  user = find_or_fail(name)
90
90
  group = find_or_fail(groupname)
@@ -107,7 +107,7 @@ module Yus
107
107
  end
108
108
  def grant(name, action, item=nil, expires=nil)
109
109
  info("grant(name=#{name}, action=#{action}, item=#{item}, expires=#{expires})")
110
- @mutex.synchronize {
110
+ @mutex.synchronize {
111
111
  allow_or_fail('grant', action)
112
112
  user = find_or_fail(name)
113
113
  user.grant(action, item || :everything, expires || :never)
@@ -127,7 +127,7 @@ module Yus
127
127
  end
128
128
  def rename(oldname, newname)
129
129
  info("rename(#{oldname}, #{newname})")
130
- @mutex.synchronize {
130
+ @mutex.synchronize {
131
131
  allow_or_fail('edit', 'yus.entities')
132
132
  user = find_or_fail(oldname)
133
133
  if((other = @needle.persistence.find_entity(newname)) && other != user)
@@ -198,13 +198,13 @@ module Yus
198
198
  @domain = domain
199
199
  super(needle)
200
200
  end
201
- def allowed?(*args)
201
+ def allowed?(*args) # AutoSession
202
202
  false
203
203
  end
204
204
  def create_entity(name, pass=nil, valid_until=nil, valid_from=Time.now)
205
205
  info("create_entity(name=#{name}, valid_until=#{valid_until}, valid_from=#{valid_from})")
206
206
  entity = nil
207
- @mutex.synchronize {
207
+ @mutex.synchronize {
208
208
  if(@needle.persistence.find_entity(name))
209
209
  debug("create_entity: Duplicate Name: '#{name}'")
210
210
  raise DuplicateNameError, "Duplicate name: #{name}"
@@ -223,14 +223,14 @@ module Yus
223
223
  end
224
224
  def get_entity_preference(name, key, domain=@domain)
225
225
  debug("get_entity_preference(name=#{name}, key=#{key}, domain=#{domain})")
226
- @mutex.synchronize {
226
+ @mutex.synchronize {
227
227
  user = find_or_fail(name)
228
228
  user.get_preference(key, domain)
229
229
  }
230
230
  end
231
231
  def get_entity_preferences(name, keys, domain=@domain)
232
232
  debug("get_entity_preferences(name=#{name}, keys=#{keys}, domain=#{domain})")
233
- @mutex.synchronize {
233
+ @mutex.synchronize {
234
234
  user = find_or_fail(name)
235
235
  keys.inject({}) { |memo, key|
236
236
  memo.store(key, user.get_preference(key, domain))
@@ -240,7 +240,7 @@ module Yus
240
240
  end
241
241
  def rename(oldname, newname)
242
242
  info("rename(#{oldname}, #{newname})")
243
- @mutex.synchronize {
243
+ @mutex.synchronize {
244
244
  user = find_or_fail(oldname)
245
245
  if((other = @needle.persistence.find_entity(newname)) && other != user)
246
246
  raise DuplicateNameError, "Duplicate name: #{newname}"
@@ -277,7 +277,7 @@ module Yus
277
277
  end
278
278
  def grant(name, action, item=nil, expires=nil)
279
279
  info("grant(name=#{name}, action=#{action}, item=#{item}, expires=#{expires})")
280
- @mutex.synchronize {
280
+ @mutex.synchronize {
281
281
  user = find_or_fail(name)
282
282
  user.grant(action, item || :everything, expires || :never)
283
283
  save(user)
@@ -291,7 +291,7 @@ module Yus
291
291
  @domain = domain
292
292
  super(needle)
293
293
  end
294
- def allowed?(*args)
294
+ def allowed?(*args) # EntitySession
295
295
  res = @user.allowed?(*args)
296
296
  debug("#{@user.name} allowed?(#{args.join(', ')}) returns #{res}")
297
297
  res
@@ -331,7 +331,7 @@ module Yus
331
331
  end
332
332
  end
333
333
  class TokenSession < EntitySession
334
- def allowed?(*args)
334
+ def allowed?(*args) # TokenSession
335
335
  key, arg, = args
336
336
  if key == 'set_password' || ( key == 'edit' && arg == 'yus.entities' )
337
337
  false
@@ -341,7 +341,7 @@ module Yus
341
341
  end
342
342
  end
343
343
  class RootSession < Session
344
- def allowed?(*args)
344
+ def allowed?(*args) # RootSession
345
345
  true
346
346
  end
347
347
  def name
@@ -1,3 +1,3 @@
1
1
  module Yus
2
- VERSION = '1.0.4'
2
+ VERSION = '1.0.5'
3
3
  end
data/readme.md CHANGED
@@ -9,7 +9,7 @@ software packages.
9
9
 
10
10
  ## FEATURES/PROBLEMS:
11
11
 
12
- * Only runs on Ruby 1.8 or ruby >= 2.1.0
12
+ * Only runs on Ruby >= 2.1.0
13
13
 
14
14
  ## INSTALL:
15
15
 
data/sha256.rb CHANGED
File without changes
@@ -14,22 +14,16 @@ Gem::Specification.new do |spec|
14
14
  spec.license = "GPLv3"
15
15
  spec.homepage = "https://github.com/zdavatz/yus/"
16
16
 
17
- # if RUBY_VERSION.to_f > 2.0
18
- # spec.metadata['allowed_push_host'] = 'RubyGems.org'
19
- # end
17
+ spec.metadata['allowed_push_host'] = 'https://rubygems.org' if RUBY_VERSION.to_f > 2.0
20
18
 
21
19
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
22
20
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
23
21
  spec.require_paths = ["lib"]
24
22
 
25
23
  spec.add_dependency "needle"
26
- # Ruby 1.8.7 cannot install pg 0.18.4
27
- spec.add_dependency "pg", '0.17.0'
28
- spec.add_dependency "ydbi", '>= 0.5.1'
29
24
  spec.add_dependency 'rclconf'
30
- spec.add_dependency 'odba'
25
+ spec.add_dependency 'odba', '>= 1.1.6'
31
26
 
32
- spec.add_runtime_dependency "ydbd-pg", '>= 0.5.1'
33
27
  spec.add_runtime_dependency 'highline'
34
28
  spec.add_dependency 'deprecated', '2.0.1'
35
29
  spec.add_development_dependency "test-unit"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yus
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yasuhiro Asaka, Zeno R.R. Davatz, Niklaus Giger
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-12 00:00:00.000000000 Z
11
+ date: 2019-03-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: needle
@@ -24,34 +24,6 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: pg
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - '='
32
- - !ruby/object:Gem::Version
33
- version: 0.17.0
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - '='
39
- - !ruby/object:Gem::Version
40
- version: 0.17.0
41
- - !ruby/object:Gem::Dependency
42
- name: ydbi
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: 0.5.1
48
- type: :runtime
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: 0.5.1
55
27
  - !ruby/object:Gem::Dependency
56
28
  name: rclconf
57
29
  requirement: !ruby/object:Gem::Requirement
@@ -72,28 +44,14 @@ dependencies:
72
44
  requirements:
73
45
  - - ">="
74
46
  - !ruby/object:Gem::Version
75
- version: '0'
76
- type: :runtime
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- version: '0'
83
- - !ruby/object:Gem::Dependency
84
- name: ydbd-pg
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - ">="
88
- - !ruby/object:Gem::Version
89
- version: 0.5.1
47
+ version: 1.1.6
90
48
  type: :runtime
91
49
  prerelease: false
92
50
  version_requirements: !ruby/object:Gem::Requirement
93
51
  requirements:
94
52
  - - ">="
95
53
  - !ruby/object:Gem::Version
96
- version: 0.5.1
54
+ version: 1.1.6
97
55
  - !ruby/object:Gem::Dependency
98
56
  name: highline
99
57
  requirement: !ruby/object:Gem::Requirement
@@ -286,7 +244,8 @@ files:
286
244
  homepage: https://github.com/zdavatz/yus/
287
245
  licenses:
288
246
  - GPLv3
289
- metadata: {}
247
+ metadata:
248
+ allowed_push_host: https://rubygems.org
290
249
  post_install_message:
291
250
  rdoc_options: []
292
251
  require_paths:
@@ -303,7 +262,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
303
262
  version: '0'
304
263
  requirements: []
305
264
  rubyforge_project:
306
- rubygems_version: 2.5.1
265
+ rubygems_version: 2.7.3
307
266
  signing_key:
308
267
  specification_version: 4
309
268
  summary: ywesee user server