that_language-service 0.1.0.pre2 → 0.1.0.pre3

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: 6c051c7168c6c236c0ebfa9b0390b18904128b98
4
- data.tar.gz: c19cbbdf07358de028c55b5d01c6bba34bfe7b41
3
+ metadata.gz: d63c06c2f42b1746e07690a0e571f4d8deb3e420
4
+ data.tar.gz: 4d4dfe0f19be9ce65f03930f9639bca44105b774
5
5
  SHA512:
6
- metadata.gz: 8395584f51cf76ef12b8d7f7101ae89a89ddc8812a3441116c2e02c388949131120a2b9d5e17ac615f478350d694cb7a691d94771ed1f73ade7aa79470fd8e2d
7
- data.tar.gz: e6d4f3f2383a05b8b1abe908972f92b5c7ad9c4d51e4386f76fbe44c65f2e06e99d7a3461f10f72fda027d2f266e8afcbf1c71b355cfc06abb1174c6358b8e44
6
+ metadata.gz: 1f14931cd5a50778974ff20873b52a9ec4d51cfe631f891e047d92d9dce5de48a4ae5a089736d1fc16b24428e9392b523807628a2e83ca62fdccde68cc3bf7e0
7
+ data.tar.gz: b5919ba9f6656a21e9ba8d72203db23424b8d47eac532053265c9dd77fafb8e9ad913290fd4b7798b2d42ddd2e046ee4ae6a205fd5d1a8dde56103656d5dea85
@@ -13,11 +13,17 @@ module ThatLanguage
13
13
  end
14
14
 
15
15
  get '/detect' do
16
- render_json(detect)
16
+ render_json({
17
+ language_code: detect.language_code,
18
+ confidence: detect.confidence
19
+ })
17
20
  end
18
21
 
19
22
  post '/detect' do
20
- render_json(detect)
23
+ render_json({
24
+ language_code: detect.language_code,
25
+ confidence: detect.confidence
26
+ })
21
27
  end
22
28
 
23
29
  get '/details' do
@@ -35,15 +41,15 @@ module ThatLanguage
35
41
  end
36
42
 
37
43
  def language_code
38
- ThatLanguage.language_code(text)
44
+ @language_code ||= ThatLanguage.language_code(text)
39
45
  end
40
46
 
41
47
  def detect
42
- ThatLanguage.detect(text)
48
+ @detect ||= ThatLanguage.detect(text)
43
49
  end
44
50
 
45
51
  def details
46
- ThatLanguage.details(text)
52
+ @details ||= ThatLanguage.details(text)
47
53
  end
48
54
 
49
55
  def text
@@ -2,6 +2,6 @@ require 'sinatra'
2
2
 
3
3
  module ThatLanguage
4
4
  module Service
5
- VERSION = "0.1.0.pre2"
5
+ VERSION = "0.1.0.pre3"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: that_language-service
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.pre2
4
+ version: 0.1.0.pre3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrick Helm