readit 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (31) hide show
  1. data/.travis.yml +12 -0
  2. data/Gemfile +3 -1
  3. data/Readme.md +61 -5
  4. data/features/bookmarks.feature +9 -9
  5. data/features/readability.yml.sample +6 -0
  6. data/features/step_definitions/api_steps.rb +4 -4
  7. data/lib/readit/version.rb +1 -1
  8. data/lib/readit.rb +89 -11
  9. data/spec/cases/api_spec.rb +29 -6
  10. data/spec/cases/parser_spec.rb +19 -0
  11. data/spec/cases/tags_spec.rb +46 -0
  12. data/spec/cassettes/Readit_API/can_add_tags_to_one_bookmark.yml +699 -0
  13. data/spec/cassettes/Readit_API/can_fetch_all_tags_information_of_current_user.yml +45 -0
  14. data/spec/cassettes/Readit_API/can_fetch_tags_of_one_bookmark.yml +687 -0
  15. data/spec/cassettes/Readit_API/can_get_bookmark_location_when_bookmarked_a_url.yml +52 -0
  16. data/spec/cassettes/Readit_API/can_get_meta_infos_of_bookmarks.yml +646 -0
  17. data/spec/cassettes/Readit_API/can_remove_tag_info_of_one_bookmark_by_tag_id.yml +786 -0
  18. data/spec/cassettes/Readit_API/should_add_bookmark.yml +52 -0
  19. data/spec/cassettes/Readit_API/should_get_bookmarks_according_to_added_since.yml +86 -0
  20. data/spec/cassettes/Readit_API/should_get_the_article_content.yml +322 -0
  21. data/spec/cassettes/Readit_API/should_get_the_bookmark_info_by_bookmark_id.yml +713 -0
  22. data/spec/cassettes/Readit_API/should_get_user_infos.yml +51 -0
  23. data/spec/cassettes/Readit_API/should_get_user_s_bookmarks.yml +634 -0
  24. data/spec/cassettes/Readit_API/should_provide_the_bookmark_id_of_an_already_bookmarked_url.yml +683 -0
  25. data/spec/cassettes/Readit_API/should_update_bookmark_to_archive.yml +808 -0
  26. data/spec/cassettes/Readit_API/should_update_bookmark_to_favarite.yml +808 -0
  27. data/spec/cassettes/Readit_Parser/should_return_parsed_article_cotents.yml +638 -0
  28. data/spec/readability.yml.sample +7 -0
  29. data/spec/spec_helper.rb +28 -1
  30. metadata +65 -11
  31. data/readability.yml.sample +0 -3
@@ -0,0 +1,51 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://www.readability.com/api/rest/v1/users/_current
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - ! '*/*'
12
+ User-Agent:
13
+ - OAuth gem v0.4.7
14
+ Authorization:
15
+ - OAuth oauth_consumer_key="<TOKENS>", oauth_nonce="tQCL0nlVlUxp2s80VWKSkdkYDvWyA8akd2gDy5oFVDw",
16
+ oauth_signature="YqpcqxWHMOI%2BFDUHDv6ar2JHnvs%3D", oauth_signature_method="HMAC-SHA1",
17
+ oauth_timestamp="1361335754", oauth_token="<TOKENS>", oauth_version="1.0"
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Content-Type:
24
+ - application/json; charset=utf-8
25
+ Date:
26
+ - Wed, 20 Feb 2013 04:49:11 GMT
27
+ P3p:
28
+ - CP='Legacy Only. Go to https://readability.com/about/terms/ for full terms.'
29
+ Server:
30
+ - nginx/1.2.1
31
+ Set-Cookie:
32
+ - readabilityToken=4FCRyvwJt8enJ7LvesTWKphGwNRyT5h9B3t5KWfP; expires=Wed, 20-Mar-2013
33
+ 04:49:11 GMT; Max-Age=2419200; Path=/
34
+ Vary:
35
+ - Accept-Encoding
36
+ - Authorization, Cookie
37
+ Content-Length:
38
+ - '398'
39
+ Connection:
40
+ - keep-alive
41
+ body:
42
+ encoding: US-ASCII
43
+ string: ! "{\n \"username\": \"<TOKENS>\",\n \"first_name\": \"Dongbin\",\n
44
+ \ \"last_name\": \"Li\",\n \"has_active_subscription\": false,\n \"avatar_url\":
45
+ \"https://graph.facebook.com/699166556/picture?height=128&width=128\",\n \"is_publisher\":
46
+ false,\n \"email_into_address\": \"<TOKENS>+wilde@inbox.readability.com\",\n
47
+ \ \"kindle_email_address\": \"mike.d.1984@kindle.com\",\n \"date_joined\":
48
+ \"2011-11-17 09:31:53\"\n}"
49
+ http_version:
50
+ recorded_at: Wed, 20 Feb 2013 04:49:15 GMT
51
+ recorded_with: VCR 2.0.1