english 0.8.0 → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1495bc71dd6882ff8cdc97915e995311daa1bf65d332f068abb47e0888a5ab33
4
- data.tar.gz: 5bda272c7c6878de990c20939ffd686dcb38d0d69fe4ef8d8afad01bf11991ae
3
+ metadata.gz: 28d0dbbf0894c747e99514c5a2e6d63600fdf4714dedfb0fc5c756f8f73082f7
4
+ data.tar.gz: 4317b00e8c4fa01a9b6d0b576a8b9a13ed009b84bc1d17ace7579696aee71054
5
5
  SHA512:
6
- metadata.gz: 7593e1b15d40b7f13a3cc3007098b6da325ad5ad63ec205a50b983d26f9ebc987f4964e3f32136b2340fb33cbdec38cb80c5c07713ed7a30b0d6957925de2d59
7
- data.tar.gz: a3c2cc22db1c9daaba001b546578e949e7e42cb93f5fbf13fe30c602b5e8fc1284bed5a2916874fc13eeacc0a4b5bf8fa6c3be76b0c7657dad6b0863d423b89e
6
+ metadata.gz: 742331277d6ec3aa12428eaf3c3ecfcd8b453308b6213bf8075c1e8d46e237000f79e9737f0d95edf46ac3488165707d2de73090200e84fdea6f078ac99208ed
7
+ data.tar.gz: 983551be028a49bac06a1b43f5903144f1f7d698377439ee8e2b2785c1b990343bb8e31f20830ffe4d057281ef49a03894fa9481295c2a32ba607aec19249bfb
data/.document ADDED
@@ -0,0 +1,4 @@
1
+ lib/
2
+ BSDL
3
+ COPYING
4
+ README.md
data/.rdoc_options ADDED
@@ -0,0 +1,2 @@
1
+ ---
2
+ main_page: README.md
@@ -4,10 +4,10 @@ Redistribution and use in source and binary forms, with or without
4
4
  modification, are permitted provided that the following conditions
5
5
  are met:
6
6
  1. Redistributions of source code must retain the above copyright
7
- notice, this list of conditions and the following disclaimer.
7
+ notice, this list of conditions and the following disclaimer.
8
8
  2. Redistributions in binary form must reproduce the above copyright
9
- notice, this list of conditions and the following disclaimer in the
10
- documentation and/or other materials provided with the distribution.
9
+ notice, this list of conditions and the following disclaimer in the
10
+ documentation and/or other materials provided with the distribution.
11
11
 
12
12
  THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
13
13
  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
data/COPYING ADDED
@@ -0,0 +1,56 @@
1
+ Ruby is copyrighted free software by Yukihiro Matsumoto <matz@netlab.jp>.
2
+ You can redistribute it and/or modify it under either the terms of the
3
+ 2-clause BSDL (see the file BSDL), or the conditions below:
4
+
5
+ 1. You may make and give away verbatim copies of the source form of the
6
+ software without restriction, provided that you duplicate all of the
7
+ original copyright notices and associated disclaimers.
8
+
9
+ 2. You may modify your copy of the software in any way, provided that
10
+ you do at least ONE of the following:
11
+
12
+ a. place your modifications in the Public Domain or otherwise
13
+ make them Freely Available, such as by posting said
14
+ modifications to Usenet or an equivalent medium, or by allowing
15
+ the author to include your modifications in the software.
16
+
17
+ b. use the modified software only within your corporation or
18
+ organization.
19
+
20
+ c. give non-standard binaries non-standard names, with
21
+ instructions on where to get the original software distribution.
22
+
23
+ d. make other distribution arrangements with the author.
24
+
25
+ 3. You may distribute the software in object code or binary form,
26
+ provided that you do at least ONE of the following:
27
+
28
+ a. distribute the binaries and library files of the software,
29
+ together with instructions (in the manual page or equivalent)
30
+ on where to get the original distribution.
31
+
32
+ b. accompany the distribution with the machine-readable source of
33
+ the software.
34
+
35
+ c. give non-standard binaries non-standard names, with
36
+ instructions on where to get the original software distribution.
37
+
38
+ d. make other distribution arrangements with the author.
39
+
40
+ 4. You may modify and include the part of the software into any other
41
+ software (possibly commercial). But some files in the distribution
42
+ are not written by the author, so that they are not under these terms.
43
+
44
+ For the list of those files and their copying conditions, see the
45
+ file LEGAL.
46
+
47
+ 5. The scripts and library files supplied as input to or produced as
48
+ output from the software do not automatically fall under the
49
+ copyright of the software, but belong to whomever generated them,
50
+ and may be sold commercially, and may be aggregated with this
51
+ software.
52
+
53
+ 6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
54
+ IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
55
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
56
+ PURPOSE.
data/README.md CHANGED
@@ -9,7 +9,7 @@ cryptic names, listed below.
9
9
  Add this line to your application's Gemfile:
