diacritics 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 301e7f416e2300e377191605ba087260b4e98a53
4
- data.tar.gz: 3d2500bf7a4258b6f7f18ff2841d07a58d3e1554
5
- SHA512:
6
- metadata.gz: 2e7348fdbf03aa2cfb746757a2ae8e1be7e01f7da1665566aa9b30036e2bb63fdffced87e951c2fd89b2458e54e8a8da390326691c6ccca9149e390ac9cdcde4
7
- data.tar.gz: 8979c04576485499c28c843947636a78a4a0d6924250af89aaf1c8bc73279c84f85a002e1c8a4f8a4c04bee5c56760b02a4b75862a5a84b1512c6aab9c629ac0
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ ZTc3ODBjZWYxZjA5M2JmOWRjOTg0NDMyZjMzYzRjN2E1MTc4YTUwZA==
5
+ data.tar.gz: !binary |-
6
+ N2ZhOTkwNTE1YWVlMjY4ODI0NjQxOTUzNzZhYzU5OGQ5NzBlNzc2ZQ==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ YmU3ZmY4YjAxNWFjYWViY2I5ZDA2ZmM0NTFkODhkNWY5OTY4NTEzMzBkNzQx
10
+ NGQ0YTU5OTM3ZWU2NTM4OTQ3YjE4ZmUwZjE5OTg1ZGE1NTg3NWFmN2QxNmE4
11
+ ZTBjZTc1ODE2NGZkMDEwYmE3NjgyMWY2Yjk0M2U3MzhhYzA2NmI=
12
+ data.tar.gz: !binary |-
13
+ MGJiNjQ2MDI3NGYwN2IwMzhkM2E5ZGMzNzEzZDFjYzU0MDRlMmEzOGQxNmMx
14
+ NmNjNGRmMzQ2MjdiMDVkZjZkMGU5MWQ5NGJkODY1MTAxNmJmYmRlYTlkYWE5
15
+ YzEyM2NlMDYzMjc3ZjUzNDgwYTM1OGRjYTQ4ZDJiYzVkYTg1MTM=
data/.rubocop.yml ADDED
@@ -0,0 +1,6 @@
1
+ AllCops:
2
+ Excludes:
3
+ - diacritics.gemspec
4
+ LineLength:
5
+ Enabled: true
6
+ Max: 79
data/.travis.yml CHANGED
@@ -2,3 +2,5 @@ language: ruby
2
2
  rvm:
3
3
  - 1.9.3
4
4
  - 2.0.0
5
+ - rbx
6
+ - jruby-head
data/CHANGELOG.md CHANGED
@@ -5,3 +5,7 @@
5
5
  ## v0.0.2
6
6
 
7
7
  * simpler way to use downcase, upcase and permanent in String class
8
+
9
+ ## v0.0.3
10
+
11
+ * benchmark
data/README.md CHANGED
@@ -34,11 +34,9 @@ String.send(:include, Diacritics::String)
34
34
  and use
35
35
 
36
36
  ```ruby
37
- text = "Lorem ipsum"
38
-
39
- text.diacritics
40
- text.diacritics
41
- text.permanent
37
+ "ŁoreM Ìpsum Ðolór. Šit Ämet".downcase #=> "łorem ìpsum ðolór. šit ämet"
38
+ "łorem ìpsum ðolÓr. šit ämet".upcase #=> "ŁOREM ÌPSUM ÐOLÓR. ŠIT ÄMET"
39
+ "Łorem ìpsum ÐolÓr. Šit ämet".permanent #=> "lorem-ipsum-dolor-sit-aemet"
42
40
  ```
43
41
 
44
42
  ## Contributing
data/Rakefile CHANGED
@@ -1,5 +1,6 @@
1
- require "bundler/gem_tasks"
1
+ # encoding: utf-8
2
+ require 'bundler/gem_tasks'
2
3
  require 'rspec/core/rake_task'
3
4
 
4
- task :default => :spec
5
+ task default: :spec
5
6
  RSpec::Core::RakeTask.new
data/TODO.md CHANGED
@@ -1,7 +1,12 @@
1
1
  ## Examples containing:
2
2
 
3
- * Czech [Ď, Ě, Ň, Ť, Ů, Ú, Û]
4
- * French [Œ, Ÿ, Î, Ï]
5
- * Portugal [Â]
6
- * Russian [Щ, Ъ, Э]
3
+ * Czech [Ď, Ě, Ň, Ť, Ů, Ú, Û, "aábcčdďeéěfghiíjklmnňoópqrřsštťuúůvwxyýzž", "AÁBCČDĎEÉĚFGHIÍJKLMNŇOÓPQRŘSŠTŤUÚŮVWXYÝZŽ"]
4
+ * French [Œ, Ÿ, Î, Ï, "abcdefghijklmnopqrstuvwxyzàâæçéèêëîïôœùûüÿ", "ABCDEFGHIJKLMNOPQRSTUVWXYZÀÂÆÇÉÈÊËÎÏÔŒÙÛÜŸ"]
5
+ * Portuguese [Â, "abcdefghijklmnopqrstuvwxyzáâãàçéêíóôõú", "ABCDEFGHIJKLMNOPQRSTUVWXYZÁÂÃÀÇÉÊÍÓÔÕÚ"]
6
+ * Russian [Щ, Ъ, Э, "абвгдеёжзийклмнопрстуфхцчшщъыьэюя", "АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ"]
7
7
  * Greek [Β, Μ, Χ, Ω, Ή, Ύ, Ώ, ΐ, ΰ, Ϊ, Ϋ]
8
+ * Slovak ["aáäeéiíoóôuúyýbcčdďfghjklĺľmnňpqrŕsštťvwxzž", "AÁÄEÉIÍOÓÔUÚYÝBCČDĎFGHJKLĹĽMNŇPQRŔSŠTŤVWXZŽ"]
9
+ * Spanish [ñ Ñ]
10
+ * Italian ["aàbcdeèéfghiìíîlmnoòópqrstuùúvz", "AÀBCDEÈÉFGHIÌÍÎLMNOÒÓPQRSTUÙÚVZ"]
11
+ * Romanian ["aăâbcdefghiîjklmnopqrsștțuvwxyz", "AĂÂBCDEFGHIÎJKLMNOPQRSȘTȚUVWXYZ"]
12
+ * Danish [å, â, ô, Å, Â, Ô]
@@ -0,0 +1,20 @@
1
+ #!/usr/bin/env ruby
2
+ # encoding: utf-8
3
+
4
+ require 'benchmark'
5
+ require 'diacritics'
6
+
7
+ String.send(:include, Diacritics::String)
8
+
9
+ ARGV.each do |filename|
10
+ one = File.read(filename)
11
+ two = one.clone
12
+ Benchmark.bm do |benchmark|
13
+ benchmark.report('String:') do
14
+ one.old_upcase
15
+ end
16
+ benchmark.report('Diacritics:') do
17
+ two.upcase
18
+ end
19
+ end
20
+ end
data/diacritics.gemspec CHANGED
@@ -4,19 +4,19 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
  require 'diacritics/version'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
- spec.name = "diacritics"
7
+ spec.name = 'diacritics'
8
8
  spec.version = Diacritics::VERSION
9
- spec.authors = ["Aleksander Malaszkiewicz"]
10
- spec.email = ["info@fractalsoft.org"]
9
+ spec.authors = ['Aleksander Malaszkiewicz']
10
+ spec.email = ['info@fractalsoft.org']
11
11
  spec.summary = %q{Support diacritics}
12
- spec.homepage = "https://github.com/fractalsoft/diacritics"
13
- spec.license = "MIT"
12
+ spec.homepage = 'https://github.com/fractalsoft/diacritics'
13
+ spec.license = 'MIT'
14
14
 
15
15
  spec.files = `git ls-files`.split($/)
16
16
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
17
17
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
- spec.require_paths = ["lib"]
18
+ spec.require_paths = ['lib']
19
19
 
20
- spec.add_development_dependency "bundler", "~> 1.3"
21
- spec.add_development_dependency "rake"
20
+ spec.add_development_dependency 'bundler', '~> 1.3'
21
+ spec.add_development_dependency 'rake'
22
22
  end
@@ -4,19 +4,25 @@ module Diacritics
4
4
  module String
5
5
  # @deprecated Please use {#downcase} instead.
6
6
  def diacritics_downcase
7
+ # rubocop:disable all
7
8
  warn '[DEPRECATION] `diacritics_downcase` is depraceted. Please use `downcase` instead.'
9
+ # rubocop:enable all
8
10
  send :downcase
9
11
  end
10
12
 
11
13
  # @deprecated Please use {#upcase} instead.
