power_p 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +4 -0
- data/.travis.yml +5 -0
- data/BSDL +22 -0
- data/COPYING +57 -0
- data/Gemfile +3 -0
- data/LEGAL +0 -0
- data/README.rdoc +16 -0
- data/Rakefile +8 -0
- data/lib/power_p/version.rb +3 -0
- data/lib/power_p.rb +28 -0
- data/power_p.gemspec +25 -0
- data/test/test_power_p.rb +8 -0
- metadata +100 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: c99351f52fbfc338960c05304117afb1038431d6
|
4
|
+
data.tar.gz: 612131704d1897368a4c1ea60b238e3d3d505271
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 1debce1526ee6533bf883e94ce616bd151fb024ed0a455a020493f96e2d2c740f764256de99253396e915427a57f8fad2e5b113a33a3c4e72c366240a46cfdd9
|
7
|
+
data.tar.gz: 93f599e12bb26a038260f0e9b2fea243dc8a60a3d279dd08dfed2e93e3e00478323de3a94bd631c2278734bbd3e11550d49c97ba6768e46479641520031070bf
|
data/.gitignore
ADDED
data/.travis.yml
ADDED
data/BSDL
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (C) 2014 Kazuki Tsujimoto, All rights reserved.
|
2
|
+
|
3
|
+
Redistribution and use in source and binary forms, with or without
|
4
|
+
modification, are permitted provided that the following conditions
|
5
|
+
are met:
|
6
|
+
1. Redistributions of source code must retain the above copyright
|
7
|
+
notice, this list of conditions and the following disclaimer.
|
8
|
+
2. Redistributions in binary form must reproduce the above copyright
|
9
|
+
notice, this list of conditions and the following disclaimer in the
|
10
|
+
documentation and/or other materials provided with the distribution.
|
11
|
+
|
12
|
+
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
13
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
14
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
15
|
+
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
16
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
17
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
18
|
+
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
19
|
+
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
20
|
+
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
21
|
+
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
22
|
+
SUCH DAMAGE.
|
data/COPYING
ADDED
@@ -0,0 +1,57 @@
|
|
1
|
+
Copyright (C) 2014 Kazuki Tsujimoto, All rights reserved.
|
2
|
+
|
3
|
+
You can redistribute it and/or modify it under either the terms of the
|
4
|
+
2-clause BSDL (see the file BSDL), or the conditions below:
|
5
|
+
|
6
|
+
1. You may make and give away verbatim copies of the source form of the
|
7
|
+
software without restriction, provided that you duplicate all of the
|
8
|
+
original copyright notices and associated disclaimers.
|
9
|
+
|
10
|
+
2. You may modify your copy of the software in any way, provided that
|
11
|
+
you do at least ONE of the following:
|
12
|
+
|
13
|
+
a) place your modifications in the Public Domain or otherwise
|
14
|
+
make them Freely Available, such as by posting said
|
15
|
+
modifications to Usenet or an equivalent medium, or by allowing
|
16
|
+
the author to include your modifications in the software.
|
17
|
+
|
18
|
+
b) use the modified software only within your corporation or
|
19
|
+
organization.
|
20
|
+
|
21
|
+
c) give non-standard binaries non-standard names, with
|
22
|
+
instructions on where to get the original software distribution.
|
23
|
+
|
24
|
+
d) make other distribution arrangements with the author.
|
25
|
+
|
26
|
+
3. You may distribute the software in object code or binary form,
|
27
|
+
provided that you do at least ONE of the following:
|
28
|
+
|
29
|
+
a) distribute the binaries and library files of the software,
|
30
|
+
together with instructions (in the manual page or equivalent)
|
31
|
+
on where to get the original distribution.
|
32
|
+
|
33
|
+
b) accompany the distribution with the machine-readable source of
|
34
|
+
the software.
|
35
|
+
|
36
|
+
c) give non-standard binaries non-standard names, with
|
37
|
+
instructions on where to get the original software distribution.
|
38
|
+
|
39
|
+
d) make other distribution arrangements with the author.
|
40
|
+
|
41
|
+
4. You may modify and include the part of the software into any other
|
42
|
+
software (possibly commercial). But some files in the distribution
|
43
|
+
are not written by the author, so that they are not under these terms.
|
44
|
+
|
45
|
+
For the list of those files and their copying conditions, see the
|
46
|
+
file LEGAL.
|
47
|
+
|
48
|
+
5. The scripts and library files supplied as input to or produced as
|
49
|
+
output from the software do not automatically fall under the
|
50
|
+
copyright of the software, but belong to whomever generated them,
|
51
|
+
and may be sold commercially, and may be aggregated with this
|
52
|
+
software.
|
53
|
+
|
54
|
+
6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
|
55
|
+
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
56
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
57
|
+
PURPOSE.
|
data/Gemfile
ADDED
data/LEGAL
ADDED
File without changes
|
data/README.rdoc
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
= power_p
|
2
|
+
== About
|
3
|
+
Extend Kernel#p with power_assert.
|
4
|
+
|
5
|
+
Note that power_p works only if p is written in the file.
|
6
|
+
|
7
|
+
$ cat test.rb
|
8
|
+
p { 3.times.to_a }
|
9
|
+
|
10
|
+
$ ruby -rpower_p test.rb
|
11
|
+
p { 3.times.to_a }
|
12
|
+
| |
|
13
|
+
| [0, 1, 2]
|
14
|
+
#<Enumerator: 3:times>
|
15
|
+
|
16
|
+
== Travis Build Status {<img src="https://secure.travis-ci.org/k-tsj/power_p.png"/>}[http://travis-ci.org/k-tsj/power_p]
|
data/Rakefile
ADDED
data/lib/power_p.rb
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
# power_p.rb
|
2
|
+
#
|
3
|
+
# Copyright (C) 2014 Kazuki Tsujimoto, All rights reserved.
|
4
|
+
|
5
|
+
require "power_p/version"
|
6
|
+
require 'power_assert'
|
7
|
+
|
8
|
+
module PowerP
|
9
|
+
def p(*, &blk)
|
10
|
+
if blk
|
11
|
+
PowerAssert.start(blk, assertion_method: __callee__) do |pa|
|
12
|
+
val = pa.yield
|
13
|
+
puts pa.message_proc.call
|
14
|
+
val
|
15
|
+
end
|
16
|
+
else
|
17
|
+
super
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
module Kernel
|
23
|
+
prepend PowerP
|
24
|
+
end
|
25
|
+
|
26
|
+
class Object
|
27
|
+
include Kernel
|
28
|
+
end
|
data/power_p.gemspec
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'power_p/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'power_p'
|
8
|
+
spec.version = PowerP::VERSION
|
9
|
+
spec.authors = ['Kazuki Tsujimoto']
|
10
|
+
spec.email = ['kazuki@callcc.net']
|
11
|
+
spec.summary = %q{Extend Kernel#p with power_assert}
|
12
|
+
spec.description = %q{Extend Kernel#p with power_assert}
|
13
|
+
spec.homepage = 'https://github.com/k-tsj/power_p'
|
14
|
+
|
15
|
+
spec.files = `git ls-files`.split("\n")
|
16
|
+
spec.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
17
|
+
spec.executables = `git ls-files -- bin/*`.split("\n").map{|f| File.basename(f) }
|
18
|
+
spec.require_paths = ['lib']
|
19
|
+
|
20
|
+
spec.add_runtime_dependency 'power_assert'
|
21
|
+
spec.add_development_dependency 'test-unit'
|
22
|
+
spec.add_development_dependency 'rake'
|
23
|
+
spec.extra_rdoc_files = ['README.rdoc']
|
24
|
+
spec.rdoc_options = ['--main', 'README.rdoc']
|
25
|
+
end
|
metadata
ADDED
@@ -0,0 +1,100 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: power_p
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Kazuki Tsujimoto
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-09-23 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: power_assert
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: test-unit
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
description: Extend Kernel#p with power_assert
|
56
|
+
email:
|
57
|
+
- kazuki@callcc.net
|
58
|
+
executables: []
|
59
|
+
extensions: []
|
60
|
+
extra_rdoc_files:
|
61
|
+
- README.rdoc
|
62
|
+
files:
|
63
|
+
- ".gitignore"
|
64
|
+
- ".travis.yml"
|
65
|
+
- BSDL
|
66
|
+
- COPYING
|
67
|
+
- Gemfile
|
68
|
+
- LEGAL
|
69
|
+
- README.rdoc
|
70
|
+
- Rakefile
|
71
|
+
- lib/power_p.rb
|
72
|
+
- lib/power_p/version.rb
|
73
|
+
- power_p.gemspec
|
74
|
+
- test/test_power_p.rb
|
75
|
+
homepage: https://github.com/k-tsj/power_p
|
76
|
+
licenses: []
|
77
|
+
metadata: {}
|
78
|
+
post_install_message:
|
79
|
+
rdoc_options:
|
80
|
+
- "--main"
|
81
|
+
- README.rdoc
|
82
|
+
require_paths:
|
83
|
+
- lib
|
84
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - ">="
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '0'
|
89
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
90
|
+
requirements:
|
91
|
+
- - ">="
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
94
|
+
requirements: []
|
95
|
+
rubyforge_project:
|
96
|
+
rubygems_version: 2.2.2
|
97
|
+
signing_key:
|
98
|
+
specification_version: 4
|
99
|
+
summary: Extend Kernel#p with power_assert
|
100
|
+
test_files: []
|