quaderno 1.2.1 → 1.2.2

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.
Files changed (59) hide show
  1. data/Gemfile +6 -7
  2. data/Gemfile.lock +0 -9
  3. data/README.md +6 -2
  4. data/VERSION +1 -1
  5. data/build_install.sh +1 -1
  6. data/changelog.md +4 -0
  7. data/lib/quaderno-ruby/base.rb +10 -2
  8. data/lib/quaderno-ruby/behavior/crud.rb +0 -1
  9. data/lib/quaderno-ruby.rb +0 -2
  10. data/quaderno.gemspec +6 -25
  11. data/test/fixtures/quaderno_cassettes/all_contacts.yml +23 -18
  12. data/test/fixtures/quaderno_cassettes/all_estimates.yml +35 -18
  13. data/test/fixtures/quaderno_cassettes/all_expenses.yml +38 -18
  14. data/test/fixtures/quaderno_cassettes/all_invoices.yml +35 -29
  15. data/test/fixtures/quaderno_cassettes/all_items.yml +17 -12
  16. data/test/fixtures/quaderno_cassettes/all_webhooks.yml +84 -68
  17. data/test/fixtures/quaderno_cassettes/deleted_contact.yml +81 -62
  18. data/test/fixtures/quaderno_cassettes/deleted_estimate.yml +96 -62
  19. data/test/fixtures/quaderno_cassettes/deleted_expense.yml +99 -62
  20. data/test/fixtures/quaderno_cassettes/deleted_invoice.yml +96 -73
  21. data/test/fixtures/quaderno_cassettes/deleted_item.yml +49 -37
  22. data/test/fixtures/quaderno_cassettes/deleted_webhook.yml +100 -80
  23. data/test/fixtures/quaderno_cassettes/delivered_estimate.yml +66 -45
  24. data/test/fixtures/quaderno_cassettes/delivered_invoice.yml +66 -56
  25. data/test/fixtures/quaderno_cassettes/found_contact.yml +39 -30
  26. data/test/fixtures/quaderno_cassettes/found_estimate.yml +55 -32
  27. data/test/fixtures/quaderno_cassettes/found_expense.yml +62 -30
  28. data/test/fixtures/quaderno_cassettes/found_invoice.yml +58 -42
  29. data/test/fixtures/quaderno_cassettes/found_item.yml +33 -24
  30. data/test/fixtures/quaderno_cassettes/found_webhook.yml +50 -40
  31. data/test/fixtures/quaderno_cassettes/new_contact.yml +19 -12
  32. data/test/fixtures/quaderno_cassettes/new_estimate.yml +61 -44
  33. data/test/fixtures/quaderno_cassettes/new_expense.yml +99 -62
  34. data/test/fixtures/quaderno_cassettes/new_invoice.yml +61 -44
  35. data/test/fixtures/quaderno_cassettes/new_item.yml +19 -12
  36. data/test/fixtures/quaderno_cassettes/new_webhook.yml +34 -28
  37. data/test/fixtures/quaderno_cassettes/paid_expense.yml +57 -30
  38. data/test/fixtures/quaderno_cassettes/paid_invoice.yml +54 -41
  39. data/test/fixtures/quaderno_cassettes/rate_limit.yml +14 -10
  40. data/test/fixtures/quaderno_cassettes/unpay_an_expense.yml +73 -43
  41. data/test/fixtures/quaderno_cassettes/unpay_an_invoice.yml +70 -54
  42. data/test/fixtures/quaderno_cassettes/updated_contact.yml +42 -30
  43. data/test/fixtures/quaderno_cassettes/updated_estimate.yml +84 -57
  44. data/test/fixtures/quaderno_cassettes/updated_expense.yml +81 -56
  45. data/test/fixtures/quaderno_cassettes/updated_invoice.yml +84 -57
  46. data/test/fixtures/quaderno_cassettes/updated_item.yml +36 -24
  47. data/test/fixtures/quaderno_cassettes/updated_webhook.yml +69 -55
  48. data/test/helper.rb +12 -12
  49. data/test/unit/test_quaderno_contacts.rb +4 -3
  50. data/test/unit/test_quaderno_estimates.rb +2 -1
  51. data/test/unit/test_quaderno_expenses.rb +3 -2
  52. data/test/unit/test_quaderno_invoices.rb +3 -2
  53. data/test/unit/test_quaderno_items.rb +4 -3
  54. data/test/unit/test_quaderno_webhooks.rb +4 -3
  55. metadata +10 -94
  56. data/quaderno-1.0.0.gem +0 -0
  57. data/quaderno-1.1.0.gem +0 -0
  58. data/quaderno-1.1.2.gem +0 -0
  59. data/quaderno-1.2.0.gem +0 -0
@@ -2,80 +2,92 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: http://n8sDLUZ5z1d6dYXKixnx@localhost:3000/recrea/api/v1/items.json
5
+ uri: http://1spyno1mbqbp3SFpg9uT@localhost:3000/recrea/api/v1/items.json
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
9
9
  headers:
10
10
  authorization:
11
- - Basic bjhzRExVWjV6MWQ2ZFlYS2l4bng6
11
+ - Basic MXNweW5vMW1icWJwM1NGcGc5dVQ6
12
12
  response:
13
13
  status:
14
14
  code: 200
15
- message: OK
15
+ message: ! 'OK '
16
16
  headers:
17
17
  x-ratelimit-limit:
18
- - '1000'
18
+ - '2000'
19
19
  x-ratelimit-remaining:
20
- - '827'
20
+ - '1855'
21
21
  content-type:
22
22
  - application/json; charset=utf-8
23
23
  x-ua-compatible:
24
24
  - IE=Edge
25
25
  etag:
26
- - ! '"a55a5c75cee2f6b8eeca35cec8ed8fe8"'
26
+ - ! '"bcea0893565ac5c95d5dae6164a7cad8"'
27
27
  cache-control:
28
28
  - max-age=0, private, must-revalidate
29
29
  x-request-id:
30
- - f21eb3d72a6394732bef496afba7eb00
30
+ - 7d3de84684ae3582772412270cd60ad1
31
31
  x-runtime:
32
- - '0.141288'
32
+ - '0.381205'
33
+ server:
34
+ - WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20)
35
+ date:
36
+ - Tue, 04 Feb 2014 14:52:22 GMT
37
+ content-length:
38
+ - '451'
33
39
  connection:
34
40
  - close
35
- server:
36
- - thin 1.5.0 codename Knife
37
41
  body:
38
42
  encoding: US-ASCII
39
- string: ! '[{"id":4,"code":"00001","name":"Airdrone","unit_cost":"0.0","url":"http://localhost:3000/recrea/api/v1/items/4"},{"id":6,"code":"XXXXXXXX","name":"byAPI","unit_cost":"0.0","url":"http://localhost:3000/recrea/api/v1/items/6"},{"id":1,"code":"00001","name":"Test_OCP","unit_cost":"1.0","url":"http://localhost:3000/recrea/api/v1/items/1"},{"id":3,"code":"00001","name":"Test_OCP","unit_cost":"10.0","tax_1_name":"IVA","tax_1_rate":21.0,"tax_2_name":"IRPF","tax_2_rate":-9.0,"url":"http://localhost:3000/recrea/api/v1/items/3"},{"id":5,"code":"FF","name":"Test_OCP","unit_cost":"0.0","tax_1_name":"IVA","tax_1_rate":21.0,"tax_2_name":"IRPF","tax_2_rate":-21.0,"url":"http://localhost:3000/recrea/api/v1/items/5"},{"id":7,"code":"XXXXXXXX","name":"Test_OCP","unit_cost":"0.0","url":"http://localhost:3000/recrea/api/v1/items/7"},{"id":8,"code":"XXXXXXXX","name":"Test_OCP","unit_cost":"0.0","url":"http://localhost:3000/recrea/api/v1/items/8"},{"id":9,"code":"XXXXXXXX","name":"Test_OCP","unit_cost":"0.0","url":"http://localhost:3000/recrea/api/v1/items/9"},{"id":10,"code":"XXXXXXXX","name":"Test_OCP","unit_cost":"10.0","url":"http://localhost:3000/recrea/api/v1/items/10"},{"id":11,"code":"XXXXXXXX","name":"Test_OCP","unit_cost":"10.0","url":"http://localhost:3000/recrea/api/v1/items/11"},{"id":17,"code":"000000","name":"Test_Skynet","unit_cost":"21.0","url":"http://localhost:3000/recrea/api/v1/items/17"}]'
43
+ string: ! '[{"id":1,"code":"00001","name":"Fritata","unit_cost":"20.0","tax_1_name":"IVA","tax_1_rate":21.0,"url":"http://localhost:3000/recrea/api/v1/items/1"},{"id":3,"code":"NaN00","name":"Nan
44
+ Kima","unit_cost":"2.35","tax_1_name":"IVA","tax_1_rate":21.0,"url":"http://localhost:3000/recrea/api/v1/items/3"},{"id":2,"code":"000017","name":"Pizzata","unit_cost":"25.99","tax_1_name":"IVA","tax_1_rate":21.0,"url":"http://localhost:3000/recrea/api/v1/items/2"}]'
40
45
  http_version: '1.1'