10
10
 
11
11
  ```ruby
12
- gem 'English'
12
+ gem 'english'
13
13
  ```
14
14
 
15
15
  And then execute:
@@ -18,7 +18,7 @@ And then execute:
18
18
 
19
19
  Or install it yourself as:
20
20
 
21
- $ gem install English
21
+ $ gem install english
22
22
 
23
23
  ## Usage
24
24
 
@@ -30,7 +30,7 @@ $\ = ' -- '
30
30
  print $', $$, "\n"
31
31
  ```
32
32
 
33
- With English:
33
+ With 'English':
34
34
 
35
35
  ```ruby
36
36
  require "English"
@@ -40,6 +40,68 @@ $OUTPUT_FIELD_SEPARATOR = ' -- '
40
40
  print $POSTMATCH, $PID, "\n"
41
41
  ```
42
42
 
43
+ The aliases are defined in [English.rb](lib/English.rb), and are as follows, first alias to builtin, then builtin to alias:
44
+
45
+ ### Builtin to Alias Table
46
+
47
+ | Builtin | Alias |
48
+ | :------: | -------------------------- |
49
+ | `` $! `` | `$ERROR_INFO` |
50
+ | `` $$ `` | `$PID` |
51
+ | `` $$ `` | `$PROCESS_ID` |
52
+ | `` $& `` | `$MATCH` |
53
+ | `` $' `` | `$POSTMATCH` |
54
+ | `` $* `` | `$ARGV` |
55
+ | `` $+ `` | `$LAST_PAREN_MATCH` |
56
+ | `` $, `` | `$OFS` |
57
+ | `` $, `` | `$OUTPUT_FIELD_SEPARATOR` |
58
+ | `` $. `` | `$INPUT_LINE_NUMBER` |
59
+ | `` $. `` | `$NR` |
60
+ | `` $/ `` | `$INPUT_RECORD_SEPARATOR` |
61
+ | `` $/ `` | `$RS` |
62
+ | `` $; `` | `$FIELD_SEPARATOR` |
63
+ | `` $; `` | `$FS` |
64
+ | `` $< `` | `$DEFAULT_INPUT` |
65
+ | `` $> `` | `$DEFAULT_OUTPUT` |
66
+ | `` $? `` | `$CHILD_STATUS` |
67
+ | `` $@ `` | `$ERROR_POSITION` |
68
+ | `` $\ `` | `$ORS` |
69
+ | `` $\ `` | `$OUTPUT_RECORD_SEPARATOR` |
70
+ | `` $_ `` | `$LAST_READ_LINE` |
71
+ | `` $` `` | `$PREMATCH` |
72
+ | `` $~ `` | `$LAST_MATCH_INFO` |
73
+
74
+
75
+ ### Alias to Builtin Table
76
+
77
+ | Alias | Builtin |
78
+ | -------------------------- | :------: |
79
+ | `$ARGV` | `` $* `` |
80
+ | `$CHILD_STATUS` | `` $? `` |
81
+ | `$DEFAULT_INPUT` | `` $< `` |
82
+ | `$DEFAULT_OUTPUT` | `` $> `` |
83
+ | `$ERROR_INFO` | `` $! `` |
84
+ | `$ERROR_POSITION` | `` $@ `` |
85
+ | `$FIELD_SEPARATOR` | `` $; `` |
86
+ | `$FS` | `` $; `` |
87
+ | `$INPUT_LINE_NUMBER` | `` $. `` |
88
+ | `$INPUT_RECORD_SEPARATOR` | `` $/ `` |
89
+ | `$LAST_MATCH_INFO` | `` $~ `` |
90
+ | `$LAST_PAREN_MATCH` | `` $+ `` |
91
+ | `$LAST_READ_LINE` | `` $_ `` |
92
+ | `$MATCH` | `` $& `` |
93
+ | `$NR` | `` $. `` |
94
+ | `$OFS` | `` $, `` |
95
+ | `$ORS` | `` $\ `` |
96
+ | `$OUTPUT_FIELD_SEPARATOR` | `` $, `` |
97
+ | `$OUTPUT_RECORD_SEPARATOR` | `` $\ `` |
98
+ | `$PID` | `` $$ `` |
99
+ | `$POSTMATCH` | `` $' `` |
100
+ | `$PREMATCH` | `` $` `` |
101
+ | `$PROCESS_ID` | `` $$ `` |
102
+ | `$RS` | `` $/ `` |
103
+
104
+
43
105
  ## Development
44
106
 
45
107
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
data/lib/English.rb CHANGED
@@ -9,7 +9,7 @@
9
9
  # "waterbuffalo" =~ /buff/
10
10
  # print $', $$, "\n"
11
11
  #
12
- # With English:
12
+ # With 'English':
13
13
  #
14
14
  # require "English"
15
15
  #
@@ -20,30 +20,30 @@
20
20
  # Below is a full list of descriptive aliases and their associated global
21
21
  # variable:
22
22
  #
23
- # $ERROR_INFO:: $!
24
- # $ERROR_POSITION:: $@
25
- # $FS:: $;
26
- # $FIELD_SEPARATOR:: $;
27
- # $OFS:: $,
28
- # $OUTPUT_FIELD_SEPARATOR:: $,
29
- # $RS:: $/
30
- # $INPUT_RECORD_SEPARATOR:: $/
31
- # $ORS:: $\
32
- # $OUTPUT_RECORD_SEPARATOR:: $\
33
- # $INPUT_LINE_NUMBER:: $.
34
- # $NR:: $.
35
- # $LAST_READ_LINE:: $_
36
- # $DEFAULT_OUTPUT:: $>
37
- # $DEFAULT_INPUT:: $<
38
- # $PID:: $$
39
- # $PROCESS_ID:: $$
40
- # $CHILD_STATUS:: $?
41
- # $LAST_MATCH_INFO:: $~
42
- # $ARGV:: $*
43
- # $MATCH:: $&
44
- # $PREMATCH:: $`
45
- # $POSTMATCH:: $'
46
- # $LAST_PAREN_MATCH:: $+
23
+ # <tt>$ERROR_INFO</tt>:: <tt>$!</tt>
24
+ # <tt>$ERROR_POSITION</tt>:: <tt>$@</tt>
25
+ # <tt>$FS</tt>:: <tt>$;</tt>
26
+ # <tt>$FIELD_SEPARATOR</tt>:: <tt>$;</tt>
27
+ # <tt>$OFS</tt>:: <tt>$,</tt>
28
+ # <tt>$OUTPUT_FIELD_SEPARATOR</tt>:: <tt>$,</tt>
29
+ # <tt>$RS</tt>:: <tt>$/</tt>
30
+ # <tt>$INPUT_RECORD_SEPARATOR</tt>:: <tt>$/</tt>
31
+ # <tt>$ORS</tt>:: <tt>$\</tt>
32
+ # <tt>$OUTPUT_RECORD_SEPARATOR</tt>:: <tt>$\</tt>
33
+ # <tt>$NR</tt>:: <tt>$.</tt>
34
+ # <tt>$INPUT_LINE_NUMBER</tt>:: <tt>$.</tt>
35
+ # <tt>$LAST_READ_LINE</tt>:: <tt>$_</tt>
36
+ # <tt>$DEFAULT_OUTPUT</tt>:: <tt>$></tt>
37
+ # <tt>$DEFAULT_INPUT</tt>:: <tt>$<</tt>
38
+ # <tt>$PID</tt>:: <tt>$$</tt>
39
+ # <tt>$PROCESS_ID</tt>:: <tt>$$</tt>
40
+ # <tt>$CHILD_STATUS</tt>:: <tt>$?</tt>
41
+ # <tt>$LAST_MATCH_INFO</tt>:: <tt>$~</tt>
42
+ # <tt>$ARGV</tt>:: <tt>$*</tt>
43
+ # <tt>$MATCH</tt>:: <tt>$&</tt>
44
+ # <tt>$PREMATCH</tt>:: <tt>$`</tt>
45
+ # <tt>$POSTMATCH</tt>:: <tt>$'</tt>
46
+ # <tt>$LAST_PAREN_MATCH</tt>:: <tt>$+</tt>
47
47
  #
