detect_language 1.0.5 → 1.0.6

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: 524783ec4f9834f1f716a44402538636ad6e53fa
4
- data.tar.gz: fadc54d0b30f29a4b3d8770078ff48ea42efa584
3
+ metadata.gz: 380aa885e4796684c9684adab6d25c6f21de09e6
4
+ data.tar.gz: 701d426655bc61b0fe008ad8ef715492fbb22295
5
5
  SHA512:
6
- metadata.gz: 2431a97d80c455c7b26d59913521a7a5c4f8944929d085ba4adb1704fd0f428bd301838400d8325f5fc764aeb3ac2f586458815dd2a35c043c3149b23b4b344c
7
- data.tar.gz: 027b353f963c15d6c1d602408fc1653371ddf16dc892fcf46d0136c07dae7a647f99c33a8cb0ed3608b37dac61f2f9fe502b74900446fc2109cca1d7888dcad2
6
+ metadata.gz: 1c0fc1f81f2a772da5a466fd78eb87c20a3e84b44f29880b927ca36a2d2cf13b7f36fa05b8fb402c5cfcd942da2a08e009205d7c9e9b85a1e1611a15a7252235
7
+ data.tar.gz: 5624098164e62cf5d922188cf2377503fab361d6f592224ae1659b31a9a83e9721756d56ce3375338c26f7c54a04cff107aa8f8abb553fb448646cd411845373
data/.travis.yml CHANGED
@@ -3,9 +3,9 @@ rvm:
3
3
  - 1.9.2
4
4
  - 1.9.3
5
5
  - 2.0.0
6
+ - 2.1.1
6
7
  - jruby-18mode # JRuby in 1.8 mode
7
8
  - jruby-19mode # JRuby in 1.9 mode
8
- - rbx-18mode
9
- - rbx-19mode
9
+ - rbx-2
10
10
  script: "bundle exec rake spec"
11
11
 
@@ -51,7 +51,7 @@ module DetectLanguage
51
51
  if response.is_a?(Array) || response["error"].nil?
52
52
  response
53
53
  else
54
- raise Exception.new(response["error"]["message"])
54
+ raise(Error, response["error"]["message"])
55
55
  end
56
56
  end
57
57
 
@@ -0,0 +1,6 @@
1
+ module DetectLanguage
2
+ class Error < StandardError; end
3
+
4
+ # deprecated
5
+ class Exception < Error; end
6
+ end
@@ -1,3 +1,3 @@
1
1
  module DetectLanguage
2
- VERSION = "1.0.5"
2
+ VERSION = "1.0.6"
3
3
  end
@@ -1,5 +1,5 @@
1
1
  require "detect_language/version"
2
- require "detect_language/exception"
2
+ require "detect_language/errors"
3
3
  require "detect_language/configuration"
4
4
  require "detect_language/client"
5
5
 
@@ -32,7 +32,7 @@ describe DetectLanguage do
32
32
  it "should raise exception for invalid key" do
33
33
  lambda {
34
34
  subject.detect("Hello world")
35
- }.should raise_error(::DetectLanguage::Exception)
35
+ }.should raise_error(DetectLanguage::Error)
36
36
  end
37
37
  end
38
38
 
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.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Laurynas Butkus
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-19 00:00:00.000000000 Z
11
+ date: 2014-07-08 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Language Detection API Client
14
14
  email:
@@ -28,7 +28,7 @@ files:
28
28
  - lib/detect_language.rb
29
29
  - lib/detect_language/client.rb
30
30
  - lib/detect_language/configuration.rb
31
- - lib/detect_language/exception.rb
31
+ - lib/detect_language/errors.rb
32
32
  - lib/detect_language/version.rb
33
33
  - spec/detect_language_spec.rb
34
34
  - spec/spec_helper.rb
@@ -52,7 +52,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
52
52
  version: '0'
53
53
  requirements: []
54
54
  rubyforge_project:
55
- rubygems_version: 2.0.6
55
+ rubygems_version: 2.2.2
56
56
  signing_key:
57
57
  specification_version: 4
58
58
  summary: Detects language of given text. Returns detected language codes and scores.
@@ -1,5 +0,0 @@
1
- module DetectLanguage
2
- class Exception < ::Exception
3
-
4
- end
5
- end