README.md in embark-journey-0.0.4 vs README.md in embark-journey-0.0.5
- old
+ new
@@ -1,25 +1,45 @@
# Journey
-TODO: Write a gem description
+A ruby wrapper for the Journey API. http://resources.journeyapps.com/api
## Installation
Add this line to your application's Gemfile:
- gem 'journey'
+ gem 'embark-journey', require: 'journey'
And then execute:
$ bundle
Or install it yourself as:
- $ gem install journey
+ $ gem install embark-journey
## Usage
-TODO: Write usage instructions here
+Configure Journey to use the relevant API credentials. For Rails, this would be placed in an initializer.
+
+ Journey.configure do |c|
+ c.api_site = ENV['JOURNEY_API_ENDPOINT']
+ c.api_user = ENV['JOURNEY_API_USERNAME']
+ c.api_password = ENV['JOURNEY_API_KEY']
+ end
+
+
+Create your resource models, inheriting from `Journey::Resource`. Under the hood, resources extend `ActiveResource::Base`.
+
+ class User < Journey::Resource
+ schema do
+ string :name
+ datetime :last_login
+ string :state
+ end
+
+ enum :state, %w[Active Inactive]
+ end
+
## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)