Skip to content

Instantly share code, notes, and snippets.

View ikesyo's full-sized avatar
🏠
Working from home

IKEDA Sho ikesyo

🏠
Working from home
View GitHub Profile
diff --git a/Source/CarthageKit/Resolver.swift b/Source/CarthageKit/Resolver.swift
index 884880b..4f20925 100644
--- a/Source/CarthageKit/Resolver.swift
+++ b/Source/CarthageKit/Resolver.swift
@@ -117,13 +117,13 @@ public struct Resolver {
private func resolveDependenciesFromNodePermutations(permutationsProducer: SignalProducer<[DependencyNode], CarthageError>) -> SignalProducer<DependencyGraph, CarthageError> {
return permutationsProducer
- .flatMap(.Concat) { rootNodes -> SignalProducer<Event<DependencyGraph, CarthageError>, CarthageError> in
+ .flatMap(.Concat) { rootNodes -> SignalProducer<DependencyGraph, CarthageError> in
diff --git a/Source/CarthageKit/Cartfile.swift b/Source/CarthageKit/Cartfile.swift
index b1b1b46..172b3c2 100644
--- a/Source/CarthageKit/Cartfile.swift
+++ b/Source/CarthageKit/Cartfile.swift
@@ -274,11 +274,14 @@ public struct Dependency<V: VersionType>: Equatable {
/// The project corresponding to this dependency.
public let project: ProjectIdentifier
+ public let dependencyOf: ProjectIdentifier?
+
@ikesyo
ikesyo / ReactiveCocoa.podspec
Created October 3, 2013 15:55
non-renaming version of ReactiveCocoa.podspec
Pod::Spec.new do |s|
s.name = "ReactiveCocoa"
s.version = "2.1"
s.summary = "A framework for composing and transforming streams of values."
s.homepage = "https://github.com/blog/1107-reactivecocoa-is-now-open-source"
s.author = { "Josh Abernathy" => "josh@github.com" }
s.source = { :git => "https://github.com/ReactiveCocoa/ReactiveCocoa.git", :tag => "v#{s.version}" }
s.license = 'MIT'
s.description = "ReactiveCocoa (RAC) is an Objective-C framework for Functional Reactive Programming. It provides APIs for composing and transforming streams of values."
@ikesyo
ikesyo / Mantle.podspec
Created October 3, 2013 15:18
Renaming version of Mantle.podspec
Pod::Spec.new do |s|
s.name = "Mantle"
s.version = "1.3"
s.summary = "Model framework for Cocoa and Cocoa Touch."
s.homepage = "https://github.com/github/Mantle"
s.license = 'MIT'
s.author = { "GitHub" => "support@github.com" }
s.source = { :git => "https://github.com/github/Mantle.git", :tag => "1.3" }
Pod::Spec.new do |s|
s.name = "ReactiveCocoa"
s.version = "2.0-RC1"
s.summary = "A framework for composing and transforming sequences of values."
s.homepage = "https://github.com/blog/1107-reactivecocoa-is-now-open-source"
s.author = { "Justin Spahr-Summers" => "jspahrsummers@github.com", "Josh Abernathy" => "josh@github.com" }
s.source = { :git => "https://github.com/ReactiveCocoa/ReactiveCocoa.git", :tag => "v#{s.version}" }
s.license = { :type => 'MIT', :file => 'LICENSE.md' }
s.description = "ReactiveCocoa (RAC) is an Objective-C framework for Functional Reactive Programming. It provides APIs for composing and transforming streams of values."
@ikesyo
ikesyo / gist:8877f7c6d0cfb9ffab35
Last active December 16, 2015 02:32
Mapping with filtering nil
let values = [ "1", "foo", "3" ]
// Swift 1.2
extension Array {
func filterMap(@noescape transform: T -> U?) -> [U] {
var results = [U]()
for x in self {
if let mapped = transform(x) {
results.append(mapped)
@ikesyo
ikesyo / main.js
Last active December 15, 2015 09:59
Parse Cloud Code: Make role
// Use Parse.Cloud.define to define as many cloud functions as you want.
// For example:
Parse.Cloud.define("hello", function(request, response) {
var acl = new Parse.ACL();
var role = new Parse.Role("testRole", acl);
role.save();
response.success("Hello world!");
});
@ikesyo
ikesyo / DescriptionBuilder.podspec
Created July 30, 2012 07:39
DescriptionBuilder.podspec
Pod::Spec.new do |s|
s.name = 'DescriptionBuilder'
s.version = '0.1'
s.platform = :ios
s.summary = 'DescriptionBuilder is helper class to make easier implementing NSObject description method.
Or dump all instance variables of any object. '
s.homepage = 'https://github.com/kishikawakatsumi/DescriptionBuilder'
s.author = { 'KISHIKAWA Katsumi' => 'kishikawakatsumi@gmail.com' }
s.source = { :git => 'https://github.com/kishikawakatsumi/DescriptionBuilder.git', :branch => 'master' }
public func toScopedDisposable(disposable: Disposable) -> ScopedDisposable {
return ScopedDisposable(disposable)
}
import Himotoki
struct User: Decodable { ... }
struct Foo: Decodable {
let name: String
let users: [User]
static func decode(e: Extractor) -> Foo? {
let create = { Foo($0) }