better_errors 2.5.1 → 2.6.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of better_errors might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 949ae4930972ea12a576bf6036ab19ef6f9d876c03a640062f76a0871648181f
4
- data.tar.gz: 36dcea704937546ac60e4d0c9503222fbcd0cb0aa62e6b2b2e35d92b8cbbbc2c
3
+ metadata.gz: b8cb5c2454ca55776cbfa1c596788008c56d584202c55fc0599e9fbb0c6d45e9
4
+ data.tar.gz: ac7de8121e985ef3277da64604a72e1c117bddba34fa15aa5e838a2bb937bcb7
5
5
  SHA512:
6
- metadata.gz: 5bc9b0ea98c35285ad19a774394b26459c80cda362b3fd940c490c4342e8190550990615c04bad077b5f71adb6e609caf890027baf8832c8de287713dcb0ca90
7
- data.tar.gz: e0f31fa9e3dfa676e35a6838547280df6da65573a14d55da125d0d20dc62edaef8485cd30e2580f50bff26d82d6533167453ee3e941cf7697ac3b6e423994b40
6
+ metadata.gz: 4ae119905448207a0af32b0f62fe812c533fe6bc990c85fb5b10066696be80f8ea44ad141a8eb4c7435180042c964a2258c8a5212bf56eb2c45050621aaa467a
7
+ data.tar.gz: 2ad99de05bd4905a79cd05bd5428b336e1cdf79d84889d3c6331275749fed3912671ed43e308e86d5afbccc83767ae43e4288bb48fccd00c205cd0c23571ece3
@@ -1,16 +1,6 @@
1
1
  sudo: false
2
2
  language: ruby
3
3
  cache: bundler
4
- before_install:
5
- # Since Rails 4.2 only supports rubygems < 2, we must install an older version for it.
6
- - >
7
- if [[ "$BUNDLE_GEMFILE" =~ "rails42" ]]; then
8
- rvm @global do gem install rubygems-update -v '<2'
9
- update_rubygems
10
- rvm @global do gem uninstall bundler --force --executables
11
- rvm @global do gem install bundler -v "~> 1.3"
12
- fi
13
-
14
4
  notifications:
15
5
  webhooks:
16
6
  # With COVERALLS_PARALLEL, coverage information sent to coveralls will not be processed until
@@ -19,9 +9,9 @@ notifications:
19
9
  - secure: "YnHYbTq51ySistjvOxsuNhyg4GLuUffEJstTYeGYXiBF7HG5h43IVYo8KNuLzwkgsOYBcNo+YMdQX7qCqJffSbhsr1FZRSzBmjFFxcyD4hu+ukM2theZ4mePVAZiePscYvQPRNY4hIb4d3egStJEytkalDhB3sOebF57tIaCssg="
20
10
  rvm:
21
11
  - 2.2.10
22
- - 2.3.7
23
- - 2.4.4
24
- - 2.5.1
12
+ - 2.3.8
13
+ - 2.4.9
14
+ - 2.5.7
25
15
  - ruby-head
26
16
  gemfile:
27
17
  - gemfiles/rails42.gemfile
@@ -48,15 +38,21 @@ matrix:
48
38
  - gemfile: gemfiles/pry010.gemfile
49
39
  - gemfile: gemfiles/pry011.gemfile
50
40
  exclude:
51
- - rvm: 2.4.4
41
+ - rvm: 2.3.8
52
42
  gemfile: gemfiles/rails42.gemfile
53
- - rvm: 2.4.4
43
+ - rvm: 2.3.8
54
44
  gemfile: gemfiles/rails42_boc.gemfile
55
- - rvm: 2.4.4
45
+ - rvm: 2.3.8
56
46
  gemfile: gemfiles/rails42_haml.gemfile
57
- - rvm: 2.5.1
47
+ - rvm: 2.4.9
58
48
  gemfile: gemfiles/rails42.gemfile
59
- - rvm: 2.5.1
49
+ - rvm: 2.4.9
60
50
  gemfile: gemfiles/rails42_boc.gemfile
