goz 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/HISTORY.rdoc +6 -4
- data/README.rdoc +0 -18
- data/TODO.md +0 -7
- data/lib/goz.rb +7 -4
- data/lib/goz/group/grouper/stemmed_groups.rb +10 -11
- data/lib/goz/version.rb +1 -1
- metadata +2 -2
data/HISTORY.rdoc
CHANGED
data/README.rdoc
CHANGED
@@ -1,18 +0,0 @@
|
|
1
|
-
= Goz - Generic self-service provisioning system
|
2
|
-
|
3
|
-
== Usage
|
4
|
-
|
5
|
-
See https://github.com/blairc/goz-sinatra for an example implementation
|
6
|
-
|
7
|
-
== Author
|
8
|
-
|
9
|
-
blair christensen. <mailto:blair.christensen@gmail.com>
|
10
|
-
|
11
|
-
== Homepage
|
12
|
-
|
13
|
-
https://github.com/blairc/goz/
|
14
|
-
|
15
|
-
== See Also
|
16
|
-
|
17
|
-
https://github.com/blairc/goz-sinatra/, https://github.com/blairc/goz-rails/
|
18
|
-
|
data/TODO.md
CHANGED
@@ -1,16 +1,9 @@
|
|
1
1
|
Goz To Do
|
2
2
|
=========
|
3
3
|
|
4
|
-
Goz v0.1.0
|
5
|
-
----------
|
6
|
-
* Release v0.1.0
|
7
|
-
|
8
|
-
|
9
4
|
Future
|
10
5
|
------
|
11
|
-
* Documentation!
|
12
6
|
* Add a real service
|
13
|
-
* Revisit-or-remove `Goz::Cache`
|
14
7
|
* Add support for asynchronous jobs (eg. interacting with external services)
|
15
8
|
* Rework API definition to support multiple implementations
|
16
9
|
|
data/lib/goz.rb
CHANGED
@@ -9,11 +9,14 @@ require_relative 'goz/user'
|
|
9
9
|
require_relative 'goz/version'
|
10
10
|
|
11
11
|
#
|
12
|
-
# = Goz - Generic
|
13
|
-
#
|
14
|
-
# == Usage
|
12
|
+
# = Goz - Generic service provisioning system for groups.
|
15
13
|
#
|
16
|
-
#
|
14
|
+
# This code is does not by itself implement a service. Instead it provides
|
15
|
+
# some of the common middleware that could be used by an actual implementation.
|
16
|
+
#
|
17
|
+
# See https://github.com/blairc/goz-sinatra for an example implementation.
|
18
|
+
#
|
19
|
+
# This code is an update/rewrite of https://github.com/blairc/goz-rails/.
|
17
20
|
#
|
18
21
|
# == Author
|
19
22
|
#
|
@@ -43,15 +43,14 @@ module Goz # :nodoc:
|
|
43
43
|
name.rstrip!
|
44
44
|
Goz::Logger.debug TAG, "find_by_name( name=#{name} )"
|
45
45
|
g = super(name)
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
end
|
53
|
-
return new ns
|
46
|
+
return g unless g.nil?
|
47
|
+
connect do |grouper|
|
48
|
+
ns = grouper.stem(name)
|
49
|
+
if ns.nil?
|
50
|
+
Goz::Logger.debug TAG, "find_by_name( name=#{name} ) - not found"
|
51
|
+
return nil
|
54
52
|
end
|
53
|
+
return new ns
|
55
54
|
end
|
56
55
|
nil
|
57
56
|
end
|
@@ -61,8 +60,8 @@ module Goz # :nodoc:
|
|
61
60
|
#
|
62
61
|
def admins()
|
63
62
|
Goz::Logger.debug TAG, "name=#{self.name} - #admins()"
|
64
|
-
return super
|
65
|
-
return super
|
63
|
+
return super unless stem?(self.name)
|
64
|
+
return super if self.class.stemmed_group?(self.name)
|
66
65
|
_members @@cf['admin_suffix']
|
67
66
|
end
|
68
67
|
|
@@ -84,7 +83,7 @@ module Goz # :nodoc:
|
|
84
83
|
#
|
85
84
|
def members()
|
86
85
|
Goz::Logger.debug TAG, "#{self.name} - #members()"
|
87
|
-
return super
|
86
|
+
return super unless stem?(self.name)
|
88
87
|
_members @@cf['member_suffix']
|
89
88
|
end
|
90
89
|
|
data/lib/goz/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: goz
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-09-
|
12
|
+
date: 2012-09-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|