critic 0.2.1 → 0.2.2

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: '0119b15b73b4b634a8094d17b84a57d1a184a4ac'
4
- data.tar.gz: 695b82b9e3aef373a73b23fa865e67ed4cd0e896
3
+ metadata.gz: 4094e59ee71c2769e9e05d891dc36e4a95dd8aa2
4
+ data.tar.gz: 24336a0cf53571ea45cccd651f49fda0758d2e68
5
5
  SHA512:
6
- metadata.gz: e006d30bcdfced9e3eb957cc8ddb80418b894213eab82f3b8f0f520282eaf47e3c76b6120ff23da6ad153886476bf7b12b1833aba6f1924e42f9b9925b13d7ed
7
- data.tar.gz: 7f8256287c97d17118eb0f33665602d63364657fd6b9dbe0fac96bd9cb6ad2221e0ede3a68bb50c7c488dc35b7c2b69c8ccddff8138c2edc7b80a5e2b07379ce
6
+ metadata.gz: ff851589a932c9e65322d6df6625d35a3148226d330842765262d70770b43c93493932ab70471094a819149be7017c42aaa61c74fd39e39006ecdfce11768a39
7
+ data.tar.gz: 201e017b6fe055d0779ab2cf09714082660266264cdb95614cc58fc1668199df9ed3ebefec0ade24197bedc2e66dee6aa12ddd8a08ef6b3f9e9aa344dc36ca81
data/.gitignore CHANGED
@@ -9,4 +9,3 @@
9
9
  /tmp/
10
10
  spec/examples.txt
11
11
  *.gem
12
- gemfiles/
@@ -4,8 +4,6 @@ cache:
4
4
  - bundler
5
5
  rvm:
6
6
  - 2.3.0
7
- before_script:
8
- - bundle install
9
7
  script:
10
8
  - bundle exec rake rubocop
11
9
  - bundle exec rake spec
@@ -1,8 +1,7 @@
1
1
  # Change Log
2
2
 
