super_awesome_print 0.2.0 → 0.2.1

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: f278fe4412a4ff7d18230b15cd8d5a36780ce476
4
- data.tar.gz: 814ec19746437935d831a4ffcc1748ec4cf0b26a
3
+ metadata.gz: f49802099873f8df102416cb70d8ee685cc60a07
4
+ data.tar.gz: 27a180a209b4c76437af52730c3265a64fd3e5cb
5
5
  SHA512:
6
- metadata.gz: 88d59f52d0c7aa9e9bf3213fe13c038ddae55c4df0fe76e69171cc90355678423b8d71d0f34086af5af2d43e1f8e0427ffaf09b69234f877d9d981e87ed3320a
7
- data.tar.gz: ac5cc4430a541b092e4eaa3d161ad9a14af26c59955566c581281c44abe580cc54020cd0c2506447ccef24099f63aded79c825fcc98fd5a5d984e33e85568d83
6
+ metadata.gz: c3416033acc16e1e1c1347b34cb94f786dda5032a2fbfaf11819b269f7311934683388490b7da3cebc752a36e5047cbb080e5c0e21bf463b34684f1d32304c26
7
+ data.tar.gz: 8a91e65efee4301ce20710848977c0a7bf1e3090a3f966f99128895ed5ff8e1d86494db9d7a1d255b729febf5e7e1c218abd82772f06fdf050dea95bc29adeac
data/README.md CHANGED
@@ -34,6 +34,7 @@ SuperAwesomePrint.configure do |config|
34
34
  config.caller_lines = 3 # defaults to 1
35
35
  config.blank_lines_top = 2 # defaults to 0
36
36
  config.blank_lines_bottom = 2 # defaults to 0
37
+ config.root_path = Rails.root.to_s # this path will be removed from caller's files path, defaults to Rails.root.to_s
37
38
  end
38
39
  ```
39
40
 
@@ -20,7 +20,7 @@ module SuperAwesomePrint
20
20
  def self.print_caller_lines(caller_array)
21
21
  number_of_lines = config.caller_lines
22
22
  lines = caller_array[0...number_of_lines].map do |line|
23
- line.gsub(Rails.root.to_s + '/', '')
23
+ line.gsub(config.root_path + '/', '')
24
24
  end
25
25
  lines.each { |line| ap line, color: { string: :purpleish } }
26
26
  end
@@ -1,9 +1,10 @@
1
1
  class Configuration
2
- attr_accessor :caller_lines, :blank_lines_top, :blank_lines_bottom
2
+ attr_accessor :caller_lines, :blank_lines_top, :blank_lines_bottom, :root_path
3
3
 
4
4
  def initialize
5
5
  @caller_lines = 1
6
6
  @blank_lines_top = 0
7
7
  @blank_lines_bottom = 0
8
+ @root_path = defined?(Rails) ? Rails.root.to_s : ''
8
9
  end
9
10
  end
@@ -1,3 +1,3 @@
1
1
  module SuperAwesomePrint
2
- VERSION = '0.2.0'.freeze
2
+ VERSION = '0.2.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: super_awesome_print
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oleg Antonyan
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-02-25 00:00:00.000000000 Z
11
+ date: 2016-02-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler