simplenote 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -3,3 +3,4 @@
3
3
  coverage
4
4
  rdoc
5
5
  pkg
6
+ .idea
data/README.rdoc CHANGED
@@ -12,6 +12,10 @@ A dead simple gem for accessing SimpleNote notes via its API
12
12
  (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
13
13
  * Send me a pull request. Bonus points for topic branches.
14
14
 
15
+ == Contributors
16
+
17
+ Aaron Peckham - create_note and awesome test coverage
18
+
15
19
  == Copyright
16
20
 
17
21
  Copyright (c) 2009 Simon Jefford. See LICENSE for details.
data/Rakefile CHANGED
@@ -10,11 +10,10 @@ begin
10
10
  gem.email = "simon.jefford@gmail.com"
11
11
  gem.homepage = "http://github.com/simonjefford/simplenote"
12
12
  gem.authors = ["Simon Jefford"]
13
- gem.add_development_dependency "thoughtbot-shoulda"
14
- gem.add_development_dependency "crack"
15
- gem.add_development_dependency "jnunemaker-matchy"
16
- gem.add_development_dependency "jferris-mocha", "=0.9.5.0.1241126838"
17
- gem.add_runtime_dependency "httparty"
13
+ gem.add_development_dependency "shoulda"
14
+ gem.add_development_dependency "fakeweb"
15
+ gem.add_development_dependency "vcr"
16
+ gem.add_runtime_dependency "httparty", "=0.6.0"
18
17
  # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
19
18
  end
20
19
  Jeweler::GemcutterTasks.new
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.2.0
data/lib/simplenote.rb CHANGED
@@ -5,19 +5,46 @@ require 'crack'
5
5
  class SimpleNote
6
6
  include HTTParty
7
7
  attr_reader :token, :email
8
+ format :json
8
9
  base_uri 'https://simple-note.appspot.com/api'
9
10
 
10
11
  def login(email, password)
11
12
  encoded_body = Base64.encode64({:email => email, :password => password}.to_params)
12
13
  @email = email
13
14
  @token = self.class.post "/login", :body => encoded_body
15
+ raise "Login failed" unless @token.response.is_a?(Net::HTTPOK)
14
16
  end
15
17
 
16
18
  def get_index
17
- self.class.get "/index", :query => { :auth => token, :email => email }, :format => :json
19
+ self.class.get "/index", :query => request_hash, :format => :json
18
20
  end
19
21
 
20
22
  def get_note(key)
21
- self.class.get "/note", :query => { :key => key, :auth => token, :email => email }
23
+ out = self.class.get "/note", :query => request_hash.merge(:key => key)
24
+ out.response.is_a?(Net::HTTPNotFound) ? nil : out
25
+ end
26
+
27
+ def delete_note(key)
28
+ out = self.class.get "/delete", :query => request_hash.merge(:key => key)
29
+ raise "Couldn't delete note" unless out.response.is_a?(Net::HTTPOK)
30
+ out
31
+ end
32
+
33
+ def update_note(key, content)
34
+ self.class.post "/note", :query => request_hash.merge(:key => key), :body => Base64.encode64(content)
35
+ end
36
+
37
+ def create_note(content)
38
+ self.class.post "/note", :query => request_hash, :body => Base64.encode64(content)
39
+ end
40
+
41
+ def search(search_string, max_results=10)
42
+ self.class.get "/search", :query => request_hash.merge(:query => search_string, :results => max_results)
43
+ end
44
+
45
+ private
46
+
47
+ def request_hash
48
+ { :auth => token, :email => email }
22
49
  end
23
50
  end
data/simplenote.gemspec CHANGED
@@ -1,15 +1,15 @@
1
1
  # Generated by jeweler
2
- # DO NOT EDIT THIS FILE
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{simplenote}
8
- s.version = "0.1.0"
8
+ s.version = "0.2.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Simon Jefford"]
12
- s.date = %q{2009-09-03}
12
+ s.date = %q{2010-07-05}
13
13
  s.description = %q{Uses HTTParty to present a nice Ruby wrapper for SimpleNote}
14
14
  s.email = %q{simon.jefford@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -26,13 +26,20 @@ Gem::Specification.new do |s|
26
26
  "VERSION",
27
27
  "lib/simplenote.rb",
28
28
  "simplenote.gemspec",
29
+ "test/fixtures/create_note.yml",
30
+ "test/fixtures/delete_note_with_bad_key.yml",
31
+ "test/fixtures/get_index.yml",
32
+ "test/fixtures/get_note_with_bad_key.yml",
33
+ "test/fixtures/login_failure.yml",
34
+ "test/fixtures/search.yml",
35
+ "test/fixtures/update_note.yml",
29
36
  "test/simplenote_test.rb",
30
37
  "test/test_helper.rb"
31
38
  ]
