rtl 0.3.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4623d22b6ca5f7100f22ea9156d4e2095dabc0db2fa3c4542113871a0d344b51
4
- data.tar.gz: f79578c56d27d4a293f04c8d452688ba7acdb6b47ebb27b24c4af92e5647316e
3
+ metadata.gz: 47c58fe5abb1411e868b5e57c51da914043d7449abc9c582d30a2297a6636957
4
+ data.tar.gz: b2f6779bc281601fb62cbe7e2c018eedfb810d1471b3c104b9f3e2bede4a9bfa
5
5
  SHA512:
6
- metadata.gz: 72243eaf4b8bf54a9bac059656854b0aba4db92950656f286ae860029514aa51af4cf5e4923794cf4243c09ad9348569dd61b540f4de0cc17e3e716b1c402735
7
- data.tar.gz: cac5550ba277e9923082ab56859e046e808c9d05c287de62e4c4175b145764417eecada9494e6be117812b82213f9fa26915b975d269b18057111f1ce0d97d5b
6
+ metadata.gz: c79513d85382bb7e1f7906844cc155c18d5e0b5862579d085de7e734e436ee6fad45e3cb0673ec53b4f3c1d08f7007f3a7759e3b7bd4b163d6c694b3c8eb9021
7
+ data.tar.gz: abff893ebd3acd373fbb95024876e4d1096e8682c19cc1ee12545d51929a0530ebf56130e62d44492bd59d51e5eae6d56dbf061dd8e29847d9561b60204b8f96
data/.gitignore CHANGED
@@ -9,4 +9,4 @@
9
9
 
10
10
  /.idea
