guise 0.6.1 → 0.9.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
2
  SHA256:
3
- metadata.gz: 3858a11b1271af985331bca2938cefe55ef3af4101b2867c74adbd514ff7b62c
4
- data.tar.gz: d72cb965723c707706413205928839b9f69f26aadd7ddb920396cb712485bb99
3
+ metadata.gz: d2ee97110ee1b7da2070d12aaf29ca76dd5c6163e55f9ff217a05fc70ed3d3a4
4
+ data.tar.gz: d8f2bcb062c300ef1d5c52417bac84dfd0c0f3d2036596197c00ccd6335f2c75
5
5
  SHA512:
6
- metadata.gz: '039f0457aea9b8d7111b87e903bfb0a47061327f0f84d57515a83062ad7c53900e620ce85955d27ca3f29b392f38eaf8d1a0f39b181bc415b9e9d0b975040078'
7
- data.tar.gz: 97e49173adf5490ea020e21a9f28ebcaf73abcd6d92a495c58eb41c2907f9ca9af712382294bf4f0e50b9a890a3e925ed846d59f330ba6f119e14af33c99f6ea
6
+ metadata.gz: 8ae904406e4f820ce02c121733a4741b4321f364b5ee134f93075d052cd393ac39da2dcd5231bbde86e920a188216137395985554da7150fe5cf875f57c2b910
7
+ data.tar.gz: 01a58667b199ef476a9b5450bcd6d39ecd1e237dfd5b075c705bdd29321282c24c518246de11ad22527fdd6d5a75b70a3835d9d3f3719816ccad4e585da96c50
@@ -0,0 +1,109 @@
1
+ version: v1.0
2
+ name: guise tests
3
+ agent:
4
+ machine:
5
+ type: e1-standard-2
6
+ os_image: ubuntu1804
7
+
8
+ blocks:
9
+ - name: Rails < 5.0
10
+ task:
11
+ jobs:
12
+ - name: rspec
13
+ matrix:
14
+ - env_var: RUBY_VERSION
15
+ values:
16
+ - "2.5.9"
17
+ - "2.6.10"
18
+
19
+ - env_var: RAILS_VERSION
20
+ values:
21
+ - "4.2"
22
+
23
+ commands:
24
+ - export BUNDLE_GEMFILE=gemfiles/$RAILS_VERSION.gemfile
25
+
26
+ - checkout
27
+
28
+ - sem-version ruby $RUBY_VERSION
29
+
30
+ - gem install bundler
31
+
32
+ - bundle config set path vendor/bundle
33
+ - mkdir -p vendor/bundle
34
+
35
+ - cache restore
36
+ - bundle install --jobs 4 --retry 3
37
+ - cache store
38
+
39
+ - bundle exec rspec
40
+
41
+ - name: Ruby < 3.0
42
+ task:
43
+ jobs:
44
+ - name: rspec
45
+ matrix:
46
+ - env_var: RUBY_VERSION
47
+ values:
48
+ - "2.5.9"
49
+ - "2.6.10"
50
+ - "2.7.6"
51
+
52
+ - env_var: RAILS_VERSION
53
+ values:
54
+ - "5.0"
55
+ - "5.1"
56
+ - "5.2"
57
+ - "6.0"
58
+ - "6.1"
59
+
60
+ commands:
61
+ - export BUNDLE_GEMFILE=gemfiles/$RAILS_VERSION.gemfile
62
+
63
+ - checkout
64
+
65
+ - sem-version ruby $RUBY_VERSION
66
+
67
+ - gem install bundler
68
+
69
+ - bundle config set path vendor/bundle
70
+ - mkdir -p vendor/bundle
71
+
72
+ - cache restore
73
+ - bundle install --jobs 4 --retry 3
74
+ - cache store
75
+
76
+ - bundle exec rspec
77
+
78
+ - name: Ruby >= 3.0
79
+ task:
80
+ jobs:
81
+ - name: rspec
82
+ matrix:
83
+ - env_var: RUBY_VERSION
84
+ values:
85
+ - "3.0.4"
86
+ - "3.1.2"
87
+
88
+ - env_var: RAILS_VERSION
89
+ values:
90
+ - "6.0"
91
+ - "6.1"
92
+
93
+ commands:
94
+ - export BUNDLE_GEMFILE=gemfiles/$RAILS_VERSION.gemfile
95
+
96
+ - checkout
97
+
98
+ - sem-version ruby $RUBY_VERSION
99
+
100
+ - gem install bundler
101
+
102
+ - bundle config set path vendor/bundle
103
+ - mkdir -p vendor/bundle
104
+
105
+ - cache restore
106
+ - bundle install --jobs 4 --retry 3
107
+ - cache store
108
+
109
+ - bundle exec rspec
data/Appraisals CHANGED
@@ -1,29 +1,33 @@
1
- appraise '3.1' do
2
- gem 'activerecord', '~> 3.1.0'
3
- gem 'activesupport', '~> 3.1.0'
1
+ appraise '4.2' do
2
+ gem 'activerecord', '~> 4.2.0'
3
+ gem 'activesupport', '~> 4.2.0'
4
+ gem 'sqlite3', '~> 1.3.0'
4
5
  end
