basefile 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 +3 -1
- data/basefile.gemspec +4 -2
- data/exe/basefile +29 -0
- data/lib/basefile/exe/decoder.rb +16 -0
- data/lib/basefile/exe/encoder.rb +15 -0
- data/lib/basefile/version.rb +1 -1
- metadata +23 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a744ac5dfa008b751a51999c233bf4f8bfdd65147deec2d2a74e010b0312913a
|
4
|
+
data.tar.gz: 7eb9460f8e53158030f42d6dae4f59324230de1e81749be1afdf4db5cccbbde7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 78a355107834b5027f8c3a4beb9d1095d466276c16be8859a0465830e0d13744e22f5fd835e6130302dcd8791fd8d84c8f34a809612668a0f0219767e2b3051c
|
7
|
+
data.tar.gz: 0c41f6fd28533bce7f05db94cf49f8cafb9784d07c1a3e7484874f9eb059e9184fbf8d3665944091887a41d1d67db2b60cb5c6369d3559da0c07c173d66217c0
|
data/Gemfile.lock
CHANGED
data/basefile.gemspec
CHANGED
@@ -6,8 +6,8 @@ Gem::Specification.new do |spec|
|
|
6
6
|
spec.authors = ["Josh Burns"]
|
7
7
|
spec.email = ["josh@tripwyre.me"]
|
8
8
|
|
9
|
-
spec.summary = "Store files as
|
10
|
-
spec.description = "Store files as
|
9
|
+
spec.summary = "Store files as base64 text"
|
10
|
+
spec.description = "Store files as base64 text"
|
11
11
|
spec.homepage = "https://github.com/tripwyre/basefile"
|
12
12
|
spec.license = "MIT"
|
13
13
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
|
@@ -23,4 +23,6 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.bindir = "exe"
|
24
24
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
25
25
|
spec.require_paths = ["lib"]
|
26
|
+
|
27
|
+
spec.add_runtime_dependency 'slop', '~> 4.8.2'
|
26
28
|
end
|
data/exe/basefile
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'basefile'
|
4
|
+
|
5
|
+
opts = Slop.parser do |o|
|
6
|
+
o.bool '-e', '--encode', 'Run encoder mode (default)'
|
7
|
+
o.bool '-d', '--decode', 'Run decoder mode'
|
8
|
+
o.string '-f','--file', 'The file to operate on (input or output dependeing on the mode)', required: true
|
9
|
+
o.bool '-v', '--verbose', 'Be loud'
|
10
|
+
o.on '--version', 'print the version' do
|
11
|
+
puts Basefile::VERSION
|
12
|
+
exit
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
if opts.decode?
|
17
|
+
opts.encode = false
|
18
|
+
# Run decoder
|
19
|
+
exit
|
20
|
+
elsif opts.encode?
|
21
|
+
if opts.verbose?
|
22
|
+
puts "Running base64 encoder on #{opts[:file]}"
|
23
|
+
end
|
24
|
+
enc = Basefile::Exe::Encoder.new(opts[:file])
|
25
|
+
enc.call
|
26
|
+
exit
|
27
|
+
else
|
28
|
+
# Throw Error
|
29
|
+
end
|
data/lib/basefile/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: basefile
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josh Burns
|
@@ -9,11 +9,26 @@ autorequire:
|
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
11
|
date: 2020-08-24 00:00:00.000000000 Z
|
12
|
-
dependencies:
|
13
|
-
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: slop
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 4.8.2
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 4.8.2
|
27
|
+
description: Store files as base64 text
|
14
28
|
email:
|
15
29
|
- josh@tripwyre.me
|
16
|
-
executables:
|
30
|
+
executables:
|
31
|
+
- basefile
|
17
32
|
extensions: []
|
18
33
|
extra_rdoc_files: []
|
19
34
|
files:
|
@@ -28,8 +43,11 @@ files:
|
|
28
43
|
- bin/console
|
29
44
|
- bin/rake
|
30
45
|
- bin/setup
|
46
|
+
- exe/basefile
|
31
47
|
- lib/basefile.rb
|
32
48
|
- lib/basefile/base64_shim.rb
|
49
|
+
- lib/basefile/exe/decoder.rb
|
50
|
+
- lib/basefile/exe/encoder.rb
|
33
51
|
- lib/basefile/file_handler.rb
|
34
52
|
- lib/basefile/version.rb
|
35
53
|
homepage: https://github.com/tripwyre/basefile
|
@@ -56,5 +74,5 @@ requirements: []
|
|
56
74
|
rubygems_version: 3.1.2
|
57
75
|
signing_key:
|
58
76
|
specification_version: 4
|
59
|
-
summary: Store files as
|
77
|
+
summary: Store files as base64 text
|
60
78
|
test_files: []
|