contextio 1.7.2 → 1.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rspec +1 -1
- data/CHANGES.md +7 -0
- data/contextio.gemspec +1 -1
- data/lib/contextio/message.rb +5 -7
- data/lib/contextio/version.rb +1 -1
- data/spec/integration/accounts_messages_spec.rb +0 -1
- data/spec/integration/folders_messages_spec.rb +0 -1
- data/spec/integration/source_sync_data_spec.rb +0 -1
- data/spec/unit/contextio/account_collection_spec.rb +0 -1
- data/spec/unit/contextio/account_spec.rb +0 -1
- data/spec/unit/contextio/api/association_helpers_spec.rb +0 -1
- data/spec/unit/contextio/api/resource_collection_spec.rb +0 -1
- data/spec/unit/contextio/api/resource_spec.rb +0 -1
- data/spec/unit/contextio/api/url_builder_spec.rb +0 -1
- data/spec/unit/contextio/api_spec.rb +0 -1
- data/spec/unit/contextio/connect_token_collection_spec.rb +0 -1
- data/spec/unit/contextio/connect_token_spec.rb +0 -1
- data/spec/unit/contextio/email_settings_spec.rb +0 -1
- data/spec/unit/contextio/message_spec.rb +15 -1
- data/spec/unit/contextio/oauth_provider_collection_spec.rb +0 -1
- data/spec/unit/contextio/oauth_provider_spec.rb +0 -1
- data/spec/unit/contextio/source_collection_spec.rb +0 -1
- data/spec/unit/contextio/source_spec.rb +0 -1
- data/spec/unit/contextio/version_spec.rb +0 -1
- data/spec/unit/contextio_spec.rb +0 -1
- metadata +10 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b32f055e0f268d765612afec4be7be53a54fc5ad
|
4
|
+
data.tar.gz: 390912492be73bbb511e294a98df94960229bcef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dd94f0e265873489075e589748592090e742fffd8d62aa726fed299664db7f582dd3d67d0b3672e4c94b17b0fc200f9e8e69006f50bbfe708e4542aaaebd486a
|
7
|
+
data.tar.gz: 1db5c5d5333c03942bf8919b9ab345ab95129644d383aa39b381a02e8fed2a9fabe13f5271951fb7ca7cf912e9c44ddfcf0cb5fd5cb0310d54a3679c456d5412
|
data/.rspec
CHANGED
@@ -1 +1 @@
|
|
1
|
-
--
|
1
|
+
--require spec_helper
|
data/CHANGES.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
# Changes
|
2
2
|
|
3
|
+
## 1.8.0
|
4
|
+
|
5
|
+
* loosened faraday dependency - Michael Bernstein
|
6
|
+
* Moved `ContextIO::Message#thread` from private to public, and also changed the
|
7
|
+
method to return json data instead of creating a `ContextIO::Thread` object. - Eric Pinzur
|
8
|
+
* Add 'references' to lazy_attributes in message.rb - Dylan Stamat
|
9
|
+
|
3
10
|
## 1.7.2
|
4
11
|
|
5
12
|
* Improve error handling for better trouble shooting. - Ben Hamill
|
data/contextio.gemspec
CHANGED
@@ -17,7 +17,7 @@ Gem::Specification.new do |gem|
|
|
17
17
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
18
18
|
gem.require_paths = ['lib']
|
19
19
|
|
20
|
-
gem.add_dependency 'faraday', '
|
20
|
+
gem.add_dependency 'faraday', ['>= 0.8.0', '< 0.10.0']
|
21
21
|
gem.add_dependency 'faraday_middleware', '~> 0.9.0'
|
22
22
|
gem.add_dependency 'simple_oauth', '~> 0.2.0'
|
23
23
|
|
data/lib/contextio/message.rb
CHANGED
@@ -15,7 +15,8 @@ class ContextIO
|
|
15
15
|
lazy_attributes :date, :folders, :addresses, :subject, :list_help,
|
16
16
|
:list_unsubscribe, :message_id, :email_message_id,
|
17
17
|
:gmail_message_id, :gmail_thread_id, :person_info,
|
18
|
-
:date_received, :date_indexed, :in_reply_to
|
18
|
+
:date_received, :date_indexed, :in_reply_to, :references
|
19
|
+
|
19
20
|
private :date_received, :date_indexed
|
20
21
|
|
21
22
|
def received_at
|
@@ -91,13 +92,10 @@ class ContextIO
|
|
91
92
|
api.request(:delete, resource_url)['success']
|
92
93
|
end
|
93
94
|
|
94
|
-
|
95
|
-
|
96
|
-
# The API doesn't return enough information to build a resource_url for this
|
97
|
-
# resource, or the resource_url its self, making this problematic. Marking
|
98
|
-
# this private until something is sorted on that front.
|
95
|
+
# Returns a list of all messages and a list of all email_message_ids in the same thread as this message.
|
96
|
+
# Note that it does not create a Thread object or a MessageCollection object in its current state.
|
99
97
|
def thread
|
100
|
-
|
98
|
+
api.request(:get, "#{resource_url}/thread")
|
101
99
|
end
|
102
100
|
end
|
103
101
|
end
|
data/lib/contextio/version.rb
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
require 'spec_helper'
|
2
1
|
require 'contextio/message'
|
3
2
|
|
4
3
|
describe ContextIO::Message do
|
@@ -36,4 +35,19 @@ describe ContextIO::Message do
|
|
36
35
|
subject.set_flags({:seen => true})
|
37
36
|
end
|
38
37
|
end
|
38
|
+
|
39
|
+
describe "#thread" do
|
40
|
+
before do
|
41
|
+
allow(api).to receive(:request).and_return({'email_message_ids' => [], 'person_info' => {}, 'messages' => []})
|
42
|
+
end
|
43
|
+
|
44
|
+
it "gets to the thread method api" do
|
45
|
+
expect(api).to receive(:request).with(
|
46
|
+
:get,
|
47
|
+
'resource/url/thread'
|
48
|
+
)
|
49
|
+
|
50
|
+
subject.thread
|
51
|
+
end
|
52
|
+
end
|
39
53
|
end
|
data/spec/unit/contextio_spec.rb
CHANGED
metadata
CHANGED
@@ -1,29 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: contextio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Hamill
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 0.8.0
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 0.10.0
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: 0.8.0
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 0.10.0
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: faraday_middleware
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|