rspeckled 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/rspeckled/plugins.rb +1 -0
- data/lib/rspeckled/plugins/awesome_print.rb +40 -14
- data/lib/rspeckled/plugins/pretty_print.rb +1 -0
- data/lib/rspeckled/version.rb +1 -1
- metadata +3 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bdecbbe20d9fa4d3d5ee167a8f7274362fc92811
|
4
|
+
data.tar.gz: 052f40be03a6413715d396cb15b26ade89f9302b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f8e88abbfbb72f7c8a406275d4677fe8c38c2c4cd7df605df1dc45e5d1933b641a324d5b29d2ef68f5ff3db125c36595ca0b40425065411eb8743e21cb50ed6a
|
7
|
+
data.tar.gz: c2f74123afafd80674fbfee817309da7132a9f61975a4b73bb673a71110b7de988e57b0d6c9feaec7993a5b25c3bd327b0248141b978933d1ee49f8a8b89207f
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/rspeckled/plugins.rb
CHANGED
@@ -14,6 +14,7 @@ require 'rspeckled/plugins/fakeredis'
|
|
14
14
|
require 'rspeckled/plugins/features'
|
15
15
|
require 'rspeckled/plugins/omniauth'
|
16
16
|
require 'rspeckled/plugins/mocks'
|
17
|
+
require 'rspeckled/plugins/pretty_print'
|
17
18
|
require 'rspeckled/plugins/rails/engine'
|
18
19
|
require 'rspeckled/plugins/rails/strong_parameters'
|
19
20
|
require 'rspeckled/plugins/recaptcha'
|
@@ -2,31 +2,57 @@
|
|
2
2
|
# Awesome Print Plugin
|
3
3
|
##############################################################################
|
4
4
|
|
5
|
+
# rubocop:disable Metrics/AbcSize
|
5
6
|
begin
|
6
7
|
require 'awesome_print'
|
8
|
+
require 'io/console'
|
7
9
|
|
10
|
+
# :reek:DuplicateMethodCall
|
8
11
|
module Kernel
|
9
|
-
def sap(
|
10
|
-
|
11
|
-
|
12
|
-
ap "************************** #{Time.now} **************************", :color => { :string => :white }
|
12
|
+
def sap(*messages)
|
13
|
+
_rows, columns = IO.console.winsize
|
14
|
+
|
13
15
|
puts
|
14
|
-
|
16
|
+
print "\e[1;37m"
|
17
|
+
print " #{Time.now} ".center(columns, '*')
|
18
|
+
print "\e[0m\n"
|
15
19
|
puts
|
16
|
-
root_path = defined?(Rails)
|
20
|
+
root_path = if defined?(Rails)
|
21
|
+
Rails.root.to_s
|
22
|
+
else
|
23
|
+
`git rev-parse --show-toplevel`
|
24
|
+
end
|
17
25
|
|
18
|
-
|
19
|
-
line.gsub(root_path
|
26
|
+
caller[0...5].each do |line|
|
27
|
+
relative_line = line.gsub!(root_path.strip, '.')
|
28
|
+
|
29
|
+
color = if relative_line == line
|
30
|
+
'35'
|
31
|
+
else
|
32
|
+
'1;30'
|
33
|
+
end
|
34
|
+
|
35
|
+
print "\e[#{color}m"
|
36
|
+
print line
|
37
|
+
print "\e[0m\n"
|
20
38
|
end
|
21
39
|
|
22
|
-
lines.each { |line| ap line, :color => { :string => :purpleish } }
|
23
|
-
puts
|
24
|
-
ap msg
|
25
|
-
puts
|
26
|
-
ap '************************************* END **************************************', :color => { :string => :white }
|
27
|
-
puts
|
28
40
|
puts
|
41
|
+
|
42
|
+
Array(messages).each_with_index do |message, index|
|
43
|
+
if message.respond_to?(:class)
|
44
|
+
print "\e[32m"
|
45
|
+
print message.class
|
46
|
+
print "\e[0m\n"
|
47
|
+
puts
|
48
|
+
end
|
49
|
+
|
50
|
+
ap(message)
|
51
|
+
|
52
|
+
puts unless index + 1 == Array(messages).length
|
53
|
+
end
|
29
54
|
end
|
30
55
|
end
|
31
56
|
rescue LoadError
|
32
57
|
end
|
58
|
+
# rubocop:enable Metrics/AbcSize
|
@@ -0,0 +1 @@
|
|
1
|
+
require 'pp'
|
data/lib/rspeckled/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspeckled
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- thegranddesign
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
31
31
|
zRIv8lqQM8QFT76rzP5SBCERwN+ltKAFbQ5/FwmZNGWYnmCP3RZMQiRnbh+9H9lh
|
32
32
|
mlbwaYZTjgsXq6cy8N38EecewgBbZYS1IYJraE/M
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date: 2016-06-
|
34
|
+
date: 2016-06-12 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rspec
|
@@ -112,6 +112,7 @@ files:
|
|
112
112
|
- lib/rspeckled/plugins/garbage_collection.rb
|
113
113
|
- lib/rspeckled/plugins/mocks.rb
|
114
114
|
- lib/rspeckled/plugins/omniauth.rb
|
115
|
+
- lib/rspeckled/plugins/pretty_print.rb
|
115
116
|
- lib/rspeckled/plugins/rails/engine.rb
|
116
117
|
- lib/rspeckled/plugins/rails/strong_parameters.rb
|
117
118
|
- lib/rspeckled/plugins/recaptcha.rb
|
metadata.gz.sig
CHANGED
Binary file
|