tate 1.4.0 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a33d505de9059911aced626c047e9d7907e184e0598f85f0eed3337662866514
4
- data.tar.gz: 41193e5808ee6ac6e5e49446539187465cacb8c1d95b6baabaa7e384e4d2fb7b
3
+ metadata.gz: 315899edcf8166179ea26996ede5fadaa052db6b039667c48427aabd2d6c6f90
4
+ data.tar.gz: be1cf852a4a2c0e16fec95b6b18fcf313f548f447bf6bae5fea771efd44db59c
5
5
  SHA512:
6
- metadata.gz: 8778bddcff1a6e29434e6eb7143c1e42b4cb08cc4026c84457ce535b1e025c9b7af09150dae2abe5d681e3d225f2a8c534036c9c40d2ba462e01099d247e1bee
7
- data.tar.gz: bbad92c092efd10d4a83a5687196c2c8420a3b2c20bc670390b6f7c6e380a75df5674d8333eba2778e1f8cb6ea855562e90e6bc5660a57f2cc3e2acfeb6bab90
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
@@ -1,4 +1,6 @@
1
- source 'https://rubygems.org'
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
2
4
 
3
5
  # Specify your gem's dependencies in tate.gemspec
4
6
  gemspec
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2019 Kerem Bozdas
3
+ Copyright (c) 2022 Kerem Bozdas
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -1,9 +1,9 @@
1
1
  # Tate ✍️
2
2
 
3
- [![Build Status](https://img.shields.io/travis/krmbzds/tate.svg)](https://travis-ci.org/krmbzds/tate)
4
- [![Code Coverage](https://img.shields.io/codeclimate/coverage/krmbzds/tate.svg)](https://codeclimate.com/github/krmbzds/tate/test_coverage)
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
- [![Downloaded](https://img.shields.io/gem/dt/tate.svg)](https://rubygems.org/gems/tate)
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.
@@ -123,9 +123,24 @@ Russian, Irish, Arabic, and Yoruba.
123
123
 
124
124
  Yes.
125
125
 
126
+ ## Support
127
+
128
+ This gem is tested against the following Ruby versions:
129
+
130
+ - ✅ `3.1.1` (stable)
131
+ - ✅ `3.0.3` (stable)
132
+ - ✅ `2.7.5` (stable)
133
+ - ⏳ `2.6.9` (security maintenance)
134
+
135
+ ## Development
136
+
137
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
138
+
139
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org][RubyGems].
140
+
126
141
  ## Contributing
127
142
 
128
- 1. Fork it (https://github.com/krmbzds/tate/fork)
143
+ 1. [Fork the repository][Fork]
129
144
  2. Create your feature branch (`git checkout -b add-irish-support`)
130
145
  3. Commit your changes (`git commit -am 'Add Irish language support'`)
131
146
  4. Push to the branch (`git push origin add-irish-support`)
@@ -147,10 +162,12 @@ Nobody has time to type transliterate in the terminal.
147
162
 
148
163
  ## License
149
164
 
150
- Copyright © 2019 [Kerem Bozdas][Personal Webpage]
165
+ Copyright © 2016-2022 [Kerem Bozdas][Personal Webpage]
151
166
 
152
167
  This project is available under the terms of the [MIT License][License].
153
168
 
154
169
  [Donation]: https://liberapay.com/krmbzds/donate
155
- [Personal Webpage]: http://kerembozdas.com
170
+ [Fork]: https://github.com/krmbzds/tate/fork
156
171
  [License]: http://kerem.mit-license.org
172
+ [Personal Webpage]: http://kerembozdas.com
173
+ [RubyGems]: https://rubygems.org
data/Rakefile CHANGED
@@ -1,6 +1,8 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "bundler/gem_tasks"
2
4
  require "rspec/core/rake_task"
3
5
 
4
6
  RSpec::Core::RakeTask.new(:spec)
5
7
 
6
- task :default => :spec
8
+ task default: :spec
data/bin/console CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
4
  require "bundler/setup"
4
5
  require "tate"
data/bin/tate CHANGED
@@ -1,23 +1,23 @@
1
1
  #!/usr/bin/env ruby
2
- # encoding: UTF-8
2
+ # frozen_string_literal: true
3
3
 
4
- lib = File.expand_path(File.dirname(__FILE__) + '/../lib')
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 'tate'
8
- require 'optionparser'
7
+ require "tate"
8
+ require "optionparser"
9
9
 
10
10
  options = {}
11
11
 
12
12
  option_parser = OptionParser.new do |opts|
13
- opts.banner = 'Usage: tate [options]'
14
- opts.on("-l[LANGUAGE]", "--lang=[LANGUAGE]", String, 'Set language for custom filters') do |language|
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('-h', '--help', 'Show this message') do
18
- options[:help] = true
17
+ opts.on("-h", "--help", "Show this message") do
18
+ options[:help] = opts.help
19
19
  end
20
- opts.on('-v', '--version', 'Show version') do
20
+ opts.on("-v", "--version", "Show version") do
21
21
  options[:version] = Tate::VERSION
22
22
  end
23
23
  end
@@ -25,11 +25,11 @@ end
25
25
  option_parser.parse!
26
26
 
27
27
  if options[:language]
28
- STDOUT.puts(Tate::transliterate(STDIN.read, language=options[:language]))
28
+ STDOUT.puts(Tate.transliterate(STDIN.read, options[:language]))
29
29
  elsif options[:version]
30
30
  STDOUT.puts(options[:version])
31
31
  elsif options.empty?
32
- STDOUT.puts(Tate::transliterate(STDIN.read))
32
+ STDOUT.puts(Tate.transliterate(STDIN.read))
33
33
  else
34
- STDOUT.puts(option_parser.help)
34
+ STDOUT.puts(options[:help])
35
35
  end
data/lib/tate/version.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Tate
2
- VERSION = "1.4.0"
4
+ VERSION = "1.7.0"
3
5
  end
data/lib/tate.rb CHANGED
@@ -1,17 +1,18 @@
1
- lib = File.expand_path(File.dirname(__FILE__) + '/../lib')
2
- $LOAD_PATH.unshift(lib) if File.directory?(lib) && !$LOAD_PATH.include?(lib)
1
+ # frozen_string_literal: true
3
2
 
4
- require 'tate/version'
3
+ lib = File.expand_path(File.dirname(__FILE__) + "/../lib")
4
+ $LOAD_PATH.unshift(lib) if File.directory?(lib) && !$LOAD_PATH.include?(lib)
5
5
 
6
- require 'i18n'
7
- require 'yaml'
6
+ require "tate/version"
7
+ require "i18n"
8
+ require "yaml"
8
9
 
9
- I18n.load_path << Dir[File.expand_path("lib/config/locales/*.yml")]
10
+ I18n.load_path << Dir[File.expand_path("#{lib}/config/locales/*.yml")]
10
11
  I18n.enforce_available_locales = false
11
12
  I18n.default_locale = :en
12
13
 
13
14
  module Tate
14
- def self.transliterate(string, language = nil, replacement = "?".freeze)
15
+ def self.transliterate(string, language = nil, _replacement = "?")
15
16
  I18n.transliterate(string, locale: language)
16
17
  end
17
18
  end
data/tate.gemspec CHANGED
@@ -1,28 +1,29 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
1
+ # frozen_string_literal: true
2
+
3
+ lib = File.expand_path("lib", __dir__)
3
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'tate/version'
5
+ require "tate/version"
5
6
 
6
7
  Gem::Specification.new do |spec|
7
- spec.name = 'tate'
8
- spec.version = Tate::VERSION
9
- spec.licenses = 'MIT'
10
- spec.authors = ['Kerem Bozdas']
11
- spec.email = ['krmbzds.github@gmail.com']
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"]
12
13
 
13
- spec.summary = 'Convert accented characters and transliterate non-latin alphabets to ASCII.'
14
- spec.description = 'Convert accented characters and transliterate non-latin alphabets to ASCII.'
15
- spec.homepage = 'https://github.com/krmbzds/tate'
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"
16
17
 
17
- spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
18
- spec.files += Dir['lib/config/locales/*.yml']
19
- spec.bindir = 'bin'
20
- spec.executables = ['tate']
21
- spec.require_paths = ['lib']
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 'i18n', '~> 1.6'
24
- spec.add_development_dependency 'bundler', '~> 2.0', '>= 2.0.2'
25
- spec.add_development_dependency 'rake', '~> 12.3'
26
- spec.add_development_dependency 'rspec', '~> 3.8'
27
- spec.add_development_dependency 'simplecov', '~> 0.17.1'
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.0
4
+ version: 1.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kerem Bozdas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-17 00:00:00.000000000 Z
11
+ date: 2022-03-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n
@@ -16,76 +16,84 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.6'
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.6'
26
+ version: '1.10'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '2.0'
34
31
  - - ">="
35
32
  - !ruby/object:Gem::Version
36
- version: 2.0.2
33
+ version: '0'
37
34
  type: :development
38
35
  prerelease: false
39
36
  version_requirements: !ruby/object:Gem::Requirement
40
37
  requirements:
41
- - - "~>"
42
- - !ruby/object:Gem::Version
43
- version: '2.0'
44
38
  - - ">="
45
39
  - !ruby/object:Gem::Version
46
- version: 2.0.2
40
+ version: '0'
47
41
  - !ruby/object:Gem::Dependency
48
42
  name: rake
49
43
  requirement: !ruby/object:Gem::Requirement
50
44
  requirements:
51
- - - "~>"
45
+ - - ">="
52
46
  - !ruby/object:Gem::Version
53
- version: '12.3'
47
+ version: '0'
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
51
  requirements:
58
- - - "~>"
52
+ - - ">="
59
53
  - !ruby/object:Gem::Version
60
- version: '12.3'
54
+ version: '0'
61
55
  - !ruby/object:Gem::Dependency
62
56
  name: rspec
63
57
  requirement: !ruby/object:Gem::Requirement
64
58
  requirements:
65
- - - "~>"
59
+ - - ">="
66
60
  - !ruby/object:Gem::Version
67
- version: '3.8'
61
+ version: '0'
68
62
  type: :development
69
63
  prerelease: false
70
64
  version_requirements: !ruby/object:Gem::Requirement
71
65
  requirements:
72
- - - "~>"
66
+ - - ">="
73
67
  - !ruby/object:Gem::Version
74
- version: '3.8'
68
+ version: '0'
75
69
  - !ruby/object:Gem::Dependency
76
- name: simplecov
70
+ name: standard
77
71
  requirement: !ruby/object:Gem::Requirement
78
72
  requirements:
79
- - - "~>"
73
+ - - ">="
80
74
  - !ruby/object:Gem::Version
81
- version: 0.17.1
75
+ version: '0'
82
76
  type: :development
83
77
  prerelease: false
84
78
  version_requirements: !ruby/object:Gem::Requirement
85
79
  requirements:
86
- - - "~>"
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
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
87
95
  - !ruby/object:Gem::Version
88
- version: 0.17.1
96
+ version: '0'
89
97
  description: Convert accented characters and transliterate non-latin alphabets to
90
98
  ASCII.
91
99
  email:
@@ -95,11 +103,11 @@ executables:
95
103
  extensions: []
96
104
  extra_rdoc_files: []
97
105
  files:
106
+ - ".github/workflows/publish.yml"
107
+ - ".github/workflows/test.yml"
98
108
  - ".gitignore"
99
109
  - ".rspec"
100
- - ".ruby-gemset"
101
- - ".ruby-version"
102
- - ".travis.yml"
110
+ - ".tool-versions"
103
111
  - Gemfile
104
112
  - LICENSE.txt
105
113
  - README.md
@@ -141,7 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
141
149
  - !ruby/object:Gem::Version
142
150
  version: '0'
143
151
  requirements: []
144
- rubygems_version: 3.0.6
152
+ rubygems_version: 3.3.7
145
153
  signing_key:
146
154
  specification_version: 4
147
155
  summary: Convert accented characters and transliterate non-latin alphabets to ASCII.
data/.ruby-gemset DELETED
@@ -1 +0,0 @@
1
- tate
data/.ruby-version DELETED
@@ -1 +0,0 @@
1
- ruby-2.6.5
data/.travis.yml DELETED
@@ -1,21 +0,0 @@
1
- ---
2
- language: ruby
3
- rvm:
4
- - 2.6.5
5
- - 2.5.7
6
- - 2.4.9
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