From 1c8b425a440ce21f749c1cd07369b1542f8f1cf1 Mon Sep 17 00:00:00 2001 From: dasmer Date: Mon, 20 Apr 2015 23:48:49 -0400 Subject: [PATCH 1/8] Generate coverage stats using slather/Coveralls --- .slather.yml | 4 ++++ .travis.yml | 3 +++ AsyncDisplayKit.xcodeproj/project.pbxproj | 4 ++++ Gemfile | 3 +++ 4 files changed, 14 insertions(+) create mode 100644 .slather.yml create mode 100644 Gemfile diff --git a/.slather.yml b/.slather.yml new file mode 100644 index 0000000000..84a984dcee --- /dev/null +++ b/.slather.yml @@ -0,0 +1,4 @@ +ci_service: travis_ci +coverage_service: coveralls +xcodeproj: AsyncDisplayKit.xcodeproj +source_directory: AsyncDisplayKit \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index f160932b2e..c714a87dae 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,7 @@ before_install: - brew update - brew reinstall xctool - gem update cocoapods + - gem install slather - xcrun simctl list install: echo "<3" env: @@ -10,6 +11,8 @@ env: - MODE=examples - MODE=life-without-cocoapods script: ./build.sh $MODE +after_success: + - slather # whitelist branches: diff --git a/AsyncDisplayKit.xcodeproj/project.pbxproj b/AsyncDisplayKit.xcodeproj/project.pbxproj index 6ab450659d..f78de8cf92 100644 --- a/AsyncDisplayKit.xcodeproj/project.pbxproj +++ b/AsyncDisplayKit.xcodeproj/project.pbxproj @@ -1054,6 +1054,8 @@ COPY_PHASE_STRIP = NO; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; + GCC_GENERATE_TEST_COVERAGE_FILES = YES; + GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", @@ -1091,6 +1093,8 @@ COPY_PHASE_STRIP = YES; ENABLE_NS_ASSERTIONS = NO; GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_GENERATE_TEST_COVERAGE_FILES = YES; + GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000000..23a1d057af --- /dev/null +++ b/Gemfile @@ -0,0 +1,3 @@ +source 'https://rubygems.org' + +gem 'slather' \ No newline at end of file From de04da843f9a9b1733888e072dd8615ead4da82c Mon Sep 17 00:00:00 2001 From: Dasmer Singh Date: Tue, 21 Apr 2015 16:38:39 -0400 Subject: [PATCH 2/8] Update Podfile.lock --- Podfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Podfile.lock b/Podfile.lock index a661aebb57..ca9c28e04f 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -10,4 +10,4 @@ SPEC CHECKSUMS: FBSnapshotTestCase: 26f32d8fa9eb30e9f09712ecfb097808bc79b898 OCMock: a6a7dc0e3997fb9f35d99f72528698ebf60d64f2 -COCOAPODS: 0.35.0 +COCOAPODS: 0.36.4 From 9cf056f6d56f6620a1dd6103e7efd6cf0b562530 Mon Sep 17 00:00:00 2001 From: Dasmer Singh Date: Tue, 21 Apr 2015 16:39:21 -0400 Subject: [PATCH 3/8] Set GENERATE_TEST_COVERAGE_FILES & INSTRUMENT_PROGRAM_FLOW_ARCS to YES in Life Without CocoaPods.xcodeproj --- .../Life Without CocoaPods.xcodeproj/project.pbxproj | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/smoke-tests/Life Without CocoaPods/Life Without CocoaPods.xcodeproj/project.pbxproj b/smoke-tests/Life Without CocoaPods/Life Without CocoaPods.xcodeproj/project.pbxproj index a024fc389d..6950c9423e 100644 --- a/smoke-tests/Life Without CocoaPods/Life Without CocoaPods.xcodeproj/project.pbxproj +++ b/smoke-tests/Life Without CocoaPods/Life Without CocoaPods.xcodeproj/project.pbxproj @@ -192,6 +192,8 @@ ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; + GCC_GENERATE_TEST_COVERAGE_FILES = YES; + GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", @@ -233,6 +235,8 @@ ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_GENERATE_TEST_COVERAGE_FILES = YES; + GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; From f8c02147fbf7d18ea9a41e16c6077e1e44c49330 Mon Sep 17 00:00:00 2001 From: Dasmer Singh Date: Tue, 21 Apr 2015 16:47:00 -0400 Subject: [PATCH 4/8] [.slather.yml] Add newline to end of file --- .slather.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.slather.yml b/.slather.yml index 84a984dcee..ef84e32dea 100644 --- a/.slather.yml +++ b/.slather.yml @@ -1,4 +1,5 @@ ci_service: travis_ci coverage_service: coveralls xcodeproj: AsyncDisplayKit.xcodeproj -source_directory: AsyncDisplayKit \ No newline at end of file +source_directory: AsyncDisplayKit + From 9006f7c356b2d8ceb25b8d35fbfef7b6925ae253 Mon Sep 17 00:00:00 2001 From: Dasmer Singh Date: Wed, 22 Apr 2015 12:20:37 -0400 Subject: [PATCH 5/8] Ignore .gcov files in git --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index f14b49ea6b..9daa27a795 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,5 @@ docs/.sass-cache *.swp *.lock + +*.gcov From 7fedfdd75707068d8bf75ee3206117639ff5acfb Mon Sep 17 00:00:00 2001 From: Dasmer Singh Date: Wed, 22 Apr 2015 12:23:11 -0400 Subject: [PATCH 6/8] [README.md] Add Coveralls badge --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 537da9a85e..926873e09a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ ![AsyncDisplayKit](https://github.com/facebook/AsyncDisplayKit/blob/master/docs/assets/logo.png) [![Build Status](https://travis-ci.org/facebook/AsyncDisplayKit.svg)](https://travis-ci.org/facebook/AsyncDisplayKit) +[![Coverage Status](https://coveralls.io/repos/facebook/AsyncDisplayKit/badge.svg?branch=master)](https://coveralls.io/r/facebook/AsyncDisplayKit?branch=master) [![Version](http://img.shields.io/cocoapods/v/AsyncDisplayKit.svg)](http://cocoapods.org/?q=AsyncDisplayKit) [![Platform](http://img.shields.io/cocoapods/p/AsyncDisplayKit.svg)]() [![License](http://img.shields.io/cocoapods/l/AsyncDisplayKit.svg)](https://github.com/facebook/AsyncDisplayKit/blob/master/LICENSE) From 03648d12a81abcad1905f8d0341b038b41741648 Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Thu, 17 Sep 2015 12:30:31 -0700 Subject: [PATCH 7/8] Clarify ASCellNode docs that it is for use with collection view as well --- AsyncDisplayKit/ASCellNode.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AsyncDisplayKit/ASCellNode.h b/AsyncDisplayKit/ASCellNode.h index 12cc6302f4..db859eea1d 100644 --- a/AsyncDisplayKit/ASCellNode.h +++ b/AsyncDisplayKit/ASCellNode.h @@ -10,7 +10,7 @@ /** - * Generic cell node. Subclass ASCellNode instead of to use . + * Generic cell node. Subclass this instead of `ASDisplayNode` to use with `ASTableView` and `ASCollectionView`. */ @interface ASCellNode : ASDisplayNode From a8924a2977a1b26eae0d9f0d10aeec4ab19444d7 Mon Sep 17 00:00:00 2001 From: Scott Goodson Date: Sat, 19 Sep 2015 20:55:40 +0200 Subject: [PATCH 8/8] Fix building test / profile under Xcode 7 It is strictly enforcing this unused variable (when asserts are compiled out). --- AsyncDisplayKit/Layout/ASLayout.mm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/AsyncDisplayKit/Layout/ASLayout.mm b/AsyncDisplayKit/Layout/ASLayout.mm index 6695a07bde..92e2d307ec 100644 --- a/AsyncDisplayKit/Layout/ASLayout.mm +++ b/AsyncDisplayKit/Layout/ASLayout.mm @@ -28,9 +28,11 @@ extern BOOL CGPointIsNull(CGPoint point) sublayouts:(NSArray *)sublayouts { ASDisplayNodeAssert(layoutableObject, @"layoutableObject is required."); +#if DEBUG for (ASLayout *sublayout in sublayouts) { ASDisplayNodeAssert(!CGPointIsNull(sublayout.position), @"Invalid position is not allowed in sublayout."); } +#endif ASLayout *l = [super new]; if (l) {