32
39
  s.homepage = %q{http://github.com/simonjefford/simplenote}
33
40
  s.rdoc_options = ["--charset=UTF-8"]
34
41
  s.require_paths = ["lib"]
35
- s.rubygems_version = %q{1.3.5}
42
+ s.rubygems_version = %q{1.3.7}
36
43
  s.summary = %q{Simple wrapper for the SimpleNote HTTP API}
37
44
  s.test_files = [
38
45
  "test/simplenote_test.rb",
@@ -43,24 +50,22 @@ Gem::Specification.new do |s|
43
50
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
44
51
  s.specification_version = 3
45
52
 
46
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
47
- s.add_development_dependency(%q<thoughtbot-shoulda>, [">= 0"])
48
- s.add_development_dependency(%q<crack>, [">= 0"])
49
- s.add_development_dependency(%q<jnunemaker-matchy>, [">= 0"])
50
- s.add_development_dependency(%q<jferris-mocha>, ["= 0.9.5.0.1241126838"])
51
- s.add_runtime_dependency(%q<httparty>, [">= 0"])
53
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
54
+ s.add_development_dependency(%q<shoulda>, [">= 0"])
55
+ s.add_development_dependency(%q<fakeweb>, [">= 0"])
56
+ s.add_development_dependency(%q<vcr>, [">= 0"])
57
+ s.add_runtime_dependency(%q<httparty>, ["= 0.6.0"])
52
58
  else
53
- s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
54
- s.add_dependency(%q<crack>, [">= 0"])
55
- s.add_dependency(%q<jnunemaker-matchy>, [">= 0"])
56
- s.add_dependency(%q<jferris-mocha>, ["= 0.9.5.0.1241126838"])
57
- s.add_dependency(%q<httparty>, [">= 0"])
59
+ s.add_dependency(%q<shoulda>, [">= 0"])
60
+ s.add_dependency(%q<fakeweb>, [">= 0"])
61
+ s.add_dependency(%q<vcr>, [">= 0"])
62
+ s.add_dependency(%q<httparty>, ["= 0.6.0"])
58
63
  end
59
64
  else
60
- s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
61
- s.add_dependency(%q<crack>, [">= 0"])
62
- s.add_dependency(%q<jnunemaker-matchy>, [">= 0"])
63
- s.add_dependency(%q<jferris-mocha>, ["= 0.9.5.0.1241126838"])
64
- s.add_dependency(%q<httparty>, [">= 0"])
65
+ s.add_dependency(%q<shoulda>, [">= 0"])
66
+ s.add_dependency(%q<fakeweb>, [">= 0"])
67
+ s.add_dependency(%q<vcr>, [">= 0"])
68
+ s.add_dependency(%q<httparty>, ["= 0.6.0"])
65
69
  end
66
70
  end
71
+
@@ -0,0 +1,176 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :post
5
+ uri: https://simple-note.appspot.com:443/api/login
6
+ body: |
7
+ cGFzc3dvcmQ9cGFzc3dvcmQhJmVtYWlsPXNpbXBsZW5vdGV0ZXN0JTQwbWFp
8
+ bGluYXRvci5jb20=
9
+
10
+ headers:
11
+ connection:
12
+ - close
13
+ content-type:
14
+ - application/x-www-form-urlencoded
15
+ content-length:
16
+ - "78"
17
+ host:
18
+ - simple-note.appspot.com
19
+ response: !ruby/struct:VCR::Response
20
+ status: !ruby/struct:VCR::ResponseStatus
21
+ code: 200
22
+ message: OK
23
+ headers:
24
+ expires:
25
+ - Fri, 01 Jan 1990 00:00:00 GMT
26
+ content-type:
27
+ - text/html; charset=utf-8
28
+ connection:
29
+ - close
30
+ date:
31
+ - Sat, 03 Jul 2010 23:21:15 GMT
32
+ server:
33
+ - Google Frontend
34
+ account-type:
35
+ - "000"
36
+ set-cookie:
37
+ - auth=2D3D3762E9204476AF991F3347C50CA9379980415D32962552C40FBE3EE4CBB6; expires=Sat, 17-Jul-2010 23:21:15 GMT
38
+ - email=simplenotetest@mailinator.com; expires=Sat, 17-Jul-2010 23:21:15 GMT
39
+ cache-control:
40
+ - no-cache
41
+ body: 2D3D3762E9204476AF991F3347C50CA9379980415D32962552C40FBE3EE4CBB6
42
+ http_version: "1.1"
43
+ - !ruby/struct:VCR::HTTPInteraction
44
+ request: !ruby/struct:VCR::Request
45
+ method: :post
46
+ uri: https://simple-note.appspot.com:443/api/note?email=simplenotetest%40mailinator.com&auth=2D3D3762E9204476AF991F3347C50CA9379980415D32962552C40FBE3EE4CBB6
47
+ body: |
48
+ QSB0ZXN0IG5vdGU=
49
+
50
+ headers:
51
+ connection:
52
+ - close
53
+ content-type:
54
+ - application/x-www-form-urlencoded
55
+ content-length:
56
+ - "17"
57
+ host:
58
+ - simple-note.appspot.com
59
+ response: !ruby/struct:VCR::Response
60
+ status: !ruby/struct:VCR::ResponseStatus
61
+ code: 200
62
+ message: OK
63
+ headers:
64
+ expires:
65
+ - Fri, 01 Jan 1990 00:00:00 GMT
66
+ content-type:
67
+ - text/html; charset=utf-8
68
+ connection:
69
+ - close
70
+ date:
71
+ - Sat, 03 Jul 2010 23:21:16 GMT
72
+ server:
73
+ - Google Frontend
74
+ cache-control:
75
+ - no-cache
76
+ body: agtzaW1wbGUtbm90ZXINCxIETm90ZRjFkrsCDA
77
+ http_version: "1.1"
78
+ - !ruby/struct:VCR::HTTPInteraction
79
+ request: !ruby/struct:VCR::Request
80
+ method: :get
81
+ uri: https://simple-note.appspot.com:443/api/index?email=simplenotetest%40mailinator.com&auth=2D3D3762E9204476AF991F3347C50CA9379980415D32962552C40FBE3EE4CBB6
82
+ body:
83
+ headers:
84
+ connection:
85
+ - close
86
+ host:
87
+ - simple-note.appspot.com
88
+ response: !ruby/struct:VCR::Response
89
+ status: !ruby/struct:VCR::ResponseStatus
90
+ code: 200
91
+ message: OK
92
+ headers:
93
+ expires:
94
+ - Fri, 01 Jan 1990 00:00:00 GMT
95
+ content-type:
96
+ - text/html; charset=utf-8
97
+ connection:
98
+ - close
99
+ date:
100
+ - Sat, 03 Jul 2010 23:21:16 GMT
101
+ server:
102
+ - Google Frontend
103
+ cache-control:
104
+ - no-cache
105
+ body: "[{\"deleted\": false, \"modify\": \"2010-07-03 23:21:16.233127\", \"key\": \"agtzaW1wbGUtbm90ZXINCxIETm90ZRjFkrsCDA\"}, {\"deleted\": true, \"modify\": \"2010-07-03 23:20:54.516094\", \"key\": \"agtzaW1wbGUtbm90ZXINCxIETm90ZRiy4rgCDA\"}, {\"deleted\": true, \"modify\": \"2010-07-03 23:20:28.660330\", \"key\": \"agtzaW1wbGUtbm90ZXINCxIETm90ZRjvlLgCDA\"}, {\"deleted\": true, \"modify\": \"2010-07-03 23:19:57.167038\", \"key\": \"agtzaW1wbGUtbm90ZXINCxIETm90ZRjYu7gCDA\"}, {\"deleted\": true, \"modify\": \"2010-07-03 23:19:39.575275\", \"key\": \"agtzaW1wbGUtbm90ZXINCxIETm90ZRjwx7kCDA\"}, {\"deleted\": false, \"modify\": \"2010-07-03 23:19:18.637359\", \"key\": \"agtzaW1wbGUtbm90ZXINCxIETm90ZRj9oLkCDA\"}, {\"deleted\": false, \"modify\": \"2010-07-03 23:17:16.238075\", \"key\": \"agtzaW1wbGUtbm90ZXINCxIETm90ZRje27oCDA\"}, {\"deleted\": false, \"modify\": \"2010-07-03 23:17:06.317652\", \"key\": \"agtzaW1wbGUtbm90ZXINCxIETm90ZRjhv7kCDA\"}, {\"deleted\": false, \"modify\": \"2010-07-03 23:15:43.961084\", \"key\": \"agtzaW1wbGUtbm90ZXINCxIETm90ZRighbgCDA\"}, {\"deleted\": false, \"modify\": \"2010-07-03 23:15:23.937139\", \"key\": \"agtzaW1wbGUtbm90ZXINCxIETm90ZRiOv7cCDA\"}, {\"deleted\": false, \"modify\": \"2010-07-03 23:14:46.996127\", \"key\": \"agtzaW1wbGUtbm90ZXINCxIETm90ZRiyibkCDA\"}, {\"deleted\": false, \"modify\": \"2010-07-03 23:14:12.942223\", \"key\": \"agtzaW1wbGUtbm90ZXINCxIETm90ZRjuo7gCDA\"}, {\"deleted\": false, \"modify\": \"2010-07-03 23:14:01.105683\", \"key\": \"agtzaW1wbGUtbm90ZXINCxIETm90ZRjto7gCDA\"}, {\"deleted\": false, \"modify\": \"2010-07-03 22:41:13.721231\", \"key\": \"agtzaW1wbGUtbm90ZXINCxIETm90ZRiD1LoCDA\"}]"
106
+ http_version: "1.1"
107
+ - !ruby/struct:VCR::HTTPInteraction
108
+ request: !ruby/struct:VCR::Request
109
+ method: :get
110
+ uri: https://simple-note.appspot.com:443/api/note?email=simplenotetest%40mailinator.com&key=agtzaW1wbGUtbm90ZXINCxIETm90ZRjFkrsCDA&auth=2D3D3762E9204476AF991F3347C50CA9379980415D32962552C40FBE3EE4CBB6
111
+ body:
112
+ headers:
113
+ connection:
114
+ - close
115
+ host:
116
+ - simple-note.appspot.com
117
+ response: !ruby/struct:VCR::Response
118
+ status: !ruby/struct:VCR::ResponseStatus
119
+ code: 200
120
+ message: OK
121
+ headers:
122
+ note-screatedate:
123
+ - "1278199276.233131"
124
+ note-smodifydate:
125
+ - "1278199276.233127"
126
+ expires:
127
+ - Fri, 01 Jan 1990 00:00:00 GMT
128
+ content-type:
129
+ - text/html; charset=utf-8
130
+ note-modifydate:
131
+ - 2010-07-03 23:21:16.233127
132
+ connection:
133
+ - close
134
+ note-key:
135
+ - agtzaW1wbGUtbm90ZXINCxIETm90ZRjFkrsCDA
136
+ date:
137
+ - Sat, 03 Jul 2010 23:21:17 GMT
138
+ server:
139
+ - Google Frontend
140
+ note-createdate:
141
+ - 2010-07-03 23:21:16.233131
142
+ note-deleted:
143
+ - "False"
144
+ cache-control:
145
+ - no-cache
146
+ body: A test note
147
+ http_version: "1.1"
148
+ - !ruby/struct:VCR::HTTPInteraction
149
+ request: !ruby/struct:VCR::Request
150
+ method: :get
151
+ uri: https://simple-note.appspot.com:443/api/delete?email=simplenotetest%40mailinator.com&key=agtzaW1wbGUtbm90ZXINCxIETm90ZRjFkrsCDA&auth=2D3D3762E9204476AF991F3347C50CA9379980415D32962552C40FBE3EE4CBB6
152
+ body:
153
+ headers:
154
+ connection:
155
+ - close
156
+ host:
157
+ - simple-note.appspot.com
158
+ response: !ruby/struct:VCR::Response
159
+ status: !ruby/struct:VCR::ResponseStatus
160
+ code: 200
161
+ message: OK
162
+ headers:
163
+ expires:
164
+ - Fri, 01 Jan 1990 00:00:00 GMT
165
+ content-type:
166
+ - text/html; charset=utf-8
167
+ connection:
168
+ - close
169
+ date:
170
+ - Sat, 03 Jul 2010 23:21:17 GMT
171
+ server:
172
+ - Google Frontend
173
+ cache-control:
174
+ - no-cache
175
+ body: agtzaW1wbGUtbm90ZXINCxIETm90ZRjFkrsCDA
176
+ http_version: "1.1"
@@ -0,0 +1,71 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :post
5
+ uri: https://simple-note.appspot.com:443/api/login
6
+ body: |
7
+ cGFzc3dvcmQ9cGFzc3dvcmQhJmVtYWlsPXNpbXBsZW5vdGV0ZXN0JTQwbWFp
8
+ bGluYXRvci5jb20=
9
+
10
+ headers:
11
+ connection:
12
+ - close
13
+ content-type:
14
+ - application/x-www-form-urlencoded
15
+ content-length:
16
+ - "78"
17
+ host:
18
+ - simple-note.appspot.com
19
+ response: !ruby/struct:VCR::Response
20
+ status: !ruby/struct:VCR::ResponseStatus
21
+ code: 200
22
+ message: OK
23
+ headers:
24
+ expires:
25
+ - Fri, 01 Jan 1990 00:00:00 GMT
26
+ content-type:
27
+ - text/html; charset=utf-8
28
+ connection:
29
+ - close
30
+ date:
31
+ - Sat, 03 Jul 2010 23:25:36 GMT
32
+ server:
33
+ - Google Frontend
34
+ account-type:
35
+ - "000"
36
+ set-cookie:
37
+ - auth=2D3D3762E9204476AF991F3347C50CA9379980415D32962552C40FBE3EE4CBB6; expires=Sat, 17-Jul-2010 23:25:36 GMT
38
+ - email=simplenotetest@mailinator.com; expires=Sat, 17-Jul-2010 23:25:36 GMT
39
+ cache-control:
40
+ - no-cache
41
+ body: 2D3D3762E9204476AF991F3347C50CA9379980415D32962552C40FBE3EE4CBB6
42
+ http_version: "1.1"
43
+ - !ruby/struct:VCR::HTTPInteraction
44
+ request: !ruby/struct:VCR::Request
45
+ method: :get
46
+ uri: https://simple-note.appspot.com:443/api/delete?email=simplenotetest%40mailinator.com&key=key%20that%20doesn't%20exist&auth=2D3D3762E9204476AF991F3347C50CA9379980415D32962552C40FBE3EE4CBB6
47
+ body:
48
+ headers:
49
+ connection:
50
+ - close
51
+ host:
52
+ - simple-note.appspot.com
53
+ response: !ruby/struct:VCR::Response
54
+ status: !ruby/struct:VCR::ResponseStatus
55
+ code: 404
56
+ message: Not Found
57
+ headers:
58
+ expires:
59
+ - Fri, 01 Jan 1990 00:00:00 GMT
60
+ content-type:
61
+ - text/html; charset=utf-8
62
+ connection:
63
+ - close
64
+ date:
65
+ - Sat, 03 Jul 2010 23:25:36 GMT
66
+ server:
67
+ - Google Frontend
68
+ cache-control:
69
+ - no-cache
70
+ body: "0"
71
+ http_version: "1.1"
@@ -0,0 +1,112 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :post
5
+ uri: https://simple-note.appspot.com:443/api/login
6
+ body: |
7
+ cGFzc3dvcmQ9cGFzc3dvcmQhJmVtYWlsPXNpbXBsZW5vdGV0ZXN0JTQwbWFp
8
+ bGluYXRvci5jb20=
9
+
10
+ headers:
11
+ connection:
12
+ - close
13
+ content-type:
14
+ - application/x-www-form-urlencoded
15
+ content-length:
16
+ - "78"
17
+ host:
18
+ - simple-note.appspot.com
19
+ response: !ruby/struct:VCR::Response
20
+ status: !ruby/struct:VCR::ResponseStatus
21
+ code: 200
22
+ message: OK
23
+ headers:
24
+ expires:
25
+ - Fri, 01 Jan 1990 00:00:00 GMT
26
+ content-type:
27
+ - text/html; charset=utf-8
28
+ connection:
29
+ - close
30
+ date:
31
+ - Sat, 03 Jul 2010 22:51:55 GMT
32
+ server:
33
+ - Google Frontend
34
+ account-type:
35
+ - "000"
36
+ set-cookie:
37
+ - auth=2D3D3762E9204476AF991F3347C50CA9379980415D32962552C40FBE3EE4CBB6; expires=Sat, 17-Jul-2010 22:51:55 GMT
38
+ - email=simplenotetest@mailinator.com; expires=Sat, 17-Jul-2010 22:51:55 GMT
39
+ cache-control:
40
+ - no-cache
41
+ body: 2D3D3762E9204476AF991F3347C50CA9379980415D32962552C40FBE3EE4CBB6
42
+ http_version: "1.1"
43
+ - !ruby/struct:VCR::HTTPInteraction
44
+ request: !ruby/struct:VCR::Request
45
+ method: :get
46
+ uri: https://simple-note.appspot.com:443/api/index?auth=2D3D3762E9204476AF991F3347C50CA9379980415D32962552C40FBE3EE4CBB6&email=simplenotetest%40mailinator.com
47
+ body:
48
+ headers:
49
+ connection:
50
+ - close
51
+ host:
52
+ - simple-note.appspot.com
53
+ response: !ruby/struct:VCR::Response
54
+ status: !ruby/struct:VCR::ResponseStatus
55
+ code: 200
56
+ message: OK
57
+ headers:
58
+ expires:
59
+ - Fri, 01 Jan 1990 00:00:00 GMT
60
+ content-type:
61
+ - text/html; charset=utf-8
62
+ connection:
63
+ - close
64
+ date:
65
+ - Sat, 03 Jul 2010 22:51:56 GMT
66
+ server:
67
+ - Google Frontend
68
+ cache-control:
69
+ - no-cache
70
+ body: "[{\"deleted\": false, \"modify\": \"2010-07-03 22:41:13.721231\", \"key\": \"agtzaW1wbGUtbm90ZXINCxIETm90ZRiD1LoCDA\"}]"
71
+ http_version: "1.1"
72
+ - !ruby/struct:VCR::HTTPInteraction
73
+ request: !ruby/struct:VCR::Request
74
+ method: :get
75
+ uri: https://simple-note.appspot.com:443/api/note?auth=2D3D3762E9204476AF991F3347C50CA9379980415D32962552C40FBE3EE4CBB6&key=agtzaW1wbGUtbm90ZXINCxIETm90ZRiD1LoCDA&email=simplenotetest%40mailinator.com
76
+ body:
77
+ headers:
78
+ connection:
79
+ - close
80
+ host:
81
+ - simple-note.appspot.com
82
+ response: !ruby/struct:VCR::Response
83
+ status: !ruby/struct:VCR::ResponseStatus
84
+ code: 200
85
+ message: OK
86
+ headers:
87
+ note-screatedate:
88
+ - "1278196867.833135"
89
+ note-smodifydate:
90
+ - "1278196873.721231"
91
+ expires:
92
+ - Fri, 01 Jan 1990 00:00:00 GMT
93
+ content-type:
94
+ - text/html; charset=utf-8
95
+ note-modifydate:
96
+ - 2010-07-03 22:41:13.721231
97
+ connection:
98
+ - close
99
+ note-key:
100
+ - agtzaW1wbGUtbm90ZXINCxIETm90ZRiD1LoCDA
101
+ date:
102
+ - Sat, 03 Jul 2010 22:51:57 GMT
103
+ server:
104
+ - Google Frontend
105
+ note-createdate:
106
+ - 2010-07-03 22:41:07.833135
107
+ note-deleted:
108
+ - "False"
109
+ cache-control:
110
+ - no-cache
111
+ body: hello world this is a new note
112
+ http_version: "1.1"
@@ -0,0 +1,73 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :post
5
+ uri: https://simple-note.appspot.com:443/api/login
6
+ body: |
7
+ cGFzc3dvcmQ9cGFzc3dvcmQhJmVtYWlsPXNpbXBsZW5vdGV0ZXN0JTQwbWFp
8
+ bGluYXRvci5jb20=
9
+
10
+ headers:
11
+ connection:
12
+ - close
13
+ content-type:
14
+ - application/x-www-form-urlencoded
15
+ content-length:
16
+ - "78"
17
+ host:
18
+ - simple-note.appspot.com
19
+ response: !ruby/struct:VCR::Response
20
+ status: !ruby/struct:VCR::ResponseStatus
21
+ code: 200
22
+ message: OK
23
+ headers:
24
+ expires:
25
+ - Fri, 01 Jan 1990 00:00:00 GMT
26
+ content-type:
27
+ - text/html; charset=utf-8
28
+ connection:
29
+ - close
30
+ date:
31
+ - Sat, 03 Jul 2010 23:23:55 GMT
32
+ server:
33
+ - Google Frontend
34
+ account-type:
35
+ - "000"
36
+ set-cookie:
37
+ - auth=2D3D3762E9204476AF991F3347C50CA9379980415D32962552C40FBE3EE4CBB6; expires=Sat, 17-Jul-2010 23:23:55 GMT
38
+ - email=simplenotetest@mailinator.com; expires=Sat, 17-Jul-2010 23:23:55 GMT
39
+ cache-control:
40
+ - no-cache
41
+ body: 2D3D3762E9204476AF991F3347C50CA9379980415D32962552C40FBE3EE4CBB6
42
+ http_version: "1.1"
43
+ - !ruby/struct:VCR::HTTPInteraction
44
+ request: !ruby/struct:VCR::Request
45
+ method: :get
46
+ uri: https://simple-note.appspot.com:443/api/note?email=simplenotetest%40mailinator.com&key=key%20that%20doesn't%20exist&auth=2D3D3762E9204476AF991F3347C50CA9379980415D32962552C40FBE3EE4CBB6
47
+ body:
48
+ headers:
49
+ connection:
50
+ - close
51
+ host:
52
+ - simple-note.appspot.com
53
+ response: !ruby/struct:VCR::Response
54
+ status: !ruby/struct:VCR::ResponseStatus
55
+ code: 404
56
+ message: Not Found
57
+ headers:
58
+ expires:
59
+ - Fri, 01 Jan 1990 00:00:00 GMT
60
+ content-type:
61
+ - text/html; charset=utf-8
62
+ connection:
63
+ - close
64
+ date:
65
+ - Sat, 03 Jul 2010 23:23:55 GMT
66
+ server:
67
+ - Google Frontend
68
+ content-length:
69
+ - "0"
70
+ cache-control:
71
+ - no-cache
72
+ body: ""
73
+ http_version: "1.1"
@@ -0,0 +1,39 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :post
5
+ uri: https://simple-note.appspot.com:443/api/login
6
+ body: |
7
+ ZW1haWw9c2ltcGxlbm90ZXRlc3QlNDBtYWlsaW5hdG9yLmNvbSZwYXNzd29y
8
+ ZD1ub3QlMjBteSUyMHBhc3N3b3JkIQ==
9
+
10
+ headers:
11
+ connection:
12
+ - close
13
+ content-type:
14
+ - application/x-www-form-urlencoded
15
+ content-length:
16
+ - "94"
17
+ host:
18
+ - simple-note.appspot.com
19
+ response: !ruby/struct:VCR::Response
20
+ status: !ruby/struct:VCR::ResponseStatus
21
+ code: 400
22
+ message: Bad Request
23
+ headers:
24
+ expires:
25
+ - Fri, 01 Jan 1990 00:00:00 GMT
26
+ content-type:
27
+ - text/html; charset=utf-8
28
+ connection:
29
+ - close
30
+ date:
31
+ - Sat, 03 Jul 2010 23:05:14 GMT
32
+ server:
33
+ - Google Frontend
34
+ content-length:
35
+ - "0"
36
+ cache-control:
37
+ - no-cache
38
+ body: ""
39
+ http_version: "1.1"
@@ -0,0 +1,100 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :post
5
+ uri: https://simple-note.appspot.com:443/api/login
6
+ body: |
7
+ cGFzc3dvcmQ9cGFzc3dvcmQhJmVtYWlsPXNpbXBsZW5vdGV0ZXN0JTQwbWFp
8
+ bGluYXRvci5jb20=
9
+
10
+ headers:
11
+ connection:
12
+ - close
13
+ content-type:
14
+ - application/x-www-form-urlencoded
15
+ content-length:
16
+ - "78"
17
+ host:
18
+ - simple-note.appspot.com
19
+ response: !ruby/struct:VCR::Response
20
+ status: !ruby/struct:VCR::ResponseStatus
21
+ code: 200
22
+ message: OK
23
+ headers:
24
+ expires:
25
+ - Fri, 01 Jan 1990 00:00:00 GMT
26
+ content-type:
27
+ - text/html; charset=utf-8
28
+ connection:
29
+ - close
30
+ date:
31
+ - Sat, 03 Jul 2010 22:59:23 GMT
32
+ server:
33
+ - Google Frontend
34
+ account-type:
35
+ - "000"
36
+ set-cookie:
37
+ - auth=2D3D3762E9204476AF991F3347C50CA9379980415D32962552C40FBE3EE4CBB6; expires=Sat, 17-Jul-2010 22:59:23 GMT
38
+ - email=simplenotetest@mailinator.com; expires=Sat, 17-Jul-2010 22:59:23 GMT
39
+ cache-control:
40
+ - no-cache
41
+ body: 2D3D3762E9204476AF991F3347C50CA9379980415D32962552C40FBE3EE4CBB6
42
+ http_version: "1.1"
43
+ - !ruby/struct:VCR::HTTPInteraction
44
+ request: !ruby/struct:VCR::Request
45
+ method: :get
46
+ uri: https://simple-note.appspot.com:443/api/search?query=hello&results=10&auth=2D3D3762E9204476AF991F3347C50CA9379980415D32962552C40FBE3EE4CBB6&email=simplenotetest%40mailinator.com
47
+ body:
48
+ headers:
49
+ connection:
50
+ - close
51
+ host:
52
+ - simple-note.appspot.com
53
+ response: !ruby/struct:VCR::Response
54
+ status: !ruby/struct:VCR::ResponseStatus
55
+ code: 200
56
+ message: OK
57
+ headers:
58
+ expires:
59
+ - Fri, 01 Jan 1990 00:00:00 GMT
60
+ content-type:
61
+ - text/html; charset=utf-8
62
+ connection:
63
+ - close
64
+ date:
65
+ - Sat, 03 Jul 2010 22:59:24 GMT
66
+ server:
67
+ - Google Frontend
68
+ cache-control:
69
+ - no-cache
70
+ body: "{\"Response\":{\"totalRecords\":1,\"Results\":[{\"content\":\"hello world this is a new note\",\"key\":\"agtzaW1wbGUtbm90ZXINCxIETm90ZRiD1LoCDA\"}]}}"
71
+ http_version: "1.1"
72
+ - !ruby/struct:VCR::HTTPInteraction
73
+ request: !ruby/struct:VCR::Request
74
+ method: :get
75
+ uri: https://simple-note.appspot.com:443/api/search?query=goodbye&results=10&auth=2D3D3762E9204476AF991F3347C50CA9379980415D32962552C40FBE3EE4CBB6&email=simplenotetest%40mailinator.com
76
+ body:
77
+ headers:
78
+ connection:
79
+ - close
80
+ host:
81
+ - simple-note.appspot.com
82
+ response: !ruby/struct:VCR::Response
83
+ status: !ruby/struct:VCR::ResponseStatus
84
+ code: 200
85
+ message: OK
86
+ headers:
87
+ expires:
88
+ - Fri, 01 Jan 1990 00:00:00 GMT
89
+ content-type:
90
+ - text/html; charset=utf-8
91
+ connection:
92
+ - close
93
+ date:
94
+ - Sat, 03 Jul 2010 22:59:24 GMT
95
+ server:
96
+ - Google Frontend
97
+ cache-control:
98
+ - no-cache
99
+ body: "{\"Response\":{\"totalRecords\":0,\"Results\":[]}}"
100
+ http_version: "1.1"
@@ -0,0 +1,182 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :post
5
+ uri: https://simple-note.appspot.com:443/api/login
6
+ body: |
7
+ cGFzc3dvcmQ9cGFzc3dvcmQhJmVtYWlsPXNpbXBsZW5vdGV0ZXN0JTQwbWFp
8
+ bGluYXRvci5jb20=
9
+
10
+ headers:
11
+ connection:
12
+ - close
13
+ content-type:
14
+ - application/x-www-form-urlencoded
15
+ content-length:
16
+ - "78"
17
+ host:
18
+ - simple-note.appspot.com
19
+ response: !ruby/struct:VCR::Response
20
+ status: !ruby/struct:VCR::ResponseStatus
21
+ code: 200
22
+ message: OK
23
+ headers:
24
+ expires:
25
+ - Fri, 01 Jan 1990 00:00:00 GMT
26
+ content-type:
27
+ - text/html; charset=utf-8
28
+ connection:
29
+ - close
30
+ date:
31
+ - Sat, 03 Jul 2010 23:46:10 GMT
32
+ server:
33
+ - Google Frontend
34
+ account-type:
35
+ - "000"
36
+ set-cookie:
37
+ - auth=2D3D3762E9204476AF991F3347C50CA9379980415D32962552C40FBE3EE4CBB6; expires=Sat, 17-Jul-2010 23:46:09 GMT
38
+ - email=simplenotetest@mailinator.com; expires=Sat, 17-Jul-2010 23:46:09 GMT
39
+ cache-control:
40
+ - no-cache
41
+ body: 2D3D3762E9204476AF991F3347C50CA9379980415D32962552C40FBE3EE4CBB6
42
+ http_version: "1.1"
43
+ - !ruby/struct:VCR::HTTPInteraction
44
+ request: !ruby/struct:VCR::Request
45
+ method: :post
46
+ uri: https://simple-note.appspot.com:443/api/note?email=simplenotetest%40mailinator.com&auth=2D3D3762E9204476AF991F3347C50CA9379980415D32962552C40FBE3EE4CBB6
47
+ body: |
48
+ QSB0ZXN0IG5vdGU=
49
+
50
+ headers:
51
+ connection:
52
+ - close
53
+ content-type:
54
+ - application/x-www-form-urlencoded
55
+ content-length:
56
+ - "17"
57
+ host:
58
+ - simple-note.appspot.com
59
+ response: !ruby/struct:VCR::Response
60
+ status: !ruby/struct:VCR::ResponseStatus
61
+ code: 200
62
+ message: OK
63
+ headers:
64
+ expires:
65
+ - Fri, 01 Jan 1990 00:00:00 GMT
66
+ content-type:
67
+ - text/html; charset=utf-8
68
+ connection:
69
+ - close
70
+ date:
71
+ - Sat, 03 Jul 2010 23:46:11 GMT
72
+ server:
73
+ - Google Frontend
74
+ cache-control:
75
+ - no-cache
76
+ body: agtzaW1wbGUtbm90ZXINCxIETm90ZRjq37sCDA
77
+ http_version: "1.1"
78
+ - !ruby/struct:VCR::HTTPInteraction
79
+ request: !ruby/struct:VCR::Request
80
+ method: :post
81
+ uri: https://simple-note.appspot.com:443/api/note?key=agtzaW1wbGUtbm90ZXINCxIETm90ZRjq37sCDA&email=simplenotetest%40mailinator.com&auth=2D3D3762E9204476AF991F3347C50CA9379980415D32962552C40FBE3EE4CBB6
82
+ body: |
83
+ VGhlIG5ldyBjb250ZW50
84
+
85
+ headers:
86
+ connection:
87
+ - close
88
+ content-type:
89
+ - application/x-www-form-urlencoded
90
+ content-length:
91
+ - "21"
92
+ host:
93
+ - simple-note.appspot.com
94
+ response: !ruby/struct:VCR::Response
95
+ status: !ruby/struct:VCR::ResponseStatus
96
+ code: 200
97
+ message: OK
98
+ headers:
99
+ expires:
100
+ - Fri, 01 Jan 1990 00:00:00 GMT
101
+ content-type:
102
+ - text/html; charset=utf-8
103
+ connection:
104
+ - close
105
+ date:
106
+ - Sat, 03 Jul 2010 23:46:12 GMT
107
+ server:
108
+ - Google Frontend
109
+ cache-control:
110
+ - no-cache
111
+ body: agtzaW1wbGUtbm90ZXINCxIETm90ZRjq37sCDA
112
+ http_version: "1.1"
113
+ - !ruby/struct:VCR::HTTPInteraction
114
+ request: !ruby/struct:VCR::Request
115
+ method: :get
116
+ uri: https://simple-note.appspot.com:443/api/note?key=agtzaW1wbGUtbm90ZXINCxIETm90ZRjq37sCDA&email=simplenotetest%40mailinator.com&auth=2D3D3762E9204476AF991F3347C50CA9379980415D32962552C40FBE3EE4CBB6
117
+ body:
118
+ headers:
119
+ connection:
120
+ - close
121
+ host:
122
+ - simple-note.appspot.com
123
+ response: !ruby/struct:VCR::Response
124
+ status: !ruby/struct:VCR::ResponseStatus
125
+ code: 200
126
+ message: OK
127
+ headers:
128
+ note-screatedate:
129
+ - "1278200771.134240"
130
+ note-smodifydate:
131
+ - "1278200772.046788"
132
+ expires:
133
+ - Fri, 01 Jan 1990 00:00:00 GMT
134
+ content-type:
135
+ - text/html; charset=utf-8
136
+ note-modifydate:
137
+ - 2010-07-03 23:46:12.046788
138
+ connection:
139
+ - close
140
+ note-key:
141
+ - agtzaW1wbGUtbm90ZXINCxIETm90ZRjq37sCDA
142
+ date:
143
+ - Sat, 03 Jul 2010 23:46:12 GMT
144
+ server:
145
+ - Google Frontend
146
+ note-createdate:
147
+ - 2010-07-03 23:46:11.134240
148
+ note-deleted:
149
+ - "False"
150
+ cache-control:
151
+ - no-cache
152
+ body: The new content
153
+ http_version: "1.1"
154
+ - !ruby/struct:VCR::HTTPInteraction
155
+ request: !ruby/struct:VCR::Request
156
+ method: :get
157
+ uri: https://simple-note.appspot.com:443/api/delete?key=agtzaW1wbGUtbm90ZXINCxIETm90ZRjq37sCDA&email=simplenotetest%40mailinator.com&auth=2D3D3762E9204476AF991F3347C50CA9379980415D32962552C40FBE3EE4CBB6
158
+ body:
159
+ headers:
160
+ connection:
161
+ - close
162
+ host:
163
+ - simple-note.appspot.com
164
+ response: !ruby/struct:VCR::Response
165
+ status: !ruby/struct:VCR::ResponseStatus
166
+ code: 200
167
+ message: OK
168
+ headers:
169
+ expires:
170
+ - Fri, 01 Jan 1990 00:00:00 GMT
171
+ content-type:
172
+ - text/html; charset=utf-8
173
+ connection:
174
+ - close
175
+ date:
176
+ - Sat, 03 Jul 2010 23:46:13 GMT
177
+ server:
178
+ - Google Frontend
179
+ cache-control:
180
+ - no-cache
181
+ body: agtzaW1wbGUtbm90ZXINCxIETm90ZRjq37sCDA
182
+ http_version: "1.1"
@@ -1,52 +1,99 @@
1
1
  require 'test_helper'
2
2
 
3
3
  class SimpleNoteTest < Test::Unit::TestCase
4
- context "login" do
4
+ context SimpleNote do
5
5
  setup do
6
- SimpleNote.stubs(:post).returns("token")
7
6
  @simplenote = SimpleNote.new
8
- @email = "validaccount@example.com"
9
- @password = "correctpassword"
10
- @simplenote.login(@email, @password)
11
7
  end
12
8
 
13
- should "store the returned token" do
14
- @simplenote.token.should == "token"
9
+ should "log in, list notes and fetch a note" do
10
+ VCR.use_cassette('get_index', :record => :none) do
11
+ login
12
+
13
+ notes = @simplenote.get_index
14
+ assert_equal 1, notes.length
15
+ assert !notes.first["deleted"]
16
+ assert_equal "2010-07-03 22:41:13.721231", notes.first["modify"]
17
+ assert_equal "agtzaW1wbGUtbm90ZXINCxIETm90ZRiD1LoCDA", notes.first["key"]
18
+
19
+ note = @simplenote.get_note(notes.first["key"])
20
+ assert_equal "hello world this is a new note", note
21
+ end
15
22
  end
16
23
 
17
- should "store the email" do
18
- @simplenote.email.should == @email
24
+ should "search notes" do
25
+ VCR.use_cassette('search', :record => :none) do
26
+ login
27
+
28
+ response = @simplenote.search("hello")
29
+ assert_equal 1, response["Response"]["Results"].length
30
+ assert_equal "agtzaW1wbGUtbm90ZXINCxIETm90ZRiD1LoCDA", response["Response"]["Results"].first["key"]
31
+
32
+ response = @simplenote.search("goodbye")
33
+ assert_equal 0, response["Response"]["Results"].length
34
+ end
19
35
  end
20
36
 
21
- should "post to /login with email and password base 64 encoded" do
22
- expected_body = Base64.encode64({ :email => @email, :password => @password}.to_params)
23
- assert_received(SimpleNote, :post) do |expect|
24
- expect.with "/login", :body => expected_body
37
+ should "raise when login fails" do
38
+ VCR.use_cassette('login_failure', :record => :none) do
39
+ error = assert_raises RuntimeError do
40
+ @simplenote.login("simplenotetest@mailinator.com", "not my password!")
41
+ end
42
+ assert_equal "Login failed", error.message
25
43
  end
26
44
  end
27
- end
28
45
 
29
- context "get_index" do
30
- setup do
31
- # TODO - test helper to construct urls given a SimpleNote object
32
- @url = "https://simple-note.appspot.com/api/index?email=me%40example.com&auth=token"
33
- body = '[{"key":"notekey", "modify":"2009-09-02 12:00:00.000000", "key":"AB1234"}]'
34
- FakeWeb.register_uri(:get, @url, :body => body)
35
- @simplenote = SimpleNote.new
36
- @simplenote.stubs(:token).returns("token")
37
- @simplenote.stubs(:email).returns("me@example.com")
38
- @index = @simplenote.get_index
46
+ should "create, list, fetch and delete a note" do
47
+ VCR.use_cassette('create_note', :record => :none) do
48
+ login
49
+
50
+ key = @simplenote.create_note("A test note")
51
+
52
+ notes = @simplenote.get_index
53
+ assert_contains notes.collect { |note| note["key"] }, key
54
+
55
+ note = @simplenote.get_note(key)
56
+ assert_equal "A test note", note
57
+
58
+ @simplenote.delete_note(key)
59
+ end
39
60
  end
40
-
41
- should "return an Array" do
42
- @index.should be_kind_of(Array)
61
+
62
+ should "update a note" do
63
+ VCR.use_cassette('update_note', :record => :none) do
64
+ login
65
+
66
+ key = @simplenote.create_note("A test note")
67
+ @simplenote.update_note(key, "The new content")
68
+
69
+ note = @simplenote.get_note(key)
70
+ assert_equal "The new content", note
71
+
72
+ @simplenote.delete_note(key)
73
+ end
43
74
  end
44
75
 
45
- context "returned array" do
46
- should "contain a single Hash" do
47
- @index.length.should == 1
48
- @index[0].should be_kind_of(Hash)
76
+ should "return nil when you fetch a note that doesn't exist" do
77
+ VCR.use_cassette('get_note_with_bad_key', :record => :none) do
78
+ login
79
+
80
+ assert_nil @simplenote.get_note("key that doesn't exist")
49
81
  end
50
82
  end
83
+
84
+ should "raise if you try to delete a note that doesn't exist" do
85
+ VCR.use_cassette('delete_note_with_bad_key', :record => :none) do
86
+ login
87
+
88
+ error = assert_raises RuntimeError do
89
+ @simplenote.delete_note("key that doesn't exist")
90
+ end
91
+ assert_equal "Couldn't delete note", error.message
92
+ end
93
+ end
94
+ end
95
+
96
+ def login
97
+ @simplenote.login("simplenotetest@mailinator.com", "password!")
51
98
  end
52
99
  end
data/test/test_helper.rb CHANGED
@@ -5,8 +5,10 @@ require 'shoulda'
5
5
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
6
6
  $LOAD_PATH.unshift(File.dirname(__FILE__))
7
7
  require 'simplenote'
8
- %w(httparty matchy fakeweb mocha base64 crack).each { |x| require x }
8
+ %w(httparty fakeweb base64 vcr).each { |x| require x }
9
9
  FakeWeb.allow_net_connect = false
10
10
 
11
- class Test::Unit::TestCase
12
- end
11
+ VCR.config do |c|
12
+ c.cassette_library_dir = 'test/fixtures'
13
+ c.http_stubbing_library = :fakeweb
14
+ end
metadata CHANGED
@@ -1,7 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simplenote
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ hash: 23
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 2
9
+ - 0
10
+ version: 0.2.0
5
11
  platform: ruby
6
12
  authors:
7
13
  - Simon Jefford
@@ -9,59 +15,67 @@ autorequire:
9
15
  bindir: bin
10
16
  cert_chain: []
11
17
 
12
- date: 2009-09-03 00:00:00 +01:00
18
+ date: 2010-07-05 00:00:00 +01:00
13
19
  default_executable:
14
20
  dependencies:
15
21
  - !ruby/object:Gem::Dependency
16
- name: thoughtbot-shoulda
17
- type: :development
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
22
+ name: shoulda
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
20
26
  requirements:
21
27
  - - ">="
22
28
  - !ruby/object:Gem::Version
29
+ hash: 3
30
+ segments:
31
+ - 0
23
32
  version: "0"
24
- version:
25
- - !ruby/object:Gem::Dependency
26
- name: crack
27
33
  type: :development
28
- version_requirement:
29
- version_requirements: !ruby/object:Gem::Requirement
34
+ version_requirements: *id001
35
+ - !ruby/object:Gem::Dependency
36
+ name: fakeweb
37
+ prerelease: false
38
+ requirement: &id002 !ruby/object:Gem::Requirement
39
+ none: false
30
40
  requirements:
31
41
  - - ">="
32
42
  - !ruby/object:Gem::Version
43
+ hash: 3
44
+ segments:
45
+ - 0
33
46
  version: "0"
34
- version:
35
- - !ruby/object:Gem::Dependency
36
- name: jnunemaker-matchy
37
47
  type: :development
38
- version_requirement:
39
- version_requirements: !ruby/object:Gem::Requirement
48
+ version_requirements: *id002
49
+ - !ruby/object:Gem::Dependency
50
+ name: vcr
51
+ prerelease: false
52
+ requirement: &id003 !ruby/object:Gem::Requirement
53
+ none: false
40
54
  requirements:
41
55
  - - ">="
42
56
  - !ruby/object:Gem::Version
57
+ hash: 3
58
+ segments:
59
+ - 0
43
60
  version: "0"
44
- version:
45
- - !ruby/object:Gem::Dependency
46
- name: jferris-mocha
47
61
  type: :development
48
- version_requirement:
49
- version_requirements: !ruby/object:Gem::Requirement
50
- requirements:
51
- - - "="
52
- - !ruby/object:Gem::Version
53
- version: 0.9.5.0.1241126838
54
- version:
62
+ version_requirements: *id003
55
63
  - !ruby/object:Gem::Dependency
56
64
  name: httparty
57
- type: :runtime
58
- version_requirement:
59
- version_requirements: !ruby/object:Gem::Requirement
65
+ prerelease: false
66
+ requirement: &id004 !ruby/object:Gem::Requirement
67
+ none: false
60
68
  requirements:
61
- - - ">="
69
+ - - "="
62
70
  - !ruby/object:Gem::Version
63
- version: "0"
64
- version:
71
+ hash: 7
72
+ segments:
73
+ - 0
74
+ - 6
75
+ - 0
76
+ version: 0.6.0
77
+ type: :runtime
78
+ version_requirements: *id004
65
79
  description: Uses HTTParty to present a nice Ruby wrapper for SimpleNote
66
80
  email: simon.jefford@gmail.com
67
81
  executables: []
@@ -81,6 +95,13 @@ files:
81
95
  - VERSION
82
96
  - lib/simplenote.rb
83
97
  - simplenote.gemspec
98
+ - test/fixtures/create_note.yml
99
+ - test/fixtures/delete_note_with_bad_key.yml
100
+ - test/fixtures/get_index.yml
101
+ - test/fixtures/get_note_with_bad_key.yml
102
+ - test/fixtures/login_failure.yml
103
+ - test/fixtures/search.yml
104
+ - test/fixtures/update_note.yml
84
105
  - test/simplenote_test.rb
85
106
  - test/test_helper.rb
86
107
  has_rdoc: true
@@ -93,21 +114,27 @@ rdoc_options:
93
114
  require_paths:
94
115
  - lib
95
116
  required_ruby_version: !ruby/object:Gem::Requirement
117
+ none: false
96
118
  requirements:
97
119
  - - ">="
98
120
  - !ruby/object:Gem::Version
121
+ hash: 3
122
+ segments:
123
+ - 0
99
124
  version: "0"
100
- version:
101
125
  required_rubygems_version: !ruby/object:Gem::Requirement
126
+ none: false
102
127
  requirements:
103
128
  - - ">="
104
129
  - !ruby/object:Gem::Version
130
+ hash: 3
131
+ segments:
132
+ - 0
105
133
  version: "0"
106
- version:
107
134
  requirements: []
108
135
 
109
136
  rubyforge_project:
110
- rubygems_version: 1.3.5
137
+ rubygems_version: 1.3.7
111
138
  signing_key:
112
139
  specification_version: 3
113
140
  summary: Simple wrapper for the SimpleNote HTTP API