View sample_json.json
This file contains 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
{ | |
"title": { | |
"en": "English", | |
"es": "Spanish" | |
}, | |
"description": "Description" | |
} |
View fastlane_beta.ruby
This file contains 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
desc "" | |
lane :beta do |lane| | |
# ensure you are in master branch | |
ensure_git_branch | |
# ensure that master branch is clean | |
ensure_git_status_clean | |
# check the semantic parameter entered |
View fastlane_run.sh
This file contains 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
# run fastlane | |
# pass 'patch', 'minor' or 'major' as parameter | |
fastlane ios beta bump:patch |
View fabric.ruby
This file contains 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
desc "Deploy a new version to the Fabric." | |
lane :fabric do | |
# upload to Beta by Crashlytics | |
crashlytics( | |
api_token: ENV['FABRIC_API_TOKEN'], | |
build_secret: ENV['FABRIC_BUILD_SECRET'] | |
) | |
end |
View env.sh
This file contains 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
export FABRIC_API_TOKEN=1111 | |
export FABRIC_BUILD_SECRET=x1x1x1x1x1 | |
export GITHUB_TOKEN=11xx1x1x1x1 |
View network_middleware.kt
This file contains 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
// This middleware executes the async requests related with the Rest API | |
internal val networkMiddleware: Middleware<AppState> = { dispatch, state -> | |
{ next -> | |
{ action -> | |
when (action) { | |
// an async operation is called | |
is SetDeviceInfo -> { getDeviceDescription(deviceId = action.deviceId, | |
deviceInfo = action.payload, | |
dispatch = dispatch) } |
View delivery_state.kt
This file contains 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
sealed class DeliveryState: StateType { | |
object NotStarted: DeliveryState() | |
data class SettingUp (val appId: AppId, | |
val serviceId: ServiceId, | |
val description: ServiceDescription? = null): DeliveryState() | |
data class Going (val progress: DeliveryProgress): DeliveryState() | |
data class IsIdle (val reason: Idle): DeliveryState() | |
data class Failed (val error: Throwable): DeliveryState() | |
data class Finished (val status: ServiceStatus): DeliveryState() |
View delivery_state.swift
This file contains 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
enum DeliveryState: StateType { | |
case notStarted | |
case settingUp(appId: AppId, | |
serviceId: ServiceId, | |
description: ServiceDescription? = null) | |
case going(progres: DeliveryProgress) | |
case idle(reason: Idle) | |
case failed(error: Error) | |
case finished(status: ServiceStatus) |
View typeHierarchy.kt
This file contains 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
val gson = GsonBuilder() | |
.registerTypeHierarchyAdapter(Result::class.java, ResultSerializer()) | |
.create() |
View resultSerializer.kt
This file contains 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 ResultSerializer : JsonSerializer<Result<*, *>>, JsonDeserializer<Result<*, *>> { | |
override fun serialize(src: Result<*, *>?, | |
typeOfSrc: Type?, | |
context: JsonSerializationContext?): JsonElement? { | |
// TODO | |
} | |
override fun deserialize(json: JsonElement?, | |
typeOfT: Type?, |
OlderNewer