readability-engine 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.markdown CHANGED
@@ -13,10 +13,20 @@ in your Gemfile. `bundle`, and then run
13
13
  `rails g readability:install`
14
14
 
15
15
  This will create a `readability.yml` file in your config dir. All you'll need to configure
16
- at that point is to add your consumer key/secret and then add `acts_as_readability` into controllers
16
+ at that point is to add your consumer key/secret and then add `readabilify` into controllers
17
17
  you want to use Readability api methods within.
18
18
 
19
- The installer will give further instructions on how to configure your app once ou install.
19
+ To check if you have access, you can use before_filter or simply check with the `readabilified?` method:
20
+ ```
21
+ before_filter :readabilified?
22
+ ```
23
+
24
+ Once you want to make API calls to Readability, use the `readability` method to make calls. For example:
25
+
26
+ ```
27
+ readabilty :bookmarks, {favorite: true} # return a listing of all the bookmarks which are favorited.
28
+ readabilty :article, params[id] # return an article
29
+ ```
20
30
 
21
31
  API Docs
22
32
  --------
@@ -39,4 +49,4 @@ License
39
49
 
40
50
  See MIT-LICENSE.
41
51
 
42
- [1]: http://readability.com/publishers/api
52
+ [1]: http://readability.com/publishers/api
@@ -2,12 +2,17 @@ module Readability
2
2
  module Generators
3
3
  class InstallGenerator < Rails::Generators::Base
4
4
  source_root File.expand_path("../templates", __FILE__)
5
- desc "Creates a Readability config file for you to modify."
5
+ desc "Creates a Readability config file for you to modify and adds necessary routes."
6
6
 
7
7
  def copy_config
8
8
  template "readability.yml", "config/readability.yml"
9
9
  end
10
10
 
11
+ def copy_routes
12
+ route "match 'readability/callback', to: 'controller#action', as: 'readability_callback'"
13
+ route "match 'readability/logout', to: 'controller#action', as: 'readability_logout'"
14
+ end
15
+
11
16
  def show_readme
12
17
  readme "README" if behavior == :invoke
13
18
  end
@@ -1,21 +1,15 @@
1
1
  You've just installed Readability authentication. It's pretty simple to setup. Simply set the 'key' and 'secret'
2
2
  to your consumer key/secret in the readability.yml file.
3
3
 
4
- To start off the auth process, direct the user to the `readability_sessions_path`
4
+ To start off the auth process, direct the user to the `new_readability_session_path`
5
5
 
6
- In your routes, set a path:
7
- match "readability/callback" => "controller#action", as: "name_me"
6
+ In your routes, modify the paths:
8
7
 
9
- so that once Readability has verified, you will be returned to this path.
8
+ match "readability/callback" => "controller#action", as: "readability_callback"
9
+ match "readability/logout" => "controller#action", as: "readability_logout"
10
+
11
+ changing only the "controller#action" block to where you want post-login and post-logout calls to be redirected to.
10
12
 
11
13
  To access helper methods and the general query interface, be sure to include the `readabilify` call at the
12
14
  top of your controller (or in ApplicationController).
13
15
 
14
- To check if you have access, you can use before_filter, or simply check with the `readabilified?` method:
15
- before_filter :readabilified?
16
-
17
- Once you want to make API calls to Readability, use the `readability` method to make calls. For example:
18
-
19
- readabilty :bookmarks, {favorite: true} # return a listing of all the bookmarks which are favorited.
20
- readabilty :article, [id] # return an article
21
-
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: readability-engine
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.4
5
+ version: 0.0.5
6
6
  platform: ruby
7
7
  authors:
8
8
  - Luke van der Hoeven
@@ -73,7 +73,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
73
73
  requirements:
74
74
  - - ">="
75
75
  - !ruby/object:Gem::Version
76
- hash: 213718141850509228
76
+ hash: 2031244648227343532
77
77
  segments:
78
78
  - 0
79
79
  version: "0"