nylas 0.18.1 → 0.18.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.
- 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: 32b516fe947f298e097580f9e9edc5ab16d30651
|
4
|
+
data.tar.gz: 3ecb7490c27847c24787d3b8a640577eb513cd02
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 19f891b316c4849cf7bf63f1023a5a7cd6e9a64364f8ba05b24742909aa2ef55e6655b3db00ca83e4f0f1dfc76376f84fe3fb6e6c56faff7ee37d5ec595b71b1
|
7
|
+
data.tar.gz: 12d7efed26adc4df3f8c27287ab443d7ff407499afbdc35d118f0a53d065a22a539686facb9c3e0b186f70d5d70e5c8f7d04570c569c9dbb688ffce3fb4f306d
|
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: nylas
|
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
|