41
- recorded_at: Tue, 14 May 2013 10:49:15 GMT
46
+ recorded_at: Tue, 04 Feb 2014 14:52:22 GMT
42
47
  - request:
43
48
  method: put
44
- uri: http://n8sDLUZ5z1d6dYXKixnx@localhost:3000/recrea/api/v1/items/1.json
49
+ uri: http://1spyno1mbqbp3SFpg9uT@localhost:3000/recrea/api/v1/items/2.json
45
50
  body:
46
51
  encoding: US-ASCII
47
52
  string: name=Test_OCP
48
53
  headers:
49
54
  authorization:
50
- - Basic bjhzRExVWjV6MWQ2ZFlYS2l4bng6
55
+ - Basic MXNweW5vMW1icWJwM1NGcGc5dVQ6
51
56
  response:
52
57
  status:
53
58
  code: 200
54
- message: OK
59
+ message: ! 'OK '
55
60
  headers:
56
61
  x-ratelimit-limit:
57
- - '1000'
62
+ - '2000'
58
63
  x-ratelimit-remaining:
59
- - '826'
64
+ - '1854'
60
65
  content-type:
61
66
  - application/json; charset=utf-8
62
67
  x-ua-compatible:
63
68
  - IE=Edge
64
69
  etag:
65
- - ! '"6df0b7ce66846edbad36a13a946d1e24"'
70
+ - ! '"fad25d508433bb4f2bc087d6a2a5545e"'
66
71
  cache-control:
67
72
  - max-age=0, private, must-revalidate
68
73
  x-request-id:
69
- - 0a28380e54a2b40858ca85cb7516856f
74
+ - faec2eb816556a17ef72fcd379d0a349
70
75
  x-runtime:
71
- - '0.090845'
76
+ - '0.139602'
77
+ server:
78
+ - WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20)
79
+ date:
80
+ - Tue, 04 Feb 2014 14:52:22 GMT
81
+ content-length:
82
+ - '151'
72
83
  connection:
73
84
  - close
74
- server:
75
- - thin 1.5.0 codename Knife
85
+ set-cookie:
86
+ - _quaderno_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRkkiJWNhMDczNWQ0ZWYwMWIwYjkwZDU2MjE2YmIxZmRmZDE1BjsAVA%3D%3D--442e44d3bc449fac8b51a8a6373e689bcf9554cf;
87
+ path=/; HttpOnly
76
88
  body:
77
89
  encoding: US-ASCII
78
- string: ! '{"id":1,"code":"00001","name":"Test_OCP","unit_cost":"1.0","url":"http://localhost:3000/recrea/api/v1/items/1"}'
90
+ string: ! '{"id":2,"code":"000017","name":"Test_OCP","unit_cost":"25.99","tax_1_name":"IVA","tax_1_rate":21.0,"url":"http://localhost:3000/recrea/api/v1/items/2"}'
79
91
  http_version: '1.1'
80
- recorded_at: Tue, 14 May 2013 10:49:15 GMT
92
+ recorded_at: Tue, 04 Feb 2014 14:52:22 GMT
81
93
  recorded_with: VCR 2.3.0
@@ -2,163 +2,177 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: http://n8sDLUZ5z1d6dYXKixnx@localhost:3000/recrea/api/v1/webhooks.json
5
+ uri: http://1spyno1mbqbp3SFpg9uT@localhost:3000/recrea/api/v1/webhooks.json
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: url=http%3A%2F%2Fquadernoapp.com&events[]=created&events[]=updated
9
9
  headers:
10
10
  authorization:
11
- - Basic bjhzRExVWjV6MWQ2ZFlYS2l4bng6
11
+ - Basic MXNweW5vMW1icWJwM1NGcGc5dVQ6
12
12
  response:
13
13
  status:
14
14
  code: 201
15
- message: Created
15
+ message: ! 'Created '
16
16
  headers:
17
17
  x-ratelimit-limit:
18
- - '1000'
18
+ - '2000'
19
19
  x-ratelimit-remaining:
20
- - '915'
20
+ - '1837'
21
21
  content-type:
22
22
  - application/json; charset=utf-8
23
23
  x-ua-compatible:
24
24
  - IE=Edge
25
25
  etag:
26
- - ! '"008068ffb852b442062708262d74cd49"'
26
+ - ! '"7e50a0eca73c3a508c4c842a765cc91d"'
27
27
  cache-control:
28
28
  - max-age=0, private, must-revalidate
29
- set-cookie:
30
- - _quaderno_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRkkiJWE4MzEzYzI1YjU3M2MwZmEyMThlOWFkYjUyYWY2ODgwBjsAVA%3D%3D--7ec0cb3dc0e6506c57834b8b9e7f83a53de5a854;
31
- path=/; HttpOnly
32
29
  x-request-id:
33
- - 42449cc21e8c5c59874779906fd95922
30
+ - 15ec241c0c2af6a9e4a2a628718c5cf9
34
31
  x-runtime:
35
- - '3.102622'
32
+ - '2.314031'
33
+ server:
34
+ - WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20)
35
+ date:
36
+ - Tue, 04 Feb 2014 14:53:37 GMT
37
+ content-length:
38
+ - '232'
36
39
  connection:
37
40
  - close
38
- server:
39
- - thin 1.5.0 codename Knife
41
+ set-cookie:
42
+ - _quaderno_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRkkiJTAyZDhmYzZjOWQ2N2M0ZmEyMDdkN2QxYzBmZTRlNTAxBjsAVA%3D%3D--a6107ef07ab1a67753855cee4cbe9de8774cef2d;
43
+ path=/; HttpOnly
40
44
  body:
41
45
  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"}'
46
+ string: ! '{"id":7,"url":"http://quadernoapp.com","auth_key":"3R6111PJWDSe-4poCP3HUg","events":["created","updated"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2014-02-04T14:53:37Z","updated_at":"2014-02-04T14:53:37Z"}'
43
47
  http_version: '1.1'
44
- recorded_at: Wed, 22 May 2013 13:03:28 GMT
48
+ recorded_at: Tue, 04 Feb 2014 14:53:37 GMT
45
49
  - request:
46
50
  method: get
47
- uri: http://n8sDLUZ5z1d6dYXKixnx@localhost:3000/recrea/api/v1/webhooks.json
51
+ uri: http://1spyno1mbqbp3SFpg9uT@localhost:3000/recrea/api/v1/webhooks.json
48
52
  body:
49
53
  encoding: US-ASCII
50
54
  string: ''
51
55
  headers:
52
56
  authorization:
53
- - Basic bjhzRExVWjV6MWQ2ZFlYS2l4bng6
57
+ - Basic MXNweW5vMW1icWJwM1NGcGc5dVQ6
54
58
  response:
55
59
  status:
56
60
  code: 200
57
- message: OK
61
+ message: ! 'OK '
58
62
  headers:
59
63
  x-ratelimit-limit:
60
- - '1000'
64
+ - '2000'
61
65
  x-ratelimit-remaining:
62
- - '914'
66
+ - '1836'
63
67
  content-type:
64
68
  - application/json; charset=utf-8
65
69
  x-ua-compatible:
66
70
  - IE=Edge
67
71
  etag:
68
- - ! '"72fe079f8ba20fd4775f781453396608"'
72
+ - ! '"9d99f68b2c5cea46cee072f1c3a4a086"'
69
73
  cache-control:
70
74
  - max-age=0, private, must-revalidate
71
75
  x-request-id:
72
- - e478d7f442c0cd28226581dc59b1acfb
76
+ - 6ee7d09f912fcf545aaf9f1ec0535ea2
73
77
  x-runtime:
74
- - '0.074554'
78
+ - '0.339448'
79
+ server:
80
+ - WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20)
81
+ date:
82
+ - Tue, 04 Feb 2014 14:53:37 GMT
83
+ content-length:
84
+ - '234'
75
85
  connection:
76
86
  - close
77
- server:
78
- - thin 1.5.0 codename Knife
79
87
  body:
80
88
  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"}]'
89
+ string: ! '[{"id":7,"url":"http://quadernoapp.com","auth_key":"3R6111PJWDSe-4poCP3HUg","events":["created","updated"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2014-02-04T14:53:37Z","updated_at":"2014-02-04T14:53:37Z"}]'
82
90
  http_version: '1.1'
