Cane compliance #49

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
3 participants
Contributor

pda commented Aug 29, 2012

Cane was failing for two separate reasons:

Methods exceeded maximum allowed ABC complexity (2):

  lib/faraday_middleware/rack_compatible.rb  FaradayMiddleware::RackCompatible#prepare_env  13
  lib/faraday_middleware/rack_compatible.rb  FaradayMiddleware::RackCompatible#restore_env  11

Classes are not documented (1):

  lib/faraday_middleware/response/chunked.rb:5  Chunked

The former has been fixed by extract-method refactoring in 37641f1.

The latter might be a bug in cane, but is resolved by adding example usage documentation in d5548bc.

pda added some commits Aug 29, 2012

Basic extract-method refactoring of RackCompatibility.
Reduces maximum ABC complexity to below 10 as measured by cane.

Previously #prepare_env had a complexity of 13, and #restore_env had a
complexity of 11.

This pull request fails (merged 37641f1 into 9b7c8c6).

Contributor

pda commented Aug 29, 2012

Failed due to Travis VM powering down:

I'm sorry but an error occured within Travis while running your build.
We are continuosly working on test run stability, please email support@travis-ci.org if this error persists.
Below is the stacktrace of the error:

Error: #<NativeException: org.virtualbox_4_1.VBoxException:
  The function "powerDown" returned an error condition:
    "The virtual machine is being powered down"  (0x80bb0002)>

@mislav mislav closed this in 3dedd42 Aug 29, 2012

Contributor

mislav commented Aug 29, 2012

The error in chunked.rb was due to Cane bug. I locked Cane down to v1.x

We tolerate the ABC complexity errors in rack_compatible for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment