better_errors-pry 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/README.md +29 -12
- data/better_errors-pry.gemspec +1 -1
- data/lib/better_errors/pry/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: '088078b5ea91515b9f04b5cac92bff89a3967f7dfd750279e9830df2b08a30de'
|
4
|
+
data.tar.gz: 16a8b49ba4555c3e466fbf287117caf738742c77e12cbe611bd95ee46a9d72b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c275160f4490b6ec2415e04b1fcf7866388da5c57e5189d1cb5fb298017f977f55365b6fbfc30210b75b4b2fb2c9ba08c1ea38c03f2d6b8486380442811c3ff
|
7
|
+
data.tar.gz: b30f24bc8b785405070361a9b59227ae56ca03ebea54eb6f3c10bc3a72efeff5c9341c9de08224a9f5ad10b10f4af69ccc156b8b0cc29506b8d0e6485106b5e2
|
data/README.md
CHANGED
@@ -7,33 +7,51 @@
|
|
7
7
|
[Better Errors](https://github.com/charliesome/better_errors) is a gem that provides a very useful error page for Ruby web/API applications.
|
8
8
|
This gem adds [Pry](http://pryrepl.org) support to Better Errors.
|
9
9
|
|
10
|
-
|
11
|
-
|
10
|
+
_This gem is intended to allow us to extract Pry support from the BetterErrors project itself.
|
11
|
+
Through at least v2.4.0, Pry support is included in the project directly.
|
12
|
+
Including this gem will replace the built-in support, and it is functionally the same at this time._
|
13
|
+
|
14
|
+
## Why the separate gem for Pry support?
|
15
|
+
|
16
|
+
BetterErrors supports a very large number of possible configurations.
|
17
|
+
It supports Rails and non-Rails, with binding_of_caller and without, and all of the major versions of the Ruby interpreter.
|
18
|
+
|
19
|
+
All of these combinations should be tested.
|
20
|
+
Currently BetterErrors has 14 different test gemfiles, each running on 6 different versions of Ruby.
|
21
|
+
And these are not comprehensive.
|
22
|
+
|
23
|
+
Because the BetterErrors gem needs to support each of these configurations, it can't specify any of its optional dependencies' required versions.
|
24
|
+
This makes BetterErrors difficult to maintain, and difficult for application maintainers to keep it and its dependencies up-to-date.
|
25
|
+
|
26
|
+
(For example, for several years, the newer version of `binding_of_caller` did not work correctly, so applications that used BetterErrors were given instructions to lock `binding_of_caller` to a specific version.
|
27
|
+
This is because BetterErrors could not specify the `binding_of_caller` version in its own gemspec, since it is optional.
|
28
|
+
Once the issue was fixed, application maintainers had no way to know that it was possible to remove the fixed version.)
|
29
|
+
|
30
|
+
The solution is to extract optional functionality that depends on additional gems from the BetterErrors project, and place it in a project like this one.
|
12
31
|
|
13
32
|
## Installation
|
14
33
|
|
15
|
-
Add this to your application's Gemfile
|
34
|
+
Add this to your application's `Gemfile`, in the `development` group, just like better_errors:
|
16
35
|
|
17
36
|
```ruby
|
18
37
|
group :development do
|
19
38
|
gem 'better_errors'
|
20
|
-
gem 'binding_of_caller'
|
21
39
|
gem 'better_errors-pry'
|
22
40
|
end
|
23
41
|
```
|
24
42
|
|
25
|
-
|
26
|
-
See [Better Errors](https://github.com/charliesome/better_errors) for more information.
|
27
|
-
|
28
|
-
[`binding_of_caller`](https://github.com/banister/binding_of_caller) is required by this gem, since it's necessary to be able to run Pry in the context of the exception that was raised.
|
43
|
+
You need to activate pry in the application (for example, in `config/environments/development.rb`):
|
29
44
|
|
30
|
-
|
45
|
+
```ruby
|
46
|
+
BetterErrors.use_pry!
|
47
|
+
```
|
31
48
|
|
32
|
-
|
49
|
+
**It's important to keep this in the development group.**
|
50
|
+
See [Better Errors](https://github.com/charliesome/better_errors#security) for more information.
|
33
51
|
|
34
52
|
## Usage
|
35
53
|
|
36
|
-
See [Better Errors](https://github.com/charliesome/better_errors#usage)
|
54
|
+
See [Better Errors](https://github.com/charliesome/better_errors#usage) to get started.
|
37
55
|
|
38
56
|
When you see the Better Errors console, you can issue Pry-specific commands, such as `ls` and `cd`.
|
39
57
|
|
@@ -63,4 +81,3 @@ On CI, the specs are run against each major release of Ruby in addition to each
|
|
63
81
|
## License
|
64
82
|
|
65
83
|
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
66
|
-
|
data/better_errors-pry.gemspec
CHANGED
@@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
|
|
27
27
|
spec.add_development_dependency "rake", "~> 10.0"
|
28
28
|
spec.add_development_dependency "rspec", "~> 3.0"
|
29
29
|
|
30
|
-
spec.add_dependency "better_errors", '~> 2.3
|
30
|
+
spec.add_dependency "better_errors", '~> 2.3', '>= 2.3.0'
|
31
31
|
spec.add_dependency "pry", ">= 0.9"
|
32
32
|
spec.add_dependency "binding_of_caller"
|
33
33
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: better_errors-pry
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Charlie Somerville
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2018-09-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -59,7 +59,7 @@ dependencies:
|
|
59
59
|
requirements:
|
60
60
|
- - "~>"
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: 2.3
|
62
|
+
version: '2.3'
|
63
63
|
- - ">="
|
64
64
|
- !ruby/object:Gem::Version
|
65
65
|
version: 2.3.0
|
@@ -69,7 +69,7 @@ dependencies:
|
|
69
69
|
requirements:
|
70
70
|
- - "~>"
|
71
71
|
- !ruby/object:Gem::Version
|
72
|
-
version: 2.3
|
72
|
+
version: '2.3'
|
73
73
|
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: 2.3.0
|
@@ -143,7 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
143
143
|
version: '0'
|
144
144
|
requirements: []
|
145
145
|
rubyforge_project:
|
146
|
-
rubygems_version: 2.6
|
146
|
+
rubygems_version: 2.7.6
|
147
147
|
signing_key:
|
148
148
|
specification_version: 4
|
149
149
|
summary: Add Pry support to Better Errors
|