Commit Graph

1122 Commits

Author SHA1 Message Date
Bogdan Poplauschi 375f29d745 Merge pull request #1681 from rs/testing
Unit Testing + some refactoring due to testing
2016-09-27 15:18:17 +03:00
Bogdan Poplauschi 0ba5241aa5 Added CodeCov icon to the readme 2016-09-26 12:52:51 +03:00
Bogdan Poplauschi b44f4b8a59 Removed empty line 2016-09-26 12:10:14 +03:00
Bogdan Poplauschi a1bbe8f219 Trying to integrate with Codecov.io 2016-09-26 12:06:11 +03:00
Bogdan Poplauschi e642024688 Fix the build: UIButton and UIImageView are not defined on Mac OS or WatchOS 2016-09-25 20:07:12 +03:00
Bogdan Poplauschi 1cbe54d600 Tests for the WebCache categories 2016-09-25 19:53:53 +03:00
Bogdan Poplauschi 460c2e01a1 Tests project: CocoaPods 1.1.0, dynamic frameworks, include all the code from SDWebImage (MapKit and GIF), updated imports so they work fine 2016-09-25 19:46:46 +03:00
Bogdan Poplauschi e1840c3262 Refactored all the duplicate code from our WebCache categories into a UIView+WebCache category. All the other categories will make calls to this one. Customization of setting the image is done via the setImageBlock and the operationKey 2016-09-25 19:44:52 +03:00
Bogdan Poplauschi 7d02ffd6ab Created a WebCache Categories Xcode group - contains all the categories that we actually expose, making it easier to work with them 2016-09-25 19:29:14 +03:00
Bogdan Poplauschi 2daeffc773 SDImageCacheConfig.h made public 2016-09-25 19:27:10 +03:00
Bogdan Poplauschi f48a133f1b Prefetcher tests 2016-09-25 15:49:33 +03:00
Bogdan Poplauschi ea0bd97d10 Tests for SDWebImageManager 2016-09-25 15:17:21 +03:00
Bogdan Poplauschi fbca6a6dc3 Removed unneded code 2016-09-25 14:57:51 +03:00
Bogdan Poplauschi cfc182f2e5 Added SDImageCacheConfig to all targets, test images, code coverage setting, tests for SDImageCache, SDWebImageDownloader, SDWebImageDownloaderOperation, SDWebImageDecoder 2016-09-24 00:14:13 +03:00
Bogdan Poplauschi 0612504f1b Instead of assert, just nslog 2016-09-24 00:07:43 +03:00
Bogdan Poplauschi 2fa77435c1 Proper place for the pragma mark and used a function to check for the proper queue 2016-09-23 23:54:23 +03:00
Bogdan Poplauschi ba88022c30 Moved the `diskImageExistsWithKey:completion:` to the right place in the header 2016-09-23 23:53:51 +03:00
Bogdan Poplauschi 537b039012 Got rid of `removeImageForKey:` and `removeImageForKey:fromDisk:` that looked sync but were async. Left only the 2 async ones 2016-09-23 23:53:18 +03:00
Bogdan Poplauschi 3e78e29480 Pragma marks for code readability 2016-09-23 23:43:06 +03:00
Bogdan Poplauschi f202b50330 Updated `queryCacheOperationForKey:image:` comments and method still works if the doneBlock is nil 2016-09-23 23:42:21 +03:00
Bogdan Poplauschi d9424345ab The `storeImage:` methods from `SDImageCache` were async already, but declared as sync. Properly marked them as async + added completion. Got rid of the recalculate param. If the `NSData` is provided, use it. Otherwise, recalculate from the `UIImage` 2016-09-23 21:37:38 +03:00
Bogdan Poplauschi 2eafdd6df0 Updated `storeImageDataToDisk:forKey:` asserting when called from other queue than ioQueue. Updated the header comments 2016-09-23 21:33:28 +03:00
Bogdan Poplauschi a6316d1cce Fixed the demo project, `clearDisk` no longer exists 2016-09-23 21:15:38 +03:00
Bogdan Poplauschi 3fc19996c2 Fixed misspell 2016-09-23 21:15:15 +03:00
Bogdan Poplauschi ebf40c7ca0 Another clarification: `imageFromDiskCacheForKey:` used to also check the memory cache which I think is misleading. Now `imageFromDiskCacheForKey` only checks the disk cache and the new method `imageFromCacheForKey` checks both caches 2016-09-23 21:14:53 +03:00
Bogdan Poplauschi df3b6a52eb Created `SDWebImageDownloaderOperationInterface` to describe the behavior of a downloader operation. Any custom operation must conform to this protocol. 2016-09-23 21:11:34 +03:00
Bogdan Poplauschi 6202f05e7a Renamed `SDImageCache` `queryDiskCacheForKey:done:` to `queryCacheOperationForKey:done:` 2016-09-23 21:02:44 +03:00
Bogdan Poplauschi e9fcf0ce03 Removed sync method `diskImageExistsWithKey:` from `SDImageCache` 2016-09-23 20:58:10 +03:00
Bogdan Poplauschi 04e963b90d Get rid of the confusion cause by `cleanDisk` and `clearDisk`. Renamed `cleanDisk` to `deleteOldFiles`. No longer expose the sync `clearDisk` and `deleteOldFiles`, just the async ones 2016-09-23 20:52:30 +03:00
Bogdan Poplauschi f4bdae6870 Fixed an issue with the `SDWebImageDownloaderOperation` : `cancelInternal` was not called because of the old mechanism rellying on the `thread` property - probably because that thread did not have a runloop. Removed that and now cancelInternal is called as expected 2016-09-23 20:46:30 +03:00
Bogdan Poplauschi 84be05b867 Removed the synchronous methods `diskImageExistsForURL:` and `cachedImageExistsForURL:` from `SDWebImageManager` 2016-09-23 20:42:22 +03:00
Bogdan Poplauschi 712f497334 Added missing property code comment 2016-09-23 20:38:04 +03:00
Bogdan Poplauschi 7d73623203 Will use a single definition for all async tests duration: kAsyncTestTimeout 2016-09-23 20:37:48 +03:00
Bogdan Poplauschi fbb310b494 Expecta can use the latest version, using the WebP subspec in the Tests Podfile so we can get all the files 2016-09-23 20:37:17 +03:00
Bogdan Poplauschi f1d749218e Created a new class SDImageCacheConfig holding the configuration of the ImageCache. Easier to read code 2016-09-23 20:35:25 +03:00
Bogdan Poplauschi 82d1f2e49a Preparing to remove the need for the `recalculateFromImage` param for store in cache. Only if the data provided is nil and we have an image, we will recaculate. Moved the NSData calculation in the UIImage MultiFormat categ, plus instead of another variant to check for PNG, relly on `sd_imageFormatForImageData` 2016-09-23 20:26:46 +03:00
Bogdan Poplauschi f32f24f9c4 Refactored NSData ImageContentType category, instead of returning the contentType as a string, the new added method `sd_imageFormatForImageData` will return a `SDImageFormat` enum value 2016-09-23 20:20:24 +03:00
Bogdan Poplauschi 0869c6915d Added PNG image to demo app 2016-09-23 20:12:13 +03:00
Bogdan Poplauschi 36e5e3c10d Merge branch 'master' into 4.x
# Conflicts:
#	CHANGELOG.md
#	Examples/SDWebImage Demo/MasterViewController.m
#	SDWebImage.podspec
#	SDWebImage/SDWebImageDownloader.m
#	SDWebImage/SDWebImageDownloaderOperation.m
#	WebImage/Info.plist
2016-09-05 20:27:56 +03:00
Bogdan Poplauschi 42a5e6f6ec Bumped version to 3.8.2 2016-09-05 20:11:18 +03:00
Bogdan Poplauschi e7bd5ab0fa Improvement for #1608 and #1623 should solve the issue for most of the cases. Apparently there is a race condition on NSURLCache and we avoid making those checks unless necesarry (basically we will query the NSURLCache only when `SDWebImageRefreshCached` is used and the image cannot be cached by the system when it's too big or behind authentication) 2016-09-05 19:53:39 +03:00
Bogdan Poplauschi dea7b4594d Actually we only want the RefreshCached flag for the 1st image (the HTTP Auth one) 2016-09-02 20:17:53 +03:00
Bogdan Poplauschi 20760d71e5 Updated code for #1608 #1623 - set a name for the download queue, avoid using the `_request` ivar and made sure we strip request of mutability 2016-09-01 15:05:30 +03:00
Bogdan Poplauschi 033899d0ac Example updated: all images use the SDWebImageRefreshCached option 2016-09-01 14:26:54 +03:00
Bogdan Poplauschi 54adffa636 Merge pull request #1595 from rs/all_platforms
watchOS and OSX support (One platform to rule them all)
2016-08-26 22:41:26 +03:00
Bogdan Poplauschi 203c3712b2 Updated the CHANGELOG so it's easier when 4.0 is actually released 2016-08-26 21:46:17 +03:00
Bogdan Poplauschi 823b615281 Set 4.0.0-beta as the version from the podspec and the Info.plist file 2016-08-26 21:35:37 +03:00
Bogdan Poplauschi b360cbdc80 Updated the Readme with the supported platforms 2016-08-26 20:07:49 +03:00
Bogdan Poplauschi 1a2f81a5d5 Added the `WEBP_USE_INTRINSICS` flag per https://github.com/rs/SDWebImage/pull/1595#issuecomment-225984546 2016-08-26 19:52:44 +03:00
Bogdan Poplauschi 6de3e4c3bf Added logos and included in the readme 2016-08-26 12:45:33 +03:00