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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ee262c3eb5ba95fb430a2a2e0fc0e7398ea8d844
4
- data.tar.gz: c9b4024b14a87f608fb61412b6a5d7dbd8e15ddf
3
+ metadata.gz: b32f055e0f268d765612afec4be7be53a54fc5ad
4
+ data.tar.gz: 390912492be73bbb511e294a98df94960229bcef
5
5
  SHA512:
6
- metadata.gz: df4b5035d406a74a45a2e4dd6a4485df9c8a5cb005c068529f148d554b08fd862dfc4e76d0897e0ca6f8c623479515a380cfae7fbd7414c6ffab60fdf35b3d34
7
- data.tar.gz: ffd3c8568ca1d75d25492c2cd9435956add7538514c53c2f10d1a9abfe6332ee24a658b17a47703d07747d564390d1379275c9fc7dbdde2a7efd250d1372b1b5
6
+ metadata.gz: dd94f0e265873489075e589748592090e742fffd8d62aa726fed299664db7f582dd3d67d0b3672e4c94b17b0fc200f9e8e69006f50bbfe708e4542aaaebd486a
7
+ data.tar.gz: 1db5c5d5333c03942bf8919b9ab345ab95129644d383aa39b381a02e8fed2a9fabe13f5271951fb7ca7cf912e9c44ddfcf0cb5fd5cb0310d54a3679c456d5412
data/.rspec CHANGED
@@ -1 +1 @@
1
- --format progress
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
@@ -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', '~> 0.8.0'
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
 
@@ -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
- private
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
- ContextIO::Thread.new(api, api.request(:get, "#{resource_url}/thread").merge(account: account))
98
+ api.request(:get, "#{resource_url}/thread")
101
99
  end
102
100
  end
103
101
  end
@@ -1,6 +1,6 @@
1
1
  class ContextIO
2
2
  # @private
3
- VERSION = "1.7.2"
3
+ VERSION = "1.8.0"
4
4
 
5
5
  # The gem version.
6
6
  #
@@ -1,4 +1,3 @@
1
- require 'spec_helper'
2
1
  require 'contextio'
3
2
 
4
3
  describe "A Message created from an Account" do
@@ -1,4 +1,3 @@
1
- require 'spec_helper'
2
1
  require 'contextio'
3
2
 
4
3
  describe "A MessageCollection created from a Folder" do
@@ -1,4 +1,3 @@
1
- require 'spec_helper'
2
1
  require 'contextio'
3
2
 
4
3
  describe "Syncing data for a source" do
@@ -1,4 +1,3 @@
1
- require 'spec_helper'
2
1
  require 'contextio/account_collection'
3
2
 
4
3
  describe ContextIO::AccountCollection do
@@ -1,4 +1,3 @@
1
- require 'spec_helper'
2
1
  require 'contextio/account'
3
2
 
4
3
  describe ContextIO::Account do
@@ -1,4 +1,3 @@
1
- require 'spec_helper'
2
1
  require 'contextio/api/association_helpers'
3
2
 
4
3
  describe "ContextIO::API::AssociationHelpers" do
@@ -1,4 +1,3 @@
1
- require 'spec_helper'
2
1
  require 'contextio/api/resource_collection'
3
2
 
4
3
  class SingularHelper
@@ -1,4 +1,3 @@
1
- require 'spec_helper'
2
1
  require 'contextio/api/resource'
3
2
 
4
3
  class ResourceCollection
@@ -1,4 +1,3 @@
1
- require 'spec_helper'
2
1
  require 'contextio/api/url_builder'
3
2
 
4
3
  describe ContextIO::API::URLBuilder do
@@ -1,4 +1,3 @@
1
- require 'spec_helper'
2
1
  require 'contextio/api'
3
2
 
4
3
  describe ContextIO::API do
@@ -1,4 +1,3 @@
1
- require 'spec_helper'
2
1
  require 'contextio/connect_token_collection'
3
2
 
4
3
  describe ContextIO::ConnectTokenCollection do
@@ -1,4 +1,3 @@
1
- require 'spec_helper'
2
1
  require 'contextio/connect_token'
3
2
 
4
3
  describe ContextIO::ConnectToken do
@@ -1,4 +1,3 @@
1
- require 'spec_helper'
2
1
  require 'contextio/email_settings'
3
2
 
4
3
  describe ContextIO::EmailSettings do
@@ -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
@@ -1,4 +1,3 @@
1
- require 'spec_helper'
2
1
  require 'contextio/oauth_provider_collection'
3
2
 
4
3
  describe ContextIO::OAuthProviderCollection do
@@ -1,4 +1,3 @@
1
- require 'spec_helper'
2
1
  require 'contextio/oauth_provider'
3
2
 
4
3
  describe ContextIO::OAuthProvider do
@@ -1,4 +1,3 @@
1
- require 'spec_helper'
2
1
  require 'contextio/source_collection'
3
2
 
4
3
  describe ContextIO::SourceCollection do
@@ -1,4 +1,3 @@
1
- require 'spec_helper'
2
1
  require 'contextio/source'
3
2
 
4
3
  describe ContextIO::Source do
@@ -1,4 +1,3 @@
1
- require 'spec_helper'
2
1
  require 'contextio/version'
3
2
 
4
3
  describe ContextIO do
@@ -1,4 +1,3 @@
1
- require 'spec_helper'
2
1
  require 'contextio'
3
2
 
4
3
  describe ContextIO do
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.7.2
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: 2014-04-17 00:00:00.000000000 Z
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