Skip to content

Commit

Permalink
Merge branch 'release/2.5.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
0xced committed Jan 31, 2017
2 parents 020a4aa + 9a81ba7 commit 97c8fc1
Show file tree
Hide file tree
Showing 39 changed files with 960 additions and 1,969 deletions.
8 changes: 8 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
codecov:
branch: develop

coverage:
precision: 1
round: nearest
ignore:
- "XCDYouTubeKit Tests"
4 changes: 2 additions & 2 deletions .jazzy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ source_directory: XCDYouTubeKit
framework_root: .
umbrella_header: XCDYouTubeKit/XCDYouTubeKit.h
module: XCDYouTubeKit
module_version: 2.5.2
module_version: 2.5.4

author: Cédric Luthi
author_url: https://twitter.com/0xced

readme: README.md
github_url: https://github.com/0xced/XCDYouTubeKit
github_file_prefix: https://github.com/0xced/XCDYouTubeKit/tree/2.5.2/XCDYouTubeKit
github_file_prefix: https://github.com/0xced/XCDYouTubeKit/tree/2.5.4/XCDYouTubeKit
32 changes: 0 additions & 32 deletions .travis.yml

This file was deleted.

5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
#### Version 2.5.4

* Adaptation to YouTube API change. (#295, #296, #297)
* Upgrade deployment target to iOS 8.0 (macOS is still 10.9 and tvOS is still 9.0)

#### Version 2.5.3

* Adaptation to YouTube API change. (#257)
Expand Down
40 changes: 40 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
CIRCLE_ARTIFACTS ?= artifacts
CIRCLE_TEST_REPORTS ?= test_reports

export SCAN_PROJECT = XCDYouTubeKit.xcodeproj
export SCAN_SCHEME = XCDYouTubeKit Framework
export SCAN_BUILDLOG_PATH = ${CIRCLE_ARTIFACTS}/$@
export SCAN_OUTPUT_TYPES =

.PHONY: default test_macOS_report test_iOS_report test_tvOS_report test_macOS test_iOS test_tvOS test_iOS_9 check_scan check_slather

default: check_slather check_scan
scan --clean --device "iPhone 5s" --code_coverage --buildlog_path "~/Library/Logs/scan"
slather coverage --verbose --output-directory "${TMPDIR}/${SCAN_SCHEME} Coverage Report" --html --show --ignore "../**/Contents/Developer/**" --scheme "${SCAN_SCHEME}" "${SCAN_PROJECT}" || true

test_macOS_report: check_scan
scan --output_directory "${CIRCLE_TEST_REPORTS}" --output_types junit --custom_report_file_name $@.xml

test_iOS_report: check_scan
scan --output_directory "${CIRCLE_TEST_REPORTS}" --output_types junit --custom_report_file_name $@.xml --device "iPhone 5s" --code_coverage --xcargs "OBJROOT=build GCC_GENERATE_TEST_COVERAGE_FILES=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES"

test_tvOS_report: check_scan
scan --output_directory "${CIRCLE_TEST_REPORTS}" --output_types junit --custom_report_file_name $@.xml --device "Apple TV 1080p"

test_macOS: check_scan
scan --configuration Release --xcargs "RUN_CLANG_STATIC_ANALYZER=YES CLANG_STATIC_ANALYZER_MODE=Deep MACOSX_DEPLOYMENT_TARGET=`xcrun --sdk "macosx" --show-sdk-version`"

test_iOS: check_scan
scan --configuration Release --device "iPhone 5s" --xcargs "RUN_CLANG_STATIC_ANALYZER=YES CLANG_STATIC_ANALYZER_MODE=Deep IPHONEOS_DEPLOYMENT_TARGET=`xcrun --sdk "iphonesimulator" --show-sdk-version`"

test_tvOS: check_scan
scan --configuration Release --device "Apple TV 1080p" --xcargs "RUN_CLANG_STATIC_ANALYZER=YES CLANG_STATIC_ANALYZER_MODE=Deep TVOS_DEPLOYMENT_TARGET=`xcrun --sdk "appletvsimulator" --show-sdk-version`"

test_iOS_9: check_scan
scan --device "iPhone 5s (9.0)"

check_scan:
@scan --version > /dev/null 2>&1 || (printf "❌ Please install \e[1;30mscan\e[0m (https://github.com/fastlane/fastlane/tree/master/scan) to run unit tests: $$ [sudo] \e[1;30mgem install scan\e[0m\n" && false)

check_slather:
@slather version > /dev/null 2>&1 || printf "⚠️ Please install \e[1;30mslather\e[0m (https://github.com/SlatherOrg/slather) to get a code coverage report: $$ [sudo] \e[1;30mgem install slather\e[0m\n"
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## About

[![Build Status](https://img.shields.io/travis/0xced/XCDYouTubeKit/master.svg?style=flat)](https://travis-ci.org/0xced/XCDYouTubeKit)
[![Coverage Status](https://img.shields.io/coveralls/0xced/XCDYouTubeKit/master.svg?style=flat)](https://coveralls.io/r/0xced/XCDYouTubeKit?branch=master)
[![Build Status](https://img.shields.io/circleci/project/0xced/XCDYouTubeKit/master.svg?style=flat)](https://circleci.com/gh/0xced/XCDYouTubeKit)
[![Coverage Status](https://img.shields.io/codecov/c/github/0xced/XCDYouTubeKit/master.svg?style=flat)](https://codecov.io/gh/0xced/XCDYouTubeKit/branch.master)
[![Platform](https://img.shields.io/cocoapods/p/XCDYouTubeKit.svg?style=flat)](http://cocoadocs.org/docsets/XCDYouTubeKit/)
[![Pod Version](https://img.shields.io/cocoapods/v/XCDYouTubeKit.svg?style=flat)](https://cocoapods.org/pods/XCDYouTubeKit)
[![Carthage Compatibility](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage/)
Expand Down
5 changes: 4 additions & 1 deletion Scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ function update_badges()
echo "Updating badges"
set -v
sed -i "" "s/$1\.svg/$2.svg/g" "README.md"
sed -i "" "s/branch=$1/branch=$2/g" "README.md"
sed -i "" "s/branch.$1/branch.$2/g" "README.md"
set +v
git add "README.md"
git commit -m "Point badges to the $2 branch"
Expand Down Expand Up @@ -36,11 +36,14 @@ sed -i "" "s/DYLIB_CURRENT_VERSION = .*;/DYLIB_CURRENT_VERSION = ${VERSION};/g"
sed -i "" "s/CURRENT_PROJECT_VERSION = .*;/CURRENT_PROJECT_VERSION = ${CURRENT_PROJECT_VERSION};/g" "XCDYouTubeKit.xcodeproj/project.pbxproj"
sed -i "" "s/CURRENT_PROJECT_VERSION = .*;/CURRENT_PROJECT_VERSION = ${VERSION};/g" "XCDYouTubeKit Demo/XCDYouTubeKit Demo.xcodeproj/project.pbxproj"
sed -i "" "s/^\(.*s.version.*=.*\)\".*\"/\1\"${VERSION}\"/" "XCDYouTubeKit.podspec"
sed -i "" "s/module_version: .*/module_version: ${VERSION}/" ".jazzy.yaml"
sed -i "" "s/tree\\/.*\\/XCDYouTubeKit/tree\\/${VERSION}\\/XCDYouTubeKit/" ".jazzy.yaml"
sed -E -i "" "s/~> [0-9\.]+/~> ${VERSION_PARTS[0]}.${VERSION_PARTS[1]}/g" "README.md"
set +v
git add "XCDYouTubeKit.xcodeproj"
git add "XCDYouTubeKit Demo/XCDYouTubeKit Demo.xcodeproj"
git add "XCDYouTubeKit.podspec"
git add ".jazzy.yaml"
git add "README.md"
git commit -m "Update version to ${VERSION}"

Expand Down
24 changes: 0 additions & 24 deletions Scripts/run-tests.sh

This file was deleted.

38 changes: 32 additions & 6 deletions XCDYouTubeKit Demo/Playground.playground/Contents.swift
Original file line number Diff line number Diff line change
@@ -1,18 +1,44 @@
import XCPlayground
import XCDYouTubeKit
#if swift(>=3.0)
import PlaygroundSupport
struct YouTubeVideoQuality {
static let hd720 = NSNumber(value: XCDYouTubeVideoQuality.HD720.rawValue)
static let medium360 = NSNumber(value: XCDYouTubeVideoQuality.medium360.rawValue)
static let small240 = NSNumber(value: XCDYouTubeVideoQuality.small240.rawValue)
}
#else
import XCPlayground
typealias Error = NSError
struct YouTubeVideoQuality {
static let hd720 = NSNumber(unsignedLong: XCDYouTubeVideoQuality.HD720.rawValue)
static let medium360 = NSNumber(unsignedLong: XCDYouTubeVideoQuality.Medium360.rawValue)
static let small240 = NSNumber(unsignedLong: XCDYouTubeVideoQuality.Small240.rawValue)
}
#endif

setenv("XCDYouTubeKitLogLevel", "0", 1)

var client = XCDYouTubeClient(languageIdentifier: "en")

client.getVideoWithIdentifier("6v2L2UGZJAM") { (video: XCDYouTubeVideo?, error: NSError?) -> Void in
video
error?.localizedDescription
client.getVideoWithIdentifier("6v2L2UGZJAM") { (video: XCDYouTubeVideo?, error: Error?) -> Void in
if let video = video {
video.description
video.streamURLs[XCDYouTubeVideoQualityHTTPLiveStreaming]
video.streamURLs[YouTubeVideoQuality.hd720]
video.streamURLs[YouTubeVideoQuality.medium360]
video.streamURLs[YouTubeVideoQuality.small240]
} else {
error?.localizedDescription
}
}

client.getVideoWithIdentifier("xxxxxxxxxxx") { (video: XCDYouTubeVideo?, error: NSError?) -> Void in
client.getVideoWithIdentifier("xxxxxxxxxxx") { (video: XCDYouTubeVideo?, error: Error?) -> Void in
video
error?.localizedDescription
}

XCPlaygroundPage.currentPage.needsIndefiniteExecution = true
#if swift(>=3.0)
PlaygroundPage.current.needsIndefiniteExecution = true
#else
XCPlaygroundPage.currentPage.needsIndefiniteExecution = true
#endif
6 changes: 0 additions & 6 deletions XCDYouTubeKit Demo/Playground.playground/timeline.xctimeline

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 2.5.3;
CURRENT_PROJECT_VERSION = 2.5.4;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
Expand All @@ -783,7 +783,6 @@
MACOSX_DEPLOYMENT_TARGET = 10.9;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
TVOS_DEPLOYMENT_TARGET = 9.0;
};
name = Debug;
Expand All @@ -805,7 +804,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = YES;
CURRENT_PROJECT_VERSION = 2.5.3;
CURRENT_PROJECT_VERSION = 2.5.4;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
Expand All @@ -823,7 +822,6 @@
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MACOSX_DEPLOYMENT_TARGET = 10.9;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
TVOS_DEPLOYMENT_TARGET = 9.0;
VALIDATE_PRODUCT = YES;
};
Expand All @@ -839,6 +837,7 @@
LD_RUNPATH_SEARCH_PATHS = "@loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = ch.pitaya.xcdyoutubekit.demo.ios;
PRODUCT_NAME = "$(TARGET_NAME)";
TARGETED_DEVICE_FAMILY = "1,2";
WRAPPER_EXTENSION = app;
};
name = Debug;
Expand All @@ -853,6 +852,7 @@
LD_RUNPATH_SEARCH_PATHS = "@loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = ch.pitaya.xcdyoutubekit.demo.ios;
PRODUCT_NAME = "$(TARGET_NAME)";
TARGETED_DEVICE_FAMILY = "1,2";
WRAPPER_EXTENSION = app;
};
name = Release;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0700"
LastUpgradeVersion = "0820"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -11,8 +11,7 @@
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES"
hideIssues = "NO">
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C2428ACF191C3C1400065504"
Expand All @@ -33,9 +32,9 @@
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C2DD4DA1191FFDE100AF6F85"
BuildableName = "XCDYouTubeKit OS X Tests.xctest"
BlueprintName = "XCDYouTubeKit OS X Tests"
BlueprintIdentifier = "C20F579A18817D5400EDBFB0"
BuildableName = "XCDYouTubeKit.xctest"
BlueprintName = "XCDYouTubeKit Tests"
ReferencedContainer = "container:../XCDYouTubeKit.xcodeproj">
</BuildableReference>
</TestableReference>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0700"
LastUpgradeVersion = "0820"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -11,8 +11,7 @@
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES"
hideIssues = "NO">
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C274159D17F491230026834B"
Expand All @@ -34,8 +33,8 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C20F579A18817D5400EDBFB0"
BuildableName = "XCDYouTubeKit iOS Tests.xctest"
BlueprintName = "XCDYouTubeKit iOS Tests"
BuildableName = "XCDYouTubeKit.xctest"
BlueprintName = "XCDYouTubeKit Tests"
ReferencedContainer = "container:../XCDYouTubeKit.xcodeproj">
</BuildableReference>
</TestableReference>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0710"
LastUpgradeVersion = "0820"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -11,8 +11,7 @@
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES"
hideIssues = "NO">
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C2D627581BE3C648005367FF"
Expand All @@ -29,6 +28,16 @@
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C20F579A18817D5400EDBFB0"
BuildableName = "XCDYouTubeKit.xctest"
BlueprintName = "XCDYouTubeKit Tests"
ReferencedContainer = "container:../XCDYouTubeKit.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
Expand Down
Loading

0 comments on commit 97c8fc1

Please sign in to comment.