5
6
 
6
- appraise '3.2' do
7
- gem 'activerecord', '~> 3.2.0'
8
- gem 'activesupport', '~> 3.2.0'
7
+ appraise '5.0' do
8
+ gem 'activerecord', '~> 5.0.0'
9
+ gem 'activesupport', '~> 5.0.0'
10
+ gem 'sqlite3', '~> 1.3.0'
9
11
  end
10
12
 
11
- appraise '4.0' do
12
- gem 'activerecord', '~> 4.0.0'
13
- gem 'activesupport', '~> 4.0.0'
13
+ appraise '5.1' do
14
+ gem 'activerecord', '~> 5.1.0'
15
+ gem 'activesupport', '~> 5.1.0'
16
+ gem 'sqlite3', '~> 1.3.0'
14
17
  end
15
18
 
16
- appraise '4.1' do
17
- gem 'activerecord', '~> 4.1.0'
18
- gem 'activesupport', '~> 4.1.0'
19
+ appraise '5.2' do
20
+ gem 'activerecord', '~> 5.2.0'
21
+ gem 'activesupport', '~> 5.2.0'
22
+ gem 'sqlite3', '~> 1.3.0'
19
23
  end
20
24
 
21
- appraise '4.2' do
22
- gem 'activerecord', '~> 4.2.0'
23
- gem 'activesupport', '~> 4.2.0'
25
+ appraise '6.0' do
26
+ gem 'activerecord', '~> 6.0.0'
27
+ gem 'activesupport', '~> 6.0.0'
24
28
  end
25
29
 
26
- appraise '5.0' do
27
- gem 'activerecord', '~> 5.0.0.beta'
28
- gem 'activesupport', '~> 5.0.0.beta'
30
+ appraise '6.1' do
31
+ gem 'activerecord', '~> 6.1.0'
32
+ gem 'activesupport', '~> 6.1.0'
29
33
  end
data/CHANGELOG.md ADDED
@@ -0,0 +1,28 @@
1
+ # Changelog
2
+
3
+ ## [0.9.0]
4
+ ### Added
5
+ * Support for ruby 3.0 and 3.1
6
+ * Test on Rails 4.2 again
7
+
8
+ ## [0.8.0]
9
+ ### Added
10
+ * Rails 6 support
11
+ * Testing on ruby 2.6
12
+
13
+ ### Fixed
14
+ * Fix how `:validate` option to `guise_for` was being handled. Passing
15
+ `validate: false` would still define validations.
16
+
17
+ ## [0.7.0] 2018-04-09
18
+ ### Removed
19
+
20
+ * Support for ruby < 2.3
21
+ * Support for rails < 4.2
22
+
23
+ ## [0.6.1] 2018-04-09
24
+ ### Fixed
25
+
26
+ * Fix broken `require` statement
27
+ * Correct proxy to `has_guise?` definitions. If `:Labtech` is a defined value,
28
+ correct how the `lab_tech?` predicate calls `has_guise?(:lab_tech)`.
data/README.md CHANGED
@@ -1,7 +1,5 @@
1
1
  # guise
2
2
 
