https://github.com/ahtung/parasut
A ruby gem for the paraşüt API
https://github.com/ahtung/parasut
gem ruby
Last synced: 12 months ago
JSON representation
A ruby gem for the paraşüt API
- Host: GitHub
- URL: https://github.com/ahtung/parasut
- Owner: ahtung
- License: mit
- Created: 2016-08-26T14:54:45.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-09-18T18:23:41.000Z (almost 10 years ago)
- Last Synced: 2025-05-30T12:11:40.369Z (about 1 year ago)
- Topics: gem, ruby
- Language: Ruby
- Homepage:
- Size: 190 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# parasut
[](https://travis-ci.org/ahtung/parasut)
[](https://coveralls.io/github/ahtung/parasut?branch=master)
[](https://badge.fury.io/rb/parasut)
You can sign up for an parasut account at https://www.parasut.com/
## Dependencies
- her
- kaminari
## Requirements
* Ruby 2.0.0 or newer
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'parasut'
```
And then execute:
$ bundle
Or install it yourself as:
$ gem install parasut
## Usage
Create an initializer for Parasut options.
```
require 'parasut'
# config/initializers/parasut.rb
Parasut.options do |option|
option.client_id = 'client_id'
option.client_secret = 'client_secret'
option.username = 'username'
option.password = 'password'
option.company_id = 'company_id'
end
```
Afterwards you can call a model:
account = Parasut::Account.find(1)
puts account.inspect
contacts = Parasut::Contact.all
puts contacts.inspect
account.destroy
## ENVs
- PARASUT_CLIENT_ID
- PARASUT_CLIENT_SECRET
- PARASUT_USERNAME
- PARASUT_PASSWORD
- PARSUT_COMPANY_ID
## Development
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
## Test
rspec
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/ahtung/parasut. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
## License
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).