inbox 0.18.1 → 0.18.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/api_thread.rb +1 -1
- data/lib/message.rb +3 -7
- data/lib/version.rb +1 -1
- metadata +2 -3
- data/lib/rfc2882.rb +0 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 52b398c61d8967ca093f406987ee2ac503e0f6d9
|
4
|
+
data.tar.gz: b011b0f946a01c69da854719ecf2802925c05c70
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f15355d979d26a67d9bcb06ef646cc0bb7c8009a071372edb68e6c096c652c35b8894f9d6ff70748f3ef3080743c5876633aad7021e0b12da1c3a2a9766c0966
|
7
|
+
data.tar.gz: 2cf44541f69383d2db41d55441c0fca1dadabee471b5017fc1ad44d7741af26a2fa4382e1b02a9e28b7f725bd54e0ea072cdf72824acb407a9974ffec79a3f8e
|
data/README.md
CHANGED
@@ -257,7 +257,7 @@ The `where` method accepts a hash of filters, as documented in the [Filters Docu
|
|
257
257
|
It's possible to access the unprocessed contents of a message using the raw method:
|
258
258
|
|
259
259
|
```ruby
|
260
|
-
raw_contents = message.raw
|
260
|
+
raw_contents = message.raw
|
261
261
|
```
|
262
262
|
|
263
263
|
|
@@ -445,7 +445,7 @@ If it's your first time updating the ruby gems, you may be prompted for the user
|
|
445
445
|
|
446
446
|
## OAuth self-test
|
447
447
|
|
448
|
-
Because it's very important that we don't break OAuth, we require releasers to run the OAuth self-test before releasing a version of the gem. The self-test is a small sinatra program which will ask you to click on a couple URLs. You need to make sure that following the URLs
|
448
|
+
Because it's very important that we don't break OAuth, we require releasers to run the OAuth self-test before releasing a version of the gem. The self-test is a small sinatra program which will ask you to click on a couple URLs. You need to make sure that following the URLs returns a working token.
|
449
449
|
|
450
450
|
To set up the program, you need to copy `tests/credentials.rb.templates` as `test/credentials.rb` and edit the `APP_ID` and `APP_SECRET` with a working Nylas API app id and secret. You also need to set up a `/callback` URL in the Nylas admin panel.
|
451
451
|
|
data/lib/api_thread.rb
CHANGED
data/lib/message.rb
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
require 'restful_model'
|
2
2
|
require 'file'
|
3
|
-
require 'rfc2882'
|
4
3
|
|
5
4
|
module Inbox
|
6
5
|
class Message < RestfulModel
|
@@ -36,7 +35,7 @@ module Inbox
|
|
36
35
|
end
|
37
36
|
|
38
37
|
if not folder.nil?
|
39
|
-
folder =
|
38
|
+
folder = Folder.new(@_api)
|
40
39
|
folder.inflate(@folder)
|
41
40
|
@folder = folder
|
42
41
|
end
|
@@ -75,12 +74,9 @@ module Inbox
|
|
75
74
|
def raw
|
76
75
|
model = nil
|
77
76
|
collection = RestfulModelCollection.new(Message, @_api, @namespace_id, {:message_id=>@id})
|
78
|
-
RestClient.get("#{collection.url}/#{id}/
|
79
|
-
|
80
|
-
model = Rfc2822.new(@_api)
|
81
|
-
model.inflate(json)
|
77
|
+
RestClient.get("#{collection.url}/#{id}/", :accept => 'message/rfc822'){ |response,request,result|
|
78
|
+
response
|
82
79
|
}
|
83
|
-
model
|
84
80
|
end
|
85
81
|
end
|
86
82
|
end
|
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: inbox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.18.
|
4
|
+
version: 0.18.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Gotow
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2015-08-
|
13
|
+
date: 2015-08-05 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rest-client
|
@@ -218,7 +218,6 @@ files:
|
|
218
218
|
- lib/parameters.rb
|
219
219
|
- lib/restful_model.rb
|
220
220
|
- lib/restful_model_collection.rb
|
221
|
-
- lib/rfc2882.rb
|
222
221
|
- lib/tag.rb
|
223
222
|
- lib/time_attr_accessor.rb
|
224
223
|
- lib/version.rb
|
data/lib/rfc2882.rb
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
require 'base64'
|
2
|
-
require 'restful_model'
|
3
|
-
|
4
|
-
module Inbox
|
5
|
-
class Rfc2822 < RestfulModel
|
6
|
-
|
7
|
-
parameter :rfc2822
|
8
|
-
|
9
|
-
def inflate(json)
|
10
|
-
super
|
11
|
-
# The 'rfc2822' attribute is a base64-encoded string. Decode it.
|
12
|
-
@rfc2822 = Base64.decode64(@rfc2822) if json.has_key?('rfc2822')
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|