checkpoint 1.1.0 → 1.1.1

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
  SHA256:
3
- metadata.gz: 4a736e9a0fc810c9323dcd7612aee0cb27af02521c59ef448c62c4e5dac3e15c
4
- data.tar.gz: b4ab5365b4cae8e5f0040af209bea2c6b9da1e1e19f856d2ae088081188df1b9
3
+ metadata.gz: bf80606ac6b3eb3ea5e17811e5277a4bff2544fc14175a43787bdeb34d0e7c9d
4
+ data.tar.gz: 5c7458c59d16a9e71a3741e4c289c4019e1a8c86726f267e62b242b3bcc199cc
5
5
  SHA512:
6
- metadata.gz: b9f4e9ddda32c366b2402333cf8e43f52da41ad4c7d5ec5a77b66ec524d43c9a9ed521f533e28a27c5c8a96a5382f08a3212db1b4ebe38c12d8b6ea3042b9151
7
- data.tar.gz: ec1130f73c436b07751d09b7a7f74e9975da9ac2d6fdd29908878150e5053e9e15f9ba8916861b82a784aa8dafc28f0aee2bc1a7fb99046f68868a6f5dc1873d
6
+ metadata.gz: 2980132b509d3df0540895110ca6aec7dfe1502c7e93178e2410998bb7ba625728280ba67058e34d2f041aaed03f3d65b1d410206b38d8f76fb609c0ca430aa4
7
+ data.tar.gz: 2820e73cda2b10a56f2557b4cac142b561c1fb2783989a77f71c9225180bf72780d364bbd5c707900976d24ac9c8e8fe66a92fbad548649d2847457e6f3de46b
data/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  [![Build Status](https://travis-ci.org/mlibrary/checkpoint.svg?branch=master)](https://travis-ci.org/mlibrary/checkpoint?branch=master)
2
2
  [![Coverage Status](https://coveralls.io/repos/github/mlibrary/checkpoint/badge.svg?branch=master)](https://coveralls.io/github/mlibrary/checkpoint?branch=master)
3
- [![Documentation Status](https://readthedocs.org/projects/checkpoint/badge/?version=latest)](https://checkpoint.readthedocs.io/en/latest/?badge=latest)
3
+ [![User Docs](https://img.shields.io/badge/user_docs-readthedocs-blue.svg)](https://checkpoint.readthedocs.io/en/latest)
4
+ [![API Docs](https://img.shields.io/badge/API_docs-rubydoc.info-blue.svg)](https://www.rubydoc.info/gems/checkpoint)
4
5
 
5
6
  # Checkpoint
6
7
 
@@ -21,9 +22,11 @@ And then execute:
21
22
 
22
23
  ## Documentation
23
24
 
24
- User documentation source is available in the `docs` directory, and in rendered format
25
+ User documentation source is available in the `docs` directory and in rendered format
25
26
  on [readthedocs](https://checkpoint.readthedocs.io/en/latest/).
26
27
 
28
+ API/class documentation is in YARD format and in rendered format on [rubydoc.info](https://www.rubydoc.info/gems/checkpoint).
29
+
27
30
  ## License
28
31
 
29
32
  Checkpoint is licensed under the BSD-3-Clause license. See [LICENSE.md](LICENSE.md).
@@ -28,7 +28,7 @@ Gem::Specification.new do |spec|
28
28
  spec.add_dependency "ettin", "~> 1.1"
29
29
  spec.add_dependency "sequel", "~> 5.6"
30
30
 
31
- spec.add_development_dependency "bundler", "~> 1.16"
31
+ spec.add_development_dependency "bundler", "~> 2.0"
32
32
  spec.add_development_dependency "coveralls", "~> 0.8"
33
33
  spec.add_development_dependency "pry"
34
34
  spec.add_development_dependency "pry-byebug"
@@ -54,6 +54,14 @@ module Checkpoint
54
54
  AllOfAnyType.new
55
55
  end
56
56
 
57
+ # Test whether this Resource represents all entities of all types.
58
+ #
59
+ # @see {::all}
60
+ # @return [Boolean] true if this is a universal wildcard
61
+ def all?
62
+ type == ALL && id == ALL
63
+ end
64
+
57
65
  # Convert this object to a Resource.
58
66
  #
59
67
  # For Checkpoint-supplied Resources, this is an identity operation,
@@ -117,6 +125,14 @@ module Checkpoint
117
125
  Resource::AllOfType.new(type)
118
126
  end
119
127
 
128
+ # Test whether this is a Resource wildcard of some specific type.
129
+ #
130
+ # @return [Boolean] true if this Resource has a specific type, but
131
+ # has the any/all ID, representing any Resources of that type
132
+ def all_of_type?
133
+ type != ALL && id == ALL
134
+ end
135
+
120
136
  # Check whether two Resources refer to the same entity.
121
137
  # @param other [Resource] Another Resource to compare with
122
138
  # @return [Boolean] true when the other Resource's entity is the same as
@@ -37,6 +37,21 @@ module Checkpoint
37
37
  @all ||= new(Resource::ALL, Resource::ALL).freeze
38
38
  end
39
39
 
40
+ # Test whether this token is for the special "all" Resource.
41
+ #
42
+ # @return [Boolean] true if this token represents any/all resources
43
+ def all?
44
+ type == Resource::ALL && id == Resource::ALL
45
+ end
46
+
47
+ # Test whether this token is a wildcard for some specific type.
48
+ #
49
+ # @return [Boolean] true if this token has a specific type, but
50
+ # represents any/all resources of that type
51
+ def all_of_type?
52
+ type != Resource::ALL && id == Resource::ALL
53
+ end
54
+
40
55
  # @return [Token] self; for convenience of taking a Resource or token
41
56
  def token
42
57
  self
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Checkpoint
4
- VERSION = "1.1.0"
4
+ VERSION = "1.1.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: checkpoint
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Noah Botimer
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-11-19 00:00:00.000000000 Z
11
+ date: 2019-05-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ettin
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '1.16'
47
+ version: '2.0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '1.16'
54
+ version: '2.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: coveralls
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -277,8 +277,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
277
277
  - !ruby/object:Gem::Version
278
278
  version: '0'
279
279
  requirements: []
280
- rubyforge_project:
281
- rubygems_version: 2.7.3
280
+ rubygems_version: 3.0.3
282
281
  signing_key:
283
282
  specification_version: 4
284
283
  summary: Checkpoint provides a model and infrastructure for policy-based authorization,