grant-front 0.2.0 → 0.2.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.
- checksums.yaml +4 -4
- data/lib/grant-front/policy.rb +5 -6
- data/lib/grant-front/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e3fc28fce5aa805abdad050ffdef1e226c3d0e21
|
|
4
|
+
data.tar.gz: 82395b0098a937f9029b197bb7dfcd162431fba6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 19a658d2306004a0ddbdff5a41b2759b28b9e05740fcac3478716ece2da39394e26c15e5dfd40a553eab0a53d8c86035380672a38e61f302acbcf7a8696a199d
|
|
7
|
+
data.tar.gz: f3c2016f4233c691cc4d7834f4526321eb4f02c7ed66872683589c0614def0452b0e446c70583bdc77f7b338a9c6162e8baeec319a566159f6cc81a2f5b9e4e0
|
data/lib/grant-front/policy.rb
CHANGED
|
@@ -7,13 +7,12 @@ module GrantFront
|
|
|
7
7
|
options[:rake] = true if options[:rake].nil?
|
|
8
8
|
|
|
9
9
|
if defined? Rails
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
policies_path = Rails.root.join('app/policies/').to_s
|
|
11
|
+
policie_path = Rails.root.join(policies_path, '**/*.rb').to_s
|
|
12
|
+
constants = Dir.glob(policie_path).inject([]) do |arr, item|
|
|
12
13
|
require item if options[:rake]
|
|
13
|
-
|
|
14
|
-
unless
|
|
15
|
-
arr << self.new(name.camelize)
|
|
16
|
-
end
|
|
14
|
+
klass = item.gsub(policies_path, '').gsub('.rb', '').camelcase
|
|
15
|
+
arr << self.new(klass) unless klass == 'ApplicationPolicy'
|
|
17
16
|
arr
|
|
18
17
|
end
|
|
19
18
|
end
|
data/lib/grant-front/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: grant-front
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- ogom
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2016-01-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: kramdown
|
|
@@ -113,7 +113,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
113
113
|
version: '0'
|
|
114
114
|
requirements: []
|
|
115
115
|
rubyforge_project:
|
|
116
|
-
rubygems_version: 2.
|
|
116
|
+
rubygems_version: 2.4.5.1
|
|
117
117
|
signing_key:
|
|
118
118
|
specification_version: 4
|
|
119
119
|
summary: Authorization Grant Front.
|
|
@@ -123,3 +123,4 @@ test_files:
|
|
|
123
123
|
- spec/lib/policy_spec.rb
|
|
124
124
|
- spec/lib/version_spec.rb
|
|
125
125
|
- spec/spec_helper.rb
|
|
126
|
+
has_rdoc:
|