jazz_fingers 0.5.3 → 0.5.4
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 +4 -4
- data/CHANGELOG.md +5 -1
- data/README.md +5 -16
- data/jazz_fingers.gemspec +0 -1
- data/lib/jazz_fingers.rb +0 -32
- data/lib/jazz_fingers/railtie.rb +4 -4
- data/lib/jazz_fingers/version.rb +1 -1
- metadata +2 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 684b5e636d6dfd5747bc1042bcfe07bb094c2b83
|
4
|
+
data.tar.gz: a4c0c8d721c14338745e140777158916165f18a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c133106579db0869da0618c92731ebd9e6b504f8b6b37528ee9225f6b71d3aac63656212005453fd648d014d80c6b18c2c38a543e26871c9b687a9599a768f43
|
7
|
+
data.tar.gz: 71e7eb0ad9cfa90d7af189b56b19054db0a7c8ce8589b969099ce5f4be9c4ffbd558c0f8ba29ad589540549119e370c40ea453e7aee10d2eb17eff2ad6b9d268
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
## 0.5.4 (2014-11-06)
|
2
|
+
|
3
|
+
* Remove [pry-stack_explorer][pry-stack_explorer]
|
4
|
+
|
1
5
|
## 0.5.3 (2014-11-04)
|
2
6
|
|
3
7
|
* Using [pry-byebug][pry-byebug] to use ruby >= 2.0.0.
|
@@ -123,7 +127,7 @@
|
|
123
127
|
[pry-nav]: https://github.com/nixme/pry-nav
|
124
128
|
[pry-remote]: https://github.com/Mon-Ouie/pry-remote
|
125
129
|
[coolline]: https://github.com/Mon-Ouie/coolline
|
126
|
-
[pry-
|
130
|
+
[pry-coolline]: https://github.com/pry/pry-coolline
|
127
131
|
[coderay]: https://github.com/rubychan/coderay
|
128
132
|
[hirb]: https://github.com/cldwalker/hirb
|
129
133
|
[pry-stack_explorer]: https://github.com/pry/pry-stack_explorer
|
data/README.md
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
Jazz Fingers
|
2
2
|
============
|
3
3
|
|
4
|
+
This repo is a fork, with updates and bug fixes based on [`jazz_hands`](https://github.com/nixme/jazz_hands).
|
5
|
+
|
4
6
|
Spending hours in the rails console? Spruce it up and show off those
|
5
7
|
hard-working hands!
|
6
8
|
|
@@ -16,15 +18,12 @@ hard-working hands!
|
|
16
18
|
* [**Pry Git**][pry-git] to teach the console about git. Diffs, blames, and
|
17
19
|
commits on methods and classes, not just files.
|
18
20
|
* [**Pry Remote**][pry-remote] to connect remotely to a Pry console.
|
19
|
-
* [**Pry
|
20
|
-
frames.
|
21
|
-
* [**Coolline**][coolline] and [**Coderay**][coderay] for syntax highlighting as
|
22
|
-
you type. _Optional. MRI 1.9.3/2.0.0 only_
|
21
|
+
* [**Pry Coolline**][pry-coolline] for syntax highlighting as you type.
|
23
22
|
|
24
23
|
|
25
24
|
## Usage
|
26
25
|
|
27
|
-
Ruby
|
26
|
+
Ruby 2.0.0+, Rails 3 or 4 only. Add to your project Gemfile:
|
28
27
|
|
29
28
|
```ruby
|
30
29
|
group :development, :test do
|
@@ -50,7 +49,6 @@ Example `config/initializers/jazz_fingers.rb`:
|
|
50
49
|
```ruby
|
51
50
|
if defined?(JazzFingers)
|
52
51
|
JazzFingers.colored_prompt = false
|
53
|
-
JazzFingers.enable_syntax_highlighting_as_you_type!
|
54
52
|
end
|
55
53
|
```
|
56
54
|
|
@@ -68,14 +66,6 @@ Separator string between the application name and line input. Defaults to `»`
|
|
68
66
|
for GNU readline or libedit. Defaults to `>` for `rb-readline` which fails on
|
69
67
|
mixed encodings.
|
70
68
|
|
71
|
-
### Syntax highlighting
|
72
|
-
|
73
|
-
Syntax highlighting as you type via [Coolline][coolline] and [Coderay][coderay]
|
74
|
-
is disabled by default due to slightly buggy behavior. To enable, add
|
75
|
-
`JazzFingers.enable_syntax_highlighting_as_you_type!` to the initializer. Only
|
76
|
-
works with MRI 1.9.3 or 2.0.0.
|
77
|
-
|
78
|
-
|
79
69
|
## Contributing
|
80
70
|
|
81
71
|
Patches and bug reports are welcome. Just send a [pull request][pullrequests] or
|
@@ -89,8 +79,7 @@ file an [issue][issues]. [Project changelog][changelog].
|
|
89
79
|
[pry-doc]: https://github.com/pry/pry-doc
|
90
80
|
[pry-git]: https://github.com/pry/pry-git
|
91
81
|
[pry-remote]: https://github.com/Mon-Ouie/pry-remote
|
92
|
-
[pry-
|
93
|
-
[coolline]: https://github.com/Mon-Ouie/coolline
|
82
|
+
[pry-coolline]: https://github.com/pry/pry-coolline
|
94
83
|
[coderay]: https://github.com/rubychan/coderay
|
95
84
|
[rb-readline]: https://github.com/luislavena/rb-readline
|
96
85
|
[pullrequests]: https://github.com/plribeiro3000/jazz_fingers/pulls
|
data/jazz_fingers.gemspec
CHANGED
@@ -23,7 +23,6 @@ Gem::Specification.new do |gem|
|
|
23
23
|
gem.add_runtime_dependency 'pry-rails', '~> 0.3'
|
24
24
|
gem.add_runtime_dependency 'pry-doc', '~> 0.6'
|
25
25
|
gem.add_runtime_dependency 'pry-git', '~> 0.2'
|
26
|
-
gem.add_runtime_dependency 'pry-stack_explorer', '~> 0.4.9'
|
27
26
|
gem.add_runtime_dependency 'pry-remote', '>= 0.1.7'
|
28
27
|
gem.add_runtime_dependency 'pry-byebug', '~> 1.3'
|
29
28
|
gem.add_runtime_dependency 'hirb', '~> 0.7'
|
data/lib/jazz_fingers.rb
CHANGED
@@ -28,38 +28,6 @@ module JazzFingers
|
|
28
28
|
mattr_accessor :prompt_separator
|
29
29
|
self.prompt_separator = defined?(RbReadline) ? '>' : "\u00BB"
|
30
30
|
|
31
|
-
|
32
|
-
class << self
|
33
|
-
# Enable syntax highlighting as you type in the Rails console via coolline and
|
34
|
-
# coderay (MRI 1.9.3+ only). Disabled by default as it's a bit buggy.
|
35
|
-
#
|
36
|
-
# Call from a Rails initializer:
|
37
|
-
#
|
38
|
-
# JazzFingers.enable_syntax_highlighting_as_you_type!
|
39
|
-
#
|
40
|
-
def enable_syntax_highlighting_as_you_type!
|
41
|
-
raise 'Syntax highlighting only supported on 1.9.3+' unless RUBY_VERSION >= '1.9.3'
|
42
|
-
|
43
|
-
# Use coolline with CodeRay for syntax highlighting as you type.
|
44
|
-
# Only works on >= 1.9.3 because coolline depends on io/console.
|
45
|
-
|
46
|
-
require 'coolline'
|
47
|
-
require 'coderay'
|
48
|
-
|
49
|
-
Pry.config.input = Coolline.new do |c|
|
50
|
-
c.transform_proc = proc do
|
51
|
-
CodeRay.scan(c.line, :ruby).term
|
52
|
-
end
|
53
|
-
|
54
|
-
c.completion_proc = proc do
|
55
|
-
word = c.completed_word
|
56
|
-
Object.constants.map(&:to_s).select { |w| w.start_with? word }
|
57
|
-
end
|
58
|
-
end
|
59
|
-
end
|
60
|
-
alias :enable_syntax_highlighting_as_you_type :enable_syntax_highlighting_as_you_type!
|
61
|
-
end
|
62
|
-
|
63
31
|
### Internal methods ###
|
64
32
|
|
65
33
|
mattr_accessor :_hirb_output
|
data/lib/jazz_fingers/railtie.rb
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
+
require 'awesome_print'
|
1
2
|
require 'pry'
|
2
|
-
require 'pry-
|
3
|
+
require 'pry-coolline'
|
3
4
|
require 'pry-doc'
|
4
5
|
require 'pry-git'
|
6
|
+
require 'pry-rails'
|
5
7
|
require 'pry-remote'
|
6
|
-
require 'pry-stack_explorer'
|
7
|
-
require 'awesome_print'
|
8
8
|
require 'jazz_fingers/hirb_ext'
|
9
9
|
|
10
10
|
module JazzFingers
|
@@ -16,7 +16,7 @@ module JazzFingers
|
|
16
16
|
|
17
17
|
# Use awesome_print for output, but keep pry's pager. If Hirb is
|
18
18
|
# enabled, try printing with it first.
|
19
|
-
Pry.config.print = ->(
|
19
|
+
Pry.config.print = ->(_output, value, _pry_) do
|
20
20
|
return if JazzFingers._hirb_output && Hirb::View.view_or_page_output(value)
|
21
21
|
pretty = value.ai(indent: 2)
|
22
22
|
_pry_.pager.page("=> #{pretty}")
|
data/lib/jazz_fingers/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jazz_fingers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paulo Henrique Lopes Ribeiro
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-11-
|
11
|
+
date: 2014-11-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|
@@ -66,20 +66,6 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0.2'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: pry-stack_explorer
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - "~>"
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: 0.4.9
|
76
|
-
type: :runtime
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - "~>"
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: 0.4.9
|
83
69
|
- !ruby/object:Gem::Dependency
|
84
70
|
name: pry-remote
|
85
71
|
requirement: !ruby/object:Gem::Requirement
|