3
- ## [Unreleased](https://github.com/lanej/critic/tree/HEAD)
4
-
5
- [Full Changelog](https://github.com/lanej/critic/compare/v0.2.0...HEAD)
3
+ ## [v0.2.1](https://github.com/lanej/critic/tree/v0.2.1) (2016-12-28)
4
+ [Full Changelog](https://github.com/lanej/critic/compare/v0.2.0...v0.2.1)
6
5
 
7
6
  **Merged pull requests:**
8
7
 
data/Gemfile CHANGED
@@ -4,7 +4,7 @@ source 'https://rubygems.org'
4
4
  # Specify your gem's dependencies in critic.gemspec
5
5
  gemspec
6
6
 
7
- gem 'activesupport', '~> 3.2.22', require: false
7
+ gem 'activesupport', '~> 5.0', require: false
8
8
  gem 'appraisal', '~> 2.1'
9
9
  gem 'rubocop', '~> 0.46.0', require: false
10
10
 
@@ -0,0 +1,13 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "activesupport", "~> 3.2"
6
+ gem "appraisal", "~> 2.1"
7
+ gem "rubocop", "~> 0.46.0", :require => false
8
+
9
+ group :test do
10
+ gem "pry-nav"
11
+ end
12
+
13
+ gemspec :path => "../"
@@ -0,0 +1,72 @@
1
+ PATH
2
+ remote: ../
3
+ specs:
4
+ critic (0.2.1)
5
+ activesupport (> 3.0, < 6.0)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ activesupport (3.2.22.2)
11
+ i18n (~> 0.6, >= 0.6.4)
12
+ multi_json (~> 1.0)
13
+ appraisal (2.1.0)
14
+ bundler
15
+ rake
16
+ thor (>= 0.14.0)
17
+ ast (2.3.0)
18
+ coderay (1.1.1)
19
+ diff-lcs (1.2.5)
20
+ i18n (0.7.0)
21
+ method_source (0.8.2)
22
+ multi_json (1.12.1)
23
+ parser (2.3.3.1)
24
+ ast (~> 2.2)
25
+ powerpack (0.1.1)
26
+ pry (0.10.4)
27
+ coderay (~> 1.1.0)
28
+ method_source (~> 0.8.1)
29
+ slop (~> 3.4)
30
+ pry-nav (0.2.4)
31
+ pry (>= 0.9.10, < 0.11.0)
32
+ rainbow (2.2.1)
33
+ rake (10.5.0)
34
+ rspec (3.5.0)
35
+ rspec-core (~> 3.5.0)
36
+ rspec-expectations (~> 3.5.0)
37
+ rspec-mocks (~> 3.5.0)
38
+ rspec-core (3.5.4)
39
+ rspec-support (~> 3.5.0)
40
+ rspec-expectations (3.5.0)
41
+ diff-lcs (>= 1.2.0, < 2.0)
42
+ rspec-support (~> 3.5.0)
43
+ rspec-mocks (3.5.0)
44
+ diff-lcs (>= 1.2.0, < 2.0)
45
+ rspec-support (~> 3.5.0)
46
+ rspec-support (3.5.0)
47
+ rubocop (0.46.0)
48
+ parser (>= 2.3.1.1, < 3.0)
49
+ powerpack (~> 0.1)
50
+ rainbow (>= 1.99.1, < 3.0)
51
+ ruby-progressbar (~> 1.7)
52
+ unicode-display_width (~> 1.0, >= 1.0.1)
53
+ ruby-progressbar (1.8.1)
54
+ slop (3.6.0)
55
+ thor (0.19.4)
56
+ unicode-display_width (1.1.2)
57
+
58
+ PLATFORMS
59
+ ruby
60
+
61
+ DEPENDENCIES
62
+ activesupport (~> 3.2)
63
+ appraisal (~> 2.1)
64
+ bundler (~> 1.10)
65
+ critic!
66
+ pry-nav
67
+ rake (~> 10.0)
68
+ rspec (~> 3.4)
69
+ rubocop (~> 0.46.0)
70
+
71
+ BUNDLED WITH
72
+ 1.13.6
@@ -0,0 +1,13 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "activesupport", "~> 4.2"
6
+ gem "appraisal", "~> 2.1"
7
+ gem "rubocop", "~> 0.46.0", :require => false
8
+
9
+ group :test do
10
+ gem "pry-nav"
11
+ end
12
+
13
+ gemspec :path => "../"
@@ -0,0 +1,79 @@
1
+ PATH
2
+ remote: ../
3
+ specs:
4
+ critic (0.2.1)
5
+ activesupport (> 3.0, < 6.0)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ activesupport (4.2.7.1)
11
+ i18n (~> 0.7)
12
+ json (~> 1.7, >= 1.7.7)
13
+ minitest (~> 5.1)
14
+ thread_safe (~> 0.3, >= 0.3.4)
15
+ tzinfo (~> 1.1)
16
+ appraisal (2.1.0)
17
+ bundler
18
+ rake
19
+ thor (>= 0.14.0)
20
+ ast (2.3.0)
21
+ coderay (1.1.1)
22
+ diff-lcs (1.2.5)
23
+ i18n (0.7.0)
24
+ json (1.8.3)
25
+ method_source (0.8.2)
26
+ minitest (5.9.1)
27
+ parser (2.3.3.1)
28
+ ast (~> 2.2)
29
+ powerpack (0.1.1)
30
+ pry (0.10.4)
31
+ coderay (~> 1.1.0)
32
+ method_source (~> 0.8.1)
33
+ slop (~> 3.4)
34
+ pry-nav (0.2.4)
35
+ pry (>= 0.9.10, < 0.11.0)
36
+ rainbow (2.2.1)
37
+ rake (10.5.0)
38
+ rspec (3.5.0)
39
+ rspec-core (~> 3.5.0)
40
+ rspec-expectations (~> 3.5.0)
41
+ rspec-mocks (~> 3.5.0)
42
+ rspec-core (3.5.4)
43
+ rspec-support (~> 3.5.0)
44
+ rspec-expectations (3.5.0)
45
+ diff-lcs (>= 1.2.0, < 2.0)
46
+ rspec-support (~> 3.5.0)
47
+ rspec-mocks (3.5.0)
48
+ diff-lcs (>= 1.2.0, < 2.0)
49
+ rspec-support (~> 3.5.0)
50
+ rspec-support (3.5.0)
51
+ rubocop (0.46.0)
52
+ parser (>= 2.3.1.1, < 3.0)
53
+ powerpack (~> 0.1)
54
+ rainbow (>= 1.99.1, < 3.0)
55
+ ruby-progressbar (~> 1.7)
56
+ unicode-display_width (~> 1.0, >= 1.0.1)
57
+ ruby-progressbar (1.8.1)
58
+ slop (3.6.0)
59
+ thor (0.19.4)
60
+ thread_safe (0.3.5)
61
+ tzinfo (1.2.2)
62
+ thread_safe (~> 0.1)
63
+ unicode-display_width (1.1.2)
64
+
65
+ PLATFORMS
66
+ ruby
67
+
68
+ DEPENDENCIES
69
+ activesupport (~> 4.2)
70
+ appraisal (~> 2.1)
71
+ bundler (~> 1.10)
72
+ critic!
73
+ pry-nav
74
+ rake (~> 10.0)
75
+ rspec (~> 3.4)
76
+ rubocop (~> 0.46.0)
77
+
78
+ BUNDLED WITH
79
+ 1.13.6
@@ -0,0 +1,13 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "activesupport", "~> 5.0"
6
+ gem "appraisal", "~> 2.1"
7
+ gem "rubocop", "~> 0.46.0", :require => false
8
+
9
+ group :test do
10
+ gem "pry-nav"
11
+ end
12
+
13
+ gemspec :path => "../"
@@ -0,0 +1,78 @@
1
+ PATH
2
+ remote: ../
3
+ specs:
4
+ critic (0.2.1)
5
+ activesupport (> 3.0, < 6.0)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ activesupport (5.0.0.1)
11
+ concurrent-ruby (~> 1.0, >= 1.0.2)
12
+ i18n (~> 0.7)
13
+ minitest (~> 5.1)
14
+ tzinfo (~> 1.1)
15
+ appraisal (2.1.0)
16
+ bundler
17
+ rake
18
+ thor (>= 0.14.0)
19
+ ast (2.3.0)
20
+ coderay (1.1.1)
21
+ concurrent-ruby (1.0.2)
22
+ diff-lcs (1.2.5)
23
+ i18n (0.7.0)
24
+ method_source (0.8.2)
25
+ minitest (5.9.1)
26
+ parser (2.3.3.1)
27
+ ast (~> 2.2)
28
+ powerpack (0.1.1)
29
+ pry (0.10.4)
30
+ coderay (~> 1.1.0)
31
+ method_source (~> 0.8.1)
32
+ slop (~> 3.4)
33
+ pry-nav (0.2.4)
34
+ pry (>= 0.9.10, < 0.11.0)
35
+ rainbow (2.2.1)
36
+ rake (10.5.0)
37
+ rspec (3.5.0)
38
+ rspec-core (~> 3.5.0)
39
+ rspec-expectations (~> 3.5.0)
40
+ rspec-mocks (~> 3.5.0)
41
+ rspec-core (3.5.4)
42
+ rspec-support (~> 3.5.0)
43
+ rspec-expectations (3.5.0)
44
+ diff-lcs (>= 1.2.0, < 2.0)
45
+ rspec-support (~> 3.5.0)
46
+ rspec-mocks (3.5.0)
47
+ diff-lcs (>= 1.2.0, < 2.0)
48
+ rspec-support (~> 3.5.0)
49
+ rspec-support (3.5.0)
50
+ rubocop (0.46.0)
51
+ parser (>= 2.3.1.1, < 3.0)
52
+ powerpack (~> 0.1)
53
+ rainbow (>= 1.99.1, < 3.0)
54
+ ruby-progressbar (~> 1.7)
55
+ unicode-display_width (~> 1.0, >= 1.0.1)
56
+ ruby-progressbar (1.8.1)
57
+ slop (3.6.0)
58
+ thor (0.19.4)
59
+ thread_safe (0.3.5)
60
+ tzinfo (1.2.2)
61
+ thread_safe (~> 0.1)
62
+ unicode-display_width (1.1.2)
63
+
64
+ PLATFORMS
65
+ ruby
66
+
67
+ DEPENDENCIES
68
+ activesupport (~> 5.0)
69
+ appraisal (~> 2.1)
70
+ bundler (~> 1.10)
71
+ critic!
72
+ pry-nav
73
+ rake (~> 10.0)
74
+ rspec (~> 3.4)
75
+ rubocop (~> 0.46.0)
76
+
77
+ BUNDLED WITH
78
+ 1.13.6
@@ -10,10 +10,16 @@ module Critic::Callbacks
10
10
  define_callbacks :authorize,
11
11
  terminator: 'authorization.result == false || result == false',
12
12
  skip_after_callbacks_if_terminated: true
13
- else
13
+ elsif ActiveSupport::VERSION::MAJOR < 5
14
14
  define_callbacks :authorize,
15
15
  terminator: ->(target, result) { target.authorization.result == false || false == result },
16
16
  skip_after_callbacks_if_terminated: true
17
+ else
18
+ define_callbacks :authorize,
19
+ terminator: lambda { |target, result_lambda|
20
+ target.authorization.result == false || result_lambda.call == false
21
+ },
22
+ skip_after_callbacks_if_terminated: true
17
23
  end
18
24
  end
19
25
 
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Critic
3
- VERSION = '0.2.1'
3
+ VERSION = '0.2.2'
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: critic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Lane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-28 00:00:00.000000000 Z
11
+ date: 2017-01-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -94,6 +94,12 @@ files:
94
94
  - bin/console
95
95
  - bin/setup
96
96
  - critic.gemspec
97
+ - gemfiles/activesupport_3.gemfile
98
+ - gemfiles/activesupport_3.gemfile.lock
99
+ - gemfiles/activesupport_4.gemfile
100
+ - gemfiles/activesupport_4.gemfile.lock
101
+ - gemfiles/activesupport_5.gemfile
102
+ - gemfiles/activesupport_5.gemfile.lock
97
103
  - lib/critic.rb
98
104
  - lib/critic/authorization.rb
99
105
  - lib/critic/authorization_denied.rb