12
14
  def diacritics_upcase
15
+ # rubocop:disable all
13
16
  warn '[DEPRECATION] `diacritics_upcase` is depraceted. Please use `upcase` instead.'
17
+ # rubocop:enable all
14
18
  send :upcase
15
19
  end
16
20
 
17
21
  # @deprecated Please use {#permanent} instead.
18
22
  def permanent_link
23
+ # rubocop:disable all
19
24
  warn '[DEPRECATION] `permanent_link` is depraceted. Please use `permanent` instead.'
25
+ # rubocop:enable all
20
26
  send :permanent
21
27
  end
22
28
 
@@ -1,4 +1,5 @@
1
+ # encoding: utf-8
1
2
  # Gem version
2
3
  module Diacritics
3
- VERSION = '0.0.2'
4
+ VERSION = '0.0.3'
4
5
  end
data/lib/diacritics.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  require 'diacritics/alphabet'
2
3
  require 'diacritics/cases'
3
4
  require 'diacritics/string'
@@ -1 +1,2 @@
1
+ # encoding: utf-8
1
2
  require 'spec_helper'
data/spec/spec_helper.rb CHANGED
@@ -1,6 +1,7 @@
1
+ # encoding: utf-8
1
2
  require 'diacritics'
2
3
  require 'coveralls'
3
- # Coveralls.wear!
4
+ Coveralls.wear!
4
5
  require 'simplecov'
5
6
  SimpleCov.start
6
7
 
metadata CHANGED
@@ -1,52 +1,56 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: diacritics
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aleksander Malaszkiewicz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-16 00:00:00.000000000 Z
11
+ date: 2013-08-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: bundler
15
14
  requirement: !ruby/object:Gem::Requirement
16
15
  requirements:
17
16
  - - ~>
18
17
  - !ruby/object:Gem::Version
19
18
  version: '1.3'
19
+ name: bundler
20
20
  type: :development
21
- prerelease: false
22
21
  version_requirements: !ruby/object:Gem::Requirement
23
22
  requirements:
24
23
  - - ~>
25
24
  - !ruby/object:Gem::Version
26
25
  version: '1.3'
26
+ prerelease: false
27
27
  - !ruby/object:Gem::Dependency
28
- name: rake
29
28
  requirement: !ruby/object:Gem::Requirement
30
29
  requirements:
31
- - - '>='
30
+ - - ! '>='
32
31
  - !ruby/object:Gem::Version
33
- version: '0'
32
+ version: !binary |-
33
+ MA==
34
+ name: rake
34
35
  type: :development
35
- prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ! '>='
39
39
  - !ruby/object:Gem::Version
40
- version: '0'
40
+ version: !binary |-
41
+ MA==
42
+ prerelease: false
41
43
  description:
42
44
  email:
43
45
  - info@fractalsoft.org
44
- executables: []
46
+ executables:
47
+ - diacritics_benchmark
45
48
  extensions: []
46
49
  extra_rdoc_files: []
47
50
  files:
48
51
  - .gitignore
49
52
  - .rspec
53
+ - .rubocop.yml
50
54
  - .ruby-gemset
51
55
  - .ruby-version
52
56
  - .travis.yml
@@ -57,6 +61,7 @@ files:
57
61
  - README.md
58
62
  - Rakefile
59
63
  - TODO.md
64
+ - bin/diacritics_benchmark
60
65
  - diacritics.gemspec
61
66
  - lib/diacritics.rb
62
67
  - lib/diacritics/alphabet.rb
@@ -77,17 +82,19 @@ require_paths:
77
82
  - lib
78
83
  required_ruby_version: !ruby/object:Gem::Requirement
79
84
  requirements:
80
- - - '>='
85
+ - - ! '>='
81
86
  - !ruby/object:Gem::Version
82
- version: '0'
87
+ version: !binary |-
88
+ MA==
83
89
  required_rubygems_version: !ruby/object:Gem::Requirement
84
90
  requirements:
85
- - - '>='
91
+ - - ! '>='
86
92
  - !ruby/object:Gem::Version
87
- version: '0'
93
+ version: !binary |-
94
+ MA==
88
95
  requirements: []
89
96
  rubyforge_project:
90
- rubygems_version: 2.0.3
97
+ rubygems_version: 2.0.6
91
98
  signing_key:
92
99
  specification_version: 4
93
100
  summary: Support diacritics