ilias 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +38 -0
- data/ilias.gemspec +39 -0
- data/lib/ilias/array.rb +3 -2
- data/lib/ilias/basic_object.rb +5 -0
- data/lib/ilias/dir.rb +5 -0
- data/lib/ilias/enumerable.rb +5 -0
- data/lib/ilias/object.rb +7 -0
- data/lib/ilias/string.rb +2 -0
- data/lib/ilias/version.rb +1 -1
- data/lib/ilias.rb +6 -2
- metadata +11 -7
- data/lib/ilias/hash.rb +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 23c861b3d10404149b5a87fb2be789fc72e97143bfd5ca8981cc97c65ddd85a8
|
4
|
+
data.tar.gz: 7520a1c5bb72ae822ea23d20b9086baa49b9335c87eab97f3a5a50080ef13380
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 878d4a3a57deb663b719f6c0f6746d5b3beed0dde49f14974f5d9fc53cc03b1cbf7a846c28c3a7e1e7e727c3f7bc6e361a43b78ae436cebac26a9ebc8e5aa754
|
7
|
+
data.tar.gz: 49f248ad3248e17486e41acf2308aaf86d7e87c0a25deea599643045c48a0796b35d8654d66dbb45e2e8377254b49ae890fbaec5c4f8aef99cff4f1121d02c92
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -23,7 +23,45 @@ array.include?(4)
|
|
23
23
|
```
|
24
24
|
I feel it'd be nice if we could alias it to agree with the third-person singular verb endings in English. You could argue that `include?` is not a verb and Ruby is not English, fair... but we use English diction in Ruby. Crystal [acknowledges](https://crystal-lang.org/api/1.4.1/Enumerable.html#includes%3F%28obj%29%3ABool-instance-method) 3rd person singular verb endings for method names.
|
25
25
|
|
26
|
+
Here's a list of aliased methods:
|
26
27
|
|
28
|
+
```ruby
|
29
|
+
module Enumerable
|
30
|
+
# Ruby classes that include Enumerable
|
31
|
+
#
|
32
|
+
# Array
|
33
|
+
# Dir
|
34
|
+
# Hash
|
35
|
+
# IO
|
36
|
+
# Range
|
37
|
+
# Set
|
38
|
+
# Struct
|
39
|
+
|
40
|
+
alias includes? include?
|
41
|
+
end
|
42
|
+
|
43
|
+
class String
|
44
|
+
alias ends_with? end_with?
|
45
|
+
alias starts_with? start_with?
|
46
|
+
alias includes? include?
|
47
|
+
alias contains? includes?
|
48
|
+
end
|
49
|
+
|
50
|
+
class Object
|
51
|
+
alias is_an? is_a?
|
52
|
+
alias responds_to? respond_to?
|
53
|
+
alias responds_to_missing? respond_to_missing?
|
54
|
+
end
|
55
|
+
|
56
|
+
class BasicObject
|
57
|
+
alias equals? equal?
|
58
|
+
end
|
59
|
+
|
60
|
+
class Dir
|
61
|
+
alias exists? exist
|
62
|
+
end
|
63
|
+
|
64
|
+
```
|
27
65
|
## Installation
|
28
66
|
|
29
67
|
Add this line to your application's Gemfile:
|
data/ilias.gemspec
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative 'lib/ilias/version'
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = 'ilias'
|
7
|
+
spec.version = Ilias::VERSION
|
8
|
+
spec.authors = ['Emmanuel Hayford']
|
9
|
+
spec.email = ['hi@manny.codes']
|
10
|
+
|
11
|
+
spec.summary = 'Readable aliases for core Ruby methods.'
|
12
|
+
spec.description = 'A list of methods from Ruby Core aliased to conform to the 3rd person singular verb endings.'
|
13
|
+
spec.homepage = 'https://github.com/siaw23/ilias'
|
14
|
+
spec.license = 'MIT'
|
15
|
+
spec.required_ruby_version = '>= 2.6.0'
|
16
|
+
|
17
|
+
spec.metadata['allowed_push_host'] = 'https://rubygems.org/'
|
18
|
+
|
19
|
+
spec.metadata['homepage_uri'] = spec.homepage
|
20
|
+
spec.metadata['source_code_uri'] = 'https://github.com/siaw23/ilias'
|
21
|
+
spec.metadata['changelog_uri'] = 'https://github.com/siaw23/ilias/blob/main/CHANGELOG.md'
|
22
|
+
|
23
|
+
# Specify which files should be added to the gem when it is released.
|
24
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
25
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
26
|
+
`git ls-files -z`.split("\x0").reject do |f|
|
27
|
+
(f == __FILE__) || f.match(%r{\A(?:(?:test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
|
28
|
+
end
|
29
|
+
end
|
30
|
+
spec.bindir = 'exe'
|
31
|
+
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
32
|
+
spec.require_paths = ['lib']
|
33
|
+
|
34
|
+
# Uncomment to register a new dependency of your gem
|
35
|
+
# spec.add_dependency "example-gem", "~> 1.0"
|
36
|
+
|
37
|
+
# For more information and examples about making a new gem, checkout our
|
38
|
+
# guide at: https://bundler.io/guides/creating_gem.html
|
39
|
+
end
|
data/lib/ilias/array.rb
CHANGED
data/lib/ilias/dir.rb
ADDED
data/lib/ilias/object.rb
ADDED
data/lib/ilias/string.rb
CHANGED
data/lib/ilias/version.rb
CHANGED
data/lib/ilias.rb
CHANGED
@@ -1,9 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_relative 'ilias/version'
|
4
3
|
require_relative 'ilias/array'
|
4
|
+
require_relative 'ilias/dir'
|
5
|
+
require_relative 'ilias/basic_object'
|
6
|
+
require_relative 'ilias/enumerable'
|
7
|
+
require_relative 'ilias/object'
|
5
8
|
require_relative 'ilias/string'
|
6
|
-
|
9
|
+
|
10
|
+
require_relative 'ilias/version'
|
7
11
|
|
8
12
|
module Ilias
|
9
13
|
class Error < StandardError; end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ilias
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Emmanuel Hayford
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-05-
|
11
|
+
date: 2022-05-31 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A list of methods from Ruby Core aliased to conform to the 3rd person
|
14
14
|
singular verb endings.
|
@@ -28,9 +28,13 @@ files:
|
|
28
28
|
- Rakefile
|
29
29
|
- bin/console
|
30
30
|
- bin/setup
|
31
|
+
- ilias.gemspec
|
31
32
|
- lib/ilias.rb
|
32
33
|
- lib/ilias/array.rb
|
33
|
-
- lib/ilias/
|
34
|
+
- lib/ilias/basic_object.rb
|
35
|
+
- lib/ilias/dir.rb
|
36
|
+
- lib/ilias/enumerable.rb
|
37
|
+
- lib/ilias/object.rb
|
34
38
|
- lib/ilias/string.rb
|
35
39
|
- lib/ilias/version.rb
|
36
40
|
homepage: https://github.com/siaw23/ilias
|
@@ -41,7 +45,7 @@ metadata:
|
|
41
45
|
homepage_uri: https://github.com/siaw23/ilias
|
42
46
|
source_code_uri: https://github.com/siaw23/ilias
|
43
47
|
changelog_uri: https://github.com/siaw23/ilias/blob/main/CHANGELOG.md
|
44
|
-
post_install_message:
|
48
|
+
post_install_message:
|
45
49
|
rdoc_options: []
|
46
50
|
require_paths:
|
47
51
|
- lib
|
@@ -56,8 +60,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
56
60
|
- !ruby/object:Gem::Version
|
57
61
|
version: '0'
|
58
62
|
requirements: []
|
59
|
-
rubygems_version: 3.
|
60
|
-
signing_key:
|
63
|
+
rubygems_version: 3.2.3
|
64
|
+
signing_key:
|
61
65
|
specification_version: 4
|
62
66
|
summary: Readable aliases for core Ruby methods.
|
63
67
|
test_files: []
|
data/lib/ilias/hash.rb
DELETED