48
48
  module English end if false
49
49
 
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: english
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yukihiro Matsumoto
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2023-11-07 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies: []
13
12
  description: Require 'English.rb' to reference global variables with less cryptic
14
13
  names.
@@ -18,14 +17,11 @@ executables: []
18
17
  extensions: []
19
18
  extra_rdoc_files: []
20
19
  files:
21
- - ".gitignore"
22
- - English.gemspec
23
- - Gemfile
24
- - LICENSE.txt
20
+ - ".document"
21
+ - ".rdoc_options"
22
+ - BSDL
23
+ - COPYING
25
24
  - README.md
26
- - Rakefile
27
- - bin/console
28
- - bin/setup
29
25
  - lib/English.rb
30
26
  homepage: https://github.com/ruby/English
31
27
  licenses:
@@ -34,7 +30,6 @@ licenses:
34
30
  metadata:
35
31
  homepage_uri: https://github.com/ruby/English
36
32
  source_code_uri: https://github.com/ruby/English
37
- post_install_message:
38
33
  rdoc_options: []
39
34
  require_paths:
40
35
  - lib
@@ -49,8 +44,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
49
44
  - !ruby/object:Gem::Version
50
45
  version: '0'
51
46
  requirements: []
52
- rubygems_version: 3.5.0.dev
53
- signing_key:
47
+ rubygems_version: 3.6.9
54
48
  specification_version: 4
55
49
  summary: Require 'English.rb' to reference global variables with less cryptic names.
56
50
  test_files: []
data/.gitignore DELETED
@@ -1,9 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /_yardoc/
4
- /coverage/
5
- /doc/
6
- /pkg/
7
- /spec/reports/
8
- /tmp/
9
- /Gemfile.lock
data/English.gemspec DELETED
@@ -1,22 +0,0 @@
1
- Gem::Specification.new do |spec|
2
- spec.name = "english"
3
- spec.version = "0.8.0"
4
- spec.authors = ["Yukihiro Matsumoto"]
5
- spec.email = ["matz@ruby-lang.org"]
6
-
7
- spec.summary = %q{Require 'English.rb' to reference global variables with less cryptic names.}
8
- spec.description = %q{Require 'English.rb' to reference global variables with less cryptic names.}
9
- spec.homepage = "https://github.com/ruby/English"
10
- spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
11
- spec.licenses = ["Ruby", "BSD-2-Clause"]
12
-
13
- spec.metadata["homepage_uri"] = spec.homepage
14
- spec.metadata["source_code_uri"] = spec.homepage
15
-
16
- # Specify which files should be added to the gem when it is released.
17
- # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
18
- spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
19
- `git ls-files -z 2>#{IO::NULL}`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
20
- end
21
- spec.require_paths = ["lib"]
22
- end
data/Gemfile DELETED
@@ -1,5 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec
4
-
5
- gem "rake"
data/Rakefile DELETED
@@ -1 +0,0 @@
1
- require "bundler/gem_tasks"
data/bin/console DELETED
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "bundler/setup"
4
- require "English"
5
-
6
- # You can add fixtures and/or initialization code here to make experimenting
7
- # with your gem easier. You can also use a different console, if you like.
8
-
9
- # (If you use this, don't forget to add pry to your Gemfile!)
10
- # require "pry"
11
- # Pry.start
12
-
13
- require "irb"
14
- IRB.start(__FILE__)
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here