Script:
cd ${SRCROOT}
if [ -e "Pods" ]
then
pod install
else
touch Pods| # Hack to change the Rails cookie serializer from Marshal to JSON and therefore allow the session | |
| # to be shared between different languages but also avoid that someone knowing the | |
| # cookie secret key could execute arbitrary code on the server by unmarshalling | |
| # modified Ruby code added to the session/permanent cookie. | |
| # | |
| # Note that all users will beed to login again since both the remember me cookie and the session cookies | |
| # won't be valid. Note also that the remember me cookie is tested multiple times per request even when it fails. | |
| # for performance reasons you might want to delete it if these extra cycles are too costly for you. | |
| # | |
| # Rails 4 (not tested on Rails 3). |
| package com.jwo.example.sampleform; | |
| import android.annotation.TargetApi; | |
| import android.app.Activity; | |
| import android.content.Context; | |
| import android.graphics.Color; | |
| import android.os.Build; | |
| import android.os.Bundle; | |
| import android.text.Editable; | |
| import android.text.TextWatcher; |
| function dex-method-count() { | |
| cat $1 | head -c 92 | tail -c 4 | hexdump -e '1/4 "%d\n"' | |
| } | |
| function dex-method-count-by-package() { | |
| dir=$(mktemp -d -t dex) | |
| baksmali $1 -o $dir | |
| for pkg in `find $dir/* -type d`; do | |
| smali $pkg -o $pkg/classes.dex | |
| count=$(dex-method-count $pkg/classes.dex) | |
| name=$(echo ${pkg:(${#dir} + 1)} | tr '/' '.') |
| - (id)initWithBeer:(BHBeer *)beer | |
| { | |
| NSAssert(beer != nil, @"beer is required"); | |
| self = [super init]; | |
| if (self) { | |
| self.beer = beer; | |
| } | |
| return self; | |
| } |
| // | |
| // NSManagedObject+KeyedSubscript.h | |
| // | |
| // Created by Jeremy Quinn on 25/05/2013. | |
| // Copyright (c) 2013 FiveOne.org. All rights reserved. | |
| // | |
| #import <CoreData/CoreData.h> | |
| @interface NSManagedObject (KeyedSubscript) |
| import com.google.gson.Gson; | |
| import com.google.gson.JsonSyntaxException; | |
| import com.android.volley.AuthFailureError; | |
| import com.android.volley.NetworkResponse; | |
| import com.android.volley.ParseError; | |
| import com.android.volley.Request; | |
| import com.android.volley.Response; | |
| import com.android.volley.Response.ErrorListener; | |
| import com.android.volley.Response.Listener; |
Locate the section for your github remote in the .git/config file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@github.com:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
| package com.squareup.example; | |
| public abstract BaseActivity extends SherlockActivity { | |
| private final ScopedBus scopedBus = new ScopedBus(); | |
| protected ScopedBus getBus() { | |
| return scopedBus; | |
| } | |
| @Override public void onPause() { |