83
- recorded_at: Wed, 22 May 2013 13:03:28 GMT
91
+ recorded_at: Tue, 04 Feb 2014 14:53:37 GMT
84
92
  - request:
85
93
  method: put
86
- uri: http://n8sDLUZ5z1d6dYXKixnx@localhost:3000/recrea/api/v1/webhooks/34.json
94
+ uri: http://1spyno1mbqbp3SFpg9uT@localhost:3000/recrea/api/v1/webhooks/7.json
87
95
  body:
88
96
  encoding: US-ASCII
89
97
  string: events[]=created&events[]=updated&events[]=deleted
90
98
  headers:
91
99
  authorization:
92
- - Basic bjhzRExVWjV6MWQ2ZFlYS2l4bng6
100
+ - Basic MXNweW5vMW1icWJwM1NGcGc5dVQ6
93
101
  response:
94
102
  status:
95
103
  code: 200
96
- message: OK
104
+ message: ! 'OK '
97
105
  headers:
98
106
  x-ratelimit-limit:
99
- - '1000'
107
+ - '2000'
100
108
  x-ratelimit-remaining:
101
- - '913'
109
+ - '1835'
102
110
  content-type:
103
111
  - application/json; charset=utf-8
104
112
  x-ua-compatible:
105
113
  - IE=Edge
106
114
  etag:
107
- - ! '"8ea06846c289a08c721d4fee2668512f"'
115
+ - ! '"96120f681b3f4d674e9ed3d4d2415326"'
108
116
  cache-control:
109
117
  - max-age=0, private, must-revalidate
110
- set-cookie:
111
- - _quaderno_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRkkiJTczYzIzZTVlNDBkNWViZGZjZDk4ZWZmODU0NTg2ZjViBjsAVA%3D%3D--506c6a7a832476913fc650fc50c471056c076de1;
112
- path=/; HttpOnly
113
118
  x-request-id:
114
- - 0d6de0e6332b7d19301c984b707d6be9
119
+ - 6f6a25cf6aa5410df32ebd8a43226d5e
115
120
  x-runtime:
116
- - '2.304703'
121
+ - '2.094574'
122
+ server:
123
+ - WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20)
124
+ date:
125
+ - Tue, 04 Feb 2014 14:53:39 GMT
126
+ content-length:
127
+ - '242'
117
128
  connection:
118
129
  - close
119
- server:
120
- - thin 1.5.0 codename Knife
130
+ set-cookie:
131
+ - _quaderno_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRkkiJTA3N2NkMjRiYzdiMGNhNGEzZDY4NTgyNjMxZmMyY2Y1BjsAVA%3D%3D--06e5b338d9e80848dc18a9eb4ac0e2e83a453ceb;
132
+ path=/; HttpOnly
121
133
  body:
122
134
  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"}'
135
+ string: ! '{"id":7,"url":"http://quadernoapp.com","auth_key":"3R6111PJWDSe-4poCP3HUg","events":["created","updated","deleted"],"last_sent_at":null,"last_error":null,"events_sent":0,"created_at":"2014-02-04T14:53:37Z","updated_at":"2014-02-04T14:53:39Z"}'
124
136
  http_version: '1.1'
125
- recorded_at: Wed, 22 May 2013 13:03:30 GMT
137
+ recorded_at: Tue, 04 Feb 2014 14:53:39 GMT
126
138
  - request:
127
139
  method: delete
128
- uri: http://n8sDLUZ5z1d6dYXKixnx@localhost:3000/recrea/api/v1/webhooks/34.json
140
+ uri: http://1spyno1mbqbp3SFpg9uT@localhost:3000/recrea/api/v1/webhooks/7.json
129
141
  body:
130
142
  encoding: US-ASCII
131
143
  string: ''
132
144
  headers:
133
145
  authorization:
134
- - Basic bjhzRExVWjV6MWQ2ZFlYS2l4bng6
146
+ - Basic MXNweW5vMW1icWJwM1NGcGc5dVQ6
135
147
  response:
136
148
  status:
137
149
  code: 204
138
- message: No Content
150
+ message: ! 'No Content '
139
151
  headers:
140
152
  x-ratelimit-limit:
141
- - '1000'
153
+ - '2000'
142
154
  x-ratelimit-remaining:
143
- - '912'
155
+ - '1834'
144
156
  x-ua-compatible:
145
157
  - IE=Edge
146
158
  cache-control:
147
159
  - no-cache
148
- set-cookie:
149
- - _quaderno_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRkkiJTRkNDZlZjVhMDUyNzU2OGMwYWU3MjE1MmFlZDhkZjY4BjsAVA%3D%3D--4bf40e81e810643c750f521be437f3a3487741d6;
150
- path=/; HttpOnly
151
160
  x-request-id:
152
- - 5c9e8c698eba0e98c39b4b8bdc8acde0
161
+ - 3620607b91bbc7d67072e8c97f8a7de8
153
162
  x-runtime:
154
- - '0.057724'
163
+ - '0.346585'
164
+ server:
165
+ - WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20)
166
+ date:
167
+ - Tue, 04 Feb 2014 14:53:40 GMT
155
168
  connection:
156
169
  - close
157
- server:
158
- - thin 1.5.0 codename Knife
170
+ set-cookie:
171
+ - _quaderno_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRkkiJTA4MDZmOTYwMjhmMTMzZTI2ZWY3NGY0YjhiM2FhYWZmBjsAVA%3D%3D--0738ff8612e7e7ee369998c721b71a4fd37a9f3c;
172
+ path=/; HttpOnly
159
173
  body:
160
174
  encoding: US-ASCII
161
175
  string: ''
162
176
  http_version: '1.1'
163
- recorded_at: Wed, 22 May 2013 13:03:30 GMT
177
+ recorded_at: Tue, 04 Feb 2014 14:53:40 GMT
164
178
  recorded_with: VCR 2.3.0
data/test/helper.rb CHANGED
@@ -1,27 +1,27 @@
1
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
3
+
1
4
  require 'rubygems'
2
5
  require 'bundler'
3
- require 'ruby-debug'
4
- require 'vcr'
5
-
6
- VCR.configure do |c|
7
- c.cassette_library_dir = 'test/fixtures/quaderno_cassettes'
8
- c.ignore_localhost = false
9
- c.hook_into :fakeweb
10
- end
11
6
 
12
7
  begin
13
- Bundler.setup(:default, :development)
8
+ Bundler.setup(:default, :test)
14
9
  rescue Bundler::BundlerError => e
15
10
  $stderr.puts e.message
16
11
  $stderr.puts "Run `bundle install` to install missing gems"
17
12
  exit e.status_code
18
13
  end
14
+
15
+ require 'vcr'
19
16
  require 'test/unit'
20
17
  require 'shoulda'
21
-
22
- $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
23
- $LOAD_PATH.unshift(File.dirname(__FILE__))
24
18
  require 'quaderno-ruby'
25
19
 
20
+ VCR.configure do |c|
21
+ c.cassette_library_dir = 'test/fixtures/quaderno_cassettes'
22
+ c.ignore_localhost = false
23
+ c.hook_into :fakeweb
24
+ end
25
+
26
26
  class Test::Unit::TestCase
27
27
  end
@@ -5,8 +5,9 @@ class TestQuadernoContact < Test::Unit::TestCase
5
5
 
6
6
  setup do
7
7
  Quaderno::Base.configure do |config|
8
- config.auth_token = 'n8sDLUZ5z1d6dYXKixnx'
8
+ config.auth_token = '1spyno1mbqbp3SFpg9uT'
9
9
  config.subdomain = 'recrea'
10
+ config.debug = true
10
11
  end
11
12
  end
12
13
 
@@ -79,8 +80,8 @@ class TestQuadernoContact < Test::Unit::TestCase
79
80
  should "know the rate limit" do
80
81
  VCR.use_cassette('rate limit') do
81
82
  rate_limit_info = Quaderno::Base.rate_limit_info
82
- assert_equal 1000, rate_limit_info[:limit]
83
- assert_operator rate_limit_info[:remaining], :< ,1000
83
+ assert_equal 2000, rate_limit_info[:limit]
84
+ assert_operator rate_limit_info[:remaining], :< ,2000
84
85
  end
85
86
  end
86
87
  end
@@ -5,8 +5,9 @@ class TestQuadernoEstimate < Test::Unit::TestCase
5
5
 
6
6
  setup do
7
7
  Quaderno::Base.configure do |config|
8
- config.auth_token = 'n8sDLUZ5z1d6dYXKixnx'
8
+ config.auth_token = '1spyno1mbqbp3SFpg9uT'
9
9
  config.subdomain = 'recrea'
10
+ config.debug = true
10
11
  end
11
12
  end
12
13
 
@@ -5,8 +5,9 @@ class TestQuadernoExpense < Test::Unit::TestCase
5
5
 
6
6
  setup do
7
7
  Quaderno::Base.configure do |config|
8
- config.auth_token = 'n8sDLUZ5z1d6dYXKixnx'
8
+ config.auth_token = '1spyno1mbqbp3SFpg9uT'
9
9
  config.subdomain = 'recrea'
10
+ config.debug = true
10
11
  end
11
12
  end
12
13
 
@@ -115,7 +116,7 @@ class TestQuadernoExpense < Test::Unit::TestCase
115
116
  payment = expenses.first.add_payment(payment_method: "cash", amount: "10000")
116
117
  assert_kind_of Quaderno::Payment, payment
117
118
  assert_equal "cash", payment.payment_method
118
- assert_equal "10,000.00", payment.amount[1..-1]
119
+ assert_equal "10,000.00", payment.amount[0..payment.amount.length - 3]
119
120
  assert_equal expenses.first.payments.last.id, payment.id
120
121
  end
121
122
  end
@@ -5,8 +5,9 @@ class TestQuadernoInvoice < Test::Unit::TestCase
5
5
 
6
6
  setup do
7
7
  Quaderno::Base.configure do |config|
8
- config.auth_token = 'n8sDLUZ5z1d6dYXKixnx'
8
+ config.auth_token = '1spyno1mbqbp3SFpg9uT'
9
9
  config.subdomain = 'recrea'
10
+ config.debug = true
10
11
  end
11
12
  end
12
13
 
@@ -130,7 +131,7 @@ class TestQuadernoInvoice < Test::Unit::TestCase
130
131
  payment = invoices.first.add_payment(payment_method: "cash", amount: "100000000")
131
132
  assert_kind_of Quaderno::Payment, payment
132
133
  assert_equal "cash", payment.payment_method
133
- assert_equal "100,000,000.00", payment.amount[1..-1]
134
+ assert_equal "100,000,000.00", payment.amount[0..payment.amount.length - 3]
134
135
  assert_equal invoices.first.payments.last.id, payment.id
135
136
  end
136
137
  end
@@ -5,8 +5,9 @@ class TestQuadernoItem < Test::Unit::TestCase
5
5
 
6
6
  setup do
7
7
  Quaderno::Base.configure do |config|
8
- config.auth_token = 'n8sDLUZ5z1d6dYXKixnx'
8
+ config.auth_token = '1spyno1mbqbp3SFpg9uT'
9
9
  config.subdomain = 'recrea'
10
+ config.debug = true
10
11
  end
11
12
  end
12
13
 
@@ -74,8 +75,8 @@ class TestQuadernoItem < Test::Unit::TestCase
74
75
  should "know the rate limit" do
75
76
  VCR.use_cassette('rate limit') do
76
77
  rate_limit_info = Quaderno::Base.rate_limit_info
77
- assert_equal 1000, rate_limit_info[:limit]
78
- assert_operator rate_limit_info[:remaining], :< ,1000
78
+ assert_equal 2000, rate_limit_info[:limit]
79
+ assert_operator rate_limit_info[:remaining], :< ,2000
79
80
  end
80
81
  end
81
82
  end
@@ -5,8 +5,9 @@ class TestQuadernoWebhook < Test::Unit::TestCase
5
5
 
6
6
  setup do
7
7
  Quaderno::Base.configure do |config|
8
- config.auth_token = 'n8sDLUZ5z1d6dYXKixnx'
8
+ config.auth_token = '1spyno1mbqbp3SFpg9uT'
9
9
  config.subdomain = 'recrea'
10
+ config.debug = true
10
11
  end
11
12
  end
12
13
 
@@ -85,8 +86,8 @@ class TestQuadernoWebhook < Test::Unit::TestCase
85
86
  should "know the rate limit" do
86
87
  VCR.use_cassette('rate limit') do
87
88
  rate_limit_info = Quaderno::Base.rate_limit_info
88
- assert_equal 1000, rate_limit_info[:limit]
89
- assert_operator rate_limit_info[:remaining], :< ,1000
89
+ assert_equal 2000, rate_limit_info[:limit]
90
+ assert_operator rate_limit_info[:remaining], :< ,2000
90
91
  end
91
92
  end
92
93
  end