byk 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +5 -13
  2. data/README.md +24 -15
  3. data/lib/byk/version.rb +1 -1
  4. metadata +10 -10
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- YmZiNDc2ZGE5NDBiZjE0ZTU1ZDk2ODg2NGU2MWExNzM0OTE4YTc5ZQ==
5
- data.tar.gz: !binary |-
6
- MjVhNGVjOTQ0MTI5NTY3YzBiZWY2MmYwYTM4YzdlM2U3OTUyOWI4YQ==
2
+ SHA1:
3
+ metadata.gz: 3ba019cfc4eecb9208d5c6aaac397820ab8cf78d
4
+ data.tar.gz: 7b49cc79f1385c443b3120bbc9e92a3ade338736
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- N2I2NzgxY2QzYjk3MDlmMWVmOTAwOWI0ZDViNjk0NTBjYjQwM2U1YjJiY2M3
10
- MmQyNDE1YmIxOTExMTNiMGE4ZDQ3OGVmOGZlOWRlNTUyODM0NDU4YzgxNzRl
11
- OTAyYzc2YzEyNDQ0NjgwNzRhMWQ4MGExOWE1ZjFiMGM3MzQzZDI=
12
- data.tar.gz: !binary |-
13
- OGUyM2RiZDdjYjA4NjQ0YmM3MTE5YjhjOWZjNGQxZTliZGI1NTdmMWRmYmEx
14
- OTQ2YWQxYmM3ZjdmZmNhM2M0NmVkYTEwNDM3YzE3ZmUyMzM4ODhjMTM2MGI3
15
- MWE5MjlkNGNjZWUzN2YwOTUyYzRmYWJmY2FjNWYwOGY5ZmM4ODc=
6
+ metadata.gz: 5f62f7e005890c0a39538aaa955d00362793539e8f499a8ea1c3922171209e75afd2ebe496162e28635858c47b77a8ad15fb82a7b5e693c5e2a7b357c578157b
7
+ data.tar.gz: 1e8ff0ee9b3897780e02a226d3df650f5be408242d6df8919bef0ff75c15bf513605726bdf3f543e3d179e4ff47e70d37466860b338c6ad14367dbb061bf5c4d
data/README.md CHANGED
@@ -5,9 +5,10 @@ Fast transliteration of Serbian Cyrillic into Latin.
5
5
 
6
6
  ![byk](https://cloud.githubusercontent.com/assets/626128/7155207/07545960-e35d-11e4-804e-5fdee70a3e30.png)
7
7
 
8
- This package was inspired by @dejan's
9
- [nice little gem](https://github.com/dejan/srbovanje), but this one
10
- comes with a C-optimized twist.
8
+ Inspired by @dejan's
9
+ [nice little gem](https://github.com/dejan/srbovanje),
10
+ this one comes with a C-optimized twist.
11
+
11
12
 
12
13
  ## Installation
13
14
 
@@ -29,11 +30,12 @@ Or install it yourself as:
29
30
  $ gem install byk
30
31
  ```
31
32
 
33
+
32
34
  ## Usage
33
35
 
34
36
  First, make sure to require the gem in your initializer:
35
37
 
36
- ```
38
+ ```ruby
37
39
  require "byk"
38
40
  ```
39
41
 
@@ -45,7 +47,7 @@ This will extend `String` with a couple of simple methods:
45
47
  "Šeširdžija".to_ascii_latin # => "Sesirdzija"
46
48
  ```
47
49
 
48
- There's also a destructive version of each:
50
+ There's also a destructive variant of each:
49
51
 
50
52
  ```ruby
51
53
  text = "Жвазбука"
@@ -55,36 +57,43 @@ text.to_ascii_latin! # => "Zvazbuka"
55
57
  text # => "Zvazbuka"
56
58
  ```
57
59
 
58
- Note that these methods will take into account the
59
- [special two-letter rules](http://sr.wikipedia.org/wiki/Gajica#Abeceda):
60
+ Note that these methods take into account the
61
+ [two-letter capitalization rules](http://sr.wikipedia.org/wiki/Gajica#Abeceda):
60
62
 
61
63
  ```ruby
64
+ "ЉИЉА Љиљановић".to_latin # => "LJILJA Ljiljanović"
62
65
  "ĐORĐE Đorđević".to_ascii_latin # => "DJORDJE Djordjevic"
63
66
  ```
64
67
 
68
+
65
69
  ## How fast is fast?
66
70
 
67
- About [7x faster](benchmark) than the baseline Ruby implementation on
71
+ About [7-8x faster](benchmark) than the baseline Ruby implementation on
68
72
  my hardware. YMMV of course.
69
73
 
74
+
70
75
  ## Raison d'être
71
76
 
72
- For massive transliteration (e.g. sites supporting dual script
73
- output), this kind of speed-up might be worthwhile, even with caching.
77
+ This kind of speed-up might prove worthwhile for massive
78
+ transliteration projects (e.g. sites supporting dual script
79
+ l10n). Remember, `Benchmark` is your friend.
74
80
 
75
- Also, it's a well-defined problem with hard-set rules which makes it a
76
- natural target for optimization. Plus, it gave me an excuse to play
81
+ I found it to be a straightforward little problem, fit for this kind
82
+ of tight optimization… which also gave me an excuse to play
77
83
  with Ruby extensions, so there :smile_cat:
78
84
 
85
+
79
86
  ## Compatibility
80
87
 
81
- Byk is supported under MRI Ruby 1.9.3, 2.0, 2.1 and 2.2. Earlier
82
- versions of MRI are untested (yet).
88
+ Byk is supported under MRI Ruby 1.9.2, 1.9.3, 2.0, 2.1 and 2.2.
89
+ Earlier versions of MRI are untested (yet).
83
90
 
84
- ## Code Status
91
+
92
+ ## Status
85
93
 
86
94
  [![Build Status](https://travis-ci.org/topalovic/byk.svg?branch=master)](https://travis-ci.org/topalovic/byk)
87
95
 
96
+
88
97
  ## License
89
98
 
90
99
  This gem is released under the [MIT License](http://www.opensource.org/licenses/MIT).
@@ -1,3 +1,3 @@
1
1
  module Byk
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
metadata CHANGED
@@ -1,41 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: byk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nikola Topalović
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-15 00:00:00.000000000 Z
11
+ date: 2015-04-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake-compiler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0.9'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0.9'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rspec
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '3.2'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '3.2'
41
41
  description: Provides C-optimized methods for transliteration of Serbian Cyrillic
@@ -63,17 +63,17 @@ require_paths:
63
63
  - lib
64
64
  required_ruby_version: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ! '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: 1.9.3
68
+ version: 1.9.2
69
69
  required_rubygems_version: !ruby/object:Gem::Requirement
70
70
  requirements:
71
- - - ! '>='
71
+ - - ">="
72
72
  - !ruby/object:Gem::Version
73
73
  version: '0'
74
74
  requirements: []
75
75
  rubyforge_project:
76
- rubygems_version: 2.4.6
76
+ rubygems_version: 2.2.2
77
77
  signing_key:
78
78
  specification_version: 4
79
79
  summary: Fast transliteration of Serbian Cyrillic into Latin.