Sha256: e3abe9ec7050d1d5e4be8f1b8a59a7e0ee83a521b6b19e31a1862524eb6311a1
Contents?: true
Size: 1.71 KB
Versions: 2
Compression:
Stored size: 1.71 KB
Contents
# IntegrationPal This engine is meant to contain the elements of big_sis that can be shared across sis integrations such as - access token - job starting - job monitoring - error capturing - cas authentication ## Usage How to use my plugin. ## Installation Add this line to your application's Gemfile: ```ruby gem 'integration_pal' ``` And then execute: ```bash $ bundle ``` Or install it yourself as: ```bash $ gem install integration_pal ``` 1) SET ENV VARS ENV['ENCRYPTION_KEY'] # this must be 32 chars ENV['SALT_KEY'] # this must be 32 chars 2) copy this to rails application.rb @cas_server_url = 'https://cas-sso.instructure.com/' config.rack_cas.server_url = @cas_server_url 3)set active job config.active_job.queue_adapter = :sidekiq # If you are using sidekiq 4) add engine to your routes.rb file mount IntegrationPal::Engine, at: '/' ## Contributing Contribution directions go here. ## License The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT). ## EXAMPLE API REQUEST # Note how we sign the requesting using ApiAuth require "uri" require "net/https" require "time" require "rubygems" require "api_auth" require 'active_record' JOB_URL = "http://localhost:3000/api/v1/jobs" access_key_id = "test" secret_access_key = "test" uri = URI.parse(JOB_URL) http = Net::HTTP.new(uri.host, uri.port) request = Net::HTTP::Post.new(uri.request_uri, 'Content-Type' => 'application/json') request.body = { job: { worker_id: 1, job_params: { start_date: "2016-05-25T19:57:16Z", end_date: "2017-05-25T13:57:59-06:00" } } }.to_json ApiAuth.sign!(request, access_key_id, secret_access_key) response = http.request(request) puts response.body
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
integration_pal-0.1.1 | README.md |
integration_pal-0.1.0 | README.md |