quaderno 1.1.2 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,8 +1,9 @@
1
1
  # Quaderno-ruby
2
2
 
3
- Quaderno-ruby is a ruby wrapper for [quaderno api] (https://github.com/recrea/quaderno-api).
3
+ Quaderno-ruby is a ruby wrapper for [quaderno api] (https://github.com/recrea/quaderno-api).
4
+ As the API, it's mostly CRUD.
4
5
 
5
- As the api, it's mostly crud.
6
+ Current version is 1.2.0. See the changelog [here](https://github.com/recrea/quaderno-ruby/blob/master/changelog.md)
6
7
 
7
8
  ## Installation & Configuration
8
9
 
@@ -103,9 +104,6 @@ will return an array with all your items.
103
104
 
104
105
  will return the items with the id passed as parameter.
105
106
 
106
-
107
- will return the contact with the id passed as parameter.
108
-
109
107
  ### Creating a new item
110
108
  ```ruby
111
109
  Quaderno::Item.create(params) #=> Quaderno::Item
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.2
1
+ 1.2.0
data/build_install.sh CHANGED
@@ -1,2 +1,2 @@
1
1
  gem build quaderno.gemspec
2
- gem install quaderno-1.1.0.gem
2
+ gem install quaderno-1.1.2.gem
data/changelog.md ADDED
@@ -0,0 +1,19 @@
1
+ #Changelog
2
+
3
+ ##1.2.0
4
+
5
+ * Added Quaderno webhooks as a resource
6
+ * Added authorization method
7
+
8
+ ##1.1.2
9
+
10
+ * Fixed minor bugs
11
+
12
+ ##1.1.0
13
+
14
+ * Added Quaderno items as a resource
15
+ * Added filter in index queries
16
+
17
+ ##1.0.0
18
+
19
+ * Initial release
@@ -38,6 +38,15 @@ module Quaderno
38
38
  @@subdomain = subdomain
39
39
  end
40
40
 
41
+ def self.authorization(auth_token)
42
+ begin
43
+ party_response = get("/subdomain/api/v1/authorization.json", basic_auth: { username: auth_token })
44
+ return JSON::parse party_response.body
45
+ rescue Errno::ECONNREFUSED
46
+ return false
47
+ end
48
+ end
49
+
41
50
  #Check the connection
42
51
  def self.ping
43
52
  begin
@@ -0,0 +1,8 @@
1
+ module Quaderno
2
+ class Webhook < Base
3
+
4
+ api_model Quaderno::Webhook
5
+ api_path 'webhooks'
6
+
7
+ end
8
+ end
data/lib/quaderno-ruby.rb CHANGED
@@ -2,7 +2,7 @@ require 'ostruct'
2
2
 
3
3
  require 'quaderno-ruby/exceptions/exceptions'
4
4
  %w(crud deliver payment).each { |filename| require "quaderno-ruby/behavior/#{ filename }" }
5
- %w(base contact item invoice estimate expense document_item payment).each { |filename| require "quaderno-ruby/#{ filename }" }
5
+ %w(base contact item invoice estimate expense document_item payment webhook).each { |filename| require "quaderno-ruby/#{ filename }" }
6
6
  require 'ruby-debug'
7
7
 
8
8
 
Binary file
data/quaderno.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "quaderno"
8
- s.version = "1.1.2"
8
+ s.version = "1.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 = ["Recrea"]
12
- s.date = "2013-05-15"
12
+ s.date = "2013-05-22"
13
13
  s.description = "longer description of your gem"
14
14
  s.email = "carlos@recrea.es"
15
15
  s.extra_rdoc_files = [
@@ -25,6 +25,7 @@ Gem::Specification.new do |s|
25
25
  "Rakefile",
26
26
  "VERSION",
27
27
  "build_install.sh",
28
+ "changelog.md",
28
29
  "lib/quaderno-ruby.rb",
29
30
  "lib/quaderno-ruby/base.rb",
30
31
  "lib/quaderno-ruby/behavior/crud.rb",
@@ -38,19 +39,23 @@ Gem::Specification.new do |s|
38
39
  "lib/quaderno-ruby/invoice.rb",
39
40
  "lib/quaderno-ruby/item.rb",
40
41
  "lib/quaderno-ruby/payment.rb",
42
+ "lib/quaderno-ruby/webhook.rb",
41
43
  "quaderno-1.0.0.gem",
42
44
  "quaderno-1.1.0.gem",
45
+ "quaderno-1.1.2.gem",
43
46
  "quaderno.gemspec",
44
47
  "test/fixtures/quaderno_cassettes/all_contacts.yml",
45
48
  "test/fixtures/quaderno_cassettes/all_estimates.yml",
46
49
  "test/fixtures/quaderno_cassettes/all_expenses.yml",
47
50
  "test/fixtures/quaderno_cassettes/all_invoices.yml",
48
51
  "test/fixtures/quaderno_cassettes/all_items.yml",
52
+ "test/fixtures/quaderno_cassettes/all_webhooks.yml",
49
53
  "test/fixtures/quaderno_cassettes/deleted_contact.yml",
50
54
  "test/fixtures/quaderno_cassettes/deleted_estimate.yml",
51
55
  "test/fixtures/quaderno_cassettes/deleted_expense.yml",
52
56
  "test/fixtures/quaderno_cassettes/deleted_invoice.yml",
53
57
  "test/fixtures/quaderno_cassettes/deleted_item.yml",
58
+ "test/fixtures/quaderno_cassettes/deleted_webhook.yml",
54
59
  "test/fixtures/quaderno_cassettes/delivered_estimate.yml",
55
60
  "test/fixtures/quaderno_cassettes/delivered_invoice.yml",
56
61
  "test/fixtures/quaderno_cassettes/found_contact.yml",
@@ -58,11 +63,13 @@ Gem::Specification.new do |s|
58
63
  "test/fixtures/quaderno_cassettes/found_expense.yml",
59
64
  "test/fixtures/quaderno_cassettes/found_invoice.yml",
60
65
  "test/fixtures/quaderno_cassettes/found_item.yml",
66
+ "test/fixtures/quaderno_cassettes/found_webhook.yml",
61
67
  "test/fixtures/quaderno_cassettes/new_contact.yml",
62
68
  "test/fixtures/quaderno_cassettes/new_estimate.yml",
63
69
  "test/fixtures/quaderno_cassettes/new_expense.yml",
64
70
  "test/fixtures/quaderno_cassettes/new_invoice.yml",
65
71
  "test/fixtures/quaderno_cassettes/new_item.yml",
72
+ "test/fixtures/quaderno_cassettes/new_webhook.yml",
66
73
  "test/fixtures/quaderno_cassettes/paid_expense.yml",
67
74
  "test/fixtures/quaderno_cassettes/paid_invoice.yml",
68
75
  "test/fixtures/quaderno_cassettes/rate_limit.yml",
@@ -73,13 +80,15 @@ Gem::Specification.new do |s|
73
80
  "test/fixtures/quaderno_cassettes/updated_expense.yml",
74
81
  "test/fixtures/quaderno_cassettes/updated_invoice.yml",
75
82
  "test/fixtures/quaderno_cassettes/updated_item.yml",
83
+ "test/fixtures/quaderno_cassettes/updated_webhook.yml",
76
84
  "test/helper.rb",
77
85
  "test/test_quaderno-ruby.rb",
78
86
  "test/unit/test_quaderno_contacts.rb",
79
87
  "test/unit/test_quaderno_estimates.rb",
80
88
  "test/unit/test_quaderno_expenses.rb",
81
89
  "test/unit/test_quaderno_invoices.rb",
82
- "test/unit/test_quaderno_items.rb"
90
+ "test/unit/test_quaderno_items.rb",
91
+ "test/unit/test_quaderno_webhooks.rb"
83
92
  ]
84
93
  s.homepage = "http://github.com/recrea/quaderno-ruby"
85
94
  s.licenses = ["MIT"]
@@ -0,0 +1,202 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://n8sDLUZ5z1d6dYXKixnx@localhost:3000/recrea/api/v1/webhooks.json
6
+ body:
7
+ encoding: US-ASCII
8
+ string: url=http%3A%2F%2Fgoogle.com&events[]=created&events[]=updated
9
+ headers:
10
+ authorization:
11
+ - Basic bjhzRExVWjV6MWQ2ZFlYS2l4bng6
12
+ response:
13
+ status:
14
+ code: 201
15
+ message: Created
16
+ headers:
17
+ x-ratelimit-limit:
18
+ - '1000'
19
+ x-ratelimit-remaining:
20
+ - '920'
21
+ content-type:
22
+ - application/json; charset=utf-8
23
+ x-ua-compatible:
24
+ - IE=Edge
25
+ etag:
26
+ - ! '"e80f123b93860e5750012885bfd17cb1"'
27
+ cache-control:
28
+ - max-age=0, private, must-revalidate
29
+ set-cookie:
30
+ - _quaderno_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRkkiJTc3MTYxNTE1MzcwNDFjMzNiMWZkZDNlYjFiMjAwNmVkBjsAVA%3D%3D--4b4ae8f109ea176a757f3d6d760883e20640c06b;
31
+ path=/; HttpOnly
32
+ x-request-id:
33
+ - c67d3f93248eaa3500ef38f64bf02624
34
+ x-runtime:
35
+ - '0.803031'
36
+ connection:
37
+ - close
38
+ server:
39
+ - thin 1.5.0 codename Knife
40
+ body:
41
+ encoding: US-ASCII
42
+ string: ! '{"id":32,"url":"http://google.com","auth_key":"rp5-q_JEC2_TLlFy3y_dYg","events":["created","updated"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2013-05-22T13:03:22Z","updated_at":"2013-05-22T13:03:22Z"}'
43
+ http_version: '1.1'
44
+ recorded_at: Wed, 22 May 2013 13:03:22 GMT
45
+ - request:
46
+ method: post
47
+ uri: http://n8sDLUZ5z1d6dYXKixnx@localhost:3000/recrea/api/v1/webhooks.json
48
+ body:
49
+ encoding: US-ASCII
50
+ string: url=http%3A%2F%2Fquadernoapp.com&events[]=created&events[]=updated&events[]=deleted
51
+ headers:
52
+ authorization:
53
+ - Basic bjhzRExVWjV6MWQ2ZFlYS2l4bng6
54
+ response:
55
+ status:
56
+ code: 201
57
+ message: Created
58
+ headers:
59
+ x-ratelimit-limit:
60
+ - '1000'
61
+ x-ratelimit-remaining:
62
+ - '919'
63
+ content-type:
64
+ - application/json; charset=utf-8
65
+ x-ua-compatible:
66
+ - IE=Edge
67
+ etag:
68
+ - ! '"9041319dce4316b2361aa723f8ea5026"'
69
+ cache-control:
70
+ - max-age=0, private, must-revalidate
71
+ set-cookie:
72
+ - _quaderno_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRkkiJTU5NmNmMzRiNGRiYjE0NDA1ZmM2MmNhYjg2OGVlNmU2BjsAVA%3D%3D--c0e58aa68297b512dd8fa67a8227bb83f9dfc715;
73
+ path=/; HttpOnly
74
+ x-request-id:
75
+ - 4527d243999d173615fcfc5cbb38ed8f
76
+ x-runtime:
77
+ - '2.105596'
78
+ connection:
79
+ - close
80
+ server:
81
+ - thin 1.5.0 codename Knife
82
+ body:
83
+ encoding: US-ASCII
84
+ string: ! '{"id":33,"url":"http://quadernoapp.com","auth_key":"vthKzhokOpZHOTnmTI4FLQ","events":["created","updated","deleted"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2013-05-22T13:03:24Z","updated_at":"2013-05-22T13:03:24Z"}'
85
+ http_version: '1.1'
86
+ recorded_at: Wed, 22 May 2013 13:03:24 GMT
87
+ - request:
88
+ method: get
89
+ uri: http://n8sDLUZ5z1d6dYXKixnx@localhost:3000/recrea/api/v1/webhooks.json
90
+ body:
91
+ encoding: US-ASCII
92
+ string: ''
93
+ headers:
94
+ authorization:
95
+ - Basic bjhzRExVWjV6MWQ2ZFlYS2l4bng6
96
+ response:
97
+ status:
98
+ code: 200
99
+ message: OK
100
+ headers:
101
+ x-ratelimit-limit:
102
+ - '1000'
103
+ x-ratelimit-remaining:
104
+ - '918'
105
+ content-type:
106
+ - application/json; charset=utf-8
107
+ x-ua-compatible:
108
+ - IE=Edge
109
+ etag:
110
+ - ! '"c1296327e6f19dfb940f2acfc35f1043"'
111
+ cache-control:
112
+ - max-age=0, private, must-revalidate
113
+ x-request-id:
114
+ - 04231344a7804acf658eac8d90f276c1
115
+ x-runtime:
116
+ - '0.215615'
117
+ connection:
118
+ - close
119
+ server:
120
+ - thin 1.5.0 codename Knife
121
+ body:
122
+ encoding: US-ASCII
123
+ string: ! '[{"id":32,"url":"http://google.com","auth_key":"rp5-q_JEC2_TLlFy3y_dYg","events":["created","updated"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2013-05-22T13:03:22Z","updated_at":"2013-05-22T13:03:22Z"},{"id":33,"url":"http://quadernoapp.com","auth_key":"vthKzhokOpZHOTnmTI4FLQ","events":["created","updated","deleted"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2013-05-22T13:03:24Z","updated_at":"2013-05-22T13:03:24Z"}]'
124
+ http_version: '1.1'
125
+ recorded_at: Wed, 22 May 2013 13:03:24 GMT
126
+ - request:
127
+ method: delete
128
+ uri: http://n8sDLUZ5z1d6dYXKixnx@localhost:3000/recrea/api/v1/webhooks/32.json
129
+ body:
130
+ encoding: US-ASCII
131
+ string: ''
132
+ headers:
133
+ authorization:
134
+ - Basic bjhzRExVWjV6MWQ2ZFlYS2l4bng6
135
+ response:
136
+ status:
137
+ code: 204
138
+ message: No Content
139
+ headers:
140
+ x-ratelimit-limit:
141
+ - '1000'
142
+ x-ratelimit-remaining:
143
+ - '917'
144
+ x-ua-compatible:
145
+ - IE=Edge
146
+ cache-control:
147
+ - no-cache
148
+ set-cookie:
149
+ - _quaderno_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRkkiJWY3Zjg3NjY1YWZjMjFlYzY2NjdlNzNhNzllZGZkOGUxBjsAVA%3D%3D--7eb66fc57366c7ca57c5eabaea2aef8ef5b790b4;
150
+ path=/; HttpOnly
151
+ x-request-id:
152
+ - 517e66b9cb0e4adc54c2f336e09d972d
153
+ x-runtime:
154
+ - '0.074968'
155
+ connection:
156
+ - close
157
+ server:
158
+ - thin 1.5.0 codename Knife
159
+ body:
160
+ encoding: US-ASCII
161
+ string: ''
162
+ http_version: '1.1'
163
+ recorded_at: Wed, 22 May 2013 13:03:24 GMT
164
+ - request:
165
+ method: delete
166
+ uri: http://n8sDLUZ5z1d6dYXKixnx@localhost:3000/recrea/api/v1/webhooks/33.json
167
+ body:
168
+ encoding: US-ASCII
169
+ string: ''
170
+ headers:
171
+ authorization:
172
+ - Basic bjhzRExVWjV6MWQ2ZFlYS2l4bng6
173
+ response:
174
+ status:
175
+ code: 204
176
+ message: No Content
177
+ headers:
178
+ x-ratelimit-limit:
179
+ - '1000'
180
+ x-ratelimit-remaining:
181
+ - '916'
182
+ x-ua-compatible:
183
+ - IE=Edge
184
+ cache-control:
185
+ - no-cache
186
+ set-cookie:
187
+ - _quaderno_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRkkiJWZkNDllZWQ5YzUyOTQyOWFjNTEzNjUwZmY0ZjFmZTNiBjsAVA%3D%3D--f53046dbbd317d0bb36b0c4d6766f4e3b06e4029;
188
+ path=/; HttpOnly
189
+ x-request-id:
190
+ - 53f43ea199689514824f657f1147607a
191
+ x-runtime:
192
+ - '0.056606'
193
+ connection:
194
+ - close
195
+ server:
196
+ - thin 1.5.0 codename Knife
197
+ body:
198
+ encoding: US-ASCII
199
+ string: ''
200
+ http_version: '1.1'
201
+ recorded_at: Wed, 22 May 2013 13:03:24 GMT
202
+ recorded_with: VCR 2.3.0
@@ -0,0 +1,241 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://n8sDLUZ5z1d6dYXKixnx@localhost:3000/recrea/api/v1/webhooks.json
6
+ body:
7
+ encoding: US-ASCII
8
+ string: url=http%3A%2F%2Fgoogle.com&events[]=created&events[]=updated
9
+ headers:
10
+ authorization:
11
+ - Basic bjhzRExVWjV6MWQ2ZFlYS2l4bng6
12
+ response:
13
+ status:
14
+ code: 201
15
+ message: Created
16
+ headers:
17
+ x-ratelimit-limit:
18
+ - '1000'
19
+ x-ratelimit-remaining:
20
+ - '929'
21
+ content-type:
22
+ - application/json; charset=utf-8
23
+ x-ua-compatible:
24
+ - IE=Edge
25
+ etag:
26
+ - ! '"41479f6abb2dc8b535664b4b55fa45e9"'
27
+ cache-control:
28
+ - max-age=0, private, must-revalidate
29
+ set-cookie:
30
+ - _quaderno_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRkkiJWFiZWY4YjdiOGE4MTEwOTJmNzYwNjM3MjI5ODEwZDlkBjsAVA%3D%3D--96c9ca246f226d02be6c26d8a868d525b15704b7;
31
+ path=/; HttpOnly
32
+ x-request-id:
33
+ - 751dfac73b7b688e55853a1e224622e6
34
+ x-runtime:
35
+ - '0.746976'
36
+ connection:
37
+ - close
38
+ server:
39
+ - thin 1.5.0 codename Knife
40
+ body:
41
+ encoding: US-ASCII
42
+ string: ! '{"id":29,"url":"http://google.com","auth_key":"Q50K-zCp8fLGNzafpqwRAg","events":["created","updated"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2013-05-22T13:03:16Z","updated_at":"2013-05-22T13:03:16Z"}'
43
+ http_version: '1.1'
44
+ recorded_at: Wed, 22 May 2013 13:03:16 GMT
45
+ - request:
46
+ method: post
47
+ uri: http://n8sDLUZ5z1d6dYXKixnx@localhost:3000/recrea/api/v1/webhooks.json
48
+ body:
49
+ encoding: US-ASCII
50
+ string: url=http%3A%2F%2Fquadernoapp.com&events[]=created&events[]=updated
51
+ headers:
52
+ authorization:
53
+ - Basic bjhzRExVWjV6MWQ2ZFlYS2l4bng6
54
+ response:
55
+ status:
56
+ code: 201
57
+ message: Created
58
+ headers:
59
+ x-ratelimit-limit:
60
+ - '1000'
61
+ x-ratelimit-remaining:
62
+ - '928'
63
+ content-type:
64
+ - application/json; charset=utf-8
65
+ x-ua-compatible:
66
+ - IE=Edge
67
+ etag:
68
+ - ! '"91751cad6f240bf2cd55374b21ec9c9c"'
69
+ cache-control:
70
+ - max-age=0, private, must-revalidate
71
+ set-cookie:
72
+ - _quaderno_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRkkiJTA4MTVlZjYwN2E4Y2M5ZDZmODNhMTFjNmE3ZDNlOTEwBjsAVA%3D%3D--f6560d1e8177a9171e9c270baa897cad6f1b9859;
73
+ path=/; HttpOnly
74
+ x-request-id:
75
+ - 44eebcec669d7dd2e4720193c175ac51
76
+ x-runtime:
77
+ - '2.037525'
78
+ connection:
79
+ - close
80
+ server:
81
+ - thin 1.5.0 codename Knife
82
+ body:
83
+ encoding: US-ASCII
84
+ string: ! '{"id":30,"url":"http://quadernoapp.com","auth_key":"mVSEZT81ZNwVwyHtlwAq1g","events":["created","updated"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2013-05-22T13:03:18Z","updated_at":"2013-05-22T13:03:18Z"}'
85
+ http_version: '1.1'
86
+ recorded_at: Wed, 22 May 2013 13:03:18 GMT
87
+ - request:
88
+ method: get
89
+ uri: http://n8sDLUZ5z1d6dYXKixnx@localhost:3000/recrea/api/v1/webhooks.json
90
+ body:
91
+ encoding: US-ASCII
92
+ string: ''
93
+ headers:
94
+ authorization:
95
+ - Basic bjhzRExVWjV6MWQ2ZFlYS2l4bng6
96
+ response:
97
+ status:
98
+ code: 200
99
+ message: OK
100
+ headers:
101
+ x-ratelimit-limit:
102
+ - '1000'
103
+ x-ratelimit-remaining:
104
+ - '927'
105
+ content-type:
106
+ - application/json; charset=utf-8
107
+ x-ua-compatible:
108
+ - IE=Edge
109
+ etag:
110
+ - ! '"ca612ba1284ac24b8347dd0dffae6109"'
111
+ cache-control:
112
+ - max-age=0, private, must-revalidate
113
+ x-request-id:
114
+ - d0d5569d82c9be995978dcd7f8089e8d
115
+ x-runtime:
116
+ - '0.193783'
117
+ connection:
118
+ - close
119
+ server:
120
+ - thin 1.5.0 codename Knife
121
+ body:
122
+ encoding: US-ASCII
123
+ string: ! '[{"id":29,"url":"http://google.com","auth_key":"Q50K-zCp8fLGNzafpqwRAg","events":["created","updated"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2013-05-22T13:03:16Z","updated_at":"2013-05-22T13:03:16Z"},{"id":30,"url":"http://quadernoapp.com","auth_key":"mVSEZT81ZNwVwyHtlwAq1g","events":["created","updated"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2013-05-22T13:03:18Z","updated_at":"2013-05-22T13:03:18Z"}]'
124
+ http_version: '1.1'
125
+ recorded_at: Wed, 22 May 2013 13:03:19 GMT
126
+ - request:
127
+ method: delete
128
+ uri: http://n8sDLUZ5z1d6dYXKixnx@localhost:3000/recrea/api/v1/webhooks/30.json
129
+ body:
130
+ encoding: US-ASCII
131
+ string: ''
132
+ headers:
133
+ authorization:
134
+ - Basic bjhzRExVWjV6MWQ2ZFlYS2l4bng6
135
+ response:
136
+ status:
137
+ code: 204
138
+ message: No Content
139
+ headers:
140
+ x-ratelimit-limit:
141
+ - '1000'
142
+ x-ratelimit-remaining:
143
+ - '926'
144
+ x-ua-compatible:
145
+ - IE=Edge
146
+ cache-control:
147
+ - no-cache
148
+ set-cookie:
149
+ - _quaderno_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRkkiJWVkZGUzZWE5YjYzNzY3NThiNzQxNmMxYTY5NTEyZTU5BjsAVA%3D%3D--19e696f976bb7946320a51be9160ea12324de4ef;
150
+ path=/; HttpOnly
151
+ x-request-id:
152
+ - ee561356cfb653c5b2817ee7ca988491
153
+ x-runtime:
154
+ - '0.058304'
155
+ connection:
156
+ - close
157
+ server:
158
+ - thin 1.5.0 codename Knife
159
+ body:
160
+ encoding: US-ASCII
161
+ string: ''
162
+ http_version: '1.1'
163
+ recorded_at: Wed, 22 May 2013 13:03:19 GMT
164
+ - request:
165
+ method: get
166
+ uri: http://n8sDLUZ5z1d6dYXKixnx@localhost:3000/recrea/api/v1/webhooks.json
167
+ body:
168
+ encoding: US-ASCII
169
+ string: ''
170
+ headers:
171
+ authorization:
172
+ - Basic bjhzRExVWjV6MWQ2ZFlYS2l4bng6
173
+ response:
174
+ status:
175
+ code: 200
176
+ message: OK
177
+ headers:
178
+ x-ratelimit-limit:
179
+ - '1000'
180
+ x-ratelimit-remaining:
181
+ - '925'
182
+ content-type:
183
+ - application/json; charset=utf-8
184
+ x-ua-compatible:
185
+ - IE=Edge
186
+ etag:
187
+ - ! '"4cbb31a140ceebe49b4a4498c4b0498d"'
188
+ cache-control:
189
+ - max-age=0, private, must-revalidate
190
+ x-request-id:
191
+ - a5fa14f7262fe2fdcaf1bd57d4e5eba9
192
+ x-runtime:
193
+ - '0.073359'
194
+ connection:
195
+ - close
196
+ server:
197
+ - thin 1.5.0 codename Knife
198
+ body:
199
+ encoding: US-ASCII
200
+ string: ! '[{"id":29,"url":"http://google.com","auth_key":"Q50K-zCp8fLGNzafpqwRAg","events":["created","updated"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2013-05-22T13:03:16Z","updated_at":"2013-05-22T13:03:16Z"}]'
201
+ http_version: '1.1'
202
+ recorded_at: Wed, 22 May 2013 13:03:19 GMT
203
+ - request:
204
+ method: delete
205
+ uri: http://n8sDLUZ5z1d6dYXKixnx@localhost:3000/recrea/api/v1/webhooks/29.json
206
+ body:
207
+ encoding: US-ASCII
208
+ string: ''
209
+ headers:
210
+ authorization:
211
+ - Basic bjhzRExVWjV6MWQ2ZFlYS2l4bng6
212
+ response:
213
+ status:
214
+ code: 204
215
+ message: No Content
216
+ headers:
217
+ x-ratelimit-limit:
218
+ - '1000'
219
+ x-ratelimit-remaining:
220
+ - '924'
221
+ x-ua-compatible:
222
+ - IE=Edge
223
+ cache-control:
224
+ - no-cache
225
+ set-cookie:
226
+ - _quaderno_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRkkiJTUxMGJmNDQ1NmM0ZTg4MWZlMTAzZDc2MGE2MjlkNWFjBjsAVA%3D%3D--019868e990c5a4465f8b240425e31832f3a7dab1;
227
+ path=/; HttpOnly
228
+ x-request-id:
229
+ - da8630d8a68ccc310dfa5027028a7e3f
230
+ x-runtime:
231
+ - '0.105922'
232
+ connection:
233
+ - close
234
+ server:
235
+ - thin 1.5.0 codename Knife
236
+ body:
237
+ encoding: US-ASCII
238
+ string: ''
239
+ http_version: '1.1'
240
+ recorded_at: Wed, 22 May 2013 13:03:19 GMT
241
+ recorded_with: VCR 2.3.0
@@ -0,0 +1,122 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://n8sDLUZ5z1d6dYXKixnx@localhost:3000/recrea/api/v1/webhooks.json
6
+ body:
7
+ encoding: US-ASCII
8
+ string: url=http%3A%2F%2Fquadernoapp.com&events[]=created&events[]=updated
9
+ headers:
10
+ authorization:
11
+ - Basic bjhzRExVWjV6MWQ2ZFlYS2l4bng6
12
+ response:
13
+ status:
14
+ code: 201
15
+ message: Created
16
+ headers:
17
+ x-ratelimit-limit:
18
+ - '1000'
19
+ x-ratelimit-remaining:
20
+ - '923'
21
+ content-type:
22
+ - application/json; charset=utf-8
23
+ x-ua-compatible:
24
+ - IE=Edge
25
+ etag:
26
+ - ! '"2b8c264ac5f7b2b4c3489fb6992ad96d"'
27
+ cache-control:
28
+ - max-age=0, private, must-revalidate
29
+ set-cookie:
30
+ - _quaderno_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRkkiJTBhYzJjMzJhMTM4OGY3MGY1MWQ2MmI4NjU1MGQ1YTkyBjsAVA%3D%3D--3e5239471da1121ea193883c36d86fac13f6dccf;
31
+ path=/; HttpOnly
32
+ x-request-id:
33
+ - 1706d5ad95d12642f8df01a155d9fdba
34
+ x-runtime:
35
+ - '2.145630'
36
+ connection:
37
+ - close
38
+ server:
39
+ - thin 1.5.0 codename Knife
40
+ body:
41
+ encoding: US-ASCII
42
+ string: ! '{"id":31,"url":"http://quadernoapp.com","auth_key":"6SZP25iCuJpUPh1GE5ZL9w","events":["created","updated"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2013-05-22T13:03:21Z","updated_at":"2013-05-22T13:03:21Z"}'
43
+ http_version: '1.1'
44
+ recorded_at: Wed, 22 May 2013 13:03:21 GMT
45
+ - request:
46
+ method: get
47
+ uri: http://n8sDLUZ5z1d6dYXKixnx@localhost:3000/recrea/api/v1/webhooks.json
48
+ body:
49
+ encoding: US-ASCII
50
+ string: ''
51
+ headers:
52
+ authorization:
53
+ - Basic bjhzRExVWjV6MWQ2ZFlYS2l4bng6
54
+ response:
55
+ status:
56
+ code: 200
57
+ message: OK
58
+ headers:
59
+ x-ratelimit-limit:
60
+ - '1000'
61
+ x-ratelimit-remaining:
62
+ - '922'
63
+ content-type:
64
+ - application/json; charset=utf-8
65
+ x-ua-compatible:
66
+ - IE=Edge
67
+ etag:
68
+ - ! '"7ffd0811c0ecf62689577631a6470f81"'
69
+ cache-control:
70
+ - max-age=0, private, must-revalidate
71
+ x-request-id:
72
+ - 6e224fcf09355e55c1e795e5114b3aef
73
+ x-runtime:
74
+ - '0.075392'
75
+ connection:
76
+ - close
77
+ server:
78
+ - thin 1.5.0 codename Knife
79
+ body:
80
+ encoding: US-ASCII
81
+ string: ! '[{"id":31,"url":"http://quadernoapp.com","auth_key":"6SZP25iCuJpUPh1GE5ZL9w","events":["created","updated"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2013-05-22T13:03:21Z","updated_at":"2013-05-22T13:03:21Z"}]'
82
+ http_version: '1.1'
83
+ recorded_at: Wed, 22 May 2013 13:03:21 GMT
84
+ - request:
85
+ method: delete
86
+ uri: http://n8sDLUZ5z1d6dYXKixnx@localhost:3000/recrea/api/v1/webhooks/31.json
87
+ body:
88
+ encoding: US-ASCII
89
+ string: ''
90
+ headers:
91
+ authorization:
92
+ - Basic bjhzRExVWjV6MWQ2ZFlYS2l4bng6
93
+ response:
94
+ status:
95
+ code: 204
96
+ message: No Content
97
+ headers:
98
+ x-ratelimit-limit:
99
+ - '1000'
100
+ x-ratelimit-remaining:
101
+ - '921'
102
+ x-ua-compatible:
103
+ - IE=Edge
104
+ cache-control:
105
+ - no-cache
106
+ set-cookie:
107
+ - _quaderno_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRkkiJTU4ODZiOWMwYWEzYWI3YzFkNjc3NWRlYTM5Njk5ZjQ0BjsAVA%3D%3D--999e96f296f5cbce65ad1338c80c6a8ce12338fe;
108
+ path=/; HttpOnly
109
+ x-request-id:
110
+ - e2ed76f34849f8a2ae5b4fb86d23dfc9
111
+ x-runtime:
112
+ - '0.072239'
113
+ connection:
114
+ - close
115
+ server:
116
+ - thin 1.5.0 codename Knife
117
+ body:
118
+ encoding: US-ASCII
119
+ string: ''
120
+ http_version: '1.1'
121
+ recorded_at: Wed, 22 May 2013 13:03:21 GMT
122
+ recorded_with: VCR 2.3.0
@@ -0,0 +1,83 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://n8sDLUZ5z1d6dYXKixnx@localhost:3000/recrea/api/v1/webhooks.json
6
+ body:
7
+ encoding: US-ASCII
8
+ string: url=http%3A%2F%2Fquadernoapp.com&events[]=created&events[]=updated
9
+ headers:
10
+ authorization:
11
+ - Basic bjhzRExVWjV6MWQ2ZFlYS2l4bng6
12
+ response:
13
+ status:
14
+ code: 201
15
+ message: Created
16
+ headers:
17
+ x-ratelimit-limit:
18
+ - '1000'
19
+ x-ratelimit-remaining:
20
+ - '931'
21
+ content-type:
22
+ - application/json; charset=utf-8
23
+ x-ua-compatible:
24
+ - IE=Edge
25
+ etag:
26
+ - ! '"8d9fa112bcc5db01832cc0c1360bd068"'
27
+ cache-control:
28
+ - max-age=0, private, must-revalidate
29
+ set-cookie:
30
+ - _quaderno_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRkkiJWU1NDE1YjY0MjI2NmUxNmVjNzczZjVhMGFmZDUwNjMwBjsAVA%3D%3D--9611b85871f59589cd79994ec031cdd33f562c5c;
31
+ path=/; HttpOnly
32
+ x-request-id:
33
+ - 928226662aeac8683e9ef50764e2d6c6
34
+ x-runtime:
35
+ - '2.361554'
36
+ connection:
37
+ - close
38
+ server:
39
+ - thin 1.5.0 codename Knife
40
+ body:
41
+ encoding: US-ASCII
42
+ string: ! '{"id":28,"url":"http://quadernoapp.com","auth_key":"KrLJIFCYDFvdEj0lDrlkEA","events":["created","updated"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2013-05-22T13:03:15Z","updated_at":"2013-05-22T13:03:15Z"}'
43
+ http_version: '1.1'
44
+ recorded_at: Wed, 22 May 2013 13:03:15 GMT
45
+ - request:
46
+ method: delete
47
+ uri: http://n8sDLUZ5z1d6dYXKixnx@localhost:3000/recrea/api/v1/webhooks/28.json
48
+ body:
49
+ encoding: US-ASCII
50
+ string: ''
51
+ headers:
52
+ authorization:
53
+ - Basic bjhzRExVWjV6MWQ2ZFlYS2l4bng6
54
+ response:
55
+ status:
56
+ code: 204
57
+ message: No Content
58
+ headers:
59
+ x-ratelimit-limit:
60
+ - '1000'
61
+ x-ratelimit-remaining:
62
+ - '930'
63
+ x-ua-compatible:
64
+ - IE=Edge
65
+ cache-control:
66
+ - no-cache
67
+ set-cookie:
68
+ - _quaderno_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRkkiJThlODg0ZGYyNzBiOTMxNGE4ZjU2Y2EwZjBhNTMwMDY5BjsAVA%3D%3D--00362c60391e6a23799e3c4d9e545fe687d1c660;
69
+ path=/; HttpOnly
70
+ x-request-id:
71
+ - b9f0c1ee3430579d94877daef3b05ef8
72
+ x-runtime:
73
+ - '0.097469'
74
+ connection:
75
+ - close
76
+ server:
77
+ - thin 1.5.0 codename Knife
78
+ body:
79
+ encoding: US-ASCII
80
+ string: ''
81
+ http_version: '1.1'
82
+ recorded_at: Wed, 22 May 2013 13:03:16 GMT
83
+ recorded_with: VCR 2.3.0
@@ -0,0 +1,164 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://n8sDLUZ5z1d6dYXKixnx@localhost:3000/recrea/api/v1/webhooks.json
6
+ body:
7
+ encoding: US-ASCII
8
+ string: url=http%3A%2F%2Fquadernoapp.com&events[]=created&events[]=updated
9
+ headers:
10
+ authorization:
11
+ - Basic bjhzRExVWjV6MWQ2ZFlYS2l4bng6
12
+ response:
13
+ status:
14
+ code: 201
15
+ message: Created
16
+ headers:
17
+ x-ratelimit-limit:
18
+ - '1000'
19
+ x-ratelimit-remaining:
20
+ - '915'
21
+ content-type:
22
+ - application/json; charset=utf-8
23
+ x-ua-compatible:
24
+ - IE=Edge
25
+ etag:
26
+ - ! '"008068ffb852b442062708262d74cd49"'
27
+ cache-control:
28
+ - max-age=0, private, must-revalidate
29
+ set-cookie:
30
+ - _quaderno_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRkkiJWE4MzEzYzI1YjU3M2MwZmEyMThlOWFkYjUyYWY2ODgwBjsAVA%3D%3D--7ec0cb3dc0e6506c57834b8b9e7f83a53de5a854;
31
+ path=/; HttpOnly
32
+ x-request-id:
33
+ - 42449cc21e8c5c59874779906fd95922
34
+ x-runtime:
35
+ - '3.102622'
36
+ connection:
37
+ - close
38
+ server:
39
+ - thin 1.5.0 codename Knife
40
+ body:
41
+ encoding: US-ASCII
42
+ string: ! '{"id":34,"url":"http://quadernoapp.com","auth_key":"DyD7GdXUs92HdnYZCzPqYQ","events":["created","updated"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2013-05-22T13:03:28Z","updated_at":"2013-05-22T13:03:28Z"}'
43
+ http_version: '1.1'
44
+ recorded_at: Wed, 22 May 2013 13:03:28 GMT
45
+ - request:
46
+ method: get
47
+ uri: http://n8sDLUZ5z1d6dYXKixnx@localhost:3000/recrea/api/v1/webhooks.json
48
+ body:
49
+ encoding: US-ASCII
50
+ string: ''
51
+ headers:
52
+ authorization:
53
+ - Basic bjhzRExVWjV6MWQ2ZFlYS2l4bng6
54
+ response:
55
+ status:
56
+ code: 200
57
+ message: OK
58
+ headers:
59
+ x-ratelimit-limit:
60
+ - '1000'
61
+ x-ratelimit-remaining:
62
+ - '914'
63
+ content-type:
64
+ - application/json; charset=utf-8
65
+ x-ua-compatible:
66
+ - IE=Edge
67
+ etag:
68
+ - ! '"72fe079f8ba20fd4775f781453396608"'
69
+ cache-control:
70
+ - max-age=0, private, must-revalidate
71
+ x-request-id:
72
+ - e478d7f442c0cd28226581dc59b1acfb
73
+ x-runtime:
74
+ - '0.074554'
75
+ connection:
76
+ - close
77
+ server:
78
+ - thin 1.5.0 codename Knife
79
+ body:
80
+ encoding: US-ASCII
81
+ string: ! '[{"id":34,"url":"http://quadernoapp.com","auth_key":"DyD7GdXUs92HdnYZCzPqYQ","events":["created","updated"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2013-05-22T13:03:28Z","updated_at":"2013-05-22T13:03:28Z"}]'
82
+ http_version: '1.1'
83
+ recorded_at: Wed, 22 May 2013 13:03:28 GMT
84
+ - request:
85
+ method: put
86
+ uri: http://n8sDLUZ5z1d6dYXKixnx@localhost:3000/recrea/api/v1/webhooks/34.json
87
+ body:
88
+ encoding: US-ASCII
89
+ string: events[]=created&events[]=updated&events[]=deleted
90
+ headers:
91
+ authorization:
92
+ - Basic bjhzRExVWjV6MWQ2ZFlYS2l4bng6
93
+ response:
94
+ status:
95
+ code: 200
96
+ message: OK
97
+ headers:
98
+ x-ratelimit-limit:
99
+ - '1000'
100
+ x-ratelimit-remaining:
101
+ - '913'
102
+ content-type:
103
+ - application/json; charset=utf-8
104
+ x-ua-compatible:
105
+ - IE=Edge
106
+ etag:
107
+ - ! '"8ea06846c289a08c721d4fee2668512f"'
108
+ cache-control:
109
+ - max-age=0, private, must-revalidate
110
+ set-cookie:
111
+ - _quaderno_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRkkiJTczYzIzZTVlNDBkNWViZGZjZDk4ZWZmODU0NTg2ZjViBjsAVA%3D%3D--506c6a7a832476913fc650fc50c471056c076de1;
112
+ path=/; HttpOnly
113
+ x-request-id:
114
+ - 0d6de0e6332b7d19301c984b707d6be9
115
+ x-runtime:
116
+ - '2.304703'
117
+ connection:
118
+ - close
119
+ server:
120
+ - thin 1.5.0 codename Knife
121
+ body:
122
+ encoding: US-ASCII
123
+ string: ! '{"id":34,"url":"http://quadernoapp.com","auth_key":"DyD7GdXUs92HdnYZCzPqYQ","events":["created","updated","deleted"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2013-05-22T13:03:28Z","updated_at":"2013-05-22T13:03:30Z"}'
124
+ http_version: '1.1'
125
+ recorded_at: Wed, 22 May 2013 13:03:30 GMT
126
+ - request:
127
+ method: delete
128
+ uri: http://n8sDLUZ5z1d6dYXKixnx@localhost:3000/recrea/api/v1/webhooks/34.json
129
+ body:
130
+ encoding: US-ASCII
131
+ string: ''
132
+ headers:
133
+ authorization:
134
+ - Basic bjhzRExVWjV6MWQ2ZFlYS2l4bng6
135
+ response:
136
+ status:
137
+ code: 204
138
+ message: No Content
139
+ headers:
140
+ x-ratelimit-limit:
141
+ - '1000'
142
+ x-ratelimit-remaining:
143
+ - '912'
144
+ x-ua-compatible:
145
+ - IE=Edge
146
+ cache-control:
147
+ - no-cache
148
+ set-cookie:
149
+ - _quaderno_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRkkiJTRkNDZlZjVhMDUyNzU2OGMwYWU3MjE1MmFlZDhkZjY4BjsAVA%3D%3D--4bf40e81e810643c750f521be437f3a3487741d6;
150
+ path=/; HttpOnly
151
+ x-request-id:
152
+ - 5c9e8c698eba0e98c39b4b8bdc8acde0
153
+ x-runtime:
154
+ - '0.057724'
155
+ connection:
156
+ - close
157
+ server:
158
+ - thin 1.5.0 codename Knife
159
+ body:
160
+ encoding: US-ASCII
161
+ string: ''
162
+ http_version: '1.1'
163
+ recorded_at: Wed, 22 May 2013 13:03:30 GMT
164
+ recorded_with: VCR 2.3.0
@@ -0,0 +1,93 @@
1
+ require 'helper'
2
+
3
+ class TestQuadernoWebhook < Test::Unit::TestCase
4
+ context "A user with an authenticate token with webhooks" do
5
+
6
+ setup do
7
+ Quaderno::Base.configure do |config|
8
+ config.auth_token = 'n8sDLUZ5z1d6dYXKixnx'
9
+ config.subdomain = 'recrea'
10
+ end
11
+ end
12
+
13
+ should "get exception if pass wrong arguments" do
14
+ assert_raise ArgumentError do
15
+ VCR.use_cassette('all webhooks') do
16
+ Quaderno::Webhook.all 1, 2, 3
17
+ end
18
+ end
19
+ assert_raise ArgumentError do
20
+ VCR.use_cassette('found webhook') do
21
+ Quaderno::Webhook.find
22
+ end
23
+ end
24
+ end
25
+
26
+ should "get all webhooks (populated db)" do
27
+ VCR.use_cassette('all webhooks') do
28
+ webhook_1 = Quaderno::Webhook.create(url: 'http://google.com', events: ['created', 'updated'])
29
+ webhook_2 = Quaderno::Webhook.create(url: 'http://quadernoapp.com', events: ['created', 'updated', 'deleted'])
30
+ webhooks = Quaderno::Webhook.all
31
+ assert_not_nil webhooks
32
+ assert_kind_of Array, webhooks
33
+ webhooks.each do |webhook|
34
+ assert_kind_of Quaderno::Webhook, webhook
35
+ end
36
+ Quaderno::Webhook.delete webhook_1.id
37
+ Quaderno::Webhook.delete webhook_2.id
38
+ end
39
+ end
40
+
41
+ should "find a webhook" do
42
+ VCR.use_cassette('found webhook') do
43
+ webhook = Quaderno::Webhook.create(url: 'http://quadernoapp.com', events: ['created', 'updated'])
44
+ webhooks = Quaderno::Webhook.all
45
+ assert_kind_of Quaderno::Webhook, webhook
46
+ assert_equal webhooks.last.id, webhook.id
47
+ Quaderno::Webhook.delete webhook.id
48
+ end
49
+ end
50
+
51
+ should "create a webhook" do
52
+ VCR.use_cassette('new webhook') do
53
+ webhook = Quaderno::Webhook.create(url: 'http://quadernoapp.com', events: ['created', 'updated'])
54
+ assert_kind_of Quaderno::Webhook, webhook
55
+ assert_equal 'http://quadernoapp.com', webhook.url
56
+ assert_equal ['created', 'updated'], webhook.events
57
+ Quaderno::Webhook.delete webhook.id
58
+ end
59
+ end
60
+
61
+ should "update a webhook" do
62
+ VCR.use_cassette('updated webhook') do
63
+ Quaderno::Webhook.create(url: 'http://quadernoapp.com', events: ['created', 'updated'])
64
+ webhooks = Quaderno::Webhook.all
65
+ webhook = Quaderno::Webhook.update(webhooks.last.id, events: ['created', 'updated', 'deleted'])
66
+ assert_kind_of Quaderno::Webhook, webhook
67
+ assert_equal ['created', 'updated', 'deleted'], webhook.events
68
+ Quaderno::Webhook.delete webhook.id
69
+ end
70
+ end
71
+
72
+ should "delete a webhook" do
73
+ VCR.use_cassette('deleted webhook') do
74
+ webhook_1 = Quaderno::Webhook.create(url: 'http://google.com', events: ['created', 'updated'])
75
+ webhook_2 = Quaderno::Webhook.create(url: 'http://quadernoapp.com', events: ['created', 'updated'])
76
+ webhooks_before = Quaderno::Webhook.all
77
+ webhook_id = webhooks_before.last.id
78
+ Quaderno::Webhook.delete webhook_id
79
+ webhooks_after = Quaderno::Webhook.all
80
+ assert_not_equal webhooks_after.last.id, webhook_id
81
+ Quaderno::Webhook.delete webhooks_after.last.id
82
+ end
83
+ end
84
+
85
+ should "know the rate limit" do
86
+ VCR.use_cassette('rate limit') do
87
+ rate_limit_info = Quaderno::Base.rate_limit_info
88
+ assert_equal 1000, rate_limit_info[:limit]
89
+ assert_operator rate_limit_info[:remaining], :< ,1000
90
+ end
91
+ end
92
+ end
93
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quaderno
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-05-15 00:00:00.000000000 Z
12
+ date: 2013-05-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -155,6 +155,7 @@ files:
155
155
  - Rakefile
156
156
  - VERSION
157
157
  - build_install.sh
158
+ - changelog.md
158
159
  - lib/quaderno-ruby.rb
159
160
  - lib/quaderno-ruby/base.rb
160
161
  - lib/quaderno-ruby/behavior/crud.rb
@@ -168,19 +169,23 @@ files:
168
169
  - lib/quaderno-ruby/invoice.rb
169
170
  - lib/quaderno-ruby/item.rb
170
171
  - lib/quaderno-ruby/payment.rb
172
+ - lib/quaderno-ruby/webhook.rb
171
173
  - quaderno-1.0.0.gem
172
174
  - quaderno-1.1.0.gem
175
+ - quaderno-1.1.2.gem
173
176
  - quaderno.gemspec
174
177
  - test/fixtures/quaderno_cassettes/all_contacts.yml
175
178
  - test/fixtures/quaderno_cassettes/all_estimates.yml
176
179
  - test/fixtures/quaderno_cassettes/all_expenses.yml
177
180
  - test/fixtures/quaderno_cassettes/all_invoices.yml
178
181
  - test/fixtures/quaderno_cassettes/all_items.yml
182
+ - test/fixtures/quaderno_cassettes/all_webhooks.yml
179
183
  - test/fixtures/quaderno_cassettes/deleted_contact.yml
180
184
  - test/fixtures/quaderno_cassettes/deleted_estimate.yml
181
185
  - test/fixtures/quaderno_cassettes/deleted_expense.yml
182
186
  - test/fixtures/quaderno_cassettes/deleted_invoice.yml
183
187
  - test/fixtures/quaderno_cassettes/deleted_item.yml
188
+ - test/fixtures/quaderno_cassettes/deleted_webhook.yml
184
189
  - test/fixtures/quaderno_cassettes/delivered_estimate.yml
185
190
  - test/fixtures/quaderno_cassettes/delivered_invoice.yml
186
191
  - test/fixtures/quaderno_cassettes/found_contact.yml
@@ -188,11 +193,13 @@ files:
188
193
  - test/fixtures/quaderno_cassettes/found_expense.yml
189
194
  - test/fixtures/quaderno_cassettes/found_invoice.yml
190
195
  - test/fixtures/quaderno_cassettes/found_item.yml
196
+ - test/fixtures/quaderno_cassettes/found_webhook.yml
191
197
  - test/fixtures/quaderno_cassettes/new_contact.yml
192
198
  - test/fixtures/quaderno_cassettes/new_estimate.yml
193
199
  - test/fixtures/quaderno_cassettes/new_expense.yml
194
200
  - test/fixtures/quaderno_cassettes/new_invoice.yml
195
201
  - test/fixtures/quaderno_cassettes/new_item.yml
202
+ - test/fixtures/quaderno_cassettes/new_webhook.yml
196
203
  - test/fixtures/quaderno_cassettes/paid_expense.yml
197
204
  - test/fixtures/quaderno_cassettes/paid_invoice.yml
198
205
  - test/fixtures/quaderno_cassettes/rate_limit.yml
@@ -203,6 +210,7 @@ files:
203
210
  - test/fixtures/quaderno_cassettes/updated_expense.yml
204
211
  - test/fixtures/quaderno_cassettes/updated_invoice.yml
205
212
  - test/fixtures/quaderno_cassettes/updated_item.yml
213
+ - test/fixtures/quaderno_cassettes/updated_webhook.yml
206
214
  - test/helper.rb
207
215
  - test/test_quaderno-ruby.rb
208
216
  - test/unit/test_quaderno_contacts.rb
@@ -210,6 +218,7 @@ files:
210
218
  - test/unit/test_quaderno_expenses.rb
211
219
  - test/unit/test_quaderno_invoices.rb
212
220
  - test/unit/test_quaderno_items.rb
221
+ - test/unit/test_quaderno_webhooks.rb
213
222
  homepage: http://github.com/recrea/quaderno-ruby
214
223
  licenses:
215
224
  - MIT
@@ -225,7 +234,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
225
234
  version: '0'
226
235
  segments:
227
236
  - 0
228
- hash: -36264673171161153
237
+ hash: -1294635013615079259
229
238
  required_rubygems_version: !ruby/object:Gem::Requirement
230
239
  none: false
231
240
  requirements: