Haneke v1.0.0 #35

Merged
merged 95 commits into from Sep 19, 2014

Projects

None yet

1 participant

@hpique
Member
hpique commented Aug 22, 2014

Haneke v1.0.0 is a major refactoring with improvements on all fronts and minor bug fixes.

Here's a changelog. For more info check out this blog post.

New components

  • UIButton+Haneke: UIButton category that reduces setting foreground or background images from network or disk to one line, like UIImageView+Haneke beforehand.
  • HNKNetwortFetcher and HNKDiskFetcher: classes that encapsulate fetching images from network and disk respectively, making it simpler to use Haneke from any layer of your app while also providing more extension points (e.g., HNKNetworkFetcher can be subclassed to use a custom URL session).
  • HNKDiskCache: standalone disk cache for any kind of data.
  • Haneke+AFNetworking: an official extension to use AFNetworking for image downloads.

API Changes

  • HNKCache: All asynchronous fetch operations are aptly named fetch* and accept success and failure blocks (instead of a single completion block).
  • UIImageView+Haneke: placeholderImage parameter has been renamed to placeholder for brevity.
  • UIImageView+Haneke: hnk_cancelImageRequest has been renamed to hnk_cancelSetImage.
  • HNKErrorDiskCacheMiss has been renamed to HNKErrorImageNotFound.
  • HNKCacheEntity has been renamed to HNKFetcher and the protocol has been changed to support asynchronous image fetching.

Bug fixes

  • Replacing an image in the cache didn't update the disk size properly.
  • Fixed documentation bugs.
  • Networks requests with error status code succeeded if the received data was a valid image. Thanks @quellish!

Code improvements

  • Added dozens of unit tests and increased test coverage to 99%.
  • UIKit categories use weak references for better performance. Thanks @damienrambout!
  • Stopped escaping spaces in disk cache file names. This makes debugging easier.

I'll the PR open for a while in case anyone wants to play with it before the official release.

hpique added some commits Jul 23, 2014
@hpique hpique Extend HNKCacheEntity cf288b7
@hpique hpique Remove imageForEntity c5b6faa
@hpique hpique Upgrade project 81b62b2
@hpique hpique Prepare for async entities 8b52cc3
@hpique hpique HNKNetworkEntity 45e047d
@hpique hpique HNKDiskEntity b1dd3f1
@hpique hpique Resolve conflict 12cf9e3
@hpique hpique Update hnk_decompressedImageWithData: 58f14b2
@hpique hpique Fix typo 0009474
@hpique hpique Rename UIImage category test file dc4e6ef
@hpique hpique retrieve -> fetch 1a550bc
@hpique hpique hnk_decompressedImageWithImage: 8111bbe
@hpique hpique fetchImageWithSuccess:failure: ef11c40
@hpique hpique Fix tests f70d565
@hpique hpique Fix tests 77bfcc4
@hpique hpique hnk_decompressedImage a297a57
@hpique hpique First go at entities dda9763
@hpique hpique Use entities in UIImageView category e59e235
@hpique hpique Use HNKSimpleEntity 153ae0d
@hpique hpique Move UIImage+Haneke into HNKCache a4f1a70
@hpique hpique HNKSimpleEntityTests 987ae89
@hpique hpique HNKDiskEntity tests and fixes af8a6cb
@hpique hpique HNKNetworkEntity tests and fixes bccd642
@hpique hpique First go at UIButton+Haneke d68379e
@hpique hpique Rename cancelImageRequest -> cancelSetImage fc007fa
@hpique hpique Set the background image 37e951c
@hpique hpique UIView+Haneke tests f2f38d6
@hpique hpique Clarify license 4531f18
@hpique hpique Some UIButton+Haneke tests da523e7
@hpique hpique Use self.name instead of __PRETTY_FUNCTION__ for keys 44508c7
@hpique hpique placeholderImage -> placeholder (brevity) 8fc48f6
@hpique hpique More UIButton+Haneke tests 1705f36
@hpique hpique Fix typo 91f18f7
@hpique hpique Fix UIButton format scale mode 98cf258
@hpique hpique Use constants for default view format values c11264b
@hpique hpique Further UIButton tests e62ad27
@hpique hpique Simplify code 80f34c8
@hpique hpique Remove methods d996c64
@hpique hpique Missing call to super 5c0b5f3
@hpique hpique Add methods 96a53b5
@hpique hpique Remove methods ffdac67
@hpique hpique Fix tests fc48cc2
@hpique hpique Pending UIButton tests 633164d
@hpique hpique retrieve -> fetch a61d1da
@hpique hpique Use weak references. See #30. 05518a7
@hpique hpique Allow network entity subclasses to provide custom session. See #18. 5c6394d
@hpique hpique Add imports 8c70c4a
@hpique hpique Fix demo 5080364
@hpique hpique Fix log 602046d
@hpique hpique Fix log 637810e
@hpique hpique First go at HNKDiskCache (pending unit tests) 238ccf2
@hpique hpique Remove unused method 6f43829
@hpique hpique First HNKDiskCache tests 0c26a79
@hpique hpique First HNKDiskCache tests 6a01e3b
@hpique hpique Further HNKDiskCache tests f37157b
@hpique hpique removeImagesOfEntity > removeImageForKey + improved tests d43b1c2
@hpique hpique Use sut for subject under test. bb15573
@hpique hpique Use success and failure blocks instead of completion block 006c21e
@hpique hpique Clarify license cf71f21
@hpique hpique Use success and failure blocks instead of completion block 2c01b6c
@hpique hpique Further HNKCache unit tests 0288ab7
@hpique hpique Reorganize and add titles e53a073
@hpique hpique Documentation f5894df
@hpique hpique Rename errors 81933d8
@hpique hpique Documentation 1604c55
@hpique hpique Documentation 71a9094
@hpique hpique Documentation 412e325
@hpique hpique Documentation 8bd8000
@hpique hpique Documentation 3e66478
@hpique hpique changed the title from Haneke v1.0 to Haneke v1.0.0 Aug 22, 2014
@hpique hpique merged commit 56a328a into master Sep 19, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment