— by Abhisek Pattnaik <abhisekp@engineer.com>
git clone https://github.com/datasift/gitflow hubflow
cd hubflow— by Abhisek Pattnaik <abhisekp@engineer.com>
git clone https://github.com/datasift/gitflow hubflow
cd hubflow| package com.firebase.client; | |
| import com.firebase.client.core.Constants; | |
| import rx.Observable; | |
| import rx.Subscriber; | |
| import rx.functions.Action0; | |
| import rx.functions.Func1; | |
| import rx.subscriptions.Subscriptions; | |
| public class RxFirebase { |
| dredd blueprint.md http://api.myservice.tld |
| FORMAT: 1A | |
| HOST: http://www.google.com | |
| # Notes Collection [/notes] | |
| ## List all Notes [GET] | |
| + Response 200 (application/json) | |
| [{ | |
| "id": 1, "title": "Jogging in park" | |
| }, { |
| -- Dog Resources -- | |
| Retrieve details about your dog | |
| GET /dog/{id} | |
| < 200 | |
| < Content-Type: application/json | |
| { name: "Rover", legs: 3} |
| ngular.module('http-loading-interceptor', ['spinner']).config([ | |
| '$httpProvider', 'spinnerProvider', function($httpProvider, spinnerProvider) { | |
| var interceptor; | |
| interceptor = function(data, headersGetter) { | |
| spinnerProvider.startSpinner(); | |
| return data; | |
| }; | |
| return $httpProvider.defaults.transformRequest.push(interceptor); | |
| } | |
| ]).config([ |
| oauth: | |
| client: | |
| override: true | |
| autoapprove: | |
| - cf | |
| clients: | |
| cf: | |
| override: true | |
| authorized-grant-types: password,implicit | |
| authorities: uaa.none |
| import org.codehaus.groovy.grails.plugins.PluginManagerHolder | |
| ... | |
| def doWithConfig = { config -> | |
| // Here we need to tell the database migrations plugin the change log is in the s5-core plugin | |
| try { | |
| def pluginManager = PluginManagerHolder.pluginManager | |
| def plugin = pluginManager.getGrailsPlugin('s5-core') | |
| def pluginDir = org.codehaus.groovy.grails.plugins.GrailsPluginUtils.getPluginDirForName('s5-core')?.path |
| Closure paginate = { attrs -> | |
| // define new prefix aware keys | |
| def _sort = attrs.prefix? attrs.prefix +"_sort" : 'sort' | |
| def _offset = attrs.prefix? attrs.prefix + "_offset" : "offset" | |
| def _total = attrs.prefix? attrs.prefix + "_total" : "total" | |
| def writer = out | |
| if (attrs.total == null) { |
| grails.config.locations = [ "classpath:Config-core-main.groovy", | |
| "classpath:Config-core-logging.groovy", | |
| "classpath:Config-core-sec.groovy" ] |