consul 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of consul might be problematic. Click here for more details.
- data/Gemfile +1 -0
- data/VERSION +1 -1
- data/consul.gemspec +23 -24
- data/lib/consul/power.rb +5 -1
- data/spec/app_root/app/models/client.rb +0 -6
- data/spec/app_root/app/models/power.rb +4 -0
- data/spec/consul/power_spec.rb +4 -0
- metadata +26 -28
data/Gemfile
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.2
|
data/consul.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{consul}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Henning Koch"]
|
12
|
-
s.date = %q{2011-
|
12
|
+
s.date = %q{2011-07-07}
|
13
13
|
s.description = %q{Consul is a scope-based authorization solution for Ruby on Rails.}
|
14
14
|
s.email = %q{henning.koch@makandra.de}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -61,38 +61,37 @@ Gem::Specification.new do |s|
|
|
61
61
|
s.homepage = %q{http://github.com/makandra/consul}
|
62
62
|
s.rdoc_options = ["--charset=UTF-8"]
|
63
63
|
s.require_paths = ["lib"]
|
64
|
-
s.rubygems_version = %q{1.
|
64
|
+
s.rubygems_version = %q{1.7.2}
|
65
65
|
s.summary = %q{Scope-based authorization solution for Rails}
|
66
66
|
s.test_files = [
|
67
|
-
"spec/
|
68
|
-
"spec/
|
69
|
-
"spec/
|
70
|
-
"spec/
|
71
|
-
"spec/
|
72
|
-
"spec/app_root/
|
73
|
-
"spec/app_root/config/environments/mysql.rb",
|
74
|
-
"spec/app_root/config/environments/postgresql.rb",
|
75
|
-
"spec/app_root/config/environments/sqlite.rb",
|
76
|
-
"spec/app_root/config/environments/sqlite3.rb",
|
77
|
-
"spec/app_root/config/routes.rb",
|
78
|
-
"spec/app_root/lib/console_with_fixtures.rb",
|
67
|
+
"spec/controllers/users_controller_spec.rb",
|
68
|
+
"spec/controllers/songs_controller_spec.rb",
|
69
|
+
"spec/controllers/dashboards_controller_spec.rb",
|
70
|
+
"spec/spec_helper.rb",
|
71
|
+
"spec/consul/power_spec.rb",
|
72
|
+
"spec/app_root/app/controllers/songs_controller.rb",
|
79
73
|
"spec/app_root/app/controllers/dashboards_controller.rb",
|
80
74
|
"spec/app_root/app/controllers/application_controller.rb",
|
81
75
|
"spec/app_root/app/controllers/users_controller.rb",
|
82
|
-
"spec/app_root/app/controllers/songs_controller.rb",
|
83
76
|
"spec/app_root/app/models/client.rb",
|
84
|
-
"spec/app_root/app/models/note.rb",
|
85
|
-
"spec/app_root/app/models/user.rb",
|
86
77
|
"spec/app_root/app/models/power.rb",
|
87
|
-
"spec/
|
88
|
-
"spec/
|
89
|
-
"spec/
|
90
|
-
"spec/
|
91
|
-
"spec/
|
78
|
+
"spec/app_root/app/models/user.rb",
|
79
|
+
"spec/app_root/app/models/note.rb",
|
80
|
+
"spec/app_root/lib/console_with_fixtures.rb",
|
81
|
+
"spec/app_root/config/boot.rb",
|
82
|
+
"spec/app_root/config/routes.rb",
|
83
|
+
"spec/app_root/config/environments/mysql.rb",
|
84
|
+
"spec/app_root/config/environments/sqlite3.rb",
|
85
|
+
"spec/app_root/config/environments/in_memory.rb",
|
86
|
+
"spec/app_root/config/environments/postgresql.rb",
|
87
|
+
"spec/app_root/config/environments/sqlite.rb",
|
88
|
+
"spec/app_root/config/environment.rb",
|
89
|
+
"spec/app_root/db/migrate/001_create_users.rb",
|
90
|
+
"spec/app_root/db/migrate/002_create_clients.rb",
|
91
|
+
"spec/app_root/db/migrate/003_create_notes.rb"
|
92
92
|
]
|
93
93
|
|
94
94
|
if s.respond_to? :specification_version then
|
95
|
-
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
96
95
|
s.specification_version = 3
|
97
96
|
|
98
97
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
data/lib/consul/power.rb
CHANGED
@@ -37,7 +37,11 @@ module Consul
|
|
37
37
|
define_method("#{name.to_s.singularize}?") { |*args| include?(name, *args) }
|
38
38
|
define_method("#{name.to_s.singularize}!") { |*args| include!(name, *args) }
|
39
39
|
ids_method = power_ids_name(name)
|
40
|
-
define_method(ids_method)
|
40
|
+
define_method(ids_method) do |*args|
|
41
|
+
scope = send(name, *args)
|
42
|
+
scope_ids = scope.scoped(:select => "`#{scope.table_name}`.`id`")
|
43
|
+
scope_ids.collect(&:id)
|
44
|
+
end
|
41
45
|
memoize ids_method
|
42
46
|
name
|
43
47
|
end
|
data/spec/consul/power_spec.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: consul
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 31
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 2
|
10
|
+
version: 0.1.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Henning Koch
|
@@ -15,8 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
19
|
-
default_executable:
|
18
|
+
date: 2011-07-07 00:00:00 Z
|
20
19
|
dependencies: []
|
21
20
|
|
22
21
|
description: Consul is a scope-based authorization solution for Ruby on Rails.
|
@@ -69,7 +68,6 @@ files:
|
|
69
68
|
- spec/rcov.opts
|
70
69
|
- spec/spec.opts
|
71
70
|
- spec/spec_helper.rb
|
72
|
-
has_rdoc: true
|
73
71
|
homepage: http://github.com/makandra/consul
|
74
72
|
licenses: []
|
75
73
|
|
@@ -99,33 +97,33 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
99
97
|
requirements: []
|
100
98
|
|
101
99
|
rubyforge_project:
|
102
|
-
rubygems_version: 1.
|
100
|
+
rubygems_version: 1.7.2
|
103
101
|
signing_key:
|
104
102
|
specification_version: 3
|
105
103
|
summary: Scope-based authorization solution for Rails
|
106
104
|
test_files:
|
107
|
-
- spec/
|
108
|
-
- spec/
|
109
|
-
- spec/
|
110
|
-
- spec/
|
111
|
-
- spec/
|
112
|
-
- spec/app_root/
|
113
|
-
- spec/app_root/config/environments/mysql.rb
|
114
|
-
- spec/app_root/config/environments/postgresql.rb
|
115
|
-
- spec/app_root/config/environments/sqlite.rb
|
116
|
-
- spec/app_root/config/environments/sqlite3.rb
|
117
|
-
- spec/app_root/config/routes.rb
|
118
|
-
- spec/app_root/lib/console_with_fixtures.rb
|
105
|
+
- spec/controllers/users_controller_spec.rb
|
106
|
+
- spec/controllers/songs_controller_spec.rb
|
107
|
+
- spec/controllers/dashboards_controller_spec.rb
|
108
|
+
- spec/spec_helper.rb
|
109
|
+
- spec/consul/power_spec.rb
|
110
|
+
- spec/app_root/app/controllers/songs_controller.rb
|
119
111
|
- spec/app_root/app/controllers/dashboards_controller.rb
|
120
112
|
- spec/app_root/app/controllers/application_controller.rb
|
121
113
|
- spec/app_root/app/controllers/users_controller.rb
|
122
|
-
- spec/app_root/app/controllers/songs_controller.rb
|
123
114
|
- spec/app_root/app/models/client.rb
|
124
|
-
- spec/app_root/app/models/note.rb
|
125
|
-
- spec/app_root/app/models/user.rb
|
126
115
|
- spec/app_root/app/models/power.rb
|
127
|
-
- spec/
|
128
|
-
- spec/
|
129
|
-
- spec/
|
130
|
-
- spec/
|
131
|
-
- spec/
|
116
|
+
- spec/app_root/app/models/user.rb
|
117
|
+
- spec/app_root/app/models/note.rb
|
118
|
+
- spec/app_root/lib/console_with_fixtures.rb
|
119
|
+
- spec/app_root/config/boot.rb
|
120
|
+
- spec/app_root/config/routes.rb
|
121
|
+
- spec/app_root/config/environments/mysql.rb
|
122
|
+
- spec/app_root/config/environments/sqlite3.rb
|
123
|
+
- spec/app_root/config/environments/in_memory.rb
|
124
|
+
- spec/app_root/config/environments/postgresql.rb
|
125
|
+
- spec/app_root/config/environments/sqlite.rb
|
126
|
+
- spec/app_root/config/environment.rb
|
127
|
+
- spec/app_root/db/migrate/001_create_users.rb
|
128
|
+
- spec/app_root/db/migrate/002_create_clients.rb
|
129
|
+
- spec/app_root/db/migrate/003_create_notes.rb
|