yandex_inflect 0.1.0 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +1 -1
- data/README.rdoc +6 -1
- data/Rakefile +4 -49
- data/lib/yandex_inflect.rb +2 -3
- data/lib/yandex_inflect/version.rb +3 -1
- data/spec/spec_helper.rb +1 -7
- metadata +44 -11
- data/init.rb +0 -3
data/LICENSE
CHANGED
data/README.rdoc
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
= YandexInflect
|
2
|
+
{<img src="http://travis-ci.org/yaroslav/yandex_inflect.png" />}[http://travis-ci.org/yaroslav/yandex_inflect]
|
3
|
+
|
2
4
|
|
3
5
|
Yandex.Inflect webservice client (provides Russian language pluralization)
|
4
6
|
|
@@ -9,7 +11,7 @@ Yandex.Inflect webservice client (provides Russian language pluralization)
|
|
9
11
|
|
10
12
|
== Установка
|
11
13
|
|
12
|
-
Установка в качестве gem
|
14
|
+
Установка в качестве gem:
|
13
15
|
|
14
16
|
gem install yandex_inflect
|
15
17
|
|
@@ -27,6 +29,9 @@ Yandex.Inflect webservice client (provides Russian language pluralization)
|
|
27
29
|
|
28
30
|
> YandexInflect.clear_cache
|
29
31
|
|
32
|
+
Для реализации собственного механизма кеширования/хранения данных достаточно переопределить методы <tt>cache_lookup(word)</tt> и <tt>cache_store(word, value)</tt>
|
33
|
+
|
34
|
+
|
30
35
|
== Автор
|
31
36
|
|
32
37
|
* Ярослав Маркин <yaroslav@markin.net>
|
data/Rakefile
CHANGED
@@ -1,55 +1,10 @@
|
|
1
1
|
require 'rubygems'
|
2
|
-
require '
|
3
|
-
require 'spec/rake/spectask'
|
2
|
+
require 'rspec/core/rake_task'
|
4
3
|
require 'rubygems/specification'
|
5
|
-
require 'date'
|
6
|
-
|
7
|
-
GEM = "yandex_inflect"
|
8
|
-
GEM_VERSION = "0.1.0"
|
9
|
-
AUTHOR = "Yaroslav Markin"
|
10
|
-
EMAIL = "yaroslav@markin.net"
|
11
|
-
HOMEPAGE = "http://github.com/yaroslav/yandex_inflect/"
|
12
|
-
SUMMARY = "Yandex.Inflect webservice client (Russian language inflection)"
|
13
|
-
|
14
|
-
spec = Gem::Specification.new do |s|
|
15
|
-
s.name = GEM
|
16
|
-
s.version = GEM_VERSION
|
17
|
-
s.platform = Gem::Platform::RUBY
|
18
|
-
s.has_rdoc = true
|
19
|
-
s.extra_rdoc_files = ["README.rdoc", "LICENSE", 'TODO']
|
20
|
-
s.summary = SUMMARY
|
21
|
-
s.description = s.summary
|
22
|
-
s.author = AUTHOR
|
23
|
-
s.email = EMAIL
|
24
|
-
s.homepage = HOMEPAGE
|
25
|
-
|
26
|
-
# Uncomment this to add a dependency
|
27
|
-
s.add_dependency "httparty"
|
28
|
-
|
29
|
-
s.require_path = 'lib'
|
30
|
-
s.autorequire = GEM
|
31
|
-
s.files = %w(LICENSE README.rdoc Rakefile TODO init.rb) + Dir.glob("{lib,spec}/**/*")
|
32
|
-
end
|
33
|
-
|
34
|
-
Rake::GemPackageTask.new(spec) do |pkg|
|
35
|
-
pkg.gem_spec = spec
|
36
|
-
end
|
37
4
|
|
38
5
|
task :default => :spec
|
39
6
|
desc "Run specs"
|
40
|
-
|
41
|
-
t.
|
42
|
-
t.
|
43
|
-
end
|
44
|
-
|
45
|
-
desc "install the gem locally"
|
46
|
-
task :install => [:package] do
|
47
|
-
sh %{sudo gem install pkg/#{GEM}-#{GEM_VERSION}}
|
48
|
-
end
|
49
|
-
|
50
|
-
desc "create a gemspec file"
|
51
|
-
task :make_spec do
|
52
|
-
File.open("#{GEM}.gemspec", "w") do |file|
|
53
|
-
file.puts spec.to_ruby
|
54
|
-
end
|
7
|
+
RSpec::Core::RakeTask.new do |t|
|
8
|
+
t.pattern = FileList['spec/**/*_spec.rb']
|
9
|
+
t.rspec_opts = %w(-fs --color)
|
55
10
|
end
|
data/lib/yandex_inflect.rb
CHANGED
@@ -1,11 +1,10 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
2
|
|
3
|
-
$KCODE = 'u'
|
3
|
+
$KCODE = 'u' if RUBY_VERSION < '1.9.0'
|
4
4
|
|
5
5
|
$:.unshift(File.dirname(__FILE__)) unless
|
6
6
|
$:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
|
7
7
|
|
8
|
-
require 'rubygems'
|
9
8
|
require 'httparty'
|
10
9
|
|
11
10
|
module YandexInflect
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yandex_inflect
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 31
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 1
|
9
|
+
- 2
|
10
|
+
version: 0.1.2
|
5
11
|
platform: ruby
|
6
12
|
authors:
|
7
13
|
- Yaroslav Markin
|
@@ -9,19 +15,39 @@ autorequire: yandex_inflect
|
|
9
15
|
bindir: bin
|
10
16
|
cert_chain: []
|
11
17
|
|
12
|
-
date:
|
18
|
+
date: 2011-10-23 00:00:00 +04:00
|
13
19
|
default_executable:
|
14
20
|
dependencies:
|
15
21
|
- !ruby/object:Gem::Dependency
|
16
22
|
name: httparty
|
17
|
-
|
18
|
-
|
19
|
-
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
20
26
|
requirements:
|
21
27
|
- - ">="
|
22
28
|
- !ruby/object:Gem::Version
|
29
|
+
hash: 3
|
30
|
+
segments:
|
31
|
+
- 0
|
23
32
|
version: "0"
|
24
|
-
|
33
|
+
type: :runtime
|
34
|
+
version_requirements: *id001
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: rspec
|
37
|
+
prerelease: false
|
38
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ~>
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
hash: 19
|
44
|
+
segments:
|
45
|
+
- 2
|
46
|
+
- 7
|
47
|
+
- 0
|
48
|
+
version: 2.7.0
|
49
|
+
type: :development
|
50
|
+
version_requirements: *id002
|
25
51
|
description: Yandex.Inflect webservice client (Russian language inflection)
|
26
52
|
email: yaroslav@markin.net
|
27
53
|
executables: []
|
@@ -37,7 +63,6 @@ files:
|
|
37
63
|
- README.rdoc
|
38
64
|
- Rakefile
|
39
65
|
- TODO
|
40
|
-
- init.rb
|
41
66
|
- lib/yandex_inflect/version.rb
|
42
67
|
- lib/yandex_inflect.rb
|
43
68
|
- spec/spec.opts
|
@@ -53,21 +78,29 @@ rdoc_options: []
|
|
53
78
|
require_paths:
|
54
79
|
- lib
|
55
80
|
required_ruby_version: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
56
82
|
requirements:
|
57
83
|
- - ">="
|
58
84
|
- !ruby/object:Gem::Version
|
85
|
+
hash: 3
|
86
|
+
segments:
|
87
|
+
- 0
|
59
88
|
version: "0"
|
60
|
-
version:
|
61
89
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
90
|
+
none: false
|
62
91
|
requirements:
|
63
92
|
- - ">="
|
64
93
|
- !ruby/object:Gem::Version
|
65
|
-
|
66
|
-
|
94
|
+
hash: 17
|
95
|
+
segments:
|
96
|
+
- 1
|
97
|
+
- 3
|
98
|
+
- 5
|
99
|
+
version: 1.3.5
|
67
100
|
requirements: []
|
68
101
|
|
69
102
|
rubyforge_project:
|
70
|
-
rubygems_version: 1.
|
103
|
+
rubygems_version: 1.5.2
|
71
104
|
signing_key:
|
72
105
|
specification_version: 3
|
73
106
|
summary: Yandex.Inflect webservice client (Russian language inflection)
|
data/init.rb
DELETED