tapp 1.1.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -19,3 +19,4 @@ rdoc
19
19
  pkg
20
20
 
21
21
  ## PROJECT::SPECIFIC
22
+ Gemfile.lock
data/README.rdoc CHANGED
@@ -23,6 +23,14 @@ examples of use:
23
23
  [1, 2]
24
24
  => {:a=>1, :b=>2}
25
25
 
26
+ === Verbose Mode
27
+
28
+ >> Tapp::verbose = true
29
+ >> (1..5).tapp
30
+ `tapp' in (irb):2:in `irb_binding'
31
+ 1..5
32
+ => 1..5
33
+
26
34
  == Note on Patches/Pull Requests
27
35
 
28
36
  * Fork the project.
data/lib/tapp/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Tapp
2
- VERSION = "1.1.0"
2
+ VERSION = "1.2.0"
3
3
  end
data/lib/tapp.rb CHANGED
@@ -1,19 +1,35 @@
1
1
  require 'tapp/version'
2
2
  require 'pp'
3
3
 
4
+ module Tapp
5
+ class << self
6
+ attr_accessor :verbose
7
+
8
+ def report_called
9
+ return unless verbose
10
+ method_quoted = caller[0].split(':in').last.strip
11
+ puts "#{method_quoted} in #{caller[1]}"
12
+ end
13
+ end
14
+ end
15
+
4
16
  class Object
5
17
  def tapp
18
+ Tapp.report_called
6
19
  tap { pp block_given? ? yield(self) : self }
7
20
  end
8
21
 
9
22
  def taputs
23
+ Tapp.report_called
10
24
  tap { puts block_given? ? yield(self) : self }
11
25
  end
12
26
 
13
27
  def taap
28
+ Tapp.report_called
14
29
  require 'ap'
15
30
  tap { ap block_given? ? yield(self) : self }
16
31
  rescue LoadError
17
32
  warn "Sorry, you need to install awesome_print: `gem install awesome_print`"
18
33
  end
19
34
  end
35
+
metadata CHANGED
@@ -1,78 +1,54 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: tapp
3
- version: !ruby/object:Gem::Version
4
- hash: 19
5
- prerelease: false
6
- segments:
7
- - 1
8
- - 1
9
- - 0
10
- version: 1.1.0
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.2.0
5
+ prerelease:
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Keita Urashima
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2011-07-07 00:00:00 +09:00
19
- default_executable:
12
+ date: 2011-10-27 00:00:00.000000000Z
20
13
  dependencies: []
21
-
22
14
  description: tap { pp self }
23
- email:
15
+ email:
24
16
  - ursm@ursm.jp
25
17
  executables: []
26
-
27
18
  extensions: []
28
-
29
19
  extra_rdoc_files: []
30
-
31
- files:
32
- - .document
20
+ files:
33
21
  - .gitignore
34
22
  - CHANGELOG.rdoc
35
23
  - Gemfile
36
- - Gemfile.lock
37
24
  - LICENSE
38
25
  - README.rdoc
39
26
  - Rakefile
40
27
  - lib/tapp.rb
41
28
  - lib/tapp/version.rb
42
29
  - tapp.gemspec
43
- has_rdoc: true
44
30
  homepage: http://github.com/esminc/tapp
45
31
  licenses: []
46
-
47
32
  post_install_message:
48
33
  rdoc_options: []
49
-
50
- require_paths:
34
+ require_paths:
51
35
  - lib
52
- required_ruby_version: !ruby/object:Gem::Requirement
36
+ required_ruby_version: !ruby/object:Gem::Requirement
53
37
  none: false
54
- requirements:
55
- - - ">="
56
- - !ruby/object:Gem::Version
57
- hash: 3
58
- segments:
59
- - 0
60
- version: "0"
61
- required_rubygems_version: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ! '>='
40
+ - !ruby/object:Gem::Version
41
+ version: '0'
42
+ required_rubygems_version: !ruby/object:Gem::Requirement
62
43
  none: false
63
- requirements:
64
- - - ">="
65
- - !ruby/object:Gem::Version
66
- hash: 3
67
- segments:
68
- - 0
69
- version: "0"
44
+ requirements:
45
+ - - ! '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
70
48
  requirements: []
71
-
72
49
  rubyforge_project:
73
- rubygems_version: 1.3.7
50
+ rubygems_version: 1.8.6
74
51
  signing_key:
75
52
  specification_version: 3
76
53
  summary: tap { pp self }
77
54
  test_files: []
78
-
data/.document DELETED
@@ -1,5 +0,0 @@
1
- README.rdoc
2
- lib/**/*.rb
3
- bin/*
4
- features/**/*.feature
5
- LICENSE
data/Gemfile.lock DELETED
@@ -1,14 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- tapp (1.0.0)
5
-
6
- GEM
7
- remote: http://rubygems.org/
8
- specs:
9
-
10
- PLATFORMS
11
- ruby
12
-
13
- DEPENDENCIES
14
- tapp!