pippi 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +5 -3
- data/lib/pippi/checks/assert_with_nil.rb +1 -1
- data/lib/pippi/checks/map_followed_by_flatten.rb +1 -1
- data/lib/pippi/checks/reverse_followed_by_each.rb +2 -2
- data/lib/pippi/checks/select_followed_by_empty.rb +1 -1
- data/lib/pippi/checks/select_followed_by_first.rb +1 -1
- data/lib/pippi/checks/select_followed_by_select.rb +1 -1
- data/lib/pippi/checks/select_followed_by_size.rb +1 -1
- data/lib/pippi/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 896e82f6e2cf4dab869124c38159fada16b72b97
|
4
|
+
data.tar.gz: ed2e62b742ffdc6a750c80d52a1e83ee00347ae1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b97e79a1af7f290e69acb952ebf5fe1a35155b42ceda4b946c8a0bb44ae26c6da7459d4e86b57a315176fafb051b9ca3dbdd55d9aac0e0d538dc188a84e95f57
|
7
|
+
data.tar.gz: 423bcbabce73b144fd9ecab55847cf0cf80380d9f02ecc4969af16389bb60a74f5bc3fe13e2db3e2a82fc2b03ae427f7ec3eaebd0b08196e06b4153f82a44500
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# Pippi
|
2
2
|
|
3
|
+
[![Build Status](http://img.shields.io/travis/tcopeland/pippi.svg)](http://travis-ci.org/tcopeland/pippi)
|
4
|
+
|
3
5
|
Pippi is a utility for finding suboptimal Ruby class API usage.
|
4
6
|
|
5
7
|
Consider this little array:
|
@@ -49,8 +51,6 @@ Here's how pippi stacks up using the [Aaron Quint](https://twitter.com/aq) [Ruby
|
|
49
51
|
|
50
52
|
Finally, why "pippi"? Because Pippi Longstocking was a Thing-Finder, and pippi finds things.
|
51
53
|
|
52
|
-
[![Build Status](http://img.shields.io/travis/tcopeland/pippi.svg)](http://travis-ci.org/tcopeland/pippi)
|
53
|
-
|
54
54
|
## Usage
|
55
55
|
|
56
56
|
### Rails with test-unit
|
@@ -81,7 +81,7 @@ Here's a [demo Rails application](https://github.com/tcopeland/pippi_demo#pippi-
|
|
81
81
|
### Rails with rspec
|
82
82
|
|
83
83
|
* Add `gem 'pippi'` to the `test` group in your project's `Gemfile`
|
84
|
-
* Add this to
|
84
|
+
* Add this to `spec/spec_helper.rb`, just below the `require 'rspec/rails'` line (if there is one):
|
85
85
|
|
86
86
|
```ruby
|
87
87
|
if ENV['USE_PIPPI'].present?
|
@@ -337,7 +337,9 @@ rm -rf pippi_debug.log pippi.log .bundle/gems/pippi-0.0.1/ .bundle/cache/pippi-0
|
|
337
337
|
## Credits
|
338
338
|
|
339
339
|
* Christopher Schramm([@cschramm](https://github.com/cschramm)) bugfixes in fault proc clearing
|
340
|
+
* Enrique Delgado: Documentation fixes
|
340
341
|
* [Evan Phoenix](https://twitter.com/evanphx)([@evanphx](https://github.com/evanphx)) for the idea of watching method invocations at runtime using metaprogramming rather than using `Tracepoint`.
|
342
|
+
* Hubert Dąbrowski: Ruby 2.0.0 fixes
|
341
343
|
* [Igor Kapkov](https://twitter.com/igasgeek)([@igas](https://github.com/igas)) documentation fixes
|
342
344
|
* [LivingSocial](https://www.livingsocial.com/) for letting me develop and open source this utility.
|
343
345
|
* [Michael Bernstein](https://twitter.com/mrb_bk)([@mrb](https://github.com/mrb)) (of [CodeClimate](https://codeclimate.com/) fame) for an inspirational discussion of code anaysis in general.
|
@@ -19,8 +19,8 @@ module Pippi::Checks
|
|
19
19
|
def self._pippi_check_assert_with_nil
|
20
20
|
ancestors.find { |x| x == ActiveSupport::TestCase }._pippi_other_check_assert_with_nil
|
21
21
|
end
|
22
|
+
prepend Pippi::Checks::AssertWithNil::MyAssertEqual
|
22
23
|
end
|
23
|
-
ActiveSupport::TestCase.prepend Pippi::Checks::AssertWithNil::MyAssertEqual
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
@@ -13,7 +13,7 @@ module Pippi::Checks
|
|
13
13
|
if self.class._pippi_check_reverse_followed_by_each.nil?
|
14
14
|
# Ignore Array subclasses since reverse or each may have difference meanings
|
15
15
|
else
|
16
|
-
result.singleton_class.prepend MyEach
|
16
|
+
result.singleton_class.class_eval { prepend MyEach }
|
17
17
|
self.class._pippi_check_reverse_followed_by_each.array_mutator_methods.each do |this_means_its_ok_sym|
|
18
18
|
result.define_singleton_method(this_means_its_ok_sym, self.class._pippi_check_reverse_followed_by_each.its_ok_watcher_proc(MyEach, :each))
|
19
19
|
end
|
@@ -29,8 +29,8 @@ module Pippi::Checks
|
|
29
29
|
class << self
|
30
30
|
attr_reader :_pippi_check_reverse_followed_by_each
|
31
31
|
end
|
32
|
+
prepend MyReverse
|
32
33
|
end
|
33
|
-
Array.prepend MyReverse
|
34
34
|
end
|
35
35
|
|
36
36
|
class Documentation
|
data/lib/pippi/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pippi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tom Copeland
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-12-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|