61
- - rvm: 2.5.1
51
+ - rvm: 2.4.9
52
+ gemfile: gemfiles/rails42_haml.gemfile
53
+ - rvm: 2.5.7
54
+ gemfile: gemfiles/rails42.gemfile
55
+ - rvm: 2.5.7
56
+ gemfile: gemfiles/rails42_boc.gemfile
57
+ - rvm: 2.5.7
62
58
  gemfile: gemfiles/rails42_haml.gemfile
@@ -24,7 +24,8 @@ Gem::Specification.new do |s|
24
24
  s.add_development_dependency "rspec", "~> 3.5"
25
25
  s.add_development_dependency "rspec-its"
26
26
  s.add_development_dependency "yard"
27
- s.add_development_dependency "kramdown"
27
+ # kramdown 2.1 requires Ruby 2.3+
28
+ s.add_development_dependency "kramdown", (RUBY_VERSION < '2.3' ? '< 2.0.0' : '> 2.0.0')
28
29
  # simplecov and coveralls must not be included here. See the Gemfiles instead.
29
30
 
30
31
  s.add_dependency "erubi", ">= 1.0.0"
@@ -2,6 +2,7 @@ source "https://rubygems.org"
2
2
 
3
3
  gem "rails", "~> 4.2.0"
4
4
  gem 'nokogiri', RUBY_VERSION < '2.1' ? '~> 1.6.0' : '>= 1.7'
5
+ gem 'i18n', '< 1.5.2' if RUBY_VERSION < '2.3'
5
6
 
6
7
  gem 'coveralls', require: false
7
8
 
@@ -2,6 +2,7 @@ source "https://rubygems.org"
2
2
 
3
3
  gem "rails", "~> 4.2.0"
4
4
  gem 'nokogiri', RUBY_VERSION < '2.1' ? '~> 1.6.0' : '>= 1.7'
5
+ gem 'i18n', '< 1.5.2' if RUBY_VERSION < '2.3'
5
6
  gem "binding_of_caller"
6
7
 
7
8
  gem 'coveralls', require: false
@@ -2,6 +2,7 @@ source "https://rubygems.org"
2
2
 
3
3
  gem "rails", "~> 4.2.0"
4
4
  gem 'nokogiri', RUBY_VERSION < '2.1' ? '~> 1.6.0' : '>= 1.7'
5
+ gem 'i18n', '< 1.5.2' if RUBY_VERSION < '2.3'
5
6
  gem "haml"
6
7
 
7
8
  gem 'coveralls', require: false
@@ -1,6 +1,7 @@
1
1
  source "https://rubygems.org"
2
2
 
3
3
  gem "rails", "~> 5.0.0"
4
+ gem 'i18n', '< 1.5.2' if RUBY_VERSION < '2.3'
4
5
 
5
6
  gem 'coveralls', require: false
6
7
 
@@ -1,6 +1,7 @@
1
1
  source "https://rubygems.org"
2
2
 
3
3
  gem "rails", "~> 5.0.0"
4
+ gem 'i18n', '< 1.5.2' if RUBY_VERSION < '2.3'
4
5
  gem "binding_of_caller"
5
6
 
6
7
  gem 'coveralls', require: false
@@ -1,6 +1,7 @@
1
1
  source "https://rubygems.org"
2
2
 
3
3
  gem "rails", "~> 5.0.0"
4
+ gem 'i18n', '< 1.5.2' if RUBY_VERSION < '2.3'
4
5
  gem "haml"
5
6
 
6
7
  gem 'coveralls', require: false
@@ -1,6 +1,7 @@
1
1
  source "https://rubygems.org"
2
2
 
3
3
  gem "rails", "~> 5.1.0"
4
+ gem 'i18n', '< 1.5.2', require: false if RUBY_VERSION < '2.3'
4
5
 
5
6
  gem 'coveralls', require: false
6
7
 
@@ -1,6 +1,7 @@
1
1
  source "https://rubygems.org"
2
2
 
3
3
  gem "rails", "~> 5.1.0"
