mighty_tap 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +4 -0
- data/Gemfile +1 -1
- data/README.md +7 -4
- data/lib/mighty_tap/version.rb +1 -1
- data/mighty_tap.gemspec +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6b5b9c9186972f16733b08421a3797b465556d35
|
4
|
+
data.tar.gz: 144cb66da27377e6270266a4f26c85bca3d14485
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad354b1c1d492487a6d43608d60101abecccc8e834df1bc47c261b61e1d512e318b0edbe71e617884e32510f93beeb9cf5c107e75e154b0d73c7b379a92a5dbb
|
7
|
+
data.tar.gz: 35b55fd6bca83c619ce7af271c610bd356e8aa408c9857b633075efb31b8fe601fe01bda861cde79b8239f157d81851cf80a881f331aba6a80718b23a728168b
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,13 +1,16 @@
|
|
1
1
|
# mighty_tap
|
2
|
+
[](https://travis-ci.org/msievers/mighty_tap)
|
3
|
+
[](https://codeclimate.com/github/msievers/mighty_tap)
|
4
|
+
[](https://codeclimate.com/github/msievers/mighty_tap)
|
2
5
|
|
3
|
-
Rubys `tap` is a awesome. mighty_tap tries to make it even more awesome by adding some missing features, while maintining full compatibility to the orginal `tap`. In order to make its usage more pleasant, `mighty_tap` is defined as in instance method on `Object` and aliased to `mtap`.
|
6
|
+
Rubys `Object#tap` is a awesome. mighty_tap tries to make it even more awesome by adding some missing features, while maintining full compatibility to the orginal `tap`. In order to make its usage more pleasant, `mighty_tap` is defined as in instance method on `Object` and aliased to `mtap`.
|
4
7
|
|
5
|
-
##
|
8
|
+
## Why is it even more awesome than `tap` ?
|
6
9
|
* you can give it a method name
|
7
10
|
* you can give it arguments and blocks for methods to call
|
8
11
|
* dispite calling methods on the object itself, you can provide a callable
|
9
12
|
* in fact you can provide anything that responds to :call
|
10
|
-
* dispite the added features it acts like the original `tap` (can act as drop-in replacement)
|
13
|
+
* dispite the added features, it acts like the original `tap` (can act as a drop-in replacement)
|
11
14
|
|
12
15
|
## Usage
|
13
16
|
|
@@ -32,7 +35,7 @@ require "mighty_tap"
|
|
32
35
|
#
|
33
36
|
# if the last argument is a proc, the method is called with the procs block variant
|
34
37
|
#
|
35
|
-
[1,2,3].mtap(:map!, -> (number) { number * 2 }) => [2,4,6]
|
38
|
+
[1,2,3].mtap(:map!, -> (number) { number * 2 }) # => [2,4,6]
|
36
39
|
|
37
40
|
#
|
38
41
|
# you can also give it a callable (something that responds to #call)
|
data/lib/mighty_tap/version.rb
CHANGED
data/mighty_tap.gemspec
CHANGED
@@ -16,7 +16,7 @@ Gem::Specification.new do |spec|
|
|
16
16
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
17
17
|
spec.require_paths = ["lib"]
|
18
18
|
|
19
|
-
spec.add_development_dependency "bundler", "
|
19
|
+
spec.add_development_dependency "bundler", ">= 1.3"
|
20
20
|
spec.add_development_dependency "rake", "~> 10.0"
|
21
21
|
spec.add_development_dependency "rspec", ">= 3.0.0", "< 4.0.0"
|
22
22
|
spec.add_development_dependency "simplecov", ">= 0.8.0"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mighty_tap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Sievers
|
@@ -14,16 +14,16 @@ dependencies:
|
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1.
|
19
|
+
version: '1.3'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '1.
|
26
|
+
version: '1.3'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|