rolypoly 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b09c15051b80319c301293ec37ab69543724ca83
4
- data.tar.gz: 3af871d40e05440ee846689d45bc479914bf26cb
3
+ metadata.gz: 1edb5688538c2b284ffedf79a379a70e92073484
4
+ data.tar.gz: b1e672c8bb90ce9b2061a4ffb3c3aa93f9696865
5
5
  SHA512:
6
- metadata.gz: 74757c303d7c9f040d8685a3baa9e0401584a3bea4ba6e241d883387e3089ee9db3c05e8644a8978b1efa70f91341a0d6a97bfa15909a43458d2be86a1cafb01
7
- data.tar.gz: 01b232b80eeb8d65569fdc28a03348fedeb98bf50ca4b0ba003e068c1ed14afb6b478dca1d2b0d7f94d132353cd66dd7d2827f9bc9cdd997ef403f3c9a504cae
6
+ metadata.gz: 1fdab74446c185aff377f3cb4ef238cea5ff23237001d4401d11ceb34b102ffa16d2661272084a42e04b992011e074dcd296920a4ed7e17ff04e5927eeab6f5e
7
+ data.tar.gz: 54e68d95397017a05f272ef9d708d808d4f8c2c456f8b81d6837e9f4ab2e81f649bf9f6a31661d811a5e3094393c73125a1accf5af8ac85f6de061396445fe71
@@ -0,0 +1,3 @@
1
+ cache:
2
+ - bundler
3
+ before_install: gem update bundler
@@ -86,17 +86,12 @@ module Rolypoly
86
86
  return true unless require_resource?
87
87
  return false unless check_role.respond_to?(:resource?)
88
88
 
89
- if resources?(required_resource)
90
- required_resource.any? do |r|
91
- check_role.resource?(r)
92
- end
93
- else
94
- check_role.resource?(required_resource)
95
- end
89
+ required_resources = type_id_resource?(required_resource) ? [required_resource] : Array(required_resource)
90
+ required_resources.any? {|r| check_role.resource?(r) }
96
91
  end
97
92
 
98
- private def resources?(resources)
99
- resources.is_a?(Array) && !%w(String Symbol).include?(resources.first.class.name)
93
+ private def type_id_resource?(required_resource)
94
+ required_resource.is_a?(Array) && %w(String Symbol).include?(required_resource.first.class.name)
100
95
  end
101
96
 
102
97
  private def find_required_resource(options = {})
@@ -1,3 +1,3 @@
1
1
  module Rolypoly
2
- VERSION = "1.0.3"
2
+ VERSION = "1.0.4"
3
3
  end
@@ -18,7 +18,6 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_development_dependency "bundler", "~> 1.8"
22
21
  spec.add_development_dependency "rake"
23
22
  spec.add_development_dependency "rspec"
24
23
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rolypoly
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Phenow
@@ -9,22 +9,8 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-10-05 00:00:00.000000000 Z
12
+ date: 2017-10-19 00:00:00.000000000 Z
13
13
  dependencies:
14
- - !ruby/object:Gem::Dependency
15
- name: bundler
16
- requirement: !ruby/object:Gem::Requirement
17
- requirements:
18
- - - "~>"
19
- - !ruby/object:Gem::Version
20
- version: '1.8'
21
- type: :development
22
- prerelease: false
23
- version_requirements: !ruby/object:Gem::Requirement
24
- requirements:
25
- - - "~>"
26
- - !ruby/object:Gem::Version
27
- version: '1.8'
28
14
  - !ruby/object:Gem::Dependency
29
15
  name: rake
30
16
  requirement: !ruby/object:Gem::Requirement
@@ -65,6 +51,7 @@ files:
65
51
  - ".rspec"
66
52
  - ".ruby-gemset"
67
53
  - ".ruby-version"
54
+ - ".travis.yml"
68
55
  - Gemfile
69
56
  - LICENSE.txt
70
57
  - README.md