minitel 0.1.0 → 0.1.1
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
- checksums.yaml.gz.sig +0 -0
- data/.gitignore +1 -0
- data/changelog.txt +5 -0
- data/lib/minitel/client.rb +5 -1
- data/lib/minitel/version.rb +1 -1
- data/spec/minitel/client_spec.rb +18 -8
- data.tar.gz.sig +0 -0
- metadata +1 -2
- metadata.gz.sig +0 -0
- data/Gemfile.lock +0 -32
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 61598e19639554992b7c083cac60ad2d778bdfda
|
|
4
|
+
data.tar.gz: 4acd579629f98f79f24533de0dbe40461c51dbe6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3d474d99a5d486cfbd0c4395bdd6f6c4ed0fd83abbe3d769c89adfe6acda17dd84c43c69211395084833be3e2c18a6bfd4cd0648635be3aad6aa5d5121dd6171
|
|
7
|
+
data.tar.gz: 82219867b18537333452e8011340fa6a5ba7e59809160c20ca1227b2300fcad938202864489febec9f3814836d72d57d743ed3238aa3749da2a26538f0acd659
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/.gitignore
CHANGED
data/changelog.txt
CHANGED
data/lib/minitel/client.rb
CHANGED
|
@@ -9,7 +9,11 @@ module Minitel
|
|
|
9
9
|
unless telex_url.start_with? "https://"
|
|
10
10
|
raise ArgumentError, "Bad Url"
|
|
11
11
|
end
|
|
12
|
-
self.connection = Excon.new(telex_url
|
|
12
|
+
self.connection = Excon.new(telex_url,
|
|
13
|
+
:headers => {
|
|
14
|
+
"User-Agent" => "minitel/#{Minitel::VERSION} excon/#{Excon::VERSION}"
|
|
15
|
+
}
|
|
16
|
+
)
|
|
13
17
|
end
|
|
14
18
|
|
|
15
19
|
def notify_app(args)
|
data/lib/minitel/version.rb
CHANGED
data/spec/minitel/client_spec.rb
CHANGED
|
@@ -1,19 +1,29 @@
|
|
|
1
1
|
require 'spec_helper'
|
|
2
2
|
|
|
3
3
|
describe Minitel::Client, '#initialize' do
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
before do
|
|
5
|
+
url = "https://u:p@foo.com"
|
|
6
|
+
client = Minitel::Client.new(url)
|
|
7
|
+
@data = client.connection.data
|
|
7
8
|
end
|
|
8
9
|
|
|
9
10
|
it 'uses the given url and credentials' do
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
expect(
|
|
11
|
+
expect(@data[:host]).to eq('foo.com')
|
|
12
|
+
expect(@data[:user]).to eq('u')
|
|
13
|
+
expect(@data[:password]).to eq('p')
|
|
14
|
+
end
|
|
13
15
|
|
|
14
|
-
|
|
16
|
+
it 'includes the minitel and excon versions in the user agent' do
|
|
17
|
+
user_agent = @data[:headers]['User-Agent']
|
|
18
|
+
expect(user_agent).to match('minitel')
|
|
19
|
+
expect(user_agent).to match(Minitel::VERSION)
|
|
20
|
+
expect(user_agent).to match('excon')
|
|
21
|
+
expect(user_agent).to match(Excon::VERSION)
|
|
22
|
+
end
|
|
15
23
|
|
|
16
|
-
|
|
24
|
+
it 'requires an https url' do
|
|
25
|
+
expect{ Minitel::Client.new('http://user:pass@what.com') }.to raise_error(ArgumentError)
|
|
26
|
+
expect{ Minitel::Client.new('https://user:pass@what.com') }.to_not raise_error
|
|
17
27
|
end
|
|
18
28
|
end
|
|
19
29
|
|
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: minitel
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Will Leinweber
|
|
@@ -88,7 +88,6 @@ files:
|
|
|
88
88
|
- ".gitignore"
|
|
89
89
|
- ".travis.yml"
|
|
90
90
|
- Gemfile
|
|
91
|
-
- Gemfile.lock
|
|
92
91
|
- Guardfile
|
|
93
92
|
- LICENSE
|
|
94
93
|
- Rakefile
|
metadata.gz.sig
CHANGED
|
Binary file
|
data/Gemfile.lock
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
PATH
|
|
2
|
-
remote: .
|
|
3
|
-
specs:
|
|
4
|
-
minitel (0.0.1)
|
|
5
|
-
excon (~> 0, >= 0.16)
|
|
6
|
-
multi_json (~> 1.0)
|
|
7
|
-
|
|
8
|
-
GEM
|
|
9
|
-
remote: https://rubygems.org/
|
|
10
|
-
specs:
|
|
11
|
-
diff-lcs (1.2.5)
|
|
12
|
-
excon (0.39.6)
|
|
13
|
-
multi_json (1.10.1)
|
|
14
|
-
rspec (3.1.0)
|
|
15
|
-
rspec-core (~> 3.1.0)
|
|
16
|
-
rspec-expectations (~> 3.1.0)
|
|
17
|
-
rspec-mocks (~> 3.1.0)
|
|
18
|
-
rspec-core (3.1.5)
|
|
19
|
-
rspec-support (~> 3.1.0)
|
|
20
|
-
rspec-expectations (3.1.2)
|
|
21
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
22
|
-
rspec-support (~> 3.1.0)
|
|
23
|
-
rspec-mocks (3.1.2)
|
|
24
|
-
rspec-support (~> 3.1.0)
|
|
25
|
-
rspec-support (3.1.1)
|
|
26
|
-
|
|
27
|
-
PLATFORMS
|
|
28
|
-
ruby
|
|
29
|
-
|
|
30
|
-
DEPENDENCIES
|
|
31
|
-
minitel!
|
|
32
|
-
rspec (~> 3.0)
|