A simple Dashing job to display the total value of open/overdue invoices from FreeAgent.
An app id/secret and access token setup via FreeAgent Developer.
Add it to dashing's gemfile:
| apply plugin: 'com.android.application' | |
| android { | |
| compileSdkVersion 21 | |
| buildToolsVersion "21.1.1" | |
| defaultConfig { | |
| applicationId "com.plymouthsoftware.android.volleyapp" | |
| minSdkVersion 8 | |
| targetSdkVersion 21 |
| require 'rubygems' | |
| require 'fog' | |
| # Configuration | |
| CONTAINER_NAME = "your_container_name" | |
| IGNORE_TYPES = ["application/directory"] | |
| MAX_TRIES = 3 | |
| CF_USERNAME = "your_rackspace_username" | |
| CF_API_KEY = "your_rackspace_api_key" |
| # Simple regex to replace ruby rocket-syntax hash keys with JSON style. | |
| # e.g. Replace :some_key => "value" with some_key: "value" | |
| # | |
| # (Tested in sublime) | |
| /:([a-zA-Z0-9_-]*)(( *)=>\ *)/$1: / |
A simple Dashing job to display the total value of open/overdue invoices from FreeAgent.
An app id/secret and access token setup via FreeAgent Developer.
Add it to dashing's gemfile:
| #!/bin/bash | |
| ### BEGIN INIT INFO | |
| # Provides: myapp passenger in standalone | |
| # Default-Start: 2 3 4 5 | |
| # Default-Stop: 0 1 6 | |
| # X-Interactive: true | |
| # Short-Description: Start/stop myapp.com web site | |
| ### END INIT INFO | |
| #PATH=/sbin:/usr/sbin:/bin:/usr/bin |
| require 'rubygems' | |
| # 1. Without Bundler | |
| # $ gem install activesupport codebase_api | |
| require 'active_support/core_ext/string' | |
| require 'codebase_api' | |
| # 2. With a Bundler Gemfile: | |
| # # ./Gemfile | |
| # gem 'codebase_api' |
| package com.example; | |
| import android.content.Context; | |
| import android.graphics.*; | |
| import android.graphics.drawable.Drawable; | |
| import android.graphics.drawable.NinePatchDrawable; | |
| import android.util.AttributeSet; | |
| import android.util.Log; | |
| import android.widget.ImageView; |
| public void showCustomDialog() { | |
| Dialog dialog = new Dialog(this, R.style.Theme.CustomDialog); | |
| dialog.setContentView(R.layout.custom_dialog); | |
| // ... | |
| dialog.show(); | |
| } |
| # spec/support/spec_support.rb | |
| def login_as(user = nil) | |
| user ||= Factory.create(:user) | |
| session[:user_id] = user.id | |
| end | |
| def current_user | |
| User.find(session[:user_id]) | |
| rescue |