stderr-p 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 81424d3631b1f265b04a0e35aa3f701bbb70a0e6
4
+ data.tar.gz: 5124f02719998376dda9a2953a437903911bb4ca
5
+ SHA512:
6
+ metadata.gz: 8bcfb6cb286409a0e6cb41ee20ba63f9748b64ecc298fe3f378d3f9698db67f3d99d85d41e839617b7e29240b65ba47c1e61e656b57f53ce19fb97861d7ad501
7
+ data.tar.gz: 35ca3a9f8758d5bddbed66734baede65af976ece41e5311f67e04a4384e5ee7c3eb64abb658fa5bf5036ffe67986bd77bdf9b92cb51b9d24c68c5b59b42ee94a
Binary file
Binary file
data/COPYING ADDED
@@ -0,0 +1,56 @@
1
+ Ruby is copyrighted free software by Yukihiro Matsumoto <matz@netlab.jp>.
2
+ You can redistribute it and/or modify it under either the terms of the
3
+ 2-clause BSDL (see the file BSDL), or the conditions below:
4
+
5
+ 1. You may make and give away verbatim copies of the source form of the
6
+ software without restriction, provided that you duplicate all of the
7
+ original copyright notices and associated disclaimers.
8
+
9
+ 2. You may modify your copy of the software in any way, provided that
10
+ you do at least ONE of the following:
11
+
12
+ a) place your modifications in the Public Domain or otherwise
13
+ make them Freely Available, such as by posting said
14
+ modifications to Usenet or an equivalent medium, or by allowing
15
+ the author to include your modifications in the software.
16
+
17
+ b) use the modified software only within your corporation or
18
+ organization.
19
+
20
+ c) give non-standard binaries non-standard names, with
21
+ instructions on where to get the original software distribution.
22
+
23
+ d) make other distribution arrangements with the author.
24
+
25
+ 3. You may distribute the software in object code or binary form,
26
+ provided that you do at least ONE of the following:
27
+
28
+ a) distribute the binaries and library files of the software,
29
+ together with instructions (in the manual page or equivalent)
30
+ on where to get the original distribution.
31
+
32
+ b) accompany the distribution with the machine-readable source of
33
+ the software.
34
+
35
+ c) give non-standard binaries non-standard names, with
36
+ instructions on where to get the original software distribution.
37
+
38
+ d) make other distribution arrangements with the author.
39
+
40
+ 4. You may modify and include the part of the software into any other
41
+ software (possibly commercial). But some files in the distribution
42
+ are not written by the author, so that they are not under these terms.
43
+
44
+ For the list of those files and their copying conditions, see the
45
+ file LEGAL.
46
+
47
+ 5. The scripts and library files supplied as input to or produced as
48
+ output from the software do not automatically fall under the
49
+ copyright of the software, but belong to whomever generated them,
50
+ and may be sold commercially, and may be aggregated with this
51
+ software.
52
+
53
+ 6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
54
+ IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
55
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
56
+ PURPOSE.
@@ -0,0 +1,3 @@
1
+ # STDERR.p
2
+
3
+ Print instect results to STDERR.
@@ -0,0 +1,6 @@
1
+ # -*- coding: us-ascii -*-
2
+ def STDERR.p(*args)
3
+ return *args.each do |arg|
4
+ puts arg.inspect
5
+ end
6
+ end
@@ -0,0 +1,25 @@
1
+ # -*- coding: us-ascii -*-
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = "stderr-p"
5
+ s.version = "0.0.1"
6
+ s.authors = ["Nobu Nakada"]
7
+ s.email = ["nobu@ruby-lang.org"]
8
+ s.summary = "Inspect to STDERR"
9
+ s.description = "Print instect results to STDERR."
10
+ s.homepage = "https://github.com/nobu/stderr-p"
11
+ s.license = "BSD-2-Clause"
12
+ s.cert_chain = %w[certs/nobu.pem]
13
+ s.signing_key = File.expand_path("~/.ssh/gem-private_key.pem") if $0 =~ /gem\z/
14
+
15
+ s.files = %w[
16
+ COPYING
17
+ README.md
18
+ stderr-p.gemspec
19
+ lib/stderr/p.rb
20
+ test/test_stderr_p.rb
21
+ ]
22
+
23
+ s.test_files = s.files.grep(/\Atest\//)
24
+ s.require_paths = ["lib"]
25
+ end
@@ -0,0 +1,24 @@
1
+ # -*- coding: us-ascii -*-
2
+
3
+ require 'test/unit'
4
+ require 'tempfile'
5
+ require_relative '../lib/stderr/p'
6
+
7
+ class TestSTDERR < Test::Unit::TestCase
8
+ def test_p
9
+ args = [[1,2,3], {foo: "bar"}]
10
+ result = Tempfile.open("x") do |tmp|
11
+ tmp.close
12
+ begin
13
+ stderr = STDERR.dup
14
+ STDERR.reopen(tmp.path)
15
+ STDERR.p(*args)
16
+ ensure
17
+ STDERR.reopen(stderr)
18
+ end
19
+ tmp.open
20
+ tmp.read
21
+ end
22
+ assert_equal(args.map {|arg| arg.inspect + "\n"}.join(""), result)
23
+ end
24
+ end
metadata ADDED
@@ -0,0 +1,72 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: stderr-p
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Nobu Nakada
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain:
11
+ - |
12
+ -----BEGIN CERTIFICATE-----
13
+ MIIDcDCCAligAwIBAgIBATANBgkqhkiG9w0BAQUFADA/MQ0wCwYDVQQDDARub2J1
14
+ MRkwFwYKCZImiZPyLGQBGRYJcnVieS1sYW5nMRMwEQYKCZImiZPyLGQBGRYDb3Jn
15
+ MB4XDTE1MTIyMjEzNDAyOFoXDTE2MTIyMTEzNDAyOFowPzENMAsGA1UEAwwEbm9i
16
+ dTEZMBcGCgmSJomT8ixkARkWCXJ1YnktbGFuZzETMBEGCgmSJomT8ixkARkWA29y
17
+ ZzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANduwQ8upTFS4aOBPQQ0
18
+ 2aRqo8otV3QgKRNy3DYwL2ugeZ4F/wAk3KdVeXnDW2Hkj9Yv33FLUKytq9QuhaG4
19
+ 3LmKnVWVbr+G0w/qtv8BIH5w9ajq89YI4X6+fOLasfHXHe/GzPW8siEszFqfEVLi
20
+ LrwipHxurRmiKR4/CyeMTbIaeS2guK1Srj1UCM71OuA18PdbPx+nnZGDRJj6satU
21
+ f3cRPJZdGntrl8ZddzYmkhDK+i7GxbnxMCxw1j3GOhkPXdwy95l3nkuU18kv/Cqn
22
+ QJvmgWgwPtH7ytuhnkIa9cgB44SKGYPvMoWrYaEPjv3v33TPk72vK6WQG1MiykxK
23
+ pHMCAwEAAaN3MHUwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0OBBYEFNNR
24
+ 10GwXP4sPVZBhDQwl+J5msFjMB0GA1UdEQQWMBSBEm5vYnVAcnVieS1sYW5nLm9y
25
+ ZzAdBgNVHRIEFjAUgRJub2J1QHJ1YnktbGFuZy5vcmcwDQYJKoZIhvcNAQEFBQAD
26
+ ggEBAAOTOY2YqMGNEBl3EJGymZKYjhSrP7m9g7WreCGRIAPvhc1Ad5nCaU3rhytF
27
+ 9ayF2X6/RGfO0JqLK0ibMS4AXDoSmzngs1YavbpgrFvDr/GDklDn0PeYwvnIjqHF
28
+ 3edYnfvOwpPshdIcSGB++HR1k+MsVQ+thJBg90qvEBXB240paJBebo66AwtnRMtl
29
+ 2s+U8KA5K21h0B3oZO7MPplyoBnkKIi2wM2vXd+bwy2vdDjCm4TmGE3s4tChPqJl
30
+ ZgehHiYUmHxhsoXmVbst3GP52kHNAhVA7+pMpYuYT7glqpuM0sPxtXCucBCBc8Fw
31
+ dUVKuhl19UL3hBtgLSctsrsoXuo=
32
+ -----END CERTIFICATE-----
33
+ date: 2016-04-12 00:00:00.000000000 Z
34
+ dependencies: []
35
+ description: Print instect results to STDERR.
36
+ email:
37
+ - nobu@ruby-lang.org
38
+ executables: []
39
+ extensions: []
40
+ extra_rdoc_files: []
41
+ files:
42
+ - COPYING
43
+ - README.md
44
+ - lib/stderr/p.rb
45
+ - stderr-p.gemspec
46
+ - test/test_stderr_p.rb
47
+ homepage: https://github.com/nobu/stderr-p
48
+ licenses:
49
+ - BSD-2-Clause
50
+ metadata: {}
51
+ post_install_message:
52
+ rdoc_options: []
53
+ require_paths:
54
+ - lib
55
+ required_ruby_version: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - ">="
58
+ - !ruby/object:Gem::Version
59
+ version: '0'
60
+ required_rubygems_version: !ruby/object:Gem::Requirement
61
+ requirements:
62
+ - - ">="
63
+ - !ruby/object:Gem::Version
64
+ version: '0'
65
+ requirements: []
66
+ rubyforge_project:
67
+ rubygems_version: 2.6.3
68
+ signing_key:
69
+ specification_version: 4
70
+ summary: Inspect to STDERR
71
+ test_files:
72
+ - test/test_stderr_p.rb
Binary file