detect_language 1.1.0 → 1.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: 3f04b5f6f7debbcbe9ceb5d8dc3d8692acb9be2b
4
- data.tar.gz: bb46979925797dfe44372542f91e70b4ac7596c3
3
+ metadata.gz: cc5fd49d8ac038b7cdba85373af25db35a0c2ef2
4
+ data.tar.gz: 32fd418fc9c9d28a4fa82009e25e1f7090a2585b
5
5
  SHA512:
6
- metadata.gz: 58790a0cc8ee72df7445598cbcae78d36b798914c8d8b57308128eb3016d723d7861771d2311889455e9357263e331d9d95e84225bd4611a08ce63f461aa9b83
7
- data.tar.gz: 9406d7aff6fdf95d93b61363ba3d6365f170b1e0ae6d3406e38ee6d5acb21f12b6d75fc25cae9e6ae62712c9e4cacbebe4b13d8a9556695bb4f1bd2866da33c7
6
+ metadata.gz: d92c0c5af430c9c476b77b37264e3f6b55743df12c579e697976a22850291dbd82d445ff4cfa21350c234f41c8af64a95a678556d7373b92dc3badba60197779
7
+ data.tar.gz: 88437b1b6483416bce8e1b114dbe4674394d556f1103ae91d63eed7dc919480bdd07724327c607a8c141cf775537bbbf96614376d981a5b33ac06c4f5e496ebb
data/README.md CHANGED
@@ -1,6 +1,10 @@
1
- Detect Language API Client [![Build Status](https://secure.travis-ci.org/detectlanguage/detectlanguage-ruby.png)](http://travis-ci.org/detectlanguage/detectlanguage-ruby)
1
+ Detect Language API Client
2
2
  ========
3
3
 
4
+ [![Gem](https://img.shields.io/gem/v/detect_language.svg)](https://rubygems.org/gems/detect_language)
5
+ [![Build Status](https://secure.travis-ci.org/detectlanguage/detectlanguage-ruby.svg)](http://travis-ci.org/detectlanguage/detectlanguage-ruby)
6
+
7
+
4
8
  Detects language of given text. Returns detected language codes and scores.
5
9
 
6
10
  Before using Detect Language API client you have to setup your personal API key.
@@ -18,7 +18,7 @@ module DetectLanguage
18
18
  end
19
19
 
20
20
  def client
21
- @client ||= Client.new(configuration)
21
+ Thread.current[:detect_language_client] ||= Client.new(configuration)
22
22
  end
23
23
 
24
24
  def detect(data)
@@ -32,7 +32,7 @@ module DetectLanguage
32
32
  request.set_form_data(params)
33
33
  end
34
34
 
35
- request.add_field('Authorization', 'Bearer ' + configuration.api_key)
35
+ request.add_field('Authorization', 'Bearer ' + configuration.api_key.to_s)
36
36
  request.add_field('User-Agent', configuration.user_agent)
37
37
 
38
38
  response = http.request(request)
@@ -1,3 +1,3 @@
1
1
  module DetectLanguage
2
- VERSION = '1.1.0'
2
+ VERSION = '1.1.1'
3
3
  end
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.0
4
+ version: 1.1.1
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-03-28 00:00:00.000000000 Z
11
+ date: 2018-06-24 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Language Detection API Client
14
14
  email: