accessly 1.0.2 → 1.1.0

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
- SHA1:
3
- metadata.gz: 96505b522e737820634c4c02ab4c861880008a70
4
- data.tar.gz: eee707f0a8667c4e9f383e827197f64db141412f
2
+ SHA256:
3
+ metadata.gz: 10d624f0224e5f67d6a95c765803e240213ad8392b573f57aa74fde51e7da7de
4
+ data.tar.gz: 30878b32b7715b031da08feb0fe9cb953d622842b132a0278a53db6bc21f647c
5
5
  SHA512:
6
- metadata.gz: 504dd75a1ce9ae60c89dd3e335de18cb7ef46e45bc2a39d67e07407d94eec0daffbeedcf70ac8a045cdb26c5be2c584c3e756cbbca46757ac9826281b3ad00dd
7
- data.tar.gz: 511e3129de53be6bb92c8519db2dd9fc29b392851337dfb38d0104116eb7d56cd0d85f4957465bfcb15b6817e1a602225b5a42e88df56d06aecaafc65ba81ae5
6
+ metadata.gz: c37585f00e5f54beec676ceb5484f3a469ba6b151da8f4d7260c20281c4fad637641a6eda455cb84df54e3e3eee6871927fd4836d431f2071a35b95e473740e0
7
+ data.tar.gz: 8355e35ef3020cb832c614a4d4c190ac1e60b659e9d63c6213c345562783b5d1d8868aa317e55a6c87a339bfd24e4d778a20237d3e87fd4b1ad9db91327cc99a
data/.gitignore CHANGED
@@ -14,6 +14,7 @@ logfile
14
14
  *.orig
15
15
  rerun.txt
16
16
  pickle-email-*.html
17
+ .DS_Store
17
18
 
18
19
  # TODO Comment out this rule if you are OK with secrets being uploaded to the repo
19
20
  config/initializers/secret_token.rb
@@ -52,3 +53,6 @@ pkg/
52
53
  # Ignore generated yard docs
53
54
  .yardoc/
54
55
  doc/
56
+
57
+ # Ignore Gemfile.lock for gem development
58
+ Gemfile.lock
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.4.2
1
+ 2.6.5
data/.tool-versions CHANGED
@@ -1 +1 @@
1
- ruby 2.4.2
1
+ ruby 2.6.5
data/.travis.yml ADDED
@@ -0,0 +1,13 @@
1
+ language: ruby
2
+ services:
3
+ - postgresql
4
+ cache: bundler
5
+ rvm:
6
+ - 2.7
7
+ - 2.6
8
+ gemfile:
9
+ - Gemfile
10
+ before_script:
11
+ - psql -c 'create database aaa_test;' -U postgres
12
+ before_install:
13
+ - gem install bundler
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ # Upcoming
2
+
3
+ # 1.1.0 / 4-23-2021
4
+
5
+ - [Make Accessly compatible with MySQL5](https://github.com/lessonly/accessly/pull/39) by @caryssaperez
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,37 @@
1
+ # Opening Pull Requests
2
+
3
+ Thanks for your interesting in contributing to Accessly; we appreciate it!
4
+
5
+ We can always use help documenting our code; we've added an inch-ci badge at the top of the readme that links to a page showing where undocumented code currently exists. We document using yard with markdown formatting.
6
+ This can be a great place to get started contributing because it gives you a chance to dive in and understand the code while documenting it.
7
+
8
+ Please consider starting a conversation in an issue before putting time into a non-trival PR to make sure the change tracks with the vision for the project.
9
+
10
+ Please squash the code in your PR down into a commit or commits with an appropriate messages before requesting review (or after making updates based on review).
11
+
12
+ Here are some tips on good commit messages:
13
+ [Thoughtbot](https://thoughtbot.com/blog/5-useful-tips-for-a-better-commit-message)
14
+ [Tim Pope](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)
15
+
16
+ Make sure that new code conforms to the style standards of the project and has test coverage.
17
+
18
+ Thanks for your help!
19
+
20
+ # Running Tests
21
+
22
+ Local tests rely on a postgres database. from a `psql` console on your local machine
23
+ 1) Create the local 'aaa_test' database
24
+ ```
25
+ CREATE DATABASE aaa_test;
26
+ ```
27
+
28
+ 2) Connect to the database
29
+ ```
30
+ \c aaa_test;
31
+ ```
32
+
33
+ 3) From the root of the gem folder run
34
+ ```
35
+ rake
36
+ ```
37
+
data/Gemfile CHANGED
@@ -1,4 +1,3 @@
1
1
  source "https://rubygems.org"
2
- ruby "2.4.2"
3
2
 
4
3
  gemspec
data/README.md CHANGED
@@ -1,6 +1,10 @@
1
1
  <img width="268" src="https://raw.githubusercontent.com/lessonly/accessly/master/logo/logo.png" alt="Accessly Logo">
2
2
 
3
3
  # Accessly
4
+ - Latest master build status:
5
+ [![Build Status](https://travis-ci.com/lessonly/accessly.svg?branch=master)](https://travis-ci.com/lessonly/accessly)
6
+ - Help us document our code 📝:
7
+ [![Inline docs](http://inch-ci.org/github/lessonly/accessly.svg?branch=master)](http://inch-ci.org/github/lessonly/accessly)
4
8
 
5
9
  Accessly exists out of our need to answer the following questions:
6
10
 
@@ -337,33 +341,16 @@ UserPolicy.new(user).list(:view)
337
341
 
338
342
  Accessly implements some internal caching to increase the performance of permission queries. If you use the same Policy object for the same lookup twice, then the second one will lookup based on the cached result. Be mindful of caching when using `revoke!` or `grant!` calls with subsequent permission queries on the same Policy object.
339
343
 
344
+ ## Maintainers
340
345
 
341
- ## Contributing
346
+ Maintainers:
347
+ - Are active contributors
348
+ - Help set project direction
349
+ - Merge contributions from contributors
342
350
 
343
- Bug reports and pull requests are welcome on GitHub at https://github.com/lessonly/accessly.
351
+ - [@rreinhardt9](https://github.com/rreinhardt9)
344
352
 
345
- ## Testing
346
-
347
- Local tests rely on a postgres database. from a `psql` console on your local machine
348
- 1) Create the local 'aaa_test' database
349
- ```
350
- CREATE DATABASE aaa_test;
351
- ```
352
-
353
- 2) Connect to the database
354
- ```
355
- \c aaa_test;
356
- ```
357
-
358
- 3) Create the necessary extension
359
- ```
360
- CREATE EXTENSION IF NOT EXISTS pgcrypto;
361
- ```
362
-
363
- 4) From the root of the gem folder run
364
- ```
365
- rake
366
- ```
353
+ If you are interested in contributing, that is exciting! Please check out [CONTRIBUTING.md](CONTRIBUTING.md); we appreciate your help!
367
354
 
368
355
  ## License
369
356
 
data/accessly.gemspec CHANGED
@@ -21,12 +21,12 @@ Gem::Specification.new do |spec|
21
21
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
22
  spec.require_paths = ["lib"]
23
23
 
24
- spec.add_dependency "activerecord", "~> 5.0"
24
+ spec.add_dependency "activerecord", ">= 5.0"
25
25
 
26
- spec.add_development_dependency "bundler", "~> 1.16"
26
+ spec.add_development_dependency "bundler", "~> 2.1"
27
27
  spec.add_development_dependency "rake", "~> 10.0"
28
28
  spec.add_development_dependency "minitest", "~> 5.0"
29
- spec.add_development_dependency "database_cleaner", "~> 1.5"
30
- spec.add_development_dependency "pg", "~> 0.18"
31
- spec.add_development_dependency "rails", "~> 5.0"
29
+ spec.add_development_dependency "database_cleaner", "~> 1.8"
30
+ spec.add_development_dependency "pg", "~> 1.0"
31
+ spec.add_development_dependency "rails", ">= 5.0"
32
32
  end
@@ -62,7 +62,6 @@ module Accessly
62
62
 
63
63
  def general_action_grant(action_id, object_type)
64
64
  Accessly::PermittedAction.create!(
65
- id: SecureRandom.uuid,
66
65
  segment_id: @segment_id,
67
66
  actor: @actor,
68
67
  action: action_id,
@@ -77,7 +76,6 @@ module Accessly
77
76
 
78
77
  def object_action_grant(action_id, object_type, object_id)
79
78
  Accessly::PermittedActionOnObject.create!(
80
- id: SecureRandom.uuid,
81
79
  segment_id: @segment_id,
82
80
  actor: @actor,
83
81
  action: action_id,
@@ -1,3 +1,3 @@
1
1
  module Accessly
2
- VERSION = "1.0.2"
2
+ VERSION = "1.1.0"
3
3
  end
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: accessly
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Milam
8
8
  - Eddie Hourigan
9
9
  - Ross Reinhardt
10
- autorequire:
10
+ autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2018-10-12 00:00:00.000000000 Z
13
+ date: 2021-04-23 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activerecord
17
17
  requirement: !ruby/object:Gem::Requirement
18
18
  requirements:
19
- - - "~>"
19
+ - - ">="
20
20
  - !ruby/object:Gem::Version
21
21
  version: '5.0'
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
- - - "~>"
26
+ - - ">="
27
27
  - !ruby/object:Gem::Version
28
28
  version: '5.0'
29
29
  - !ruby/object:Gem::Dependency
@@ -32,14 +32,14 @@ dependencies:
32
32
  requirements:
33
33
  - - "~>"
34
34
  - !ruby/object:Gem::Version
35
- version: '1.16'
35
+ version: '2.1'
36
36
  type: :development
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
40
  - - "~>"
41
41
  - !ruby/object:Gem::Version
42
- version: '1.16'
42
+ version: '2.1'
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: rake
45
45
  requirement: !ruby/object:Gem::Requirement
@@ -74,40 +74,40 @@ dependencies:
74
74
  requirements:
75
75
  - - "~>"
76
76
  - !ruby/object:Gem::Version
77
- version: '1.5'
77
+ version: '1.8'
78
78
  type: :development
79
79
  prerelease: false
80
80
  version_requirements: !ruby/object:Gem::Requirement
81
81
  requirements:
82
82
  - - "~>"
83
83
  - !ruby/object:Gem::Version
84
- version: '1.5'
84
+ version: '1.8'
85
85
  - !ruby/object:Gem::Dependency
86
86
  name: pg
87
87
  requirement: !ruby/object:Gem::Requirement
88
88
  requirements:
89
89
  - - "~>"
90
90
  - !ruby/object:Gem::Version
91
- version: '0.18'
91
+ version: '1.0'
92
92
  type: :development
93
93
  prerelease: false
94
94
  version_requirements: !ruby/object:Gem::Requirement
95
95
  requirements:
96
96
  - - "~>"
97
97
  - !ruby/object:Gem::Version
98
- version: '0.18'
98
+ version: '1.0'
99
99
  - !ruby/object:Gem::Dependency
100
100
  name: rails
101
101
  requirement: !ruby/object:Gem::Requirement
102
102
  requirements:
103
- - - "~>"
103
+ - - ">="
104
104
  - !ruby/object:Gem::Version
105
105
  version: '5.0'
106
106
  type: :development
107
107
  prerelease: false
108
108
  version_requirements: !ruby/object:Gem::Requirement
109
109
  requirements:
110
- - - "~>"
110
+ - - ">="
111
111
  - !ruby/object:Gem::Version
112
112
  version: '5.0'
113
113
  description: Use the policy pattern to define access control mechanisms in Rails.
@@ -123,8 +123,10 @@ files:
123
123
  - ".gitignore"
124
124
  - ".ruby-version"
125
125
  - ".tool-versions"
126
+ - ".travis.yml"
127
+ - CHANGELOG.md
128
+ - CONTRIBUTING.md
126
129
  - Gemfile
127
- - Gemfile.lock
128
130
  - LICENSE
129
131
  - LICENSE.txt
130
132
  - README.md
@@ -155,7 +157,7 @@ homepage: https://github.com/lessonly/accessly
155
157
  licenses:
156
158
  - MIT
157
159
  metadata: {}
158
- post_install_message:
160
+ post_install_message:
159
161
  rdoc_options: []
160
162
  require_paths:
161
163
  - lib
@@ -170,9 +172,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
170
172
  - !ruby/object:Gem::Version
171
173
  version: '0'
172
174
  requirements: []
173
- rubyforge_project:
174
- rubygems_version: 2.6.13
175
- signing_key:
175
+ rubygems_version: 3.0.3
176
+ signing_key:
176
177
  specification_version: 4
177
178
  summary: Simplified access control in Rails
178
179
  test_files: []
data/Gemfile.lock DELETED
@@ -1,128 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- accessly (1.0.2)
5
- activerecord (~> 5.0)
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- actioncable (5.1.5)
11
- actionpack (= 5.1.5)
12
- nio4r (~> 2.0)
13
- websocket-driver (~> 0.6.1)
14
- actionmailer (5.1.5)
15
- actionpack (= 5.1.5)
16
- actionview (= 5.1.5)
17
- activejob (= 5.1.5)
18
- mail (~> 2.5, >= 2.5.4)
19
- rails-dom-testing (~> 2.0)
20
- actionpack (5.1.5)
21
- actionview (= 5.1.5)
22
- activesupport (= 5.1.5)
23
- rack (~> 2.0)
24
- rack-test (>= 0.6.3)
25
- rails-dom-testing (~> 2.0)
26
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
27
- actionview (5.1.5)
28
- activesupport (= 5.1.5)
29
- builder (~> 3.1)
30
- erubi (~> 1.4)
31
- rails-dom-testing (~> 2.0)
32
- rails-html-sanitizer (~> 1.0, >= 1.0.3)
33
- activejob (5.1.5)
34
- activesupport (= 5.1.5)
35
- globalid (>= 0.3.6)
36
- activemodel (5.1.5)
37
- activesupport (= 5.1.5)
38
- activerecord (5.1.5)
39
- activemodel (= 5.1.5)
40
- activesupport (= 5.1.5)
41
- arel (~> 8.0)
42
- activesupport (5.1.5)
43
- concurrent-ruby (~> 1.0, >= 1.0.2)
44
- i18n (~> 0.7)
45
- minitest (~> 5.1)
46
- tzinfo (~> 1.1)
47
- arel (8.0.0)
48
- builder (3.2.3)
49
- concurrent-ruby (1.0.5)
50
- crass (1.0.3)
51
- database_cleaner (1.5.3)
52
- erubi (1.7.1)
53
- globalid (0.4.1)
54
- activesupport (>= 4.2.0)
55
- i18n (0.9.5)
56
- concurrent-ruby (~> 1.0)
57
- loofah (2.2.2)
58
- crass (~> 1.0.2)
59
- nokogiri (>= 1.5.9)
60
- mail (2.7.0)
61
- mini_mime (>= 0.1.1)
62
- method_source (0.9.0)
63
- mini_mime (1.0.0)
64
- mini_portile2 (2.3.0)
65
- minitest (5.11.3)
66
- nio4r (2.3.0)
67
- nokogiri (1.8.2)
68
- mini_portile2 (~> 2.3.0)
69
- pg (0.21.0)
70
- rack (2.0.4)
71
- rack-test (0.8.3)
72
- rack (>= 1.0, < 3)
73
- rails (5.1.5)
74
- actioncable (= 5.1.5)
75
- actionmailer (= 5.1.5)
76
- actionpack (= 5.1.5)
77
- actionview (= 5.1.5)
78
- activejob (= 5.1.5)
79
- activemodel (= 5.1.5)
80
- activerecord (= 5.1.5)
81
- activesupport (= 5.1.5)
82
- bundler (>= 1.3.0)
83
- railties (= 5.1.5)
84
- sprockets-rails (>= 2.0.0)
85
- rails-dom-testing (2.0.3)
86
- activesupport (>= 4.2.0)
87
- nokogiri (>= 1.6)
88
- rails-html-sanitizer (1.0.3)
89
- loofah (~> 2.0)
90
- railties (5.1.5)
91
- actionpack (= 5.1.5)
92
- activesupport (= 5.1.5)
93
- method_source
94
- rake (>= 0.8.7)
95
- thor (>= 0.18.1, < 2.0)
96
- rake (10.5.0)
97
- sprockets (3.7.1)
98
- concurrent-ruby (~> 1.0)
99
- rack (> 1, < 3)
100
- sprockets-rails (3.2.1)
101
- actionpack (>= 4.0)
102
- activesupport (>= 4.0)
103
- sprockets (>= 3.0.0)
104
- thor (0.20.0)
105
- thread_safe (0.3.6)
106
- tzinfo (1.2.5)
107
- thread_safe (~> 0.1)
108
- websocket-driver (0.6.5)
109
- websocket-extensions (>= 0.1.0)
110
- websocket-extensions (0.1.3)
111
-
112
- PLATFORMS
113
- ruby
114
-
115
- DEPENDENCIES
116
- accessly!
117
- bundler (~> 1.16)
118
- database_cleaner (~> 1.5)
119
- minitest (~> 5.0)
120
- pg (~> 0.18)
121
- rails (~> 5.0)
122
- rake (~> 10.0)
123
-
124
- RUBY VERSION
125
- ruby 2.4.2p198
126
-
127
- BUNDLED WITH
128
- 1.16.1