| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|\
| |
| | |
rubocop: fix offences of the Layout/EndAlignment cop
|
|/ |
|
|\
| |
| | |
rubocop: fix offences of the Layout/ExtraSpacing cop
|
|/ |
|
|\
| |
| | |
helpers/text: delete the 'bright_default' alias
|
|/
|
|
|
|
|
|
| |
Replaces https://github.com/pry/pry/pull/1692
(Remove the "default" method from `Pry::Helpers::Text`)
This alias serves no real purpose because `bold` is already superior: it's short
and understandable.
|
|\
| |
| | |
Gracefully handle (ignore) null bytes in history lines
|
| |
| |
| |
| |
| |
| |
| |
| | |
Fixes #1789.
Readline is unable to add lines to its history that contain a null byte;
we should therefore avoid saving such lines to the history file, and
ignore any such lines that are already present in the file.
|
|\ \
| | |
| | | |
travis: generate docs and fail if there are warnings
|
| | |
| | |
| | |
| | |
| | | |
1. The links break the build because YARD cannot "resolve" them
2. Pry does not receive money from these companies for at least 4+ years
|
|/ /
| |
| |
| |
| |
| |
| | |
The idea is extracted from https://github.com/pry/pry/pull/1720.
This ensures that documentation mistakes don't slip through the cracks in the
future.
|
|\ \
| | |
| | | |
Tweak documentation for pryrc
|
|/ /
| |
| |
| |
| |
| |
| |
| | |
Since `~/.pryrc` was replaced by `$XDG_CONFIG_HOME` and `~/.config/pry/pryrc` in
https://github.com/pry/pry/pull/1609, we need to adjust some
documentation. `~/.pryrc` becomes simply `pryrc`.
I've also edited the wiki with this similar change.
|
|\ \
| | |
| | | |
Find configuration file in XDG Base Directory
|
| | |
| | |
| | |
| | |
| | |
| | | |
Find configuration file in XDG Base Directory only if `PRYRC` is not
set, and `~/.pryrc` does not exist, therefore not confusing current
users. Note that cache file path is not modified.
|
|\ \ \
| |_|/
|/| | |
commands/wtf,pry: add support for Exception#cause
|
|/ /
| |
| |
| |
| | |
Fixes #1449 (support exceptions with cause)
Replaces #1525
|
|\ \
| | |
| | | |
README: update badges
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
Apparently, they've changed the URL. The old URL wasn't working.
|
|/ /
| |
| |
| | |
The old badge link seems to be outdated.
|
|\ \
| |/
|/| |
spec/commands/edit: delete unwanted unlinking
|
|/
|
|
| |
This line was needed for Rubinius but since we dropped it, it serves no purpose.
|
|\
| |
| | |
Drop support for Rubinius
|
|/
|
|
|
|
|
| |
Fixes #1775 (Drop support for Rubinius)
I am amazed how many hacks we've had just to support Rubinius. It feels good to
be able to remove them and reduce the complexity of the codebase.
|
|\
| |
| | |
Rakefile: unit test with help of RSpec::Core::RakeTask
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit a99861f1b1cea84d044c458ec5fba401d88c6802 broke some tests for me when I
try to run them locally. Example failures:
```
Failures:
1) gist nominally logs in
Failure/Error: expect(Pad.gist_calls[:login!]).not_to be_nil
expected: not nil
got: nil
2) show-doc on modules show-doc -a messages relating to -a indicates...
Failure/Error:
raise CommandError, "No docs found for: #{
obj_name ? obj_name : 'current context'
Pry::CommandError:
No docs found for: TestClassForShowSource
```
There's little reason to use our own task for specs since RSpec already provides
one. Switching to that deletes some old (likely unused) code and fixes the
failures for me. Win-win.
|
|\
| |
| | |
Add Rubocop
|
| | |
|
| |
| |
| |
| |
| | |
The config ignores all violations for now. We will be fixing them at our own
pace.
|
|/
|
|
|
|
| |
Rubocop is a really nice tool when configured properly. A lot of default rules
are very opinionated but the good thing is that it's very easy to disable them.
With help of Rubocop I'd like to improve the quality of Pry's code.
|
|\
| |
| | |
repl.rb: guard against negative overhang
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When copy pasting into pry a code like this
~~~ ruby
foo do
bar #note the tab here
done
~~~
then `@indent.indent(val)` replace the tab by two spaces, and so
`overhang = original_val.length - indented_val.length` is negative,
which yields an Exception in `whitespace = ' ' * overhang`.
Guard against this by taking the max with 0.
|
|\ \
| |/
|/| |
commands/show_source: handle when source is nil but comment exists
|
|/
|
|
|
|
|
| |
Fixes https://github.com/pry/pry/issues/1452.
($ RuntimeError.exception fails)
Alternative to https://github.com/pry/pry/pull/1453.
|
| |
|
| |
|
|\
| |
| | |
Check for existance of cli_options_file before calling realpath()
|
|/ |
|
| |
|
|\
| |
| | |
Update year in LICENSE
|
| | |
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* PluginManager#load_cli_options: use the realpath
Since ruby 2.5, `require 'foo'` will use the realpath of the file
corresponding to foo.rb. However `require '/absolute/path/to/foo.rb'`
won't use the realpath.
So when $GEM_HOME contains a symlink (ie it is not the realpath), when a
pry plugin is loaded, by `activate!`:
require gem_name if !active?
the real_path of `gem_name` is used.
But then in load_cli_options:
cli_options_file = File.join(spec.full_gem_path, "lib/#{spec.name}/cli.rb")
require cli_options_file if File.exist?(cli_options_file)
since the path given is absolute, it will be used directly without realpath.
This means that cli.rb may potentially be required twice (once via its realpath if the plugin requires it, the other via its $GEM_HOME path when required by `load_cli_options`), which could raise some errors.
Fix this by using the realpath in load_cli_options too.
Revision r59984 in ruby 2.5 introduced the use of realpath for load paths,
and it was backported to version 2.4 in the minor revision 2.4.4. So
only use the realpath ourselves for ruby versions above or equal to
2.4.4.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In Windows, if `less` (or another pager) isn't found by `where.exe` it outputs this info to stderr:
```
[1] pry(main)> 1
INFO: Could not find files for the given pattern(s).
=> 1
```
The `/Q` flag silences this message:
```
[1] pry(main)> 1
=> 1
```
Tested on Conemu, cmd and PowerShell.
|
|\
| |
| | |
Fix formatting in spec
|
|/ |
|