turkish_support 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CODE_OF_CONDUCT.md +46 -0
- data/lib/turkish_support/array_methods.rb +6 -6
- data/lib/turkish_support/version.rb +1 -1
- data/spec/turkish_support_spec.rb +8 -0
- data/turkish_support.gemspec +2 -2
- metadata +11 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 21d687b0e2cd2035ebdc1b198340aaa12faa920bc458bc9920a7828215747baf
|
4
|
+
data.tar.gz: c2d0ac7f7debf20bbcf50a28ac7758bd721d30ab5cfb68e3fbaac8d97f1c13de
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 772a94afbe5c4d45333438ce3001fe210bd647b55fd0137cc644650da6acc214216fe31a2c074e087ba7791ae4b7e016167ac43d12bb6823f87d947a11aa6809
|
7
|
+
data.tar.gz: 78e2537eddc53678bcf432df6fe24bd254c94f01fc04fa9203d599c75306bf9cca3ddc7e3b4f41ea7c837a3b2fca0bdde374118c8c625c3bd7d192f19335015c
|
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
6
|
+
|
7
|
+
## Our Standards
|
8
|
+
|
9
|
+
Examples of behavior that contributes to creating a positive environment include:
|
10
|
+
|
11
|
+
* Using welcoming and inclusive language
|
12
|
+
* Being respectful of differing viewpoints and experiences
|
13
|
+
* Gracefully accepting constructive criticism
|
14
|
+
* Focusing on what is best for the community
|
15
|
+
* Showing empathy towards other community members
|
16
|
+
|
17
|
+
Examples of unacceptable behavior by participants include:
|
18
|
+
|
19
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or advances
|
20
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
21
|
+
* Public or private harassment
|
22
|
+
* Publishing others' private information, such as a physical or electronic address, without explicit permission
|
23
|
+
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
24
|
+
|
25
|
+
## Our Responsibilities
|
26
|
+
|
27
|
+
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
|
28
|
+
|
29
|
+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
|
30
|
+
|
31
|
+
## Scope
|
32
|
+
|
33
|
+
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
|
34
|
+
|
35
|
+
## Enforcement
|
36
|
+
|
37
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at sbagdat@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
|
38
|
+
|
39
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
|
40
|
+
|
41
|
+
## Attribution
|
42
|
+
|
43
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
|
44
|
+
|
45
|
+
[homepage]: http://contributor-covenant.org
|
46
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
@@ -1,12 +1,12 @@
|
|
1
1
|
module TurkishSupport
|
2
2
|
refine Array do
|
3
3
|
def sort
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
ch.ord
|
4
|
+
if block_given? && any? { |item| !item.is_a? String }
|
5
|
+
super
|
6
|
+
else
|
7
|
+
sort_by do |item|
|
8
|
+
item.chars.map do |ch|
|
9
|
+
ALPHABET.include?(ch) ? ASCII_ALPHABET[ch] : ch.ord
|
10
10
|
end
|
11
11
|
end
|
12
12
|
end
|
@@ -650,6 +650,14 @@ module TurkishSupport # rubocop:disable Metrics/ModuleLength
|
|
650
650
|
it 'sorts array for random conditions' do
|
651
651
|
expect(unsorted_array_for_block_using.sort {|a, b| a[1] <=> b[1]}).to eq(sorted_array_for_block_using)
|
652
652
|
end
|
653
|
+
|
654
|
+
it 'sorts nested arrays' do
|
655
|
+
unsorted_nested_array = [["Şakir", 2], ["İsmet", 0], ["Zeliha", 1]]
|
656
|
+
expect(unsorted_nested_array.sort {|a, b| a[1] <=> b[1]})
|
657
|
+
.to eq([["İsmet", 0], ["Zeliha", 1], ["Şakir", 2]])
|
658
|
+
expect(unsorted_nested_array.sort {|a, b| b[0] <=> a[0]})
|
659
|
+
.to eq([["Zeliha", 1], ["Şakir", 2], ["İsmet", 0]])
|
660
|
+
end
|
653
661
|
end
|
654
662
|
|
655
663
|
context 'with destructive version' do
|
data/turkish_support.gemspec
CHANGED
@@ -20,6 +20,6 @@ Gem::Specification.new do |spec|
|
|
20
20
|
|
21
21
|
spec.required_ruby_version = '>= 2.0.0'
|
22
22
|
spec.add_development_dependency 'bundler', '~> 1.5'
|
23
|
-
spec.add_development_dependency 'rake'
|
24
|
-
spec.add_development_dependency 'rspec'
|
23
|
+
spec.add_development_dependency 'rake', '~> 12.0'
|
24
|
+
spec.add_development_dependency 'rspec', '~> 3.5'
|
25
25
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: turkish_support
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sıtkı Bağdat
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-12-
|
11
|
+
date: 2017-12-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -28,30 +28,30 @@ dependencies:
|
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
33
|
+
version: '12.0'
|
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: '0'
|
40
|
+
version: '12.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '3.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: '
|
54
|
+
version: '3.5'
|
55
55
|
description: |-
|
56
56
|
Turkish character support for core ruby methods
|
57
57
|
like String#upcase, String#gsub, String#match, Array#sort, and etc...)
|
@@ -66,6 +66,7 @@ files:
|
|
66
66
|
- ".rspec"
|
67
67
|
- ".rubocop.yml"
|
68
68
|
- ".travis.yml"
|
69
|
+
- CODE_OF_CONDUCT.md
|
69
70
|
- Gemfile
|
70
71
|
- LICENSE.txt
|
71
72
|
- README.md
|