minitel 0.1.0 → 0.1.1

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: 533325700a781993cff2caa0601121f48f6bc947
4
- data.tar.gz: f28924e1b4dc9b948d60a5013d3fbe80dcf98f51
3
+ metadata.gz: 61598e19639554992b7c083cac60ad2d778bdfda
4
+ data.tar.gz: 4acd579629f98f79f24533de0dbe40461c51dbe6
5
5
  SHA512:
6
- metadata.gz: a4e7a4e76ca52053180758b98ddc370235d2741b100e948ce60df9ec68d83085c74818213dea25f411571b374d0154c9525dba1dc7f52b3949602bf57d99433a
7
- data.tar.gz: e03e2a4e45de7a14e8f9afbf2c151e9e940831289246fb510be900cdf741355d9d66dd194a66f8e787143f313e9f067c44bc9c88194a6aa6c924e1266d066e4c
6
+ metadata.gz: 3d474d99a5d486cfbd0c4395bdd6f6c4ed0fd83abbe3d769c89adfe6acda17dd84c43c69211395084833be3e2c18a6bfd4cd0648635be3aad6aa5d5121dd6171
7
+ data.tar.gz: 82219867b18537333452e8011340fa6a5ba7e59809160c20ca1227b2300fcad938202864489febec9f3814836d72d57d743ed3238aa3749da2a26538f0acd659
checksums.yaml.gz.sig CHANGED
Binary file
data/.gitignore CHANGED
@@ -3,6 +3,7 @@
3
3
  .bundle
4
4
  .config
5
5
  .yardoc
6
+ Gemfile.lock
6
7
  InstalledFiles
7
8
  _yardoc
8
9
  coverage
data/changelog.txt CHANGED
@@ -1,3 +1,8 @@
1
+ 0.1.1 2014-10-08
2
+ ================
3
+
4
+ Add a User-Agent header
5
+
1
6
  0.1.0 2014-10-08
2
7
  ================
3
8
 
@@ -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)
@@ -1,3 +1,3 @@
1
1
  module Minitel
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
@@ -1,19 +1,29 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe Minitel::Client, '#initialize' do
4
- it 'requires an https url' do
5
- expect{ Minitel::Client.new('http://user:pass@what.com') }.to raise_error(ArgumentError)
6
- expect{ Minitel::Client.new('https://user:pass@what.com') }.to_not raise_error
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
- url = "https://u:p@foo.com"
11
- mock = double(:excon)
12
- expect(Excon).to receive(:new).with(url).and_return(mock)
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
- client = Minitel::Client.new(url)
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
- expect(client.connection).to eq(mock)
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.0
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)