cute_print 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -4
- data/VERSION +1 -1
- data/cute_print.gemspec +4 -3
- data/lib/cute_print/ruby_generator.rb +0 -2
- data/spec/irb_spec.rb +3 -2
- data/spec/printer_spec.rb +1 -1
- data/spec/silence_warnings.rb +24 -0
- data/spec/spec_helper.rb +6 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b77c74c7dd08701b1565f5c5c31716ee0db3e047
|
4
|
+
data.tar.gz: 0755262ff0105ecdb4b482ca308a91537b810604
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a0121678c3b1f7e924889f629bb46ec9e944de20a2b9c50101a31b14bb1b67496475f07e4d42175dd47319f57073b70c22d300ce2facd7447ed2c78422d8f3b
|
7
|
+
data.tar.gz: 4c27d895e6dda812b3391da579b63ae310e25230d76deb7bca55132b25fa05763cbf92612899c682b1e836e026feb124552edc234e147ccc9a733dd51beb7963
|
data/CHANGELOG.md
CHANGED
@@ -1,16 +1,20 @@
|
|
1
|
-
# 1.0.
|
1
|
+
# 1.0.1 - 2014-12-21
|
2
|
+
|
3
|
+
* Eliminate warnings in "-w" mode
|
4
|
+
|
5
|
+
# 1.0.0 - 2014-12.13
|
2
6
|
|
3
7
|
* Declare API stability with advent of v. 1.0.0
|
4
8
|
* Update gems
|
5
9
|
|
6
|
-
# 0.4.0 2014-10-25
|
10
|
+
# 0.4.0 - 2014-10-25
|
7
11
|
|
8
12
|
API changes
|
9
13
|
|
10
14
|
* Can be used without patching any core Ruby classes (see README)
|
11
15
|
* Use fewer output lines when possible while better respecting term width
|
12
16
|
|
13
|
-
# 0.3.0
|
17
|
+
# 0.3.0 - 2014-09-27
|
14
18
|
|
15
19
|
Breaking changes:
|
16
20
|
|
@@ -27,7 +31,7 @@ Bug fixes:
|
|
27
31
|
* Works in irb (issue #1)
|
28
32
|
* Is now thread safe (issue #4)
|
29
33
|
|
30
|
-
# 0.2.0
|
34
|
+
# 0.2.0 - 2014-09-05
|
31
35
|
|
32
36
|
Breaking changes:
|
33
37
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.1
|
data/cute_print.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: cute_print 1.0.
|
5
|
+
# stub: cute_print 1.0.1 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "cute_print"
|
9
|
-
s.version = "1.0.
|
9
|
+
s.version = "1.0.1"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
13
13
|
s.authors = ["Wayne Conrad"]
|
14
|
-
s.date = "2014-12-
|
14
|
+
s.date = "2014-12-21"
|
15
15
|
s.description = "Write debug output to stderr. Optionally print the source filename and line number, or the source of the debug statement. Easily inspect the middle of a call chain."
|
16
16
|
s.email = "wconrad@yagni.com"
|
17
17
|
s.extra_rdoc_files = [
|
@@ -92,6 +92,7 @@ Gem::Specification.new do |s|
|
|
92
92
|
"spec/labeler_spec.rb",
|
93
93
|
"spec/outline_labeler_spec.rb",
|
94
94
|
"spec/printer_spec.rb",
|
95
|
+
"spec/silence_warnings.rb",
|
95
96
|
"spec/spec_helper.rb",
|
96
97
|
"spec/support/captures_stderr.rb",
|
97
98
|
"tasks/cucumber.rake",
|
data/spec/irb_spec.rb
CHANGED
@@ -10,13 +10,14 @@ describe CutePrint do
|
|
10
10
|
|
11
11
|
it "should be able to inspect source when called from irb" do
|
12
12
|
lib_path = File.join(File.dirname(__FILE__), "../lib/cute_print")
|
13
|
-
|
13
|
+
_stdout_output, stderr_output =
|
14
|
+
Open3.popen3("irb") do |stdin, stdout, stderr, wait_thr|
|
14
15
|
stdin.puts "require #{lib_path.inspect}"
|
15
16
|
stdin.puts "q {1 + 2}"
|
16
17
|
stdin.close
|
17
18
|
[stdout.read, stderr.read]
|
18
19
|
end
|
19
|
-
expect(
|
20
|
+
expect(stderr_output).to eq "(1 + 2) is 3\n"
|
20
21
|
end
|
21
22
|
|
22
23
|
end
|
data/spec/printer_spec.rb
CHANGED
@@ -0,0 +1,24 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
# From [Ruby verbose mode and how it's broken][1] by Mislav Marohnić
|
3
|
+
# [1]: http://mislav.uniqpath.com/2011/06/ruby-verbose-mode/
|
4
|
+
#
|
5
|
+
# Silence Ruby verbose output. Use this to quiet warnings from
|
6
|
+
# a third-party library:
|
7
|
+
#
|
8
|
+
# silence_warnings do
|
9
|
+
# require "library_with_many_warnings"
|
10
|
+
# end
|
11
|
+
module Kernel
|
12
|
+
|
13
|
+
def silence_warnings
|
14
|
+
with_warnings(nil) { yield }
|
15
|
+
end
|
16
|
+
|
17
|
+
def with_warnings(flag)
|
18
|
+
old_verbose, $VERBOSE = $VERBOSE, flag
|
19
|
+
yield
|
20
|
+
ensure
|
21
|
+
$VERBOSE = old_verbose
|
22
|
+
end
|
23
|
+
|
24
|
+
end unless Kernel.respond_to? :silence_warnings
|
data/spec/spec_helper.rb
CHANGED
@@ -1,9 +1,14 @@
|
|
1
|
+
$VERBOSE=true
|
1
2
|
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), "..", "lib"))
|
2
3
|
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
3
4
|
|
5
|
+
require_relative "silence_warnings"
|
6
|
+
|
4
7
|
require "pp"
|
5
8
|
require "rspec"
|
6
|
-
|
9
|
+
silence_warnings do
|
10
|
+
require "rspec-given"
|
11
|
+
end
|
7
12
|
|
8
13
|
globs = [
|
9
14
|
"../test_support",
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cute_print
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Wayne Conrad
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-12-
|
11
|
+
date: 2014-12-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruby_parser
|
@@ -121,6 +121,7 @@ files:
|
|
121
121
|
- spec/labeler_spec.rb
|
122
122
|
- spec/outline_labeler_spec.rb
|
123
123
|
- spec/printer_spec.rb
|
124
|
+
- spec/silence_warnings.rb
|
124
125
|
- spec/spec_helper.rb
|
125
126
|
- spec/support/captures_stderr.rb
|
126
127
|
- tasks/cucumber.rake
|