mayi 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/LICENSE.txt +1 -1
- data/Rakefile +2 -2
- data/VERSION +1 -1
- data/lib/mayi/access.rb +7 -1
- data/mayi.gemspec +63 -0
- metadata +8 -5
data/LICENSE.txt
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
GNU LESSER GENERAL PUBLIC LICENSE
|
2
2
|
Version 3, 29 June 2007
|
3
3
|
|
4
|
-
Copyright (C)
|
4
|
+
Copyright (C) 2012 Björn Blomqvist, Erik Hansson. <http://bits2life.com/>
|
5
5
|
Everyone is permitted to copy and distribute verbatim copies
|
6
6
|
of this license document, but changing it is not allowed.
|
7
7
|
|
data/Rakefile
CHANGED
@@ -17,8 +17,8 @@ Jeweler::Tasks.new do |gem|
|
|
17
17
|
gem.name = "mayi"
|
18
18
|
gem.homepage = "http://github.com/bjornblomqvist/mayi"
|
19
19
|
gem.license = "LGPL3"
|
20
|
-
gem.summary = %Q{ A plugable access rights
|
21
|
-
gem.description = %Q{ A plugable access rights
|
20
|
+
gem.summary = %Q{ A plugable access rights API. Meant to make integrations easier. }
|
21
|
+
gem.description = %Q{ A plugable access rights API. Meant to make integrations easier. Werry useful as an integration point for blog,forum and CMS components. Also its much nicer to read than the basic stuff i usually do. }
|
22
22
|
gem.email = "darwin@bits2life.com"
|
23
23
|
gem.authors = ["Darwin"]
|
24
24
|
# dependencies defined in Gemfile
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.1
|
data/lib/mayi/access.rb
CHANGED
@@ -9,7 +9,13 @@ module MayI
|
|
9
9
|
|
10
10
|
def refresh(data = {})
|
11
11
|
raise "You have not set any implementation yet" unless self.implementation
|
12
|
-
|
12
|
+
if self.implementation.is_a?(Class)
|
13
|
+
Thread.current["mayi_access_implementation_#{self.object_id}"] = self.implementation.new(data)
|
14
|
+
else
|
15
|
+
instance = self.implementation.to_s.split('::').reduce(Object){|cls, c| cls.const_get(c) }.new(data)
|
16
|
+
Thread.current["mayi_access_implementation_#{self.object_id}"] = instance
|
17
|
+
end
|
18
|
+
|
13
19
|
end
|
14
20
|
|
15
21
|
def clear
|
data/mayi.gemspec
ADDED
@@ -0,0 +1,63 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = "mayi"
|
8
|
+
s.version = "1.0.1"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Darwin"]
|
12
|
+
s.date = "2012-08-23"
|
13
|
+
s.description = " A plugable access rights API. Meant to make integrations easier. Werry useful as an integration point for blog,forum and CMS components. Also its much nicer to read than the basic stuff i usually do. "
|
14
|
+
s.email = "darwin@bits2life.com"
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE.txt",
|
17
|
+
"README.markdown"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
".document",
|
21
|
+
".rspec",
|
22
|
+
"Gemfile",
|
23
|
+
"Gemfile.lock",
|
24
|
+
"LICENSE.txt",
|
25
|
+
"README.markdown",
|
26
|
+
"Rakefile",
|
27
|
+
"VERSION",
|
28
|
+
"lib/mayi.rb",
|
29
|
+
"lib/mayi/access.rb",
|
30
|
+
"lib/mayi/access_denied_error.rb",
|
31
|
+
"lib/mayi/proxy.rb",
|
32
|
+
"mayi.gemspec",
|
33
|
+
"spec/mayi_spec.rb",
|
34
|
+
"spec/spec_helper.rb"
|
35
|
+
]
|
36
|
+
s.homepage = "http://github.com/bjornblomqvist/mayi"
|
37
|
+
s.licenses = ["LGPL3"]
|
38
|
+
s.require_paths = ["lib"]
|
39
|
+
s.rubygems_version = "1.8.24"
|
40
|
+
s.summary = "A plugable access rights API. Meant to make integrations easier."
|
41
|
+
|
42
|
+
if s.respond_to? :specification_version then
|
43
|
+
s.specification_version = 3
|
44
|
+
|
45
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
46
|
+
s.add_development_dependency(%q<rspec>, ["~> 2.8.0"])
|
47
|
+
s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
|
48
|
+
s.add_development_dependency(%q<bundler>, [">= 0"])
|
49
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.8.4"])
|
50
|
+
else
|
51
|
+
s.add_dependency(%q<rspec>, ["~> 2.8.0"])
|
52
|
+
s.add_dependency(%q<rdoc>, ["~> 3.12"])
|
53
|
+
s.add_dependency(%q<bundler>, [">= 0"])
|
54
|
+
s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
|
55
|
+
end
|
56
|
+
else
|
57
|
+
s.add_dependency(%q<rspec>, ["~> 2.8.0"])
|
58
|
+
s.add_dependency(%q<rdoc>, ["~> 3.12"])
|
59
|
+
s.add_dependency(%q<bundler>, [">= 0"])
|
60
|
+
s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mayi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.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-08-
|
12
|
+
date: 2012-08-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
@@ -75,7 +75,9 @@ dependencies:
|
|
75
75
|
- - ~>
|
76
76
|
- !ruby/object:Gem::Version
|
77
77
|
version: 1.8.4
|
78
|
-
description: ! ' A plugable access rights
|
78
|
+
description: ! ' A plugable access rights API. Meant to make integrations easier.
|
79
|
+
Werry useful as an integration point for blog,forum and CMS components. Also its
|
80
|
+
much nicer to read than the basic stuff i usually do. '
|
79
81
|
email: darwin@bits2life.com
|
80
82
|
executables: []
|
81
83
|
extensions: []
|
@@ -95,6 +97,7 @@ files:
|
|
95
97
|
- lib/mayi/access.rb
|
96
98
|
- lib/mayi/access_denied_error.rb
|
97
99
|
- lib/mayi/proxy.rb
|
100
|
+
- mayi.gemspec
|
98
101
|
- spec/mayi_spec.rb
|
99
102
|
- spec/spec_helper.rb
|
100
103
|
homepage: http://github.com/bjornblomqvist/mayi
|
@@ -112,7 +115,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
112
115
|
version: '0'
|
113
116
|
segments:
|
114
117
|
- 0
|
115
|
-
hash:
|
118
|
+
hash: -352664706531760730
|
116
119
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
117
120
|
none: false
|
118
121
|
requirements:
|
@@ -124,5 +127,5 @@ rubyforge_project:
|
|
124
127
|
rubygems_version: 1.8.24
|
125
128
|
signing_key:
|
126
129
|
specification_version: 3
|
127
|
-
summary: A plugable access rights
|
130
|
+
summary: A plugable access rights API. Meant to make integrations easier.
|
128
131
|
test_files: []
|