jazz_fingers 2.0.0 → 2.0.1.rc1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: aaecd076918e8c0a873af5007079f239c6da8b94
4
- data.tar.gz: 19fb8b5fdb8ef30f55e9737f9bcb6344dc2253b3
3
+ metadata.gz: dd88336dda33591dc81630b46696372ea999b26f
4
+ data.tar.gz: 3d05c39a662f46a1603e340664e0898da3cb1af9
5
5
  SHA512:
6
- metadata.gz: f6e8dc5f3708373499ac583f108d7fd55ae4b6efca65a5af5b8c65f1345ce49300ef2d832a6556aa1ef03c39f89a7581b65c67c45ad575d8a4cb8bbf7d61a58d
7
- data.tar.gz: 52ca34d63cbb53f6580728581edd113ea56b588ed9addbceea459f72327172243c004e0dcd8ca810d04bc934f3259322894b50199b922e60f6d2cb9889382158
6
+ metadata.gz: b24b36fd6ffffa9b12ad565a10199dd4517e23b702a15c7bf1243cfb7a175289c787e50c671117ffac3d7dcd6781ef20d8ff8b1f473a8cca204177a767d0b4cc
7
+ data.tar.gz: c1846c62dee3afd7501a848c4a110405e46e7ef400ddf1feebac6037365df1ef8e7a0f8c6ceba0cba4985ce95ff7d4abc25b1847def1fc77b4304bd49e70106c
data/README.md CHANGED
@@ -50,6 +50,7 @@ if defined?(JazzFingers)
50
50
  config.colored_prompt = false
51
51
  config.awesome_print = false
52
52
  config.coolline = false
53
+ config.application_name = MyAwesomeProject
53
54
  end
54
55
 
55
56
  require 'jazz_fingers/setup'
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 Rails console."
13
- gem.description = "Spending hours in the rails 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."
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
@@ -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
- if respond_to?(:app)
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)
@@ -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('c', 'continue')
8
- Pry.commands.alias_command('s', 'step')
9
- Pry.commands.alias_command('n', 'next')
8
+ Pry.commands.alias_command("c", "continue")
9
+ Pry.commands.alias_command("s", "step")
10
+ Pry.commands.alias_command("n", "next")
@@ -1,3 +1,3 @@
1
1
  module JazzFingers
2
- VERSION = "2.0.0"
2
+ VERSION = "2.0.1.rc1"
3
3
  end
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 ||= Prompt.new(colored: config.colored_prompt, separator: config.prompt_separator)
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.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-01 00:00:00.000000000 Z
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 rails console? Spruce it up and show off those
140
- hard-working hands! jazz_fingers replaces IRB with Pry, improves output through
141
- awesome_print, and has some other goodies up its sleeves.
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: '0'
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 Rails console.
191
+ summary: Exercise those fingers. Pry-based enhancements for the default Ruby console.
192
192
  test_files: []
193
193
  has_rdoc: