Skip to content

Instantly share code, notes, and snippets.

View pepicrft's full-sized avatar
🌱
Open-sourcing

Pedro Piñera Buendía pepicrft

🌱
Open-sourcing
View GitHub Profile
-
name: “status:in_progress”
color: “35bd00”
-
name: “status:blocked”
color: “251235”
// Constants.swift
import Foundation
internal enum Keys: String {
case Forecast
}
//ForecastEntity.swift
import Foundation
lane :deploy do
ensure_git_branch
version = version_bump_podspec(path: "MyPod.podspec")
git_commit(path: ["./MyPod.podspec", "./Example/MyPod.lock"], message: "Bumped to version #{version}")
push_to_git_remote(remote_branch: 'master', force: false, tags: true)
changelog = changelog_from_git_commits
github_release = set_github_release(
repository_name: "MyOrg/MyPod",
api_token: ENV['GITHUB_TOKEN'],
name: version,
lane :travis do
pods
tests
pod_lib_lint(allow_warnings: true, verbose: false)
end
osx_image: xcode7.3
language: objective-c
notifications:
email: false
before_install:
- gem install bundler
- bundle install
script:
- bundle exec fastlane travis
after_success:
lane :tests do
scan(workspace: "Example/MyPod.xcworkspace", scheme: "MyPod-Example", clean: true)
end
lane :pods do
cocoapods(podfile: "Example/")
end
lane :my_lane do
# Todo
end
protocol Repository {
typealias T
func save(entity entity: T, name: String)
func clear(name name: String)
func fetch(name name: String) -> T?
func observe(name name: String) -> Observable<T?>
}
func viewDidLoad() {
super.viewDidLoad()
self.userObserver = UserObserver()
self.userObserver.rx().subscribeNext { [weak self] user in
self.avatarImageView.setImage(url: user.avatarUrl)
}
}