pippi 0.0.6 → 0.0.7

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 71a917fd7fe564b1259bbe2e1bd5816f99642c95
4
- data.tar.gz: 04ee328c79590242bdf9901dfbf19128c20174fd
3
+ metadata.gz: 896e82f6e2cf4dab869124c38159fada16b72b97
4
+ data.tar.gz: ed2e62b742ffdc6a750c80d52a1e83ee00347ae1
5
5
  SHA512:
6
- metadata.gz: 4322323a5f61a25e4697774e900c403aaa17a206dc721583d0778ffe32337f8a791bae64c9dd17967c2ed778f34e08b40f9b09c97ec3bbd8fe8f2f3f2a906dcb
7
- data.tar.gz: 46c707010d0424970e002c07a90f21ab8a37a633a955afcba21be1331f7b667c477026bb5de0bfe81d35eaa42a14eec6c65ff22d7a7dcd532b64b95ab840f4e3
6
+ metadata.gz: b97e79a1af7f290e69acb952ebf5fe1a35155b42ceda4b946c8a0bb44ae26c6da7459d4e86b57a315176fafb051b9ca3dbdd55d9aac0e0d538dc188a84e95f57
7
+ data.tar.gz: 423bcbabce73b144fd9ecab55847cf0cf80380d9f02ecc4969af16389bb60a74f5bc3fe13e2db3e2a82fc2b03ae427f7ec3eaebd0b08196e06b4153f82a44500
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.0.7 (2014-12-01)
2
+
3
+ * [FIXED] Support for Ruby 2.0
4
+
1
5
  ## 0.0.6 (2014-11-18)
2
6
 
3
7
  * [NEW] Added SelectFollowedBySelect
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 the top of `spec/spec_helper.rb`:
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
 
@@ -35,8 +35,8 @@ module Pippi::Checks
35
35
  class << self
36
36
  attr_reader :_pippi_check_map_followed_by_flatten
37
37
  end
38
+ prepend MyMap
38
39
  end
39
- Array.prepend MyMap
40
40
  end
41
41
 
42
42
  class Documentation
@@ -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
@@ -34,8 +34,8 @@ module Pippi::Checks
34
34
  def self._pippi_check_select_followed_by_empty
35
35
  @_pippi_check_select_followed_by_empty
36
36
  end
37
+ prepend MySelect
37
38
  end
38
- Array.prepend MySelect
39
39
  end
40
40
 
41
41
  class Documentation
@@ -34,8 +34,8 @@ module Pippi::Checks
34
34
  class << self
35
35
  attr_reader :_pippi_check_select_followed_by_first
36
36
  end
37
+ prepend MySelect
37
38
  end
38
- Array.prepend MySelect
39
39
  end
40
40
 
41
41
  class Documentation
@@ -28,8 +28,8 @@ module Pippi::Checks
28
28
  def self._pippi_check_select_followed_by_select
29
29
  @_pippi_check_select_followed_by_select
30
30
  end
31
+ prepend MyFirstSelect
31
32
  end
32
- Array.prepend MyFirstSelect
33
33
  end
34
34
 
35
35
  class Documentation
@@ -31,8 +31,8 @@ module Pippi::Checks
31
31
  class << self
32
32
  attr_reader :_pippi_check_select_followed_by_size
33
33
  end
34
+ prepend MySelect
34
35
  end
35
- Array.prepend MySelect
36
36
  end
37
37
 
38
38
  class Documentation
data/lib/pippi/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Pippi
2
- VERSION = '0.0.6'
2
+ VERSION = '0.0.7'
3
3
  end
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.6
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-17 00:00:00.000000000 Z
11
+ date: 2014-12-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake