rtl 0.3.0 → 0.4.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: 5e055b33f0f22f0d73a351fe4586c5ac6389dbb72bb2192d24dd099b219caa1f
4
+ data.tar.gz: 2900b4358d80b800f4a1a453fe6b47934020c23d3a91bde06ed026103cb1e079
5
5
  SHA512:
6
- metadata.gz: 72243eaf4b8bf54a9bac059656854b0aba4db92950656f286ae860029514aa51af4cf5e4923794cf4243c09ad9348569dd61b540f4de0cc17e3e716b1c402735
7
- data.tar.gz: cac5550ba277e9923082ab56859e046e808c9d05c287de62e4c4175b145764417eecada9494e6be117812b82213f9fa26915b975d269b18057111f1ce0d97d5b
6
+ metadata.gz: 26c87c6f7bd897b3f4105845ac515a0d052aeb34a28b321f69112ca7cacd106eb7186c114c6b95ea489daef193caee22670ca23e398eb60d6c6cbf55ea6c642c
7
+ data.tar.gz: 7580427b3b521a0b3c0fadb7b87ef98e275fad3b61fbaab825b0af65842279fd251168b85bb5a2c6ab4b4c5b8fda430732ac6d97fb6b07d1f5ada010e98faf3e
data/.gitignore CHANGED
@@ -9,4 +9,4 @@
9
9
 
10
10
  /.idea
11
11
  /.idea/*
12
-
12
+ coverage
data/.travis.yml CHANGED
@@ -7,7 +7,7 @@ rvm:
7
7
  - 3.0.0
8
8
  cache: bundler
9
9
  before_install: gem install bundler -v 2.2.20
10
- install: bundle install --jobs=4 --retry=3
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,15 @@
1
1
  # RTL Gem Changelog
2
2
 
3
- ## [v0.2.3]
4
- - Initial release [@abarrak](https://github.com/abarrak).
3
+ ## [0.4.0] - 2021-07-24
4
+ - Make querying by :all criteria as the default for convenience instead of iso_code only [@abarrak](https://github.com/abarrak).
5
+ - Bug fix on error reporting in case incorrect scheme option is passed [@abarrak](https://github.com/abarrak).
5
6
 
6
- ## [0.2.4]
7
- - Add support for Urdu [@benwbrum](https://github.com/benwbrum).
8
7
 
9
- ## [0.3.0]
8
+ ## [0.3.0] - 2021-07-24
10
9
  - Update development dependencies to latest versions [@abarrak](https://github.com/abarrak).
11
10
 
11
+ ## [0.2.4] - 2019-03-1
12
+ - Add support for Urdu [@benwbrum](https://github.com/benwbrum).
13
+
14
+ ## [v0.2.3] - 2016-10-3
15
+ - Initial release [@abarrak](https://github.com/abarrak).
data/Gemfile.lock CHANGED
@@ -6,17 +6,25 @@ PATH
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
@@ -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.3.0"
2
+ VERSION = "0.4.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,7 +1,7 @@
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.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Abdullah Barrak (abarrak)
@@ -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,