11
11
  /.idea/*
12
-
12
+ coverage
data/.travis.yml CHANGED
@@ -6,8 +6,8 @@ rvm:
6
6
  - 2.7.0
7
7
  - 3.0.0
8
8
  cache: bundler
9
- before_install: gem install bundler -v 2.2.20
10
- install: bundle install --jobs=4 --retry=3
9
+ before_install: gem install bundler -v 2.2.24
10
+ install: bundle install --jobs=3 --retry=3
11
11
  before_script:
12
12
  - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
13
13
  - chmod +x ./cc-test-reporter
data/CHANGELOG CHANGED
@@ -1,11 +1,27 @@
1
1
  # RTL Gem Changelog
2
2
 
3
- ## [v0.2.3]
4
- - Initial release [@abarrak](https://github.com/abarrak).
3
+ ## [0.6.0] - 2022-06-14
5
4
 
6
- ## [0.2.4]
7
- - Add support for Urdu [@benwbrum](https://github.com/benwbrum).
5
+ - Add support for Yiddish language [@richardjaldin](https://github.com/richardjaldin).
6
+
7
+ ## [0.5.0] - 2022-04-14
8
+
9
+ - Add support for Pashto (Pushto) [@asped](https://github.com/asped).
10
+
11
+ ## [0.4.0] - 2021-07-24
12
+
13
+ - Make querying by :all criteria as the default for convenience instead of iso_code only [@abarrak](https://github.com/abarrak).
14
+ - Bug fix on error reporting in case incorrect scheme option is passed [@abarrak](https://github.com/abarrak).
15
+
16
+ ## [0.3.0] - 2021-07-24
8
17
 
9
- ## [0.3.0]
10
18
  - Update development dependencies to latest versions [@abarrak](https://github.com/abarrak).
11
19
 
20
+ ## [0.2.4] - 2019-03-1
21
+
22
+ - Add support for Urdu [@benwbrum](https://github.com/benwbrum).
23
+
24
+ ## [v0.2.3] - 2016-10-3
25
+
26
+ - Initial release [@abarrak](https://github.com/abarrak).
27
+
data/Gemfile.lock CHANGED
@@ -1,22 +1,30 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rtl (0.3.0)
4
+ rtl (0.5.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
+ docile (1.4.0)
9
10
  minitest (5.14.4)
10
11
  rake (13.0.6)
12
+ simplecov (0.21.2)
13
+ docile (~> 1.1)
14
+ simplecov-html (~> 0.11)
15
+ simplecov_json_formatter (~> 0.1)
16
+ simplecov-html (0.12.3)
17
+ simplecov_json_formatter (0.1.3)
11
18
 
12
19
  PLATFORMS
13
- x86_64-darwin-18
20
+ ruby
14
21
 
15
22
  DEPENDENCIES
16
23
  bundler (~> 2.2.20)
17
24
  minitest (~> 5)
18
25
  rake (~> 13)
19
26
  rtl!
27
+ simplecov (~> 0.21)
20
28
 
21
29
  BUNDLED WITH
22
30
  2.2.24
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # RTL
2
2
  [![Gem Version](https://badge.fury.io/rb/rtl.svg)](https://rubygems.org/gems/rtl)
3
3
  [![Build Status](https://travis-ci.org/abarrak/rtl.svg?branch=master)](https://travis-ci.org/abarrak/rtl)
4
+ [![Test Coverage](https://api.codeclimate.com/v1/badges/e6e976b150ddabbc4665/test_coverage)](https://codeclimate.com/github/abarrak/rtl/test_coverage)
5
+ [![Maintainability](https://api.codeclimate.com/v1/badges/e6e976b150ddabbc4665/maintainability)](https://codeclimate.com/github/abarrak/rtl/maintainability)
4
6
 
5
7
  This gem helps you check whether a language direction is right-to-left (RTL) or left-to-right (LTR) implicitly, by supplying its full name, iso code, or other options.
6
8
 
@@ -71,6 +73,8 @@ Rtl.rtl? :Persian, :full_name #=> true
71
73
  Rtl.rtl? :kur, :all #=> true
72
74
  ```
73
75
 
76
+ Which is the default, in case no scheme criteria is specified.
77
+
74
78
 
75
79
  #### Get List of all languages by any of the above criteria:
76
80
 
data/lib/rtl/core.rb CHANGED
@@ -9,12 +9,13 @@ module Rtl
9
9
  "Inscriptional Pahlavi", "Psalter Pahlavi", "Book Pahlavi", "Phoenician",
10
10
  "Inscriptional Parthian", "Samaritan", "Old South Arabian", "Syriac",
11
11
  "Syriac (Estrangelo variant)", "Syriac (Western variant)",
12
- "Syriac (Eastern variant)", "Thaana", "Woleai", "Persian", "Kurdish", "Urdu"]
12
+ "Syriac (Eastern variant)", "Thaana", "Woleai", "Persian", "Kurdish", "Urdu",
13
+ "Pashto (Pushto)", "Yiddish"]
13
14
 
14
15
  # ISO 639 codes for RTL languages.
15
16
  # If a language has 639-1 and 639-2 codes, both are included.
16
17
  ISO_CODES = ["ar", "ara", "arc", "ae", "ave", "egy", "he", "heb", "nqo", "pal", "phn", "sam",
17
- "syc", "syr", "fa", "per", "fas", "ku", "kur", "ur", "urd"]
18
+ "syc", "syr", "fa", "per", "fas", "ku", "kur", "ur", "urd", "pus", "ps", "yi", "yid"]
18
19
 
19
20
  # ISO 15924 codes for RTL languages.
20
21
  ISO_LONG_CODES = ['Adlm', 'Arab', 'Aran', 'Armi', 'Avst', 'Cprt', 'Egyd', 'Egyh', 'Hatr',
@@ -40,7 +41,7 @@ module Rtl
40
41
  "Thaana"]
41
42
 
42
43
  # Query whether a language is rtl or not.
43
- def self.rtl? language, scheme = :iso_code
44
+ def self.rtl? language, scheme = :all
44
45
  sch = scheme.to_sym
45
46
  l = language.to_s.strip
46
47
 
@@ -58,7 +59,7 @@ module Rtl
58
59
  when :all
59
60
  self.all l
60
61
  else
61
- raise ArgumentError.new "Unknown base value #{base}."
62
+ raise ArgumentError.new "Unknown scheme value #{scheme}."
62
63
  end
63
64
  end
64
65
 
@@ -71,7 +72,7 @@ module Rtl
71
72
  begin
72
73
  self.const_get member
73
74
  rescue NameError
74
- raise ArgumentError.new "Unknown Supplied scheme #{sch}."
75
+ raise ArgumentError.new "Unknown Supplied scheme #{scheme}."
75
76
  end
76
77
  end
77
78
 
data/lib/rtl/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Rtl
2
- VERSION = "0.3.0"
2
+ VERSION = "0.6.0"
3
3
  end
data/rtl.gemspec CHANGED
@@ -27,4 +27,5 @@ Gem::Specification.new do |spec|
27
27
  spec.add_development_dependency "bundler", "~> 2.2.20"
28
28
  spec.add_development_dependency "rake", "~> 13"
29
29
  spec.add_development_dependency "minitest", "~> 5"
30
+ spec.add_development_dependency "simplecov", "~> 0.21"
30
31
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rtl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Abdullah Barrak (abarrak)
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-24 00:00:00.000000000 Z
11
+ date: 2022-06-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '5'
55
+ - !ruby/object:Gem::Dependency
56
+ name: simplecov
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '0.21'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '0.21'
55
69
  description: |-
56
70
  RTL helps you to check whether a language direction is right-to-left (RTL)
57
71
  or left-to-right (LTR) implicitly, by supplying its full name, iso code,