README.md in hullio-0.1.0 vs README.md in hullio-0.2.0
- old
+ new
@@ -1,9 +1,7 @@
# Hull Ruby client
-TODO: Write a gem description
-
## Installation
Add this line to your application's Gemfile:
gem 'hullio'
@@ -21,11 +19,11 @@
### Configuration
Hull.configure do |c|
c.app_id = "your-app-id"
c.app_secret = "your-app-secret"
- c.endpoint = "http://ORG-NAMESPACE.hullapp.io"
+ c.org_url = "http://ORG-NAMESPACE.hullapp.io"
end
### Making API Calls
`get`, `put`, `post` and `delete` methods are directly available on Hull.
@@ -46,10 +44,36 @@
Hull.get('entity', { uid: 'http://example.com' })
Hull.put('entity', { uid: 'http://example.com', name: 'My super Page' })
Hull.delete('entity', { uid: 'http://example.com' })
+### Compiling widgets and tempaltes with Rails' Assets Pipeline
+
+Load `handlebars_assets` in your Gemfile as part of the assets group
+
+ group :assets do
+ gem 'handlebars_assets'
+ end
+
+
+Place your widgets inside the `app/assets/javascripts` dir.
+
+ app
+ ├── assets
+ │ ├── javascripts
+ │ │ ├── application.js
+ │ │ └── hello
+ │ │ ├── hello.hbs
+ │ │ └── main.js
+
+And require the in your `application.js` file :
+
+
+ //= require handlebars
+ //= require_tree .
+
+
### Bring your own users
In addition to providing multiple social login options, Hull allows you to create and authenticate users that are registered within your own app.
To use this feature, you just have to add a `userHash` key at the initialization of hull.js :
@@ -57,13 +81,14 @@
In you view :
<script>
Hull.init({
appId: "<%= Hull.app_id %>",
- orgUrl: "<%= Hull.endpoint %>",
+ orgUrl: "<%= Hull.org_url %>",
userHash: "<%= Hull.user_hash({ id: "123", email: "bill@hullapp.io", name: "Bill Evans" }) %>"
});
</script>
+
## Contributing
1. Fork it