jazz_fingers 2.0.0 → 2.0.1.rc1
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/README.md +1 -0
- data/jazz_fingers.gemspec +3 -2
- data/lib/jazz_fingers/configuration.rb +12 -1
- data/lib/jazz_fingers/prompt.rb +2 -7
- data/lib/jazz_fingers/setup.rb +4 -3
- data/lib/jazz_fingers/version.rb +1 -1
- data/lib/jazz_fingers.rb +7 -1
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd88336dda33591dc81630b46696372ea999b26f
|
4
|
+
data.tar.gz: 3d05c39a662f46a1603e340664e0898da3cb1af9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b24b36fd6ffffa9b12ad565a10199dd4517e23b702a15c7bf1243cfb7a175289c787e50c671117ffac3d7dcd6781ef20d8ff8b1f473a8cca204177a767d0b4cc
|
7
|
+
data.tar.gz: c1846c62dee3afd7501a848c4a110405e46e7ef400ddf1feebac6037365df1ef8e7a0f8c6ceba0cba4985ce95ff7d4abc25b1847def1fc77b4304bd49e70106c
|
data/README.md
CHANGED
data/jazz_fingers.gemspec
CHANGED
@@ -9,8 +9,8 @@ Gem::Specification.new do |gem|
|
|
9
9
|
gem.email = "plribeiro3000@gmail.com"
|
10
10
|
gem.license = "MIT"
|
11
11
|
gem.homepage = "https://github.com/plribeiro3000/jazz_fingers"
|
12
|
-
gem.summary = "Exercise those fingers. Pry-based enhancements for the default
|
13
|
-
gem.description = "Spending hours in the
|
12
|
+
gem.summary = "Exercise those fingers. Pry-based enhancements for the default Ruby console."
|
13
|
+
gem.description = "Spending hours in the ruby console? Spruce it up and show off those hard-working hands! jazz_fingers replaces IRB with Pry, improves output through awesome_print, and has some other goodies up its sleeves."
|
14
14
|
|
15
15
|
gem.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
|
16
16
|
gem.files = `git ls-files`.split("\n")
|
@@ -27,5 +27,6 @@ Gem::Specification.new do |gem|
|
|
27
27
|
gem.add_runtime_dependency "hirb", "~> 0.7"
|
28
28
|
gem.add_runtime_dependency "pry-coolline", "~> 0.2"
|
29
29
|
gem.add_runtime_dependency "awesome_print", "~> 1.6"
|
30
|
+
|
30
31
|
gem.add_development_dependency "rubocop"
|
31
32
|
end
|
@@ -1,6 +1,7 @@
|
|
1
1
|
module JazzFingers
|
2
2
|
class Configuration
|
3
|
-
attr_writer :colored_prompt, :prompt_separator, :coolline, :awesome_print
|
3
|
+
attr_writer :colored_prompt, :prompt_separator, :coolline, :awesome_print,
|
4
|
+
:application_name
|
4
5
|
|
5
6
|
# Color the prompt?
|
6
7
|
#
|
@@ -36,5 +37,15 @@ module JazzFingers
|
|
36
37
|
|
37
38
|
@awesome_print
|
38
39
|
end
|
40
|
+
|
41
|
+
def application_name
|
42
|
+
return "(#{@application_name.to_s.underscore})" unless @application_name.nil?
|
43
|
+
|
44
|
+
if defined?(Rails)
|
45
|
+
return "(#{Rails.application.class.parent_name.underscore})"
|
46
|
+
else
|
47
|
+
return "(jazz_fingers)"
|
48
|
+
end
|
49
|
+
end
|
39
50
|
end
|
40
51
|
end
|
data/lib/jazz_fingers/prompt.rb
CHANGED
@@ -3,6 +3,7 @@ module JazzFingers
|
|
3
3
|
def initialize(options = {})
|
4
4
|
@colored = options.fetch(:colored)
|
5
5
|
@separator = options.fetch(:separator)
|
6
|
+
@application_name = options.fetch(:application_name)
|
6
7
|
end
|
7
8
|
|
8
9
|
def colored?
|
@@ -32,13 +33,7 @@ module JazzFingers
|
|
32
33
|
end
|
33
34
|
|
34
35
|
def name
|
35
|
-
|
36
|
-
name = "(#{app.class.parent_name.underscore})"
|
37
|
-
else
|
38
|
-
name = "(jazz_fingers)"
|
39
|
-
end
|
40
|
-
|
41
|
-
blue_text(name)
|
36
|
+
blue_text(@application_name)
|
42
37
|
end
|
43
38
|
|
44
39
|
def line_number(pry)
|
data/lib/jazz_fingers/setup.rb
CHANGED
@@ -2,8 +2,9 @@
|
|
2
2
|
Pry.print = JazzFingers.print if JazzFingers.config.awesome_print?
|
3
3
|
Pry.prompt = JazzFingers.prompt
|
4
4
|
Pry.input = JazzFingers.input if JazzFingers.config.coolline?
|
5
|
+
Pry.config.should_load_plugins = false
|
5
6
|
|
6
7
|
# Command Shortcuts
|
7
|
-
Pry.commands.alias_command(
|
8
|
-
Pry.commands.alias_command(
|
9
|
-
Pry.commands.alias_command(
|
8
|
+
Pry.commands.alias_command("c", "continue")
|
9
|
+
Pry.commands.alias_command("s", "step")
|
10
|
+
Pry.commands.alias_command("n", "next")
|
data/lib/jazz_fingers/version.rb
CHANGED
data/lib/jazz_fingers.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require "hirb"
|
2
2
|
require "pry"
|
3
|
+
require "pry-byebug"
|
3
4
|
require "pry-doc"
|
4
5
|
require "pry-git"
|
5
6
|
require "pry-remote"
|
@@ -19,7 +20,12 @@ module JazzFingers
|
|
19
20
|
end
|
20
21
|
|
21
22
|
def prompt
|
22
|
-
@prompt ||=
|
23
|
+
@prompt ||=
|
24
|
+
Prompt.new(
|
25
|
+
colored: config.colored_prompt,
|
26
|
+
separator: config.prompt_separator,
|
27
|
+
application_name: config.application_name
|
28
|
+
)
|
23
29
|
@prompt.config
|
24
30
|
end
|
25
31
|
|
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: 2.0.
|
4
|
+
version: 2.0.1.rc1
|
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: 2015-06-
|
11
|
+
date: 2015-06-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|
@@ -136,9 +136,9 @@ dependencies:
|
|
136
136
|
- - ">="
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '0'
|
139
|
-
description: Spending hours in the
|
140
|
-
|
141
|
-
|
139
|
+
description: Spending hours in the ruby console? Spruce it up and show off those hard-working
|
140
|
+
hands! jazz_fingers replaces IRB with Pry, improves output through awesome_print,
|
141
|
+
and has some other goodies up its sleeves.
|
142
142
|
email: plribeiro3000@gmail.com
|
143
143
|
executables: []
|
144
144
|
extensions: []
|
@@ -180,14 +180,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
180
180
|
version: '2.0'
|
181
181
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
182
182
|
requirements:
|
183
|
-
- - "
|
183
|
+
- - ">"
|
184
184
|
- !ruby/object:Gem::Version
|
185
|
-
version:
|
185
|
+
version: 1.3.1
|
186
186
|
requirements: []
|
187
187
|
rubyforge_project:
|
188
188
|
rubygems_version: 2.4.2
|
189
189
|
signing_key:
|
190
190
|
specification_version: 4
|
191
|
-
summary: Exercise those fingers. Pry-based enhancements for the default
|
191
|
+
summary: Exercise those fingers. Pry-based enhancements for the default Ruby console.
|
192
192
|
test_files: []
|
193
193
|
has_rdoc:
|