tent-client 0.0.1 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +7 -0
  2. data/.travis.yml +1 -3
  3. data/Gemfile +1 -1
  4. data/LICENSE +27 -0
  5. data/README.md +8 -19
  6. data/lib/tent-client.rb +111 -51
  7. data/lib/tent-client/attachment.rb +13 -0
  8. data/lib/tent-client/cycle_http.rb +124 -14
  9. data/lib/tent-client/discovery.rb +59 -27
  10. data/lib/tent-client/faraday/chunked_adapter.rb +100 -0
  11. data/lib/tent-client/faraday/utils.rb +10 -0
  12. data/lib/tent-client/link_header.rb +5 -0
  13. data/lib/tent-client/middleware/authentication.rb +103 -0
  14. data/lib/tent-client/middleware/content_type_header.rb +24 -0
  15. data/lib/tent-client/middleware/encode_json.rb +5 -6
  16. data/lib/tent-client/multipart-post/parts.rb +100 -0
  17. data/lib/tent-client/post.rb +99 -38
  18. data/lib/tent-client/tent_type.rb +77 -0
  19. data/lib/tent-client/version.rb +1 -1
  20. data/spec/cycle_http_spec.rb +213 -0
  21. data/spec/discovery_spec.rb +114 -0
  22. data/spec/{unit/link_header_spec.rb → link_header_spec.rb} +10 -8
  23. data/spec/spec_helper.rb +7 -3
  24. data/spec/support/discovery_link_behaviour.rb +31 -0
  25. data/spec/timestamp_skew_spec.rb +126 -0
  26. data/tent-client.gemspec +11 -6
  27. metadata +75 -91
  28. data/.rspec +0 -1
  29. data/Guardfile +0 -6
  30. data/LICENSE.txt +0 -22
  31. data/lib/tent-client/app.rb +0 -33
  32. data/lib/tent-client/app_authorization.rb +0 -21
  33. data/lib/tent-client/follower.rb +0 -37
  34. data/lib/tent-client/following.rb +0 -31
  35. data/lib/tent-client/group.rb +0 -19
  36. data/lib/tent-client/middleware/accept_header.rb +0 -14
  37. data/lib/tent-client/middleware/mac_auth.rb +0 -50
  38. data/lib/tent-client/post_attachment.rb +0 -11
  39. data/lib/tent-client/profile.rb +0 -17
  40. data/spec/unit/cycle_http_spec.rb +0 -84
  41. data/spec/unit/discovery_spec.rb +0 -46
  42. data/spec/unit/middleware/mac_auth_spec.rb +0 -68
@@ -0,0 +1,114 @@
1
+ require 'spec_helper'
2
+ require 'tent-client/discovery'
3
+
4
+ require 'support/discovery_link_behaviour'
5
+
6
+ describe TentClient::Discovery do
7
+ let(:entity_uri) { "http://tent.example.org/xfapc" }
8
+ let(:server_host) { "http://tent.example.org" }
9
+ let(:server_url) { "#{server_host}/xfapc" }
10
+ let(:server_meta_post_url) { "/xfapc/posts/29834719346" }
11
+ let(:link_header) {
12
+ %(<#{server_meta_post_url}>; rel="%s") % described_class::META_POST_REL
13
+ }
14
+ let(:link_html) {
15
+ %(<html><head><link href="#{server_meta_post_url}" rel="%s" /></head></html>) % described_class::META_POST_REL
16
+ }
17
+ let(:meta_post) {
18
+ {
19
+ "content" => {
20
+ "entity" => entity_uri,
21
+ "previous_entities" => [],
22
+ "servers" => [
23
+ {
24
+ "version" => "0.3",
25
+ "urls" => {
26
+ "oauth_auth" => "#{server_url}/oauth/authorize",
27
+ "oauth_token" => "#{server_url}/oauth/token",
28
+ "posts_feed" => "#{server_url}/posts",
29
+ "new_post" => "#{server_url}/posts",
30
+ "post" => "#{server_url}/posts/{entity}/{post}",
31
+ "post_attachment" => "#{server_url}/posts/{entity}/{post}/attachments/{name}?version={version}",
32
+ "batch" => "#{server_url}/batch",
33
+ "server_info" => "#{server_url}/server"
34
+ },
35
+ "preference" => 0
36
+ }
37
+ ]
38
+ }
39
+ }
40
+ }
41
+ let(:client) { TentClient.new(entity_uri) }
42
+ let(:instance) { described_class.new(client, entity_uri) }
43
+
44
+ describe ".discover" do
45
+ it "performs discovery" do
46
+ described_class.any_instance.expects(:discover)
47
+ described_class.discover(client, entity_uri)
48
+ end
49
+ end
50
+
51
+ describe "#discover" do
52
+ context "when multiple links" do
53
+ let(:env) { { :url => URI(entity_uri) } }
54
+ let(:res) {
55
+ stub(:env => env)
56
+ }
57
+ before do
58
+ instance.expects(:perform_head_discovery).returns([res, [
59
+ "http://foo.example.com", server_meta_post_url
60
+ ]])
61
+
62
+ stub_request(:any, "http://foo.example.com").to_return(:status => 404)
63
+ end
64
+
65
+ it_behaves_like "a valid discovery link"
66
+ end
67
+
68
+ context "when valid link header" do
69
+ before do
70
+ stub_request(:head, entity_uri).to_return(:headers => { 'Link' => link_header })
71
+ end
72
+
73
+ it_behaves_like "a valid discovery link"
74
+ end
75
+
76
+ context "when invalid link header" do
77
+ before do
78
+ stub_request(:head, entity_uri).to_return(:headers => { 'Link' => link_header })
79
+ end
80
+
81
+ it_behaves_like "a invalid discovery link"
82
+ end
83
+
84
+ context "when no link header" do
85
+ before do
86
+ stub_request(:head, entity_uri).to_return(:headers => { 'Link' => "" })
87
+ end
88
+
89
+ context "when valid link tag" do
90
+ before do
91
+ stub_request(:get, entity_uri).to_return(:body => link_html, :headers => { 'Content-Type' => 'text/html' })
92
+ end
93
+
94
+ it_behaves_like "a valid discovery link"
95
+ end
96
+
97
+ context "when no link tag" do
98
+ before do
99
+ stub_request(:get, entity_uri).to_return(:body => "<html></html>", :headers => { 'Content-Type' => 'text/html' })
100
+ end
101
+
102
+ it_behaves_like "a invalid discovery link"
103
+ end
104
+
105
+ context "when invalid link tag" do
106
+ before do
107
+ stub_request(:get, entity_uri).to_return(:body => link_html, :headers => { 'Content-Type' => 'text/html' })
108
+ end
109
+
110
+ it_behaves_like "a invalid discovery link"
111
+ end
112
+ end
113
+ end
114
+ end
@@ -1,24 +1,26 @@
1
1
  require 'spec_helper'
2
+ require 'tent-client/link_header'
2
3
 
3
4
  describe TentClient::LinkHeader do
4
5
  def new_link(link, attrs={})
5
6
  TentClient::LinkHeader::Link.new(link, attrs)
6
7
  end
7
- it 'should parse a simple link' do
8
+
9
+ it 'parses a simple link' do
8
10
  link_header = %Q(<http://example.com/TheBook/chapter2>; rel="previous";\n title="previous chapter")
9
11
  expected_link = new_link('http://example.com/TheBook/chapter2', :rel => 'previous', :title => 'previous chapter')
10
- described_class.parse(link_header).links.first.should eq(expected_link)
12
+ expect(described_class.parse(link_header).links.first).to eq(expected_link)
11
13
  end
12
14
 
13
- it 'should ignore utf-8 attributes' do
15
+ it 'ignores utf-8 attributes' do
14
16
  link_header = %Q(</TheBook/chapter2>;\n rel="previous"; title*=UTF-8'de'letztes%20Kapitel,\n </TheBook/chapter4>;\n rel="next"; title*=UTF-8'de'n%c3%a4chstes%20Kapitel)
15
17
  expected_links = [new_link('/TheBook/chapter2', :rel => 'previous'), new_link('/TheBook/chapter4', :rel => 'next')]
16
- described_class.parse(link_header).links.should eq(expected_links)
18
+ expect(described_class.parse(link_header).links).to eq(expected_links)
17
19
  end
18
20
 
19
- it 'should convert a link header to a string' do
20
- expected_header = %Q(<https://example.com/tent/profile>; rel="profile"; type="application/vnd.tent.profile+json")
21
- link = new_link('https://example.com/tent/profile', :rel => 'profile', :type => 'application/vnd.tent.profile+json')
22
- described_class.new(link).to_s.should eq(expected_header)
21
+ it 'converts a link header to a string' do
22
+ expected_header = %Q(<https://example.com/tent/profile>; rel="profile"; type="application/vnd.example.something+json")
23
+ link = new_link('https://example.com/tent/profile', :rel => 'profile', :type => 'application/vnd.example.something+json')
24
+ expect(described_class.new(link).to_s).to eq(expected_header)
23
25
  end
24
26
  end
@@ -2,12 +2,16 @@ $LOAD_PATH.unshift(File.dirname(__FILE__))
2
2
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
3
3
 
4
4
  require 'bundler/setup'
5
- require 'mocha_standalone'
5
+ require 'mocha/api'
6
+ require 'webmock/rspec'
7
+
6
8
  require 'tent-client'
7
- require 'oj'
8
9
 
9
- Dir["#{File.dirname(__FILE__)}/support/*.rb"].each { |f| require f }
10
+ ENV['RACK_ENV'] ||= 'test'
10
11
 
11
12
  RSpec.configure do |config|
12
13
  config.mock_with :mocha
14
+ config.expect_with :rspec do |c|
15
+ c.syntax = :expect
16
+ end
13
17
  end
@@ -0,0 +1,31 @@
1
+ shared_examples "a valid discovery link" do
2
+ before do
3
+ stub_request(:any, server_host + server_meta_post_url).to_return(
4
+ :status => 200,
5
+ :headers => {
6
+ 'Content-Type' => 'application/json'
7
+ },
8
+ :body => Yajl::Encoder.encode({"post" => meta_post })
9
+ )
10
+ end
11
+
12
+ it "returns meta post" do
13
+ expect(instance.discover).to eql(meta_post)
14
+ end
15
+ end
16
+
17
+ shared_examples "a invalid discovery link" do
18
+ before do
19
+ stub_request(:any, server_host + server_meta_post_url).to_return(
20
+ :status => 404,
21
+ :headers => {
22
+ 'Content-Type' => 'application/json'
23
+ },
24
+ :body => %({"error":"Not Found"})
25
+ )
26
+ end
27
+
28
+ it "returns nil" do
29
+ expect(instance.discover).to eql(nil)
30
+ end
31
+ end
@@ -0,0 +1,126 @@
1
+ require 'spec_helper'
2
+ require 'tent-client'
3
+ require 'hawk'
4
+
5
+ describe TentClient do
6
+ # - make request
7
+ # - return valid skew header
8
+ # - validate that request is retried with skew
9
+ # - validate that subsequent requests are with new skew
10
+ #
11
+ # - make request
12
+ # - return invalid skew header
13
+ # - validate that request is not retried
14
+ # - validate that subsequent requests use the original skew (0)
15
+
16
+ def translate_credentials(credentials)
17
+ _credentials = {}
18
+ _credentials[:id] = credentials[:id]
19
+ _credentials[:key] = credentials[:hawk_key]
20
+ _credentials[:algorithm] = credentials[:hawk_algorithm]
21
+ _credentials
22
+ end
23
+
24
+ let(:credentials) {
25
+ {
26
+ :id => '123456',
27
+ :hawk_key => '2983d45yun89q',
28
+ :hawk_algorithm => 'sha256'
29
+ }
30
+ }
31
+
32
+ let(:skew) { 160 }
33
+
34
+ let(:timestamp) { Time.now.to_i + skew } # future time
35
+
36
+ let(:client) {
37
+ TentClient.new(nil, :credentials => credentials)
38
+ }
39
+
40
+ let(:http_stubs) { [] }
41
+
42
+ context "valid skew header" do
43
+ let(:tsm_header) {
44
+ Hawk::Server.build_tsm_header(
45
+ :ts => timestamp,
46
+ :credentials => translate_credentials(credentials)
47
+ )
48
+ }
49
+
50
+ it "retries request with calculated timestamp skew" do
51
+ http_stubs << stub_request(:get, "http://example.com").with { |request|
52
+ request.headers['Authorization'] =~ %r{ts="#{timestamp - skew}"}
53
+ }.to_return(
54
+ :status => 401,
55
+ :headers => {
56
+ 'WWW-Authenticate' => tsm_header
57
+ }
58
+ )
59
+
60
+ http_stubs << stub_request(:get, "http://example.com").with { |request|
61
+ request.headers['Authorization'] =~ %r{ts="#{timestamp}"}
62
+ }.to_return(
63
+ :status => 200
64
+ )
65
+
66
+ res = client.http.send(:get, "http://example.com")
67
+
68
+ http_stubs.each do |stub|
69
+ expect(stub).to have_been_requested
70
+ end
71
+
72
+ expect(res.status).to eql(200)
73
+ end
74
+
75
+ context "when retry is disabled" do
76
+ let(:client) {
77
+ TentClient.new(nil, :credentials => credentials, :ts_skew_retry_enabled => false)
78
+ }
79
+
80
+ it "calculates skew" do
81
+ http_stubs << stub_request(:get, "http://example.com").with { |request|
82
+ request.headers['Authorization'] =~ %r{ts="#{timestamp - skew}"}
83
+ }.to_return(
84
+ :status => 401,
85
+ :headers => {
86
+ 'WWW-Authenticate' => tsm_header
87
+ }
88
+ )
89
+
90
+ res = client.http.send(:get, "http://example.com")
91
+
92
+ http_stubs.each do |stub|
93
+ expect(stub).to have_been_requested
94
+ end
95
+
96
+ expect(res.status).to eql(401)
97
+ expect(client.ts_skew).to eql(skew)
98
+ end
99
+ end
100
+ end
101
+
102
+ context "invalid skew header" do
103
+ let(:invalid_tsm_header) {
104
+ %(Hawk ts="#{timestamp}" tsm="invalidTsMac")
105
+ }
106
+
107
+ it "ignores header" do
108
+ http_stubs << stub_request(:get, "http://example.com").with { |request|
109
+ request.headers['Authorization'] =~ %r{ts="#{timestamp - skew}"}
110
+ }.to_return(
111
+ :status => 401,
112
+ :headers => {
113
+ 'WWW-Authenticate' => invalid_tsm_header
114
+ }
115
+ )
116
+
117
+ res = client.http.send(:get, "http://example.com")
118
+
119
+ http_stubs.each do |stub|
120
+ expect(stub).to have_been_requested
121
+ end
122
+
123
+ expect(res.status).to eql(401)
124
+ end
125
+ end
126
+ end
@@ -7,25 +7,30 @@ Gem::Specification.new do |gem|
7
7
  gem.name = "tent-client"
8
8
  gem.version = TentClient::VERSION
9
9
  gem.authors = ["Jonathan Rudenberg", "Jesse Stuart"]
10
- gem.email = ["jonathan@titanous.com", "jessestuart@gmail.com"]
10
+ gem.email = ["jonathan@titanous.com", "jesse@jessestuart.ca"]
11
11
  gem.description = %q{Tent Protocol client}
12
12
  gem.summary = %q{Tent Protocol client}
13
- gem.homepage = "http://tent.io"
13
+ gem.homepage = "https://tent.io"
14
14
 
15
15
  gem.files = `git ls-files`.split($/)
16
16
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
17
17
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
18
  gem.require_paths = ["lib"]
19
19
 
20
+ gem.add_runtime_dependency 'yajl-ruby'
21
+ gem.add_runtime_dependency 'hawk-auth'
20
22
  gem.add_runtime_dependency 'faraday', '0.8.4'
21
23
  gem.add_runtime_dependency 'faraday_middleware', '0.8.8'
22
- gem.add_runtime_dependency 'nokogiri'
23
- gem.add_runtime_dependency 'oj'
24
24
  gem.add_runtime_dependency 'faraday_middleware-multi_json'
25
+ gem.add_runtime_dependency 'nokogiri'
26
+
27
+ if RUBY_VERSION.split('.').slice(0, 2).join(".") == "1.8"
28
+ gem.add_runtime_dependency 'addressable'
29
+ end
25
30
 
26
- gem.add_development_dependency 'rspec'
27
31
  gem.add_development_dependency 'bundler'
28
32
  gem.add_development_dependency 'rake'
29
- gem.add_development_dependency 'guard-rspec'
33
+ gem.add_development_dependency 'rspec'
30
34
  gem.add_development_dependency 'mocha'
35
+ gem.add_development_dependency 'webmock'
31
36
  end
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tent-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
5
- prerelease:
4
+ version: 0.2.1
6
5
  platform: ruby
7
6
  authors:
8
7
  - Jonathan Rudenberg
@@ -10,239 +9,224 @@ authors:
10
9
  autorequire:
11
10
  bindir: bin
12
11
  cert_chain: []
13
- date: 2012-09-20 00:00:00.000000000 Z
12
+ date: 2013-09-03 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
- name: faraday
15
+ name: yajl-ruby
17
16
  requirement: !ruby/object:Gem::Requirement
18
- none: false
19
17
  requirements:
20
- - - '='
18
+ - - '>='
21
19
  - !ruby/object:Gem::Version
22
- version: 0.8.4
20
+ version: '0'
23
21
  type: :runtime
24
22
  prerelease: false
25
23
  version_requirements: !ruby/object:Gem::Requirement
26
- none: false
27
24
  requirements:
28
- - - '='
25
+ - - '>='
29
26
  - !ruby/object:Gem::Version
30
- version: 0.8.4
27
+ version: '0'
31
28
  - !ruby/object:Gem::Dependency
32
- name: faraday_middleware
29
+ name: hawk-auth
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - '>='
33
+ - !ruby/object:Gem::Version
34
+ version: '0'
35
+ type: :runtime
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - '>='
40
+ - !ruby/object:Gem::Version
41
+ version: '0'
42
+ - !ruby/object:Gem::Dependency
43
+ name: faraday
33
44
  requirement: !ruby/object:Gem::Requirement
34
- none: false
35
45
  requirements:
36
46
  - - '='
37
47
  - !ruby/object:Gem::Version
38
- version: 0.8.8
48
+ version: 0.8.4
39
49
  type: :runtime
40
50
  prerelease: false
41
51
  version_requirements: !ruby/object:Gem::Requirement
42
- none: false
43
52
  requirements:
44
53
  - - '='
45
54
  - !ruby/object:Gem::Version
46
- version: 0.8.8
55
+ version: 0.8.4
47
56
  - !ruby/object:Gem::Dependency
48
- name: nokogiri
57
+ name: faraday_middleware
49
58
  requirement: !ruby/object:Gem::Requirement
50
- none: false
51
59
  requirements:
52
- - - ! '>='
60
+ - - '='
53
61
  - !ruby/object:Gem::Version
54
- version: '0'
62
+ version: 0.8.8
55
63
  type: :runtime
56
64
  prerelease: false
57
65
  version_requirements: !ruby/object:Gem::Requirement
58
- none: false
59
66
  requirements:
60
- - - ! '>='
67
+ - - '='
61
68
  - !ruby/object:Gem::Version
62
- version: '0'
69
+ version: 0.8.8
63
70
  - !ruby/object:Gem::Dependency
64
- name: oj
71
+ name: faraday_middleware-multi_json
65
72
  requirement: !ruby/object:Gem::Requirement
66
- none: false
67
73
  requirements:
68
- - - ! '>='
74
+ - - '>='
69
75
  - !ruby/object:Gem::Version
70
76
  version: '0'
71
77
  type: :runtime
72
78
  prerelease: false
73
79
  version_requirements: !ruby/object:Gem::Requirement
74
- none: false
75
80
  requirements:
76
- - - ! '>='
81
+ - - '>='
77
82
  - !ruby/object:Gem::Version
78
83
  version: '0'
79
84
  - !ruby/object:Gem::Dependency
80
- name: faraday_middleware-multi_json
85
+ name: nokogiri
81
86
  requirement: !ruby/object:Gem::Requirement
82
- none: false
83
87
  requirements:
84
- - - ! '>='
88
+ - - '>='
85
89
  - !ruby/object:Gem::Version
86
90
  version: '0'
87
91
  type: :runtime
88
92
  prerelease: false
89
93
  version_requirements: !ruby/object:Gem::Requirement
90
- none: false
91
94
  requirements:
92
- - - ! '>='
95
+ - - '>='
93
96
  - !ruby/object:Gem::Version
94
97
  version: '0'
95
98
  - !ruby/object:Gem::Dependency
96
- name: rspec
99
+ name: bundler
97
100
  requirement: !ruby/object:Gem::Requirement
98
- none: false
99
101
  requirements:
100
- - - ! '>='
102
+ - - '>='
101
103
  - !ruby/object:Gem::Version
102
104
  version: '0'
103
105
  type: :development
104
106
  prerelease: false
105
107
  version_requirements: !ruby/object:Gem::Requirement
106
- none: false
107
108
  requirements:
108
- - - ! '>='
109
+ - - '>='
109
110
  - !ruby/object:Gem::Version
110
111
  version: '0'
111
112
  - !ruby/object:Gem::Dependency
112
- name: bundler
113
+ name: rake
113
114
  requirement: !ruby/object:Gem::Requirement
114
- none: false
115
115
  requirements:
116
- - - ! '>='
116
+ - - '>='
117
117
  - !ruby/object:Gem::Version
118
118
  version: '0'
119
119
  type: :development
120
120
  prerelease: false
121
121
  version_requirements: !ruby/object:Gem::Requirement
122
- none: false
123
122
  requirements:
124
- - - ! '>='
123
+ - - '>='
125
124
  - !ruby/object:Gem::Version
126
125
  version: '0'
127
126
  - !ruby/object:Gem::Dependency
128
- name: rake
127
+ name: rspec
129
128
  requirement: !ruby/object:Gem::Requirement
130
- none: false
131
129
  requirements:
132
- - - ! '>='
130
+ - - '>='
133
131
  - !ruby/object:Gem::Version
134
132
  version: '0'
135
133
  type: :development
136
134
  prerelease: false
137
135
  version_requirements: !ruby/object:Gem::Requirement
138
- none: false
139
136
  requirements:
140
- - - ! '>='
137
+ - - '>='
141
138
  - !ruby/object:Gem::Version
142
139
  version: '0'
143
140
  - !ruby/object:Gem::Dependency
144
- name: guard-rspec
141
+ name: mocha
145
142
  requirement: !ruby/object:Gem::Requirement
146
- none: false
147
143
  requirements:
148
- - - ! '>='
144
+ - - '>='
149
145
  - !ruby/object:Gem::Version
150
146
  version: '0'
151
147
  type: :development
152
148
  prerelease: false
153
149
  version_requirements: !ruby/object:Gem::Requirement
154
- none: false
155
150
  requirements:
156
- - - ! '>='
151
+ - - '>='
157
152
  - !ruby/object:Gem::Version
158
153
  version: '0'
159
154
  - !ruby/object:Gem::Dependency
160
- name: mocha
155
+ name: webmock
161
156
  requirement: !ruby/object:Gem::Requirement
162
- none: false
163
157
  requirements:
164
- - - ! '>='
158
+ - - '>='
165
159
  - !ruby/object:Gem::Version
166
160
  version: '0'
167
161
  type: :development
168
162
  prerelease: false
169
163
  version_requirements: !ruby/object:Gem::Requirement
170
- none: false
171
164
  requirements:
172
- - - ! '>='
165
+ - - '>='
173
166
  - !ruby/object:Gem::Version
174
167
  version: '0'
175
168
  description: Tent Protocol client
176
169
  email:
177
170
  - jonathan@titanous.com
178
- - jessestuart@gmail.com
171
+ - jesse@jessestuart.ca
179
172
  executables: []
180
173
  extensions: []
181
174
  extra_rdoc_files: []
182
175
  files:
183
176
  - .gitignore
184
- - .rspec
185
177
  - .travis.yml
186
178
  - Gemfile
187
- - Guardfile
188
- - LICENSE.txt
179
+ - LICENSE
189
180
  - README.md
190
181
  - Rakefile
191
182
  - lib/tent-client.rb
192
- - lib/tent-client/app.rb
193
- - lib/tent-client/app_authorization.rb
183
+ - lib/tent-client/attachment.rb
194
184
  - lib/tent-client/cycle_http.rb
195
185
  - lib/tent-client/discovery.rb
196
- - lib/tent-client/follower.rb
197
- - lib/tent-client/following.rb
198
- - lib/tent-client/group.rb
186
+ - lib/tent-client/faraday/chunked_adapter.rb
187
+ - lib/tent-client/faraday/utils.rb
199
188
  - lib/tent-client/link_header.rb
200
- - lib/tent-client/middleware/accept_header.rb
189
+ - lib/tent-client/middleware/authentication.rb
190
+ - lib/tent-client/middleware/content_type_header.rb
201
191
  - lib/tent-client/middleware/encode_json.rb
202
- - lib/tent-client/middleware/mac_auth.rb
192
+ - lib/tent-client/multipart-post/parts.rb
203
193
  - lib/tent-client/post.rb
204
- - lib/tent-client/post_attachment.rb
205
- - lib/tent-client/profile.rb
194
+ - lib/tent-client/tent_type.rb
206
195
  - lib/tent-client/version.rb
196
+ - spec/cycle_http_spec.rb
197
+ - spec/discovery_spec.rb
198
+ - spec/link_header_spec.rb
207
199
  - spec/spec_helper.rb
208
- - spec/unit/cycle_http_spec.rb
209
- - spec/unit/discovery_spec.rb
210
- - spec/unit/link_header_spec.rb
211
- - spec/unit/middleware/mac_auth_spec.rb
200
+ - spec/support/discovery_link_behaviour.rb
201
+ - spec/timestamp_skew_spec.rb
212
202
  - tent-client.gemspec
213
- homepage: http://tent.io
203
+ homepage: https://tent.io
214
204
  licenses: []
205
+ metadata: {}
215
206
  post_install_message:
216
207
  rdoc_options: []
217
208
  require_paths:
218
209
  - lib
219
210
  required_ruby_version: !ruby/object:Gem::Requirement
220
- none: false
221
211
  requirements:
222
- - - ! '>='
212
+ - - '>='
223
213
  - !ruby/object:Gem::Version
224
214
  version: '0'
225
- segments:
226
- - 0
227
- hash: -2628975409218371797
228
215
  required_rubygems_version: !ruby/object:Gem::Requirement
229
- none: false
230
216
  requirements:
231
- - - ! '>='
217
+ - - '>='
232
218
  - !ruby/object:Gem::Version
233
219
  version: '0'
234
- segments:
235
- - 0
236
- hash: -2628975409218371797
237
220
  requirements: []
238
221
  rubyforge_project:
239
- rubygems_version: 1.8.23
222
+ rubygems_version: 2.0.7
240
223
  signing_key:
241
- specification_version: 3
224
+ specification_version: 4
242
225
  summary: Tent Protocol client
243
226
  test_files:
227
+ - spec/cycle_http_spec.rb
228
+ - spec/discovery_spec.rb
229
+ - spec/link_header_spec.rb
244
230
  - spec/spec_helper.rb
245
- - spec/unit/cycle_http_spec.rb
246
- - spec/unit/discovery_spec.rb
247
- - spec/unit/link_header_spec.rb
248
- - spec/unit/middleware/mac_auth_spec.rb
231
+ - spec/support/discovery_link_behaviour.rb
232
+ - spec/timestamp_skew_spec.rb