3
- [![Build Status](https://travis-ci.org/ecbypi/guise.png?branch=master)](https://travis-ci.org/ecbypi/guise)
4
- [![Code Climate](https://codeclimate.com/github/ecbypi/guise.png)](https://codeclimate.com/github/ecbypi/guise)
5
3
 
6
4
  A typical, quick-and-easy role management system involves `users` and `roles`
7
5
  tables with a join table between them to determine membership to a role:
data/Rakefile CHANGED
@@ -2,7 +2,6 @@
2
2
  require 'bundler/gem_tasks'
3
3
  require 'bundler/setup'
4
4
  require 'rspec/core/rake_task'
5
- require 'appraisal'
6
5
 
7
6
  desc "Run specs"
8
7
  RSpec::Core::RakeTask.new('spec') do |task|
data/gemfiles/4.2.gemfile CHANGED
@@ -4,5 +4,6 @@ source "https://rubygems.org"
4
4
 
5
5
  gem "activerecord", "~> 4.2.0"
6
6
  gem "activesupport", "~> 4.2.0"
7
+ gem "sqlite3", "~> 1.3.0"
7
8
 
8
- gemspec :path => "../"
9
+ gemspec path: "../"
@@ -1,92 +1,81 @@
1
1
  PATH
2
- remote: ../
2
+ remote: ..
3
3
  specs:
4
- guise (0.6.0)
5
- activerecord (>= 3.1, < 5.0)
6
- activesupport (>= 3.1, < 5.0)
4
+ guise (0.8.0)
5
+ activerecord (>= 4.2)
6
+ activesupport (>= 4.2)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- activemodel (4.2.5)
12
- activesupport (= 4.2.5)
11
+ activemodel (4.2.11.3)
12
+ activesupport (= 4.2.11.3)
13
13
  builder (~> 3.1)
14
- activerecord (4.2.5)
15
- activemodel (= 4.2.5)
16
- activesupport (= 4.2.5)
14
+ activerecord (4.2.11.3)
15
+ activemodel (= 4.2.11.3)
16
+ activesupport (= 4.2.11.3)
17
17
  arel (~> 6.0)
18
- activesupport (4.2.5)
18
+ activesupport (4.2.11.3)
19
19
  i18n (~> 0.7)
20
- json (~> 1.7, >= 1.7.7)
21
20
  minitest (~> 5.1)
22
21
  thread_safe (~> 0.3, >= 0.3.4)
23
22
  tzinfo (~> 1.1)
24
- appraisal (2.1.0)
23
+ appraisal (2.4.1)
25
24
  bundler
26
25
  rake
27
26
  thor (>= 0.14.0)
28
- arel (6.0.3)
29
- builder (3.2.2)
30
- byebug (5.0.0)
31
- columnize (= 0.9.0)
32
- codeclimate-test-reporter (0.4.8)
33
- simplecov (>= 0.7.1, < 1.0.0)
34
- coderay (1.1.0)
35
- columnize (0.9.0)
36
- diff-lcs (1.2.5)
37
- docile (1.1.5)
38
- i18n (0.7.0)
39
- json (1.8.3)
40
- method_source (0.8.2)
41
- minitest (5.8.2)
42
- pry (0.10.3)
43
- coderay (~> 1.1.0)
44
- method_source (~> 0.8.1)
45
- slop (~> 3.4)
46
- rake (10.4.2)
47
- redcarpet (3.3.3)
48
- rspec (3.4.0)
49
- rspec-core (~> 3.4.0)
50
- rspec-expectations (~> 3.4.0)
51
- rspec-mocks (~> 3.4.0)
52
- rspec-core (3.4.0)
53
- rspec-support (~> 3.4.0)
54
- rspec-expectations (3.4.0)
27
+ arel (6.0.4)
28
+ builder (3.2.4)
29
+ byebug (10.0.2)
30
+ coderay (1.1.3)
31
+ concurrent-ruby (1.1.10)
32
+ diff-lcs (1.5.0)
33
+ i18n (0.9.5)
34
+ concurrent-ruby (~> 1.0)
35
+ method_source (1.0.0)
36
+ minitest (5.15.0)
37
+ pry (0.14.1)
38
+ coderay (~> 1.1)
39
+ method_source (~> 1.0)
40
+ rake (12.3.3)
41
+ redcarpet (3.5.1)
42
+ rspec (3.11.0)
43
+ rspec-core (~> 3.11.0)
44
+ rspec-expectations (~> 3.11.0)
45
+ rspec-mocks (~> 3.11.0)
46
+ rspec-core (3.11.0)
47
+ rspec-support (~> 3.11.0)
48
+ rspec-expectations (3.11.0)
55
49
  diff-lcs (>= 1.2.0, < 2.0)
56
- rspec-support (~> 3.4.0)
57
- rspec-mocks (3.4.0)
50
+ rspec-support (~> 3.11.0)
51
+ rspec-mocks (3.11.1)
58
52
  diff-lcs (>= 1.2.0, < 2.0)
59
- rspec-support (~> 3.4.0)
60
- rspec-support (3.4.0)
61
- simplecov (0.10.0)
62
- docile (~> 1.1.0)
63
- json (~> 1.8)
64
- simplecov-html (~> 0.10.0)
65
- simplecov-html (0.10.0)
66
- slop (3.6.0)
67
- sqlite3 (1.3.11)
68
- thor (0.19.1)
69
- thread_safe (0.3.5)
70
- tzinfo (1.2.2)
53
+ rspec-support (~> 3.11.0)
54
+ rspec-support (3.11.0)
55
+ sqlite3 (1.3.13)
56
+ thor (1.2.1)
57
+ thread_safe (0.3.6)
58
+ tzinfo (1.2.9)
71
59
  thread_safe (~> 0.1)
72
- yard (0.8.7.6)
60
+ webrick (1.7.0)
61
+ yard (0.9.27)
62
+ webrick (~> 1.7.0)
73
63
 
74
64
  PLATFORMS
75
- ruby
65
+ x86_64-darwin-21
76
66
 
77
67
  DEPENDENCIES
78
68
  activerecord (~> 4.2.0)
79
69
  activesupport (~> 4.2.0)
80
70
  appraisal (>= 1.0)
81
- byebug (~> 5.0)
82
- codeclimate-test-reporter (~> 0.3)
71
+ byebug (~> 10.0)
83
72
  guise!
84
73
  pry (~> 0.9)
85
- rake (~> 10.1)
74
+ rake (~> 12.3)
86
75
  redcarpet (~> 3.2)
87
76
  rspec (~> 3.0)
88
- sqlite3 (~> 1.3)
89
- yard (~> 0.8)
77
+ sqlite3 (~> 1.3.0)
78
+ yard (>= 0.9.20)
90
79
 
91
80
  BUNDLED WITH
92
- 1.10.6
81
+ 2.3.7
data/gemfiles/5.0.gemfile CHANGED
@@ -2,7 +2,8 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "activerecord", "~> 5.0.0.beta"
6
- gem "activesupport", "~> 5.0.0.beta"
5
+ gem "activerecord", "~> 5.0.0"
6
+ gem "activesupport", "~> 5.0.0"
7
+ gem "sqlite3", "~> 1.3.0"
7
8
 
8
- gemspec :path => "../"
9
+ gemspec path: "../"
@@ -1,94 +1,77 @@
1
1
  PATH
2
- remote: ../
2
+ remote: ..
3
3
  specs:
4
- guise (0.6.0)
5
- activerecord (>= 3.1, < 5.0)
6
- activesupport (>= 3.1, < 5.0)
4
+ guise (0.8.0)
5
+ activerecord (>= 4.2)
6
+ activesupport (>= 4.2)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- activemodel (5.0.0.beta1)
12
- activesupport (= 5.0.0.beta1)
13
- builder (~> 3.1)
14
- activerecord (5.0.0.beta1)
15
- activemodel (= 5.0.0.beta1)
16
- activesupport (= 5.0.0.beta1)
11
+ activemodel (5.0.7.2)
12
+ activesupport (= 5.0.7.2)
13
+ activerecord (5.0.7.2)
14
+ activemodel (= 5.0.7.2)
15
+ activesupport (= 5.0.7.2)
17
16
  arel (~> 7.0)
18
- activesupport (5.0.0.beta1)
19
- concurrent-ruby (~> 1.0)
20
- i18n (~> 0.7)
21
- json (~> 1.7, >= 1.7.7)
22
- method_source
17
+ activesupport (5.0.7.2)
18
+ concurrent-ruby (~> 1.0, >= 1.0.2)
19
+ i18n (>= 0.7, < 2)
23
20
  minitest (~> 5.1)
24
21
  tzinfo (~> 1.1)
25
- appraisal (2.1.0)
22
+ appraisal (2.4.1)
26
23
  bundler
27
24
  rake
28
25
  thor (>= 0.14.0)
29
- arel (7.0.0)
30
- builder (3.2.2)
31
- byebug (5.0.0)
32
- columnize (= 0.9.0)
33
- codeclimate-test-reporter (0.4.8)
34
- simplecov (>= 0.7.1, < 1.0.0)
35
- coderay (1.1.0)
36
- columnize (0.9.0)
37
- concurrent-ruby (1.0.0)
38
- diff-lcs (1.2.5)
39
- docile (1.1.5)
40
- i18n (0.7.0)
41
- json (1.8.3)
42
- method_source (0.8.2)
43
- minitest (5.8.3)
44
- pry (0.10.3)
45
- coderay (~> 1.1.0)
46
- method_source (~> 0.8.1)
47
- slop (~> 3.4)
48
- rake (10.5.0)
49
- redcarpet (3.3.4)
50
- rspec (3.4.0)
51
- rspec-core (~> 3.4.0)
52
- rspec-expectations (~> 3.4.0)
53
- rspec-mocks (~> 3.4.0)
54
- rspec-core (3.4.1)
55
- rspec-support (~> 3.4.0)
56
- rspec-expectations (3.4.0)
26
+ arel (7.1.4)
27
+ byebug (10.0.2)
28
+ coderay (1.1.3)
29
+ concurrent-ruby (1.1.9)
30
+ diff-lcs (1.4.4)
31
+ i18n (1.8.10)
32
+ concurrent-ruby (~> 1.0)
33
+ method_source (1.0.0)
34
+ minitest (5.14.4)
35
+ pry (0.14.1)
36
+ coderay (~> 1.1)
37
+ method_source (~> 1.0)
38
+ rake (12.3.3)
39
+ redcarpet (3.5.1)
40
+ rspec (3.10.0)
41
+ rspec-core (~> 3.10.0)
42
+ rspec-expectations (~> 3.10.0)
43
+ rspec-mocks (~> 3.10.0)
44
+ rspec-core (3.10.1)
45
+ rspec-support (~> 3.10.0)
46
+ rspec-expectations (3.10.1)
57
47
  diff-lcs (>= 1.2.0, < 2.0)
58
- rspec-support (~> 3.4.0)
59
- rspec-mocks (3.4.1)
48
+ rspec-support (~> 3.10.0)
49
+ rspec-mocks (3.10.2)
60
50
  diff-lcs (>= 1.2.0, < 2.0)
61
- rspec-support (~> 3.4.0)
62
- rspec-support (3.4.1)
63
- simplecov (0.11.1)
64
- docile (~> 1.1.0)
65
- json (~> 1.8)
66
- simplecov-html (~> 0.10.0)
67
- simplecov-html (0.10.0)
68
- slop (3.6.0)
69
- sqlite3 (1.3.11)
70
- thor (0.19.1)
71
- thread_safe (0.3.5)
72
- tzinfo (1.2.2)
51
+ rspec-support (~> 3.10.0)
52
+ rspec-support (3.10.2)
53
+ sqlite3 (1.3.13)
54
+ thor (1.1.0)
55
+ thread_safe (0.3.6)
56
+ tzinfo (1.2.9)
73
57
  thread_safe (~> 0.1)
74
- yard (0.8.7.6)
58
+ yard (0.9.26)
75
59
 
76
60
  PLATFORMS
77
61
  ruby
78
62
 
79
63
  DEPENDENCIES
80
- activerecord (~> 5.0.0.beta)
81
- activesupport (~> 5.0.0.beta)
64
+ activerecord (~> 5.0.0)
65
+ activesupport (~> 5.0.0)
82
66
  appraisal (>= 1.0)
83
- byebug (~> 5.0)
84
- codeclimate-test-reporter (~> 0.3)
67
+ byebug (~> 10.0)
85
68
  guise!
86
69
  pry (~> 0.9)
87
- rake (~> 10.1)
70
+ rake (~> 12.3)
88
71
  redcarpet (~> 3.2)
89
72
  rspec (~> 3.0)
90
- sqlite3 (~> 1.3)
91
- yard (~> 0.8)
73
+ sqlite3 (~> 1.3.0)
74
+ yard (>= 0.9.20)
92
75
 
93
76
  BUNDLED WITH
94
- 1.10.6
77
+ 2.1.4
@@ -0,0 +1,9 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "activerecord", "~> 5.1.0"
6
+ gem "activesupport", "~> 5.1.0"
7
+ gem "sqlite3", "~> 1.3.0"
8
+
9
+ gemspec path: "../"
@@ -0,0 +1,77 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ guise (0.8.0)
5
+ activerecord (>= 4.2)
6
+ activesupport (>= 4.2)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ activemodel (5.1.7)
12
+ activesupport (= 5.1.7)
13
+ activerecord (5.1.7)
14
+ activemodel (= 5.1.7)
15
+ activesupport (= 5.1.7)
16
+ arel (~> 8.0)
17
+ activesupport (5.1.7)
18
+ concurrent-ruby (~> 1.0, >= 1.0.2)
19
+ i18n (>= 0.7, < 2)
20
+ minitest (~> 5.1)
21
+ tzinfo (~> 1.1)
22
+ appraisal (2.4.1)
23
+ bundler
24
+ rake
25
+ thor (>= 0.14.0)
26
+ arel (8.0.0)
27
+ byebug (10.0.2)
28
+ coderay (1.1.3)
29
+ concurrent-ruby (1.1.9)
30
+ diff-lcs (1.4.4)
31
+ i18n (1.8.10)
32
+ concurrent-ruby (~> 1.0)
33
+ method_source (1.0.0)
34
+ minitest (5.14.4)
35
+ pry (0.14.1)
36
+ coderay (~> 1.1)
37
+ method_source (~> 1.0)
38
+ rake (12.3.3)
39
+ redcarpet (3.5.1)
40
+ rspec (3.10.0)
41
+ rspec-core (~> 3.10.0)
42
+ rspec-expectations (~> 3.10.0)
43
+ rspec-mocks (~> 3.10.0)
44
+ rspec-core (3.10.1)
45
+ rspec-support (~> 3.10.0)
46
+ rspec-expectations (3.10.1)
47
+ diff-lcs (>= 1.2.0, < 2.0)
48
+ rspec-support (~> 3.10.0)
49
+ rspec-mocks (3.10.2)
50
+ diff-lcs (>= 1.2.0, < 2.0)
51
+ rspec-support (~> 3.10.0)
52
+ rspec-support (3.10.2)
53
+ sqlite3 (1.3.13)
54
+ thor (1.1.0)
55
+ thread_safe (0.3.6)
56
+ tzinfo (1.2.9)
57
+ thread_safe (~> 0.1)
58
+ yard (0.9.26)
59
+
60
+ PLATFORMS
61
+ ruby
62
+
63
+ DEPENDENCIES
64
+ activerecord (~> 5.1.0)
65
+ activesupport (~> 5.1.0)
66
+ appraisal (>= 1.0)
67
+ byebug (~> 10.0)
68
+ guise!
69
+ pry (~> 0.9)
70
+ rake (~> 12.3)
71
+ redcarpet (~> 3.2)
72
+ rspec (~> 3.0)
73
+ sqlite3 (~> 1.3.0)
74
+ yard (>= 0.9.20)
75
+
76
+ BUNDLED WITH
77
+ 2.1.4
@@ -0,0 +1,9 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "activerecord", "~> 5.2.0"
6
+ gem "activesupport", "~> 5.2.0"
7
+ gem "sqlite3", "~> 1.3.0"
8
+
9
+ gemspec path: "../"