4
+ gem 'i18n', '< 1.5.2' if RUBY_VERSION < '2.3'
4
5
  gem "binding_of_caller"
5
6
 
6
7
  gem 'coveralls', require: false
@@ -1,6 +1,7 @@
1
1
  source "https://rubygems.org"
2
2
 
3
3
  gem "rails", "~> 5.1.0"
4
+ gem 'i18n', '< 1.5.2' if RUBY_VERSION < '2.3'
4
5
  gem "haml"
5
6
 
6
7
  gem 'coveralls', require: false
@@ -1,6 +1,7 @@
1
1
  source "https://rubygems.org"
2
2
 
3
3
  gem "rails", "~> 5.2.0"
4
+ gem 'i18n', '< 1.5.2' if RUBY_VERSION < '2.3'
4
5
 
5
6
  gem 'coveralls', require: false
6
7
 
@@ -1,6 +1,7 @@
1
1
  source "https://rubygems.org"
2
2
 
3
3
  gem "rails", "~> 5.2.0"
4
+ gem 'i18n', '< 1.5.2' if RUBY_VERSION < '2.3'
4
5
  gem "binding_of_caller"
5
6
 
6
7
  gem 'coveralls', require: false
@@ -1,6 +1,7 @@
1
1
  source "https://rubygems.org"
2
2
 
3
3
  gem "rails", "~> 5.2.0"
4
+ gem 'i18n', '< 1.5.2' if RUBY_VERSION < '2.3'
4
5
  gem "haml"
5
6
 
6
7
  gem 'coveralls', require: false
@@ -33,7 +33,7 @@ module BetterErrors
33
33
  # Adds an address to the set of IP addresses allowed to access Better
34
34
  # Errors.
35
35
  def self.allow_ip!(addr)
36
- ALLOWED_IPS << IPAddr.new(addr)
36
+ ALLOWED_IPS << (addr.is_a?(IPAddr) ? addr : IPAddr.new(addr))
37
37
  end
38
38
 
39
39
  allow_ip! "127.0.0.0/8"
@@ -69,7 +69,10 @@ module BetterErrors
69
69
  def local_variables
70
70
  return {} unless frame_binding
71
71
 
72
- frame_binding.eval("local_variables").each_with_object({}) do |name, hash|
72
+ lv = frame_binding.eval("local_variables")
73
+ return {} unless lv
74
+
75
+ lv.each_with_object({}) do |name, hash|
73
76
  # Ruby 2.2's local_variables will include the hidden #$! variable if
74
77
  # called from within a rescue context. This is not a valid variable name,
75
78
  # so the local_variable_get method complains. This should probably be
@@ -94,7 +97,10 @@ module BetterErrors
94
97
  end
95
98
 
96
99
  def visible_instance_variables
97
- frame_binding.eval("instance_variables") - BetterErrors.ignored_instance_variables
100
+ iv = frame_binding.eval("instance_variables")
101
+ return {} unless iv
102
+
103
+ iv - BetterErrors.ignored_instance_variables
98
104
  end
99
105
 
100
106
  def to_s
@@ -1,3 +1,3 @@
1
1
  module BetterErrors
2
- VERSION = "2.5.1"
2
+ VERSION = "2.6.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: better_errors
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.1
4
+ version: 2.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Charlie Somerville
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-02-14 00:00:00.000000000 Z
11
+ date: 2020-02-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -70,16 +70,16 @@ dependencies:
70
70
  name: kramdown
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ">="
73
+ - - ">"
74
74
  - !ruby/object:Gem::Version
75
- version: '0'
75
+ version: 2.0.0
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ">="
80
+ - - ">"
81
81
  - !ruby/object:Gem::Version
82
- version: '0'
82
+ version: 2.0.0
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: erubi
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -197,7 +197,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
197
197
  - !ruby/object:Gem::Version
198
198
  version: '0'
199
199
  requirements: []
200
- rubygems_version: 3.0.1
200
+ rubygems_version: 3.0.3
201
201
  signing_key:
202
202
  specification_version: 4
203
203
  summary: Better error page for Rails and other Rack apps