detect_language 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/detect_language/client.rb +2 -2
- data/lib/detect_language/configuration.rb +2 -2
- data/lib/detect_language/version.rb +1 -1
- data/spec/detect_language_spec.rb +1 -9
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a8385ba646ee0a0ea95962ec93d3aaa14eeaa4ac
|
4
|
+
data.tar.gz: 260c92bba19c8b68387f0e68267fa96c8c112d7d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9fe63bc8ed34fd9debbba9b0e88b2298c04036fa62ae41ac1adf0ed3ca852c9f94d060c422202ca348c40d4bd9add27c57bde7c2931a55be74ebea896e227dd
|
7
|
+
data.tar.gz: 0ab29b1b5087cc0b3b282a8d5ba0593c68c1f49b7251b71ae8844cdbc8eb0e7fa2f0a6e7092a317b357b168b4da4f793ee67c3443559413401b7ec860f7decd4
|
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Detect Language API Client
|
2
2
|
========
|
3
3
|
|
4
|
-
[![Gem](https://
|
4
|
+
[![Gem Version](https://badge.fury.io/rb/detect_language.svg)](https://badge.fury.io/rb/detect_language)
|
5
5
|
[![Build Status](https://secure.travis-ci.org/detectlanguage/detectlanguage-ruby.svg)](http://travis-ci.org/detectlanguage/detectlanguage-ruby)
|
6
6
|
|
7
7
|
|
@@ -32,8 +32,8 @@ module DetectLanguage
|
|
32
32
|
request.set_form_data(params)
|
33
33
|
end
|
34
34
|
|
35
|
-
request
|
36
|
-
request
|
35
|
+
request['Authorization'] = 'Bearer ' + configuration.api_key.to_s
|
36
|
+
request['User-Agent'] = configuration.user_agent
|
37
37
|
|
38
38
|
response = http.request(request)
|
39
39
|
|
@@ -44,7 +44,7 @@ module DetectLanguage
|
|
44
44
|
@api_key = nil
|
45
45
|
@api_version = "0.2"
|
46
46
|
@host = "ws.detectlanguage.com"
|
47
|
-
@user_agent = "
|
47
|
+
@user_agent = "detectlanguage-ruby/#{VERSION}"
|
48
48
|
end
|
49
49
|
|
50
50
|
def protocol
|
@@ -80,4 +80,4 @@ module DetectLanguage
|
|
80
80
|
end
|
81
81
|
|
82
82
|
end
|
83
|
-
end
|
83
|
+
end
|
@@ -14,15 +14,7 @@ describe DetectLanguage do
|
|
14
14
|
it "should have default configuration values" do
|
15
15
|
subject.configuration.api_version.should == '0.2'
|
16
16
|
subject.configuration.host.should == 'ws.detectlanguage.com'
|
17
|
-
subject.configuration.user_agent.should ==
|
18
|
-
end
|
19
|
-
|
20
|
-
it "should allow configuring" do
|
21
|
-
subject.configure do |config|
|
22
|
-
config.user_agent = "Detect Language testing"
|
23
|
-
end
|
24
|
-
|
25
|
-
subject.configuration.user_agent.should == "Detect Language testing"
|
17
|
+
subject.configuration.user_agent.should == "detectlanguage-ruby/#{DetectLanguage::VERSION}"
|
26
18
|
end
|
27
19
|
end
|
28
20
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: detect_language
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Laurynas Butkus
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-07-01 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Language Detection API Client
|
14
14
|
email:
|