wtf_lang 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -1,10 +1,7 @@
1
1
  source "http://rubygems.org"
2
- # Add dependencies required to use your gem here.
3
- # Example:
4
- # gem "activesupport", ">= 2.3.5"
5
2
 
6
- # Add dependencies to develop your gem here.
7
- # Include everything needed to run rake, tests, features, etc.
3
+ gem "json"
4
+
8
5
  group :development do
9
6
  gem "shoulda", ">= 0"
10
7
  gem "bundler", "~> 1.0.0"
@@ -1,20 +1,24 @@
1
- GEM
2
- remote: http://rubygems.org/
3
- specs:
4
- git (1.2.5)
5
- jeweler (1.6.0)
6
- bundler (~> 1.0.0)
7
- git (>= 1.2.5)
8
- rake
9
- rake (0.8.7)
10
- rcov (0.9.9)
11
- shoulda (2.11.3)
12
-
13
- PLATFORMS
14
- x86-mingw32
15
-
16
- DEPENDENCIES
17
- bundler (~> 1.0.0)
18
- jeweler (~> 1.6.0)
19
- rcov
20
- shoulda
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ git (1.2.5)
5
+ jeweler (1.6.0)
6
+ bundler (~> 1.0.0)
7
+ git (>= 1.2.5)
8
+ rake
9
+ json (1.5.1)
10
+ json (1.5.1-x86-mingw32)
11
+ rake (0.8.7)
12
+ rcov (0.9.9)
13
+ shoulda (2.11.3)
14
+
15
+ PLATFORMS
16
+ ruby
17
+ x86-mingw32
18
+
19
+ DEPENDENCIES
20
+ bundler (~> 1.0.0)
21
+ jeweler (~> 1.6.0)
22
+ json
23
+ rcov
24
+ shoulda
data/Rakefile CHANGED
@@ -27,7 +27,7 @@ Jeweler::Tasks.new do |gem|
27
27
  gem.email = "younash@gmail.com"
28
28
  gem.authors = ["nashby"]
29
29
  gem.files.include Dir.glob('lib/**/*.rb')
30
- # dependencies defined in Gemfile
30
+ gem.add_dependency 'json'
31
31
  end
32
32
  Jeweler::RubygemsDotOrgTasks.new
33
33
 
@@ -10,7 +10,11 @@ module WtfLang
10
10
  end
11
11
 
12
12
  def full_lang
13
- LANGUAGES.key(lang)
13
+ if Hash.method_defined? :key
14
+ LANGUAGES.key(lang)
15
+ else
16
+ LANGUAGES.index(lang)
17
+ end
14
18
  end
15
19
 
16
20
  def lang_confidence
@@ -2,7 +2,7 @@ module WtfLang
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 3
5
- PATCH = 0
5
+ PATCH = 1
6
6
  BUILD = nil
7
7
 
8
8
  STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join('.')
@@ -14,6 +14,14 @@ class TestWtfLang < Test::Unit::TestCase
14
14
  should "return jp language" do
15
15
  assert_equal "ja", "ルビーはとても素晴らしいです!".lang
16
16
  end
17
+
18
+ should "return eo language" do
19
+ assert_equal "eo", "Eĥoŝanĝo ĉiŭĵaŭde!".lang
20
+ end
21
+
22
+ should "return esperanto language" do
23
+ assert_equal "esperanto", "Esperanton ĉiuj parolos!".full_lang
24
+ end
17
25
 
18
26
  should "return full language name" do
19
27
  assert_equal "russian", "руби такой крутой!".full_lang
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{wtf_lang}
8
- s.version = "0.3.0"
8
+ s.version = "0.3.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["nashby"]
12
- s.date = %q{2011-05-08}
12
+ s.date = %q{2011-05-12}
13
13
  s.description = %q{Can't stop dreaming about an easy language detector? Just use wtf_lang!}
14
14
  s.email = %q{younash@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -45,21 +45,27 @@ Gem::Specification.new do |s|
45
45
  s.specification_version = 3
46
46
 
47
47
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
48
+ s.add_runtime_dependency(%q<json>, [">= 0"])
48
49
  s.add_development_dependency(%q<shoulda>, [">= 0"])
49
50
  s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
50
51
  s.add_development_dependency(%q<jeweler>, ["~> 1.6.0"])
51
52
  s.add_development_dependency(%q<rcov>, [">= 0"])
53
+ s.add_runtime_dependency(%q<json>, [">= 0"])
52
54
  else
55
+ s.add_dependency(%q<json>, [">= 0"])
53
56
  s.add_dependency(%q<shoulda>, [">= 0"])
54
57
  s.add_dependency(%q<bundler>, ["~> 1.0.0"])
55
58
  s.add_dependency(%q<jeweler>, ["~> 1.6.0"])
56
59
  s.add_dependency(%q<rcov>, [">= 0"])
60
+ s.add_dependency(%q<json>, [">= 0"])
57
61
  end
58
62
  else
63
+ s.add_dependency(%q<json>, [">= 0"])
59
64
  s.add_dependency(%q<shoulda>, [">= 0"])
60
65
  s.add_dependency(%q<bundler>, ["~> 1.0.0"])
61
66
  s.add_dependency(%q<jeweler>, ["~> 1.6.0"])
62
67
  s.add_dependency(%q<rcov>, [">= 0"])
68
+ s.add_dependency(%q<json>, [">= 0"])
63
69
  end
64
70
  end
65
71
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wtf_lang
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,12 +9,23 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-05-08 00:00:00.000000000 +03:00
12
+ date: 2011-05-12 00:00:00.000000000 +03:00
13
13
  default_executable:
14
14
  dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: json
17
+ requirement: &9611340 !ruby/object:Gem::Requirement
18
+ none: false
19
+ requirements:
20
+ - - ! '>='
21
+ - !ruby/object:Gem::Version
22
+ version: '0'
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: *9611340
15
26
  - !ruby/object:Gem::Dependency
16
27
  name: shoulda
17
- requirement: &9746400 !ruby/object:Gem::Requirement
28
+ requirement: &9610872 !ruby/object:Gem::Requirement
18
29
  none: false
19
30
  requirements:
20
31
  - - ! '>='
@@ -22,10 +33,10 @@ dependencies:
22
33
  version: '0'
23
34
  type: :development
24
35
  prerelease: false
25
- version_requirements: *9746400
36
+ version_requirements: *9610872
26
37
  - !ruby/object:Gem::Dependency
27
38
  name: bundler
28
- requirement: &9745932 !ruby/object:Gem::Requirement
39
+ requirement: &9610380 !ruby/object:Gem::Requirement
29
40
  none: false
30
41
  requirements:
31
42
  - - ~>
@@ -33,10 +44,10 @@ dependencies:
33
44
  version: 1.0.0
34
45
  type: :development
35
46
  prerelease: false
36
- version_requirements: *9745932
47
+ version_requirements: *9610380
37
48
  - !ruby/object:Gem::Dependency
38
49
  name: jeweler
39
- requirement: &9745428 !ruby/object:Gem::Requirement
50
+ requirement: &9609936 !ruby/object:Gem::Requirement
40
51
  none: false
41
52
  requirements:
42
53
  - - ~>
@@ -44,10 +55,10 @@ dependencies:
44
55
  version: 1.6.0
45
56
  type: :development
46
57
  prerelease: false
47
- version_requirements: *9745428
58
+ version_requirements: *9609936
48
59
  - !ruby/object:Gem::Dependency
49
60
  name: rcov
50
- requirement: &9744996 !ruby/object:Gem::Requirement
61
+ requirement: &9609504 !ruby/object:Gem::Requirement
51
62
  none: false
52
63
  requirements:
53
64
  - - ! '>='
@@ -55,7 +66,18 @@ dependencies:
55
66
  version: '0'
56
67
  type: :development
57
68
  prerelease: false
58
- version_requirements: *9744996
69
+ version_requirements: *9609504
70
+ - !ruby/object:Gem::Dependency
71
+ name: json
72
+ requirement: &9609192 !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ type: :runtime
79
+ prerelease: false
80
+ version_requirements: *9609192
59
81
  description: Can't stop dreaming about an easy language detector? Just use wtf_lang!
60
82
  email: younash@gmail.com
61
83
  executables: []
@@ -97,7 +119,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
97
119
  version: '0'
98
120
  segments:
99
121
  - 0
100
- hash: -1011563727
122
+ hash: -450518063
101
123
  required_rubygems_version: !ruby/object:Gem::Requirement
102
124
  none: false
103
125
  requirements: