rtl 0.2.4 → 0.5.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
- SHA1:
3
- metadata.gz: 6571b3f57a8a1124799f0cfda3a5fd030dfde4a4
4
- data.tar.gz: 78212aa6ccd87e71c5827c6b96c540a7a1511813
2
+ SHA256:
3
+ metadata.gz: a8d046a077448c878175b96b94f65d70084600986becc7a50079b5af5328bff0
4
+ data.tar.gz: a7f5530abe401d14fd4088d0ab94f6737abc29480ccdb741823d7b5c0e8ed107
5
5
  SHA512:
6
- metadata.gz: 0217f4e1bab48c2eeb42d323471ba6e1138dbb57e5acd760dd80fd8f4c30ededf781df81887a285bd30ebbbd9fb472841e976f0b1f2afe4acbe3ce324952ba10
7
- data.tar.gz: 58b1b4a7d07bdeb739d6bb4ab70529470c2993d5c5da008c58d40bb709f5029204fa9dabf1a9a07dc6a4be9f93e9d9fc9031f9ed0894abd27befc53766d52582
6
+ metadata.gz: 57e8b7396d52f77baf3f31f802e296b67d86ed56d42a77282ba7c1e9d80c7e8d98f33e7b9a824b4425ac250e72558c151064a66ea8d8a39ee82047a3a5669745
7
+ data.tar.gz: 7983f0f02f67d41fc98b292ed243734a38555b4e5fa6c071742469f0f58748c301173dae2f2734f208e0a19d80ea9a5d7cb4851ac051a7bf50e2861f69316bcc
data/.gitignore CHANGED
@@ -1,6 +1,5 @@
1
1
  /.bundle/
2
2
  /.yardoc
3
- /Gemfile.lock
4
3
  /_yardoc/
5
4
  /coverage/
6
5
  /doc/
@@ -10,4 +9,4 @@
10
9
 
11
10
  /.idea
12
11
  /.idea/*
13
-
12
+ coverage
data/.ruby-gemset ADDED
@@ -0,0 +1 @@
1
+ rtl
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.7.3
data/.travis.yml CHANGED
@@ -1,6 +1,19 @@
1
1
  sudo: false
2
2
  language: ruby
3
+ dist: trusty
3
4
  rvm:
4
- - 2.2.0
5
+ - 2.5.0
6
+ - 2.6.0
7
+ - 2.7.0
8
+ - 3.0.0
5
9
  cache: bundler
6
- before_install: gem install bundler -v 1.13.1
10
+ before_install: gem install bundler -v 2.2.20
11
+ install: bundle install --jobs=3 --retry=3
12
+ before_script:
13
+ - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
14
+ - chmod +x ./cc-test-reporter
15
+ - ./cc-test-reporter before-build
16
+ script:
17
+ - bundle exec rake test
18
+ after_script:
19
+ - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
data/CHANGELOG ADDED
@@ -0,0 +1,19 @@
1
+ # RTL Gem Changelog
2
+
3
+ ## [0.4.0] - 2021-07-24
4
+
5
+ - Make querying by :all criteria as the default for convenience instead of iso_code only [@abarrak](https://github.com/abarrak).
6
+ - Bug fix on error reporting in case incorrect scheme option is passed [@abarrak](https://github.com/abarrak).
7
+
8
+ ## [0.3.0] - 2021-07-24
9
+
10
+ - Update development dependencies to latest versions [@abarrak](https://github.com/abarrak).
11
+
12
+ ## [0.2.4] - 2019-03-1
13
+
14
+ - Add support for Urdu [@benwbrum](https://github.com/benwbrum).
15
+
16
+ ## [v0.2.3] - 2016-10-3
17
+
18
+ - Initial release [@abarrak](https://github.com/abarrak).
19
+
data/Gemfile.lock ADDED
@@ -0,0 +1,30 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ rtl (0.3.0)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ docile (1.4.0)
10
+ minitest (5.14.4)
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)
18
+
19
+ PLATFORMS
20
+ ruby
21
+
22
+ DEPENDENCIES
23
+ bundler (~> 2.2.20)
24
+ minitest (~> 5)
25
+ rake (~> 13)
26
+ rtl!
27
+ simplecov (~> 0.21)
28
+
29
+ BUNDLED WITH
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,12 @@ 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", "Pashto (Pushto)"]
13
13
 
14
14
  # ISO 639 codes for RTL languages.
15
15
  # If a language has 639-1 and 639-2 codes, both are included.
16
16
  ISO_CODES = ["ar", "ara", "arc", "ae", "ave", "egy", "he", "heb", "nqo", "pal", "phn", "sam",
17
- "syc", "syr", "fa", "per", "fas", "ku", "kur", "ur", "urd"]
17
+ "syc", "syr", "fa", "per", "fas", "ku", "kur", "ur", "urd", "pus", "ps"]
18
18
 
19
19
  # ISO 15924 codes for RTL languages.
20
20
  ISO_LONG_CODES = ['Adlm', 'Arab', 'Aran', 'Armi', 'Avst', 'Cprt', 'Egyd', 'Egyh', 'Hatr',
@@ -40,7 +40,7 @@ module Rtl
40
40
  "Thaana"]
41
41
 
42
42
  # Query whether a language is rtl or not.
43
- def self.rtl? language, scheme = :iso_code
43
+ def self.rtl? language, scheme = :all
44
44
  sch = scheme.to_sym
45
45
  l = language.to_s.strip
46
46
 
@@ -58,7 +58,7 @@ module Rtl
58
58
  when :all
59
59
  self.all l
60
60
  else
61
- raise ArgumentError.new "Unknown base value #{base}."
61
+ raise ArgumentError.new "Unknown scheme value #{scheme}."
62
62
  end
63
63
  end
64
64
 
@@ -71,7 +71,7 @@ module Rtl
71
71
  begin
72
72
  self.const_get member
73
73
  rescue NameError
74
- raise ArgumentError.new "Unknown Supplied scheme #{sch}."
74
+ raise ArgumentError.new "Unknown Supplied scheme #{scheme}."
75
75
  end
76
76
  end
77
77
 
data/lib/rtl/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Rtl
2
- VERSION = "0.2.4"
2
+ VERSION = "0.5.0"
3
3
  end
data/rtl.gemspec CHANGED
@@ -24,7 +24,8 @@ Gem::Specification.new do |spec|
24
24
 
25
25
  spec.require_paths = ["lib"]
26
26
 
27
- spec.add_development_dependency "bundler", "~> 1.13"
28
- spec.add_development_dependency "rake", "~> 10.0"
29
- spec.add_development_dependency "minitest", "~> 5.0"
27
+ spec.add_development_dependency "bundler", "~> 2.2.20"
28
+ spec.add_development_dependency "rake", "~> 13"
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.2.4
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Abdullah Barrak (abarrak)
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-02-28 00:00:00.000000000 Z
11
+ date: 2022-04-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,42 +16,56 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.13'
19
+ version: 2.2.20
20
20
  type: :development
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.13'
26
+ version: 2.2.20
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '10.0'
33
+ version: '13'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '10.0'
40
+ version: '13'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: minitest
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '5.0'
47
+ version: '5'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '5.0'
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,
@@ -63,8 +77,12 @@ extensions: []
63
77
  extra_rdoc_files: []
64
78
  files:
65
79
  - ".gitignore"
80
+ - ".ruby-gemset"
81
+ - ".ruby-version"
66
82
  - ".travis.yml"
83
+ - CHANGELOG
67
84
  - Gemfile
85
+ - Gemfile.lock
68
86
  - LICENSE.txt
69
87
  - README.md
70
88
  - Rakefile
@@ -76,7 +94,7 @@ homepage: https://github.com/abarrak/rtl
76
94
  licenses:
77
95
  - MIT
78
96
  metadata: {}
79
- post_install_message:
97
+ post_install_message:
80
98
  rdoc_options: []
81
99
  require_paths:
82
100
  - lib
@@ -91,9 +109,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
91
109
  - !ruby/object:Gem::Version
92
110
  version: '0'
93
111
  requirements: []
94
- rubyforge_project:
95
- rubygems_version: 2.6.10
96
- signing_key:
112
+ rubygems_version: 3.1.6
113
+ signing_key:
97
114
  specification_version: 4
98
115
  summary: A gem for checking RTL direction of a language.
99
116
  test_files: []