turegex 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in turegex.gemspec
4
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,14 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ turegex (0.0.1)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+
10
+ PLATFORMS
11
+ ruby
12
+
13
+ DEPENDENCIES
14
+ turegex!
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2015 Hüseyin Tekinaslan <huseyin.tekinaslan@bil.omu.edu.tr>
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1 @@
1
+ # Turegex
data/Rakefile ADDED
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env rake
2
+ require "bundler/gem_tasks"
3
+ require "rake/testtask"
4
+
5
+ Rake::TestTask.new do |t|
6
+ t.test_files = FileList['test/*_test.rb']
7
+ end
8
+ desc "Run tests"
9
+ task default: :test
data/lib/turegex.rb ADDED
@@ -0,0 +1,12 @@
1
+ # encoding: utf-8
2
+
3
+ require "turegex/version"
4
+
5
+ class String
6
+ def to_t
7
+ chars = { ı: 'i', ü: 'u', ö: 'o', ğ: 'g', ş: 's', ç: 'c',
8
+ İ: 'I', Ü: 'U', Ö: 'O', Ğ: 'G', Ş: 'S', Ç: 'C', }
9
+
10
+ gsub(Regexp.new('[' + chars.keys.join + ']')) { |t| chars[:"#{t}"] }
11
+ end
12
+ end
@@ -0,0 +1,3 @@
1
+ module Turegex
2
+ VERSION = "0.0.1"
3
+ end
data/test/trgx_test.rb ADDED
@@ -0,0 +1,11 @@
1
+ # encoding: utf-8
2
+
3
+ require 'minitest/autorun'
4
+ require File.dirname(__FILE__) + '/../lib/turegex'
5
+
6
+ class TisikkirlirTest < Minitest::Test
7
+ def test_turegex
8
+ assert_equal "HUSEYIN TEKINASLAN", "HÜSEYİN TEKİNASLAN".to_t
9
+ assert_equal "Huseyin Tekinaslan", "Hüseyın Tekınaslan".to_t
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ # encoding: utf-8
2
+
3
+ require 'minitest/autorun'
4
+ require File.dirname(__FILE__) + '/../lib/turegex'
5
+
6
+ class TisikkirlirTest < Minitest::Test
7
+ def test_turegex
8
+ assert_equal "HUSEYIN TEKINASLAN", "HÜSEYİN TEKİNASLAN".to_t
9
+ assert_equal "Huseyin Tekinaslan", "Hüseyın Tekınaslan".to_t
10
+ end
11
+ end
data/turegex.gemspec ADDED
@@ -0,0 +1,18 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ require File.expand_path('../lib/turegex/version', __FILE__)
4
+
5
+ Gem::Specification.new do |gem|
6
+ gem.authors = ["Hüseyin Tekinaslan"]
7
+ gem.email = ["huseyin.tekinaslan@bil.omu.edu.tr"]
8
+ gem.description = %q{Regular expressions for Turkish characters}
9
+ gem.summary = %q{Turkish Regexp}
10
+ gem.homepage = ""
11
+ gem.version = Turegex::VERSION
12
+
13
+ gem.files = `git ls-files`.split($\)
14
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
15
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
16
+ gem.name = "turegex"
17
+ gem.require_paths = ["lib"]
18
+ end
metadata ADDED
@@ -0,0 +1,57 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: turegex
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Hüseyin Tekinaslan
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2015-05-26 00:00:00.000000000 Z
13
+ dependencies: []
14
+ description: Regular expressions for Turkish characters
15
+ email:
16
+ - huseyin.tekinaslan@bil.omu.edu.tr
17
+ executables: []
18
+ extensions: []
19
+ extra_rdoc_files: []
20
+ files:
21
+ - Gemfile
22
+ - Gemfile.lock
23
+ - LICENSE
24
+ - README.md
25
+ - Rakefile
26
+ - lib/turegex.rb
27
+ - lib/turegex/version.rb
28
+ - test/trgx_test.rb
29
+ - test/trgx_test.rb~
30
+ - turegex.gemspec
31
+ homepage: ''
32
+ licenses: []
33
+ post_install_message:
34
+ rdoc_options: []
35
+ require_paths:
36
+ - lib
37
+ required_ruby_version: !ruby/object:Gem::Requirement
38
+ none: false
39
+ requirements:
40
+ - - ! '>='
41
+ - !ruby/object:Gem::Version
42
+ version: '0'
43
+ required_rubygems_version: !ruby/object:Gem::Requirement
44
+ none: false
45
+ requirements:
46
+ - - ! '>='
47
+ - !ruby/object:Gem::Version
48
+ version: '0'
49
+ requirements: []
50
+ rubyforge_project:
51
+ rubygems_version: 1.8.23
52
+ signing_key:
53
+ specification_version: 3
54
+ summary: Turkish Regexp
55
+ test_files:
56
+ - test/trgx_test.rb
57
+ - test/trgx_test.rb~