tapp 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.rdoc +11 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +14 -0
- data/README.rdoc +26 -2
- data/Rakefile +1 -17
- data/lib/tapp/version.rb +3 -0
- data/lib/tapp.rb +8 -0
- data/tapp.gemspec +12 -39
- metadata +14 -11
- data/VERSION +0 -1
data/CHANGELOG.rdoc
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
data/README.rdoc
CHANGED
@@ -1,9 +1,30 @@
|
|
1
1
|
= tapp
|
2
2
|
|
3
|
-
|
3
|
+
== Usage
|
4
|
+
|
5
|
+
$ gem install tapp
|
6
|
+
|
7
|
+
require 'tapp'
|
8
|
+
...
|
9
|
+
foo bar.tapp #=> pp bar
|
10
|
+
foo bar.taputs #=> puts bar
|
11
|
+
foo bar.taap #=> ap bar
|
12
|
+
|
13
|
+
examples of use:
|
14
|
+
|
15
|
+
>> require 'tapp'
|
16
|
+
=> true
|
17
|
+
>> (1..5).tapp.select(&:odd?).tapp.inject(&:+)
|
18
|
+
1..5
|
19
|
+
[1, 3, 5]
|
20
|
+
=> 9
|
21
|
+
>> {:a => 1, :b => 2}.tapp(&:keys).tapp(&:values)
|
22
|
+
[:a, :b]
|
23
|
+
[1, 2]
|
24
|
+
=> {:a=>1, :b=>2}
|
4
25
|
|
5
26
|
== Note on Patches/Pull Requests
|
6
|
-
|
27
|
+
|
7
28
|
* Fork the project.
|
8
29
|
* Make your feature addition or bug fix.
|
9
30
|
* Add tests for it. This is important so I don't break it in a
|
@@ -12,6 +33,9 @@ Description goes here.
|
|
12
33
|
(if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
|
13
34
|
* Send me a pull request. Bonus points for topic branches.
|
14
35
|
|
36
|
+
== Contributors
|
37
|
+
see https://github.com/esminc/tapp/pulls
|
38
|
+
|
15
39
|
== Copyright
|
16
40
|
|
17
41
|
Copyright (c) 2010 Keita Urashima. See LICENSE for details.
|
data/Rakefile
CHANGED
@@ -1,17 +1 @@
|
|
1
|
-
require '
|
2
|
-
require 'rake'
|
3
|
-
|
4
|
-
begin
|
5
|
-
require 'jeweler'
|
6
|
-
Jeweler::Tasks.new do |gem|
|
7
|
-
gem.name = "tapp"
|
8
|
-
gem.summary = 'tap { pp self }'
|
9
|
-
gem.description = 'tap { pp self }'
|
10
|
-
gem.email = "ursm@ursm.jp"
|
11
|
-
gem.homepage = "http://github.com/esminc/tapp"
|
12
|
-
gem.authors = ["Keita Urashima"]
|
13
|
-
end
|
14
|
-
Jeweler::GemcutterTasks.new
|
15
|
-
rescue LoadError
|
16
|
-
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
|
17
|
-
end
|
1
|
+
require 'bundler/gem_tasks'
|
data/lib/tapp/version.rb
ADDED
data/lib/tapp.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'tapp/version'
|
1
2
|
require 'pp'
|
2
3
|
|
3
4
|
class Object
|
@@ -8,4 +9,11 @@ class Object
|
|
8
9
|
def taputs
|
9
10
|
tap { puts block_given? ? yield(self) : self }
|
10
11
|
end
|
12
|
+
|
13
|
+
def taap
|
14
|
+
require 'ap'
|
15
|
+
tap { ap block_given? ? yield(self) : self }
|
16
|
+
rescue LoadError
|
17
|
+
warn "Sorry, you need to install awesome_print: `gem install awesome_print`"
|
18
|
+
end
|
11
19
|
end
|
data/tapp.gemspec
CHANGED
@@ -1,45 +1,18 @@
|
|
1
|
-
# Generated by jeweler
|
2
|
-
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
1
|
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "tapp/version"
|
5
4
|
|
6
5
|
Gem::Specification.new do |s|
|
7
|
-
s.name
|
8
|
-
s.version
|
9
|
-
|
10
|
-
s.
|
11
|
-
s.
|
12
|
-
s.
|
6
|
+
s.name = "tapp"
|
7
|
+
s.version = Tapp::VERSION
|
8
|
+
s.authors = ["Keita Urashima"]
|
9
|
+
s.email = ["ursm@ursm.jp"]
|
10
|
+
s.homepage = "http://github.com/esminc/tapp"
|
11
|
+
s.summary = %q{tap { pp self }}
|
13
12
|
s.description = %q{tap { pp self }}
|
14
|
-
s.email = %q{ursm@ursm.jp}
|
15
|
-
s.extra_rdoc_files = [
|
16
|
-
"LICENSE",
|
17
|
-
"README.rdoc"
|
18
|
-
]
|
19
|
-
s.files = [
|
20
|
-
".document",
|
21
|
-
".gitignore",
|
22
|
-
"LICENSE",
|
23
|
-
"README.rdoc",
|
24
|
-
"Rakefile",
|
25
|
-
"VERSION",
|
26
|
-
"lib/tapp.rb",
|
27
|
-
"tapp.gemspec"
|
28
|
-
]
|
29
|
-
s.homepage = %q{http://github.com/esminc/tapp}
|
30
|
-
s.rdoc_options = ["--charset=UTF-8"]
|
31
|
-
s.require_paths = ["lib"]
|
32
|
-
s.rubygems_version = %q{1.3.7}
|
33
|
-
s.summary = %q{tap { pp self }}
|
34
|
-
|
35
|
-
if s.respond_to? :specification_version then
|
36
|
-
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
37
|
-
s.specification_version = 3
|
38
13
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
end
|
14
|
+
s.files = `git ls-files`.split("\n")
|
15
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
16
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
17
|
+
s.require_paths = ["lib"]
|
44
18
|
end
|
45
|
-
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tapp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
|
+
- 1
|
8
9
|
- 0
|
9
|
-
|
10
|
-
version: 1.0.0
|
10
|
+
version: 1.1.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Keita Urashima
|
@@ -15,35 +15,38 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
18
|
+
date: 2011-07-07 00:00:00 +09:00
|
19
19
|
default_executable:
|
20
20
|
dependencies: []
|
21
21
|
|
22
22
|
description: tap { pp self }
|
23
|
-
email:
|
23
|
+
email:
|
24
|
+
- ursm@ursm.jp
|
24
25
|
executables: []
|
25
26
|
|
26
27
|
extensions: []
|
27
28
|
|
28
|
-
extra_rdoc_files:
|
29
|
-
|
30
|
-
- README.rdoc
|
29
|
+
extra_rdoc_files: []
|
30
|
+
|
31
31
|
files:
|
32
32
|
- .document
|
33
33
|
- .gitignore
|
34
|
+
- CHANGELOG.rdoc
|
35
|
+
- Gemfile
|
36
|
+
- Gemfile.lock
|
34
37
|
- LICENSE
|
35
38
|
- README.rdoc
|
36
39
|
- Rakefile
|
37
|
-
- VERSION
|
38
40
|
- lib/tapp.rb
|
41
|
+
- lib/tapp/version.rb
|
39
42
|
- tapp.gemspec
|
40
43
|
has_rdoc: true
|
41
44
|
homepage: http://github.com/esminc/tapp
|
42
45
|
licenses: []
|
43
46
|
|
44
47
|
post_install_message:
|
45
|
-
rdoc_options:
|
46
|
-
|
48
|
+
rdoc_options: []
|
49
|
+
|
47
50
|
require_paths:
|
48
51
|
- lib
|
49
52
|
required_ruby_version: !ruby/object:Gem::Requirement
|
data/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
1.0.0
|