codex_vitae 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.github/workflows/main.yml +16 -0
- data/.gitignore +8 -0
- data/Gemfile +12 -0
- data/Gemfile.lock +30 -0
- data/README.md +35 -0
- data/Rakefile +12 -0
- data/bin/console +15 -0
- data/bin/setup +8 -0
- data/codex_decrypt +54 -0
- data/codex_encrypt +54 -0
- data/codex_vitae +8 -0
- data/codex_vitae.gemspec +36 -0
- data/index.html +16 -0
- data/lib/codex_vitae.rb +59 -0
- data/lib/codex_vitae/version.rb +5 -0
- data/submit.html +14 -0
- metadata +62 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 31555400d46047746b3297f0214a8c6eb0c95c3045a319bb54ad7bbc2a4f9fdf
|
4
|
+
data.tar.gz: d407be52d33816072b2cddbe92c08fa3da45928b9b5e87bed0749982093e0501
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 60ba1a45511f8f7a765592c7c815aecfe8d1ffe869b0e999a53449698b611009b68e04369dcb2c7ee5f713373be5a7747e402187183a7526e9840518a8012cc4
|
7
|
+
data.tar.gz: 2899eb7a0d58605fd32b88b7a18f1749dd5359c9154b868ac7e1e42a84772487289bf7e73c76a2b652d10416fa83be284c3b5d12712b597b655b03c0bdc2ed68
|
@@ -0,0 +1,16 @@
|
|
1
|
+
name: Ruby
|
2
|
+
|
3
|
+
on: [push,pull_request]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
build:
|
7
|
+
runs-on: ubuntu-latest
|
8
|
+
steps:
|
9
|
+
- uses: actions/checkout@v2
|
10
|
+
- name: Set up Ruby
|
11
|
+
uses: ruby/setup-ruby@v1
|
12
|
+
with:
|
13
|
+
ruby-version: 2.6.3
|
14
|
+
bundler-cache: true
|
15
|
+
- name: Run the default task
|
16
|
+
run: bundle exec rake
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
codex_vitae (0.1.0)
|
5
|
+
|
6
|
+
GEM
|
7
|
+
remote: https://rubygems.org/
|
8
|
+
specs:
|
9
|
+
ansi (1.5.0)
|
10
|
+
builder (3.2.4)
|
11
|
+
minitest (5.14.4)
|
12
|
+
minitest-reporters (1.2.0)
|
13
|
+
ansi
|
14
|
+
builder
|
15
|
+
minitest (>= 5.0)
|
16
|
+
ruby-progressbar
|
17
|
+
rake (13.0.3)
|
18
|
+
ruby-progressbar (1.11.0)
|
19
|
+
|
20
|
+
PLATFORMS
|
21
|
+
universal-darwin-20
|
22
|
+
|
23
|
+
DEPENDENCIES
|
24
|
+
codex_vitae!
|
25
|
+
minitest (~> 5.0)
|
26
|
+
minitest-reporters (= 1.2.0)
|
27
|
+
rake (~> 13.0)
|
28
|
+
|
29
|
+
BUNDLED WITH
|
30
|
+
2.2.17
|
data/README.md
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
# Codex Vitae
|
2
|
+
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/codex_vitae`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'codex_vitae'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle install
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install codex_vitae
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
TODO: Write usage instructions here
|
26
|
+
|
27
|
+
## Development
|
28
|
+
|
29
|
+
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.
|
30
|
+
|
31
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
|
+
|
33
|
+
## Contributing
|
34
|
+
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/codex_vitae.
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require "bundler/setup"
|
5
|
+
require "codex_vitae"
|
6
|
+
|
7
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
8
|
+
# with your gem easier. You can also use a different console, if you like.
|
9
|
+
|
10
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
11
|
+
# require "pry"
|
12
|
+
# Pry.start
|
13
|
+
|
14
|
+
require "irb"
|
15
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
data/codex_decrypt
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# C O D E X D E C R Y P T
|
4
|
+
|
5
|
+
puts "Enter that you have been trusted with."
|
6
|
+
|
7
|
+
codex = gets
|
8
|
+
|
9
|
+
puts "For your eyes only:" + "\n"
|
10
|
+
|
11
|
+
def decrypt(codex)
|
12
|
+
transformer = {
|
13
|
+
"2" => "a",
|
14
|
+
"i" => "b",
|
15
|
+
"b" => "c",
|
16
|
+
"z" => "d",
|
17
|
+
"0" => "e",
|
18
|
+
"h" => "f",
|
19
|
+
"a" => "g",
|
20
|
+
"7" => "h",
|
21
|
+
"x" => "i",
|
22
|
+
"3" => "j",
|
23
|
+
"q" => "k",
|
24
|
+
"c" => "l",
|
25
|
+
"g" => "m",
|
26
|
+
"1" => "n",
|
27
|
+
"6" => "o",
|
28
|
+
"m" => "p",
|
29
|
+
"r" => "q",
|
30
|
+
"p" => "r",
|
31
|
+
"5" => "s",
|
32
|
+
"l" => "t",
|
33
|
+
"9" => "u",
|
34
|
+
"e" => "v",
|
35
|
+
"v" => "w",
|
36
|
+
"y" => "x",
|
37
|
+
"w" => "y",
|
38
|
+
"d" => "z",
|
39
|
+
"8" => ".",
|
40
|
+
"n" => ",",
|
41
|
+
"f" => "?",
|
42
|
+
"u" => "\(",
|
43
|
+
"k" => "\)",
|
44
|
+
"t" => "\"",
|
45
|
+
"o" => ":",
|
46
|
+
"s" => "$",
|
47
|
+
"j" => "\'",
|
48
|
+
"4" => " ",
|
49
|
+
}
|
50
|
+
decryption = codex.downcase.split(" ").join("")
|
51
|
+
puts decryption.gsub(/\S/, transformer).upcase
|
52
|
+
end
|
53
|
+
|
54
|
+
decrypt(codex)
|
data/codex_encrypt
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# C O D E X E N C R Y P T
|
4
|
+
|
5
|
+
puts "Enter everything you ever learned about life."
|
6
|
+
|
7
|
+
codex = gets.downcase
|
8
|
+
|
9
|
+
puts "Excelent."
|
10
|
+
puts "This is your Codex Vitae:" + "\n"
|
11
|
+
|
12
|
+
def encrypt(codex)
|
13
|
+
transformer = {
|
14
|
+
"a" => "2",
|
15
|
+
"b" => "i",
|
16
|
+
"c" => "b",
|
17
|
+
"d" => "z",
|
18
|
+
"e" => "0",
|
19
|
+
"f" => "h",
|
20
|
+
"g" => "a",
|
21
|
+
"h" => "7",
|
22
|
+
"i" => "x",
|
23
|
+
"j" => "3",
|
24
|
+
"k" => "q",
|
25
|
+
"l" => "c",
|
26
|
+
"m" => "g",
|
27
|
+
"n" => "1",
|
28
|
+
"o" => "6",
|
29
|
+
"p" => "m",
|
30
|
+
"q" => "r",
|
31
|
+
"r" => "p",
|
32
|
+
"s" => "5",
|
33
|
+
"t" => "l",
|
34
|
+
"u" => "9",
|
35
|
+
"v" => "e",
|
36
|
+
"w" => "v",
|
37
|
+
"x" => "y",
|
38
|
+
"y" => "w",
|
39
|
+
"z" => "d",
|
40
|
+
"." => "8",
|
41
|
+
"," => "n",
|
42
|
+
"?" => "f",
|
43
|
+
"\(" => "u",
|
44
|
+
"\)" => "k",
|
45
|
+
"\"" => "t",
|
46
|
+
":" => "o",
|
47
|
+
"$" => "s",
|
48
|
+
"\'" => "j",
|
49
|
+
}
|
50
|
+
encryption = codex.gsub(/\S/, transformer).gsub(/\s/, "4")
|
51
|
+
puts encryption.upcase.chars.join(" ")
|
52
|
+
end
|
53
|
+
|
54
|
+
encrypt(codex)
|
data/codex_vitae
ADDED
data/codex_vitae.gemspec
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "lib/codex_vitae/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "codex_vitae"
|
7
|
+
spec.version = CodexVitae::VERSION
|
8
|
+
spec.authors = ["Alan Rivero Gorinstein"]
|
9
|
+
spec.email = ["alan@riverogorinstein.com"]
|
10
|
+
|
11
|
+
spec.summary = %q{Takes in plain text and returns it encrypted in Codex Vitae format.}
|
12
|
+
spec.description = %q{Creates an encrypted Codex Vitae out of your plain text.}
|
13
|
+
spec.homepage = "https://github.com/alanriverogorinstein/codex_vitae"
|
14
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
|
15
|
+
|
16
|
+
spec.metadata["allowed_push_host"] = "https://rubygems.org/"
|
17
|
+
|
18
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
19
|
+
spec.metadata["source_code_uri"] = "https://github.com/alanriverogorinstein/codex_vitae"
|
20
|
+
spec.metadata["changelog_uri"] = "https://github.com/alanriverogorinstein/codex_vitae"
|
21
|
+
|
22
|
+
# Specify which files should be added to the gem when it is released.
|
23
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
24
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
25
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features)/}) }
|
26
|
+
end
|
27
|
+
spec.bindir = "exe"
|
28
|
+
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
29
|
+
spec.require_paths = ["lib"]
|
30
|
+
|
31
|
+
# Uncomment to register a new dependency of your gem
|
32
|
+
# spec.add_dependency "example-gem", "~> 1.0"
|
33
|
+
|
34
|
+
# For more information and examples about making a new gem, checkout our
|
35
|
+
# guide at: https://bundler.io/guides/creating_gem.html
|
36
|
+
end
|
data/index.html
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<title>Library of the Unbroken Spine</title>
|
5
|
+
<meta charset="UTF-8" />
|
6
|
+
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
7
|
+
<meta name="description" content="" />
|
8
|
+
</head>
|
9
|
+
<body>
|
10
|
+
<h1>Library of the Unbroken Spine</h1>
|
11
|
+
<p><a href="#">Rivero Gorinstein</a> 213 p, 2021.</p>
|
12
|
+
<p><a href="#">Diez</a> 507 p, 2020.</p>
|
13
|
+
<p><a href="#">Bacaleinicow</a> 1,044 p, 1963.</p>
|
14
|
+
<a href="./submit.html"><button>Submit a Codex Vitae</button</a>
|
15
|
+
</body>
|
16
|
+
</html>
|
data/lib/codex_vitae.rb
ADDED
@@ -0,0 +1,59 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "codex_vitae/version"
|
4
|
+
|
5
|
+
#module CodexVitae
|
6
|
+
#class Error < StandardError; end
|
7
|
+
# Your code goes here...
|
8
|
+
#end
|
9
|
+
|
10
|
+
puts "Enter everything you ever learned about life."
|
11
|
+
|
12
|
+
codex = gets.downcase
|
13
|
+
|
14
|
+
puts "Excelent."
|
15
|
+
puts "This is your Codex Vitae:" + "\n"
|
16
|
+
|
17
|
+
def encrypt(codex)
|
18
|
+
transformer = {
|
19
|
+
"a" => "2",
|
20
|
+
"b" => "i",
|
21
|
+
"c" => "b",
|
22
|
+
"d" => "z",
|
23
|
+
"e" => "0",
|
24
|
+
"f" => "h",
|
25
|
+
"g" => "a",
|
26
|
+
"h" => "7",
|
27
|
+
"i" => "x",
|
28
|
+
"j" => "3",
|
29
|
+
"k" => "q",
|
30
|
+
"l" => "c",
|
31
|
+
"m" => "g",
|
32
|
+
"n" => "1",
|
33
|
+
"o" => "6",
|
34
|
+
"p" => "m",
|
35
|
+
"q" => "r",
|
36
|
+
"r" => "p",
|
37
|
+
"s" => "5",
|
38
|
+
"t" => "l",
|
39
|
+
"u" => "9",
|
40
|
+
"v" => "e",
|
41
|
+
"w" => "v",
|
42
|
+
"x" => "y",
|
43
|
+
"y" => "w",
|
44
|
+
"z" => "d",
|
45
|
+
"." => "8",
|
46
|
+
"," => "n",
|
47
|
+
"?" => "f",
|
48
|
+
"\(" => "u",
|
49
|
+
"\)" => "k",
|
50
|
+
"\"" => "t",
|
51
|
+
":" => "o",
|
52
|
+
"$" => "s",
|
53
|
+
"\'" => "j",
|
54
|
+
}
|
55
|
+
encryption = codex.gsub(/\S/, transformer).gsub(/\s/, "4")
|
56
|
+
puts encryption.upcase.chars.join(" ")
|
57
|
+
end
|
58
|
+
|
59
|
+
encrypt(codex)
|
data/submit.html
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<title>Library of the Unbroken Spine</title>
|
5
|
+
<meta charset="UTF-8" />
|
6
|
+
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
7
|
+
<meta name="description" content="" />
|
8
|
+
</head>
|
9
|
+
<body>
|
10
|
+
<h1>Submit a Codex Vitae</h1>
|
11
|
+
<textarea name="submit" rows="8" cols="80">Enter everything you ever knew about life.</textarea><br>
|
12
|
+
<button>Encrypt</button
|
13
|
+
</body>
|
14
|
+
</html>
|
metadata
ADDED
@@ -0,0 +1,62 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: codex_vitae
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Alan Rivero Gorinstein
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2021-06-12 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: Creates an encrypted Codex Vitae out of your plain text.
|
14
|
+
email:
|
15
|
+
- alan@riverogorinstein.com
|
16
|
+
executables: []
|
17
|
+
extensions: []
|
18
|
+
extra_rdoc_files: []
|
19
|
+
files:
|
20
|
+
- ".github/workflows/main.yml"
|
21
|
+
- ".gitignore"
|
22
|
+
- Gemfile
|
23
|
+
- Gemfile.lock
|
24
|
+
- README.md
|
25
|
+
- Rakefile
|
26
|
+
- bin/console
|
27
|
+
- bin/setup
|
28
|
+
- codex_decrypt
|
29
|
+
- codex_encrypt
|
30
|
+
- codex_vitae
|
31
|
+
- codex_vitae.gemspec
|
32
|
+
- index.html
|
33
|
+
- lib/codex_vitae.rb
|
34
|
+
- lib/codex_vitae/version.rb
|
35
|
+
- submit.html
|
36
|
+
homepage: https://github.com/alanriverogorinstein/codex_vitae
|
37
|
+
licenses: []
|
38
|
+
metadata:
|
39
|
+
allowed_push_host: https://rubygems.org/
|
40
|
+
homepage_uri: https://github.com/alanriverogorinstein/codex_vitae
|
41
|
+
source_code_uri: https://github.com/alanriverogorinstein/codex_vitae
|
42
|
+
changelog_uri: https://github.com/alanriverogorinstein/codex_vitae
|
43
|
+
post_install_message:
|
44
|
+
rdoc_options: []
|
45
|
+
require_paths:
|
46
|
+
- lib
|
47
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
48
|
+
requirements:
|
49
|
+
- - ">="
|
50
|
+
- !ruby/object:Gem::Version
|
51
|
+
version: 2.4.0
|
52
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
53
|
+
requirements:
|
54
|
+
- - ">="
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: '0'
|
57
|
+
requirements: []
|
58
|
+
rubygems_version: 3.0.3
|
59
|
+
signing_key:
|
60
|
+
specification_version: 4
|
61
|
+
summary: Takes in plain text and returns it encrypted in Codex Vitae format.
|
62
|
+
test_files: []
|