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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5e3f6aaccaca24c6a5e7dff34a3002008b1ee470
4
- data.tar.gz: 44be6c4edf11da60d4f76185a5f45915d17d6b41
3
+ metadata.gz: e3fc28fce5aa805abdad050ffdef1e226c3d0e21
4
+ data.tar.gz: 82395b0098a937f9029b197bb7dfcd162431fba6
5
5
  SHA512:
6
- metadata.gz: 327888963d8caae5220afa74ddb45779956d283ae7f0ac179e5d086b2c17d8afbbe84d3582bfe4147dfc7675a0a9d2909ff8971a43fa14f5a687b0681136277a
7
- data.tar.gz: 199be717bcf61ac252ea1e954a87dd3b205346c50b1c30cdbe5cd6eb3910791d56620978656269c6ff0322caba613b4a9ae98bade1c49e4c25150b222d044936
6
+ metadata.gz: 19a658d2306004a0ddbdff5a41b2759b28b9e05740fcac3478716ece2da39394e26c15e5dfd40a553eab0a53d8c86035380672a38e61f302acbcf7a8696a199d
7
+ data.tar.gz: f3c2016f4233c691cc4d7834f4526321eb4f02c7ed66872683589c0614def0452b0e446c70583bdc77f7b338a9c6162e8baeec319a566159f6cc81a2f5b9e4e0
@@ -7,13 +7,12 @@ module GrantFront
7
7
  options[:rake] = true if options[:rake].nil?
8
8
 
9
9
  if defined? Rails
10
- path = Rails.root.join('app/policies/*.rb').to_s
11
- constants = Dir.glob(path).inject([]) do |arr, item|
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
- name = File.basename(item, '.*')
14
- unless name == 'application_policy'
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
@@ -1,3 +1,3 @@
1
1
  module GrantFront
2
- VERSION = '0.2.0'.freeze
2
+ VERSION = '0.2.1'.freeze
3
3
  end
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.0
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: 2014-12-07 00:00:00.000000000 Z
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.2.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: