aesthetify 1.0.2 → 1.1.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
- SHA1:
3
- metadata.gz: f8c24e3ce07a09528f6b44ca8ce305af19b42bd4
4
- data.tar.gz: ff3009ef2a9086ed3b8b952471823e4f01f7edd8
2
+ SHA256:
3
+ metadata.gz: 3b7df15e3665b5abf1b176ffd2c9841a83b6100bd5748b21873bb6ef2dbe5e95
4
+ data.tar.gz: 4afb727e31db47f4b6810261aee0d15bff20f161d44506ea1c4f72af73c1aa4f
5
5
  SHA512:
6
- metadata.gz: 54a274d8ad67143a316f15e044887d9a118c18f3d52db3ad2da590f591c04975a60363a6a06486fb8cb70f141e801c6df2f348e655a741c85bf3592ff9ab728e
7
- data.tar.gz: 5e03b05eae75d7d4885963d9847ebcf1aa8e11c729d9e0e28dd9b219c12a75fb7c46892028ea026df6a87a951b81e464324f60c2b708790bec1e16a3a949eb15
6
+ metadata.gz: 6775420adacf43afd4c79b49ab1da6b09687052314e7bc084aa703004c28eab3910c956d4977a9982c433a3f947a118f78e5f1ea4806472b9fd0ed1e509b8a61
7
+ data.tar.gz: 2ff4e081cadf00830f13a680d76bb1c5e94d86d2ff31032db9cb5e3a6567ee1b0e48b01cceaa71516efad4421d6401668fdbb211fb88f0610ed54f6b5d21afae
data/.gitattributes CHANGED
File without changes
data/.gitignore CHANGED
@@ -1 +1,2 @@
1
- /bin/*.gem
1
+ Gemfile.lock
2
+ /build
data/.travis.yml CHANGED
@@ -1,21 +1,10 @@
1
- language: ruby
2
- rvm:
3
- - 2.5.1
4
- - 2.5.0
5
- - 2.4.4
6
- - 2.4.3
7
- - 2.4.2
8
- - 2.4.1
9
- - 2.4.0
10
- - 2.3.7
11
- - 2.3.6
12
- - 2.3.5
13
- - 2.3.4
14
- - 2.3.3
15
- - 2.3.2
16
- - 2.3.1
17
- - 2.3.0
18
- script:
19
- - bundle exec rake test
20
- before_install:
21
- - gem install bundler
1
+ language: ruby
2
+ rvm:
3
+ - 3.1.2
4
+ - 3.0.4
5
+ - 2.7.6
6
+ - 2.6.10
7
+ script:
8
+ - bundle exec rake test
9
+ before_install:
10
+ - gem install bundler
data/Gemfile CHANGED
@@ -1,3 +1,3 @@
1
- source 'https://rubygems.org'
2
-
3
- gemspec
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
data/LICENSE CHANGED
@@ -1,20 +1,20 @@
1
- MIT License
2
-
3
- Copyright (c) 2017-2018 TheAssailant https://github.com/theassailant
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy of
6
- this software and associated documentation files (the "Software"), to deal in
7
- the Software without restriction, including without limitation the rights to
8
- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
- the Software, and to permit persons to whom the Software is furnished to do so,
10
- subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
- FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
- COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
- IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2017-2018 TheAssailant https://github.com/theassailant
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ this software and associated documentation files (the "Software"), to deal in
7
+ the Software without restriction, including without limitation the rights to
8
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
+ the Software, and to permit persons to whom the Software is furnished to do so,
10
+ subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -1,50 +1,60 @@
1
- # aesthetify
2
-
3
- [![Gem Version](https://badge.fury.io/rb/aesthetify.svg)](https://badge.fury.io/rb/aesthetify)
4
- [![Build Status](https://travis-ci.org/TheAssailant/aesthetify.svg?branch=master)](https://travis-ci.org/TheAssailant/aesthetify)
5
-
6
- aesthetify makes it simple to take any string and transform it for the
7
- AESTHETIC. In addition, it also makes creating Fullwidth text
8
- just as simple.
9
-
10
- aesthetify comes with regular methods and bang versions of those methods for
11
- in-place string modification.
12
-
13
- ## Usage
14
-
15
- ```ruby
16
- require "aesthetify"
17
- ```
18
-
19
- Using String#aesthetify:
20
- ```ruby
21
- text = "vaporwave"
22
- text.aesthetify!
23
- puts text
24
- #=> VAPORWAVE
25
- ```
26
-
27
- Using String#fullwidth:
28
- ```ruby
29
- text = "long boy"
30
- text.fullwidth!
31
- puts text
32
- #=> long boy
33
- ```
34
-
35
- Using concatenation:
36
- ```ruby
37
- text = "This is the " + "sad boys ".aesthetify + "club"
38
- puts text
39
- #=> This is the SAD BOYS club
40
- ```
41
-
42
- ## Supported Ruby versions
43
- aesthetify supports all of the currently supported versions of Ruby. As of
44
- 2018-03-30 these are:
45
- - Ruby 2.3 - 2.3.7
46
- - Ruby 2.4 - 2.4.4
47
- - Ruby 2.5 - 2.5.1
48
-
49
- ## License
50
- aesthetify is licensed under the [MIT License](https://opensource.org/licenses/MIT).
1
+ # aesthetify
2
+
3
+ [![Gem Version](https://badge.fury.io/rb/aesthetify.svg)](https://badge.fury.io/rb/aesthetify)
4
+ [![Build Status](https://travis-ci.org/TheAssailant/aesthetify.svg?branch=master)](https://travis-ci.org/TheAssailant/aesthetify)
5
+
6
+ aesthetify makes it simple to take any string and transform it for the
7
+ AESTHETIC. In addition, it also makes creating Fullwidth text
8
+ just as simple.
9
+
10
+ aesthetify comes with regular methods and bang versions of those methods for
11
+ in-place string modification.
12
+
13
+ ## Usage
14
+
15
+ ```ruby
16
+ require "aesthetify"
17
+ ```
18
+
19
+ Using String#aesthetify:
20
+ ```ruby
21
+ text = "vaporwave"
22
+ text.aesthetify!
23
+ puts text
24
+ #=> VAPORWAVE
25
+ ```
26
+
27
+ Using String#fullwidth:
28
+ ```ruby
29
+ text = "long boy"
30
+ text.fullwidth!
31
+ puts text
32
+ #=> long boy
33
+ ```
34
+
35
+ Using concatenation:
36
+ ```ruby
37
+ text = "This is the " + "sad boys ".aesthetify + "club"
38
+ puts text
39
+ #=> This is the SAD BOYS club
40
+ ```
41
+
42
+ ## CLI usage
43
+
44
+ Simply call either the `aesthetify` or `fullwidth` commands and enter your text after.
45
+
46
+ ```bash
47
+ $ aesthetify macintosh plus
48
+ MACINTOSH PLUS
49
+ ```
50
+
51
+ ## Supported Ruby versions
52
+ aesthetify supports all of the currently supported versions of Ruby. As of
53
+ 2022-11-17 these are:
54
+ - Ruby 2.6 - 2.6.10
55
+ - Ruby 2.7 - 2.7.9
56
+ - Ruby 3.0 - 3.0.4
57
+ - Ruby 3.1 - 3.1.2
58
+
59
+ ## License
60
+ aesthetify is licensed under the [MIT License](https://opensource.org/licenses/MIT).
data/Rakefile CHANGED
File without changes
data/aesthetify.gemspec CHANGED
@@ -1,19 +1,22 @@
1
- Gem::Specification.new do |s|
2
- s.name = "aesthetify"
3
- s.version = "1.0.2"
4
- s.authors = "TheAssailant"
5
- s.email = "TheAssailant@users.noreply.github.com"
6
- s.summary = %q{aesthetify is a gem that lets you transform ASCII text into fullwidth text of 2 distinct flavors: regular Fullwidth and AESTHETIC}
7
- s.homepage = "https://github.com/TheAssailant/aesthetify"
8
- s.license = "MIT"
9
-
10
- s.required_ruby_version = "~> 2.3"
11
-
12
- s.add_development_dependency "bundler", "~> 1.15"
13
- s.add_development_dependency "minitest"
14
- s.add_development_dependency "minitest-proveit"
15
- s.add_development_dependency "rake"
16
-
17
- s.files = `git ls-files`.split("\n")
18
- s.test_files = `git ls-files -- test/*`.split("\n")
19
- end
1
+ Gem::Specification.new do |s|
2
+ s.name = "aesthetify"
3
+ s.version = "1.1.1"
4
+ s.authors = "TheAssailant"
5
+ s.email = "TheAssailant@protonmail.com"
6
+ s.summary = %q{aesthetify is a gem that lets you transform ASCII text into fullwidth text of 2 distinct flavors: regular Fullwidth and AESTHETIC}
7
+ s.homepage = "https://github.com/TheAssailant/aesthetify"
8
+ s.license = "MIT"
9
+
10
+ s.executables << "aesthetify" << "fullwidth"
11
+ s.require_paths = ['lib']
12
+
13
+ s.required_ruby_version = [">= 2.3", "< 4"]
14
+
15
+ s.add_development_dependency "bundler"
16
+ s.add_development_dependency "minitest"
17
+ s.add_development_dependency "minitest-proveit"
18
+ s.add_development_dependency "rake"
19
+
20
+ s.files = `git ls-files`.split("\n")
21
+ s.test_files = `git ls-files -- test/*`.split("\n")
22
+ end
data/bin/aesthetify ADDED
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require "aesthetify"
5
+
6
+ puts ARGV.join(" ").aesthetify
data/bin/fullwidth ADDED
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require "aesthetify"
5
+
6
+ puts ARGV.join(" ").fullwidth
data/lib/aesthetify.rb CHANGED
@@ -1,45 +1,45 @@
1
- =begin
2
- The basic premise is we shift characters into the Fullwidth and Halfwidth
3
- Unicode character space using simple arithmetic and a 0x0020 (32) character
4
- offset since the ASCII characters with fullwidth replacements only begin
5
- showing up at 0x0021 in Unicode (0x0020 is the space character).
6
- =end
7
-
8
- class String
9
- def aesthetify
10
- output = []
11
- # Did you know? You can do something like this without a `self`
12
- split("").each do |letter|
13
- # We skip lowercase letters so we can turn them uppercase for the
14
- # aesthetify method
15
- if (0x0021..0x0060).cover?(letter.ord) || (0x007B..0x007E).cover?(letter.ord)
16
- output << (letter.ord + 0xFF00 - 32).chr(Encoding::UTF_8)
17
- elsif (0x0061..0x007A).cover?(letter.ord)
18
- output << (letter.ord + 0xFF00 - 64).chr(Encoding::UTF_8)
19
- else
20
- output << letter
21
- end
22
- end
23
- output.join
24
- end
25
-
26
- def aesthetify!
27
- replace aesthetify
28
- end
29
-
30
- def fullwidth
31
- output = []
32
- split("").each do |letter|
33
- if (0x0021..0x007E).cover?(letter.ord)
34
- output << (letter.ord + 0xFF00 - 32).chr(Encoding::UTF_8)
35
- else
36
- output << letter
37
- end
38
- end
39
- output.join
40
- end
41
-
42
- def fullwidth!
43
- replace fullwidth
44
- end
45
- end
1
+ =begin
2
+ The basic premise is we shift characters into the Fullwidth and Halfwidth
3
+ Unicode character space using simple arithmetic and a 0x0020 (32) character
4
+ offset since the ASCII characters with fullwidth replacements only begin
5
+ showing up at 0x0021 in Unicode (0x0020 is the space character).
6
+ =end
7
+
8
+ class String
9
+ def aesthetify
10
+ output = []
11
+ # Did you know? You can do something like this without a `self`
12
+ split("").each do |letter|
13
+ # We skip lowercase letters so we can turn them uppercase for the
14
+ # aesthetify method
15
+ if (0x0021..0x0060).cover?(letter.ord) || (0x007B..0x007E).cover?(letter.ord)
16
+ output << (letter.ord + 0xFF00 - 32).chr(Encoding::UTF_8)
17
+ elsif (0x0061..0x007A).cover?(letter.ord)
18
+ output << (letter.ord + 0xFF00 - 64).chr(Encoding::UTF_8)
19
+ else
20
+ output << letter
21
+ end
22
+ end
23
+ output.join
24
+ end
25
+
26
+ def aesthetify!
27
+ replace aesthetify
28
+ end
29
+
30
+ def fullwidth
31
+ output = []
32
+ split("").each do |letter|
33
+ if (0x0021..0x007E).cover?(letter.ord)
34
+ output << (letter.ord + 0xFF00 - 32).chr(Encoding::UTF_8)
35
+ else
36
+ output << letter
37
+ end
38
+ end
39
+ output.join
40
+ end
41
+
42
+ def fullwidth!
43
+ replace fullwidth
44
+ end
45
+ end
@@ -1,38 +1,38 @@
1
- require 'aesthetify'
2
- require 'minitest/autorun'
3
- require 'minitest/hell'
4
-
5
- DATA1 = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~"
6
- DATA2 = "The quick brown fox jumps over the lazy dog."
7
-
8
- AESTHETIFY1 = " !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~"
9
- AESTHETIFY2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG."
10
-
11
- FULLWIDTH1 = " !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~"
12
- FULLWIDTH2 = "The quick brown fox jumps over the lazy dog."
13
-
14
- class AesthetifyTest < Minitest::Test
15
- prove_it!
16
-
17
- def test_aesthetify
18
- assert_equal AESTHETIFY1, DATA1.aesthetify
19
- assert_equal AESTHETIFY2, DATA2.aesthetify
20
- end
21
-
22
- def test_aesthetify_mutation
23
- testdata = String.new(DATA2)
24
- testdata.aesthetify!
25
- assert_equal AESTHETIFY2, testdata
26
- end
27
-
28
- def test_fullwidth
29
- assert_equal FULLWIDTH1, DATA1.fullwidth
30
- assert_equal FULLWIDTH2, DATA2.fullwidth
31
- end
32
-
33
- def test_fullwidth_mutation
34
- testdata = String.new(DATA2)
35
- testdata.fullwidth!
36
- assert_equal FULLWIDTH2, testdata
37
- end
38
- end
1
+ require 'aesthetify'
2
+ require 'minitest/autorun'
3
+ require 'minitest/hell'
4
+
5
+ DATA1 = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~"
6
+ DATA2 = "The quick brown fox jumps over the lazy dog."
7
+
8
+ AESTHETIFY1 = " !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~"
9
+ AESTHETIFY2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG."
10
+
11
+ FULLWIDTH1 = " !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~"
12
+ FULLWIDTH2 = "The quick brown fox jumps over the lazy dog."
13
+
14
+ class AesthetifyTest < Minitest::Test
15
+ prove_it!
16
+
17
+ def test_aesthetify
18
+ assert_equal AESTHETIFY1, DATA1.aesthetify
19
+ assert_equal AESTHETIFY2, DATA2.aesthetify
20
+ end
21
+
22
+ def test_aesthetify_mutation
23
+ testdata = String.new(DATA2)
24
+ testdata.aesthetify!
25
+ assert_equal AESTHETIFY2, testdata
26
+ end
27
+
28
+ def test_fullwidth
29
+ assert_equal FULLWIDTH1, DATA1.fullwidth
30
+ assert_equal FULLWIDTH2, DATA2.fullwidth
31
+ end
32
+
33
+ def test_fullwidth_mutation
34
+ testdata = String.new(DATA2)
35
+ testdata.fullwidth!
36
+ assert_equal FULLWIDTH2, testdata
37
+ end
38
+ end
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aesthetify
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - TheAssailant
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-04 00:00:00.000000000 Z
11
+ date: 2022-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '1.15'
19
+ version: '0'
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.15'
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: minitest
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -66,9 +66,11 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
- description:
70
- email: TheAssailant@users.noreply.github.com
71
- executables: []
69
+ description:
70
+ email: TheAssailant@protonmail.com
71
+ executables:
72
+ - aesthetify
73
+ - fullwidth
72
74
  extensions: []
73
75
  extra_rdoc_files: []
74
76
  files:
@@ -76,37 +78,40 @@ files:
76
78
  - ".gitignore"
77
79
  - ".travis.yml"
78
80
  - Gemfile
79
- - Gemfile.lock
80
81
  - LICENSE
81
82
  - README.md
82
83
  - Rakefile
83
84
  - aesthetify.gemspec
85
+ - bin/aesthetify
86
+ - bin/fullwidth
84
87
  - lib/aesthetify.rb
85
88
  - test/aesthetify_test.rb
86
89
  homepage: https://github.com/TheAssailant/aesthetify
87
90
  licenses:
88
91
  - MIT
89
92
  metadata: {}
90
- post_install_message:
93
+ post_install_message:
91
94
  rdoc_options: []
92
95
  require_paths:
93
96
  - lib
94
97
  required_ruby_version: !ruby/object:Gem::Requirement
95
98
  requirements:
96
- - - "~>"
99
+ - - ">="
97
100
  - !ruby/object:Gem::Version
98
101
  version: '2.3'
102
+ - - "<"
103
+ - !ruby/object:Gem::Version
104
+ version: '4'
99
105
  required_rubygems_version: !ruby/object:Gem::Requirement
100
106
  requirements:
101
107
  - - ">="
102
108
  - !ruby/object:Gem::Version
103
109
  version: '0'
104
110
  requirements: []
105
- rubyforge_project:
106
- rubygems_version: 2.6.11
107
- signing_key:
111
+ rubygems_version: 3.3.3
112
+ signing_key:
108
113
  specification_version: 4
109
- summary: "aesthetify is a gem that lets you transform ASCII text into fullwidth text
110
- of 2 distinct flavors: regular \uFEFFFullwidth and AESTHETIC"
114
+ summary: 'aesthetify is a gem that lets you transform ASCII text into fullwidth text
115
+ of 2 distinct flavors: regular Fullwidth and AESTHETIC'
111
116
  test_files:
112
117
  - test/aesthetify_test.rb
data/Gemfile.lock DELETED
@@ -1,25 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- aesthetify (1.0.2)
5
-
6
- GEM
7
- remote: https://rubygems.org/
8
- specs:
9
- minitest (5.11.3)
10
- minitest-proveit (1.0.0)
11
- minitest (> 5, < 7)
12
- rake (12.3.1)
13
-
14
- PLATFORMS
15
- ruby
16
-
17
- DEPENDENCIES
18
- aesthetify!
19
- bundler (~> 1.15)
20
- minitest
21
- minitest-proveit
22
- rake
23
-
24
- BUNDLED WITH
25
- 1.16.1