tate 1.6.0 → 1.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/publish.yml +24 -0
- data/.github/workflows/test.yml +53 -0
- data/.tool-versions +1 -0
- data/Gemfile +1 -1
- data/LICENSE.txt +1 -1
- data/README.md +8 -7
- data/Rakefile +2 -2
- data/bin/console +3 -3
- data/bin/tate +7 -7
- data/lib/tate/version.rb +1 -1
- data/lib/tate.rb +5 -5
- data/tate.gemspec +20 -19
- metadata +30 -16
- data/.ruby-gemset +0 -1
- data/.ruby-version +0 -1
- data/.travis.yml +0 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 315899edcf8166179ea26996ede5fadaa052db6b039667c48427aabd2d6c6f90
|
4
|
+
data.tar.gz: be1cf852a4a2c0e16fec95b6b18fcf313f548f447bf6bae5fea771efd44db59c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d7074a99304c2b3bd8c4254cf4c43ab310c8af32e59064f1ebd1f72b784e38e4fb21c2738f816768312fb00cecc59a5d95d560be2c38a79686e588c296974a86
|
7
|
+
data.tar.gz: 3ea872c374514fa6e07a96e836147b32f5d988ee2da097fe3ba848d4a1423a7e7adadd3c96a5795b4fe7f105ec0c211b2ba912e48b48f023cccdc4bd3a9bd4a3
|
@@ -0,0 +1,24 @@
|
|
1
|
+
name: Publish
|
2
|
+
|
3
|
+
on:
|
4
|
+
release:
|
5
|
+
types: [published]
|
6
|
+
|
7
|
+
jobs:
|
8
|
+
build:
|
9
|
+
name: Publish Packages
|
10
|
+
runs-on: ubuntu-latest
|
11
|
+
|
12
|
+
steps:
|
13
|
+
- uses: actions/checkout@v2
|
14
|
+
|
15
|
+
- name: Set up Ruby
|
16
|
+
uses: ruby/setup-ruby@v1
|
17
|
+
with:
|
18
|
+
bundler-cache: true
|
19
|
+
|
20
|
+
- name: Publish to RubyGems
|
21
|
+
uses: dawidd6/action-publish-gem@v1
|
22
|
+
with:
|
23
|
+
api_key: ${{secrets.RUBYGEMS_AUTH_TOKEN}}
|
24
|
+
|
@@ -0,0 +1,53 @@
|
|
1
|
+
name: Test
|
2
|
+
|
3
|
+
on:
|
4
|
+
pull_request:
|
5
|
+
|
6
|
+
push:
|
7
|
+
branches: [ develop, master ]
|
8
|
+
|
9
|
+
env:
|
10
|
+
GIT_COMMIT_SHA: ${{ github.sha }}
|
11
|
+
GIT_BRANCH: ${{ github.ref }}
|
12
|
+
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
|
13
|
+
|
14
|
+
jobs:
|
15
|
+
|
16
|
+
lint:
|
17
|
+
runs-on: ubuntu-latest
|
18
|
+
name: lint ${{ matrix.ruby }}
|
19
|
+
strategy:
|
20
|
+
fail-fast: false
|
21
|
+
matrix:
|
22
|
+
ruby: [ '2.6.9', '2.7.5', '3.0.3', '3.1.1' ]
|
23
|
+
|
24
|
+
steps:
|
25
|
+
- uses: actions/checkout@v2
|
26
|
+
- uses: ruby/setup-ruby@v1
|
27
|
+
with:
|
28
|
+
ruby-version: ${{ matrix.ruby }}
|
29
|
+
bundler-cache: true
|
30
|
+
|
31
|
+
- name: StandardRB
|
32
|
+
continue-on-error: ${{ matrix.experimental }}
|
33
|
+
run: bundle exec standardrb --parallel --format progress
|
34
|
+
|
35
|
+
test:
|
36
|
+
needs: [ lint ]
|
37
|
+
runs-on: ubuntu-latest
|
38
|
+
name: test ${{ matrix.ruby }}
|
39
|
+
strategy:
|
40
|
+
fail-fast: false
|
41
|
+
matrix:
|
42
|
+
ruby: [ '2.6.9', '2.7.5', '3.0.3', '3.1.1' ]
|
43
|
+
|
44
|
+
steps:
|
45
|
+
- uses: actions/checkout@v2
|
46
|
+
- uses: ruby/setup-ruby@v1
|
47
|
+
with:
|
48
|
+
ruby-version: ${{ matrix.ruby }}
|
49
|
+
bundler-cache: true
|
50
|
+
|
51
|
+
- name: Test
|
52
|
+
continue-on-error: ${{ matrix.experimental }}
|
53
|
+
run: bundle exec rake
|
data/.tool-versions
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ruby 3.1.1
|
data/Gemfile
CHANGED
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# Tate ✍️
|
2
2
|
|
3
|
-
[![Build Status](https://img.shields.io/
|
4
|
-
[![
|
3
|
+
[![Build Status](https://img.shields.io/github/workflow/status/krmbzds/tate/Test/master)](https://github.com/krmbzds/tate/actions/workflows/test.yml)
|
4
|
+
[![Coveralls](https://img.shields.io/coveralls/github/krmbzds/tate)](https://coveralls.io/github/krmbzds/tate)
|
5
5
|
[![Maintainability](https://img.shields.io/codeclimate/maintainability/krmbzds/tate.svg)](https://codeclimate.com/github/krmbzds/tate/maintainability)
|
6
|
-
[![
|
6
|
+
[![Downloads](https://img.shields.io/gem/dt/tate.svg)](https://rubygems.org/gems/tate)
|
7
7
|
[![Gem Version](https://img.shields.io/gem/v/tate.svg)](https://rubygems.org/gems/tate)
|
8
8
|
|
9
9
|
**Tate** converts accented characters and transliterates non-latin scripts to their closest ASCII equivalent.
|
@@ -127,9 +127,10 @@ Yes.
|
|
127
127
|
|
128
128
|
This gem is tested against the following Ruby versions:
|
129
129
|
|
130
|
-
- ✅ `
|
131
|
-
- ✅ `
|
132
|
-
-
|
130
|
+
- ✅ `3.1.1` (stable)
|
131
|
+
- ✅ `3.0.3` (stable)
|
132
|
+
- ✅ `2.7.5` (stable)
|
133
|
+
- ⏳ `2.6.9` (security maintenance)
|
133
134
|
|
134
135
|
## Development
|
135
136
|
|
@@ -161,7 +162,7 @@ Nobody has time to type transliterate in the terminal.
|
|
161
162
|
|
162
163
|
## License
|
163
164
|
|
164
|
-
Copyright © 2016-
|
165
|
+
Copyright © 2016-2022 [Kerem Bozdas][Personal Webpage]
|
165
166
|
|
166
167
|
This project is available under the terms of the [MIT License][License].
|
167
168
|
|
data/Rakefile
CHANGED
data/bin/console
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
|
-
require
|
5
|
-
require
|
4
|
+
require "bundler/setup"
|
5
|
+
require "tate"
|
6
6
|
|
7
7
|
# You can add fixtures and/or initialization code here to make experimenting
|
8
8
|
# with your gem easier. You can also use a different console, if you like.
|
@@ -11,5 +11,5 @@ require 'tate'
|
|
11
11
|
# require "pry"
|
12
12
|
# Pry.start
|
13
13
|
|
14
|
-
require
|
14
|
+
require "irb"
|
15
15
|
IRB.start
|
data/bin/tate
CHANGED
@@ -1,23 +1,23 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
|
-
lib = File.expand_path(File.dirname(__FILE__) +
|
4
|
+
lib = File.expand_path(File.dirname(__FILE__) + "/../lib")
|
5
5
|
$LOAD_PATH.unshift(lib) if File.directory?(lib) && !$LOAD_PATH.include?(lib)
|
6
6
|
|
7
|
-
require
|
8
|
-
require
|
7
|
+
require "tate"
|
8
|
+
require "optionparser"
|
9
9
|
|
10
10
|
options = {}
|
11
11
|
|
12
12
|
option_parser = OptionParser.new do |opts|
|
13
|
-
opts.banner =
|
14
|
-
opts.on(
|
13
|
+
opts.banner = "Usage: tate [-l LANGUAGE]"
|
14
|
+
opts.on("-l LANGUAGE", "--language LANGUAGE", String, "Set language for custom filters") do |language|
|
15
15
|
options[:language] = language
|
16
16
|
end
|
17
|
-
opts.on(
|
17
|
+
opts.on("-h", "--help", "Show this message") do
|
18
18
|
options[:help] = opts.help
|
19
19
|
end
|
20
|
-
opts.on(
|
20
|
+
opts.on("-v", "--version", "Show version") do
|
21
21
|
options[:version] = Tate::VERSION
|
22
22
|
end
|
23
23
|
end
|
data/lib/tate/version.rb
CHANGED
data/lib/tate.rb
CHANGED
@@ -1,18 +1,18 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
lib = File.expand_path(File.dirname(__FILE__) +
|
3
|
+
lib = File.expand_path(File.dirname(__FILE__) + "/../lib")
|
4
4
|
$LOAD_PATH.unshift(lib) if File.directory?(lib) && !$LOAD_PATH.include?(lib)
|
5
5
|
|
6
|
-
require
|
7
|
-
require
|
8
|
-
require
|
6
|
+
require "tate/version"
|
7
|
+
require "i18n"
|
8
|
+
require "yaml"
|
9
9
|
|
10
10
|
I18n.load_path << Dir[File.expand_path("#{lib}/config/locales/*.yml")]
|
11
11
|
I18n.enforce_available_locales = false
|
12
12
|
I18n.default_locale = :en
|
13
13
|
|
14
14
|
module Tate
|
15
|
-
def self.transliterate(string, language = nil, _replacement =
|
15
|
+
def self.transliterate(string, language = nil, _replacement = "?")
|
16
16
|
I18n.transliterate(string, locale: language)
|
17
17
|
end
|
18
18
|
end
|
data/tate.gemspec
CHANGED
@@ -1,28 +1,29 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
lib = File.expand_path(
|
3
|
+
lib = File.expand_path("lib", __dir__)
|
4
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
-
require
|
5
|
+
require "tate/version"
|
6
6
|
|
7
7
|
Gem::Specification.new do |spec|
|
8
|
-
spec.name
|
9
|
-
spec.version
|
10
|
-
spec.licenses
|
11
|
-
spec.authors
|
12
|
-
spec.email
|
8
|
+
spec.name = "tate"
|
9
|
+
spec.version = Tate::VERSION
|
10
|
+
spec.licenses = "MIT"
|
11
|
+
spec.authors = ["Kerem Bozdas"]
|
12
|
+
spec.email = ["krmbzds.github@gmail.com"]
|
13
13
|
|
14
|
-
spec.summary
|
15
|
-
spec.description
|
16
|
-
spec.homepage
|
14
|
+
spec.summary = "Convert accented characters and transliterate non-latin alphabets to ASCII."
|
15
|
+
spec.description = "Convert accented characters and transliterate non-latin alphabets to ASCII."
|
16
|
+
spec.homepage = "https://github.com/krmbzds/tate"
|
17
17
|
|
18
|
-
spec.files
|
19
|
-
spec.bindir
|
20
|
-
spec.executables
|
21
|
-
spec.require_paths = [
|
18
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
19
|
+
spec.bindir = "bin"
|
20
|
+
spec.executables = ["tate"]
|
21
|
+
spec.require_paths = ["lib"]
|
22
22
|
|
23
|
-
spec.add_runtime_dependency
|
24
|
-
spec.add_development_dependency
|
25
|
-
spec.add_development_dependency
|
26
|
-
spec.add_development_dependency
|
27
|
-
spec.add_development_dependency
|
23
|
+
spec.add_runtime_dependency "i18n", "~> 1.10"
|
24
|
+
spec.add_development_dependency "bundler"
|
25
|
+
spec.add_development_dependency "rake"
|
26
|
+
spec.add_development_dependency "rspec"
|
27
|
+
spec.add_development_dependency "standard"
|
28
|
+
spec.add_development_dependency "coveralls_reborn"
|
28
29
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kerem Bozdas
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-03-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: i18n
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1.
|
19
|
+
version: '1.10'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '1.
|
26
|
+
version: '1.10'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -67,19 +67,33 @@ dependencies:
|
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: standard
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0
|
75
|
+
version: '0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: coveralls_reborn
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
81
88
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
83
97
|
description: Convert accented characters and transliterate non-latin alphabets to
|
84
98
|
ASCII.
|
85
99
|
email:
|
@@ -89,11 +103,11 @@ executables:
|
|
89
103
|
extensions: []
|
90
104
|
extra_rdoc_files: []
|
91
105
|
files:
|
106
|
+
- ".github/workflows/publish.yml"
|
107
|
+
- ".github/workflows/test.yml"
|
92
108
|
- ".gitignore"
|
93
109
|
- ".rspec"
|
94
|
-
- ".
|
95
|
-
- ".ruby-version"
|
96
|
-
- ".travis.yml"
|
110
|
+
- ".tool-versions"
|
97
111
|
- Gemfile
|
98
112
|
- LICENSE.txt
|
99
113
|
- README.md
|
@@ -120,7 +134,7 @@ homepage: https://github.com/krmbzds/tate
|
|
120
134
|
licenses:
|
121
135
|
- MIT
|
122
136
|
metadata: {}
|
123
|
-
post_install_message:
|
137
|
+
post_install_message:
|
124
138
|
rdoc_options: []
|
125
139
|
require_paths:
|
126
140
|
- lib
|
@@ -135,8 +149,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
135
149
|
- !ruby/object:Gem::Version
|
136
150
|
version: '0'
|
137
151
|
requirements: []
|
138
|
-
rubygems_version: 3.
|
139
|
-
signing_key:
|
152
|
+
rubygems_version: 3.3.7
|
153
|
+
signing_key:
|
140
154
|
specification_version: 4
|
141
155
|
summary: Convert accented characters and transliterate non-latin alphabets to ASCII.
|
142
156
|
test_files: []
|
data/.ruby-gemset
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
tate
|
data/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
ruby-2.7.1
|
data/.travis.yml
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
---
|
2
|
-
language: ruby
|
3
|
-
rvm:
|
4
|
-
- 2.7.1
|
5
|
-
- 2.6.6
|
6
|
-
- 2.5.8
|
7
|
-
before_install:
|
8
|
-
- 'gem update --system'
|
9
|
-
- 'gem --version'
|
10
|
-
- 'gem install bundler'
|
11
|
-
before_script:
|
12
|
-
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
13
|
-
- chmod +x ./cc-test-reporter
|
14
|
-
- "./cc-test-reporter before-build"
|
15
|
-
script:
|
16
|
-
- bundle exec rspec
|
17
|
-
after_script:
|
18
|
-
- "./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT"
|
19
|
-
env:
|
20
|
-
global:
|
21
|
-
- CC_TEST_REPORTER_ID=8ec95d64844683a9ce73f086a637d7bb2c7ae00a0042c4efa75ee34637a0fd58
|