^& | Standard Editor > Show Related Items | ^1 |
^É | Standard Editor > Show Previous History | ^2 |
^⌘É | Standard Editor > Show Previous File History | ^⌘2 |
^" | Standard Editor > Show Next History | ^3 |
^⌘" | Standard Editor > Show Next Files History | ^⌘3 |
^’ | Standard Editor > Show Top Level Items | ^4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Fastlane::FastFile # from https://github.com/fastlane/fastlane/blob/master/fastlane/lib/fastlane/fast_file.rb | |
# Hash that raises an error when we access a missing value | |
class RequiredOptions < Hash | |
def initialize(options, lane) | |
options.each { |key, value| self[key] = value } | |
@lane = lane | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lane :lint_pull_request do |options| | |
add_license_message( | |
repository_name: "felginep/my-ios-app", | |
api_token: ENV["GITHUB_TOKEN"], | |
issue_number: options[:issue_number] | |
) | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# heavily inspired from https://github.com/fastlane/fastlane/blob/master/fastlane/lib/fastlane/actions/set_github_release.rb | |
module Fastlane | |
module Actions | |
module SharedValues | |
COMMENT_GITHUB_ISSUE_COMMENT_LINK = :COMMENT_GITHUB_ISSUE_COMMENT_LINK | |
COMMENT_GITHUB_ISSUE_COMMENT_ID = :COMMENT_GITHUB_ISSUE_COMMENT_ID | |
COMMENT_GITHUB_ISSUE_COMMENT_JSON = :COMMENT_GITHUB_ISSUE_COMMENT_JSON | |
end | |
class CommentGithubIssueAction < Action |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
struct Action { | |
let title: String | |
let style: UIAlertAction.Style | |
let action: () -> Void | |
} | |
extension Action { | |
static func `default`(_ title: String, action: @escaping () -> Void) -> [Action] { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
struct AlertBuilder { | |
private var style: UIAlertController.Style = .alert | |
private var title: String? | |
private var message: String? | |
private var actions: [UIAlertAction] = [] | |
func style(_ style: UIAlertController.Style) -> AlertBuilder { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
import UIKit | |
struct ViewStyle<T> { | |
let style: (T) -> Void | |
} | |
let filled = ViewStyle<UIButton> { | |
$0.setTitleColor(.white, for: .normal) | |
$0.backgroundColor = .red |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
import Foundation | |
func test(named: String, | |
_ work: (_ assert: @escaping (Bool) -> Void, _ done: @escaping () -> Void) -> Void) { | |
var testPass = true | |
var assertCount = 0 | |
let assert: (Bool) -> Void = { value in | |
assertCount = assertCount + 1 | |
testPass = testPass && value |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
disabled_rules: # rule identifiers to exclude from running | |
# not sure | |
- closure_parameter_position | |
- unused_closure_parameter | |
- operator_whitespace # what about defining func ==() | |
- colon | |
# - force_cast | |
# - force_try | |
# useless |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protocol ContentSizable { | |
func ad_updateContentSize() | |
} | |
extension UIView : ContentSizable { | |
func ad_updateContentSize() { | |
subviews.forEach { $0.ad_updateContentSize() } | |
} | |
} |
NewerOlder