GithubHelp home page GithubHelp logo

clever-ruby's Introduction

Clever::Ruby

Build Status

Ruby bindings to the Clever API. Documentation

Installation

Add this line to your application's Gemfile:

gem 'clever-ruby'

And then execute:

$ bundle

Or install it yourself as:

$ gem install clever-ruby

Usage

Configure clever-ruby to use your Clever token:

Clever.configure do |config|
  config.token = 'YOUR-API-TOKEN'
end

See the documentation for further details.

Run tests

To run all tests:

$ rake test

To run a specific test file, for example test/unit/clever_test.rb:

$ rake test TEST=test/unit/clever_test.rb

To run all tests and the linter (rubocop):

$ rake

The linter follows the Ruby Style Guide with a few exceptions. To just run the linter:

$ rake lint

Updating VCR cassettes

It is not currently possible to easily recreate the scenario in which the original VCR cassettes were recorded, especially for the events. If you need to update or add to the recorded requests and responses:

  • Using a Clever District Admin sandbox account, set up the data to include the updated or added situation.
  • In the tests, temporarily replace DEMO_TOKEN with the OAuth token of your sandbox district.
  • Remove the existing VCR cassettes that you would like to update so that they will get rerecorded.
  • Run the tests.
  • Using a combination of git checkout -p, git add -p, find-and-replace, sed/awk, etc. check into git the updated data and any updated formatting that you want to keep. Check out and discard any recordings of your Bearer Token (so that the cassettes all contain DEMO_TOKEN) and any other irrelevant data changes. Change the IDs of any objects in your added or updated response data to match those of the demo data.

Documentation

To generate it to ./doc:

$ rake doc

To see documentation coverage:

$ rake doc-coverage

and then view doc_coverage.txt.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git add -p ./path/to/files; git commit -m 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

clever-ruby's People

Contributors

aashay avatar azylman avatar brauliomartinezlm avatar carols10cents avatar dccarroll avatar eighnjel avatar jefff avatar joelmccracken avatar mandabrown avatar mohit avatar osdiab avatar rgarcia avatar samfishman avatar seejee avatar srobbibaro avatar thejefe avatar veraticus avatar whoisjake avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.