Skip to content

bterkuile/grid_rest

Repository files navigation

grid_rest

grid_rest is a gem that makes your rails application interact with other backends through a REST interface. It is build in a situation where one rails application was talking to 2 java backends. The main development focus is JSON communication, but XML should be just as easy.

Example configurations

These configurations should be put in config/grid_rest.yml:

General REST interface

include_in:
- ActiveRecord::Base
- ActionController::Base
extend: ActiveRecord::Base  
development:
  url_prefix: '/api/1.0'
  host: localhost
  port: 20400
  logging: true

production:
  url_prefix: '/api/1.0'
  host: localhost
  port: 20400
  logging: true

test:
  url_prefix: '/api/1.0'
  host: localhost
  port: 20400
  logging: true

Multiple REST interfaces

include_in:
- ActiveRecord::Base
- ActionController::Base
extend: ActiveRecord::Base  
development:
  zieook_workflow:
    url_prefix: "/api/1.0/"
    host: localhost
    port: 20200
    logging: true
  zieook_data:
    url_prefix: "/api/1.0"
    host: localhost
    port: 20100
    logging: true

production:
  zieook_workflow:
    url_prefix: "/api/1.0/"
    host: localhost
    port: 20200
    logging: true
  zieook_data:
    url_prefix: "/api/1.0"
    host: localhost
    port: 20100
    logging: false

test:
  zieook_workflow:
    url_prefix: "/api/1.0/"
    host: localhost
    port: 20200
    logging: true
  zieook_data:
    url_prefix: "/api/1.0"
    host: localhost
    port: 20100
    logging: true

Other ORM

include_in:
- MyOrm::Base
- ActionController::Base
extend: MyOrm::Base  
....

Contributing to grid_rest

  • Check out the latest master to make sure the feature hasn’t been implemented or the bug hasn’t been fixed yet

  • Check out the issue tracker to make sure someone already hasn’t requested it and/or contributed it

  • Fork the project

  • Start a feature/bugfix branch

  • Commit and push until you are happy with your contribution

  • Make sure to add tests for it. This is important so I don’t break it in a future version unintentionally.

Copyright © 2011 GridLine. See LICENSE.txt for further details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages