basefile 0.2.0 → 0.2.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 +4 -4
- data/.github/workflows/ci.yml +26 -0
- data/Gemfile.lock +1 -3
- data/README.md +3 -1
- data/basefile.gemspec +0 -2
- data/bin/test-install.sh +6 -0
- data/lib/basefile/version.rb +1 -1
- metadata +6 -23
- data/.travis.yml +0 -6
- data/exe/basefile +0 -29
- data/lib/basefile/exe/decoder.rb +0 -16
- data/lib/basefile/exe/encoder.rb +0 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b14dccaf00f9b0102034cc0b3bcf33406f7020f62d4346b3ab33a7900af8ffc2
|
4
|
+
data.tar.gz: 147539c1075d307b4f8228022f39f2e7b9082628286d00b257a99fca9882c78c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f3d9a474ce7d6f5654fb26865c800346c769ced33b927426b074884a28928a1b8cc260e5fd5d79e770ca049c3cdae8a73917cecd93d2e5c95d5665a3d0af61bc
|
7
|
+
data.tar.gz: db45cfcbc0fc9fb2191b7ea6d1f090de54fbf09eca24b37ae85cd2eedf7f7cc3d31ecfc62c71a8df70c006be3684f9413ce58ef503e06c6eebae5c9f39043f50
|
@@ -0,0 +1,26 @@
|
|
1
|
+
name: CI
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ master ]
|
6
|
+
pull_request:
|
7
|
+
branches: [ master ]
|
8
|
+
|
9
|
+
jobs:
|
10
|
+
test:
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
|
13
|
+
steps:
|
14
|
+
- uses: actions/checkout@v2
|
15
|
+
- name: Set up Ruby
|
16
|
+
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
|
17
|
+
# change this to (see https://github.com/ruby/setup-ruby#versioning):
|
18
|
+
uses: ruby/setup-ruby@v1
|
19
|
+
with:
|
20
|
+
ruby-version: 2.7.1
|
21
|
+
- name: Install dependencies
|
22
|
+
run: bundle install
|
23
|
+
- name: Run tests
|
24
|
+
run: bundle exec rake
|
25
|
+
- name: Build gem package
|
26
|
+
run: bundle exec rake build
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
# Basefile
|
2
2
|
|
3
|
+

|
4
|
+

|
5
|
+
|
3
6
|
Basefile provides a flexible API to store files as raw base64 text and then retreieve them.
|
4
7
|
|
5
8
|
## Installation
|
@@ -33,7 +36,6 @@ base64_str = handler.encode_file
|
|
33
36
|
puts base64_str
|
34
37
|
|
35
38
|
# Decode / File
|
36
|
-
|
37
39
|
handler.fileout = "./new_file.png"
|
38
40
|
handler.decode_file(base64_str)
|
39
41
|
|
data/basefile.gemspec
CHANGED
data/bin/test-install.sh
ADDED
data/lib/basefile/version.rb
CHANGED
metadata
CHANGED
@@ -1,39 +1,24 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: basefile
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josh Burns
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-08-
|
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
|
11
|
+
date: 2020-08-28 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
27
13
|
description: Store files as base64 text
|
28
14
|
email:
|
29
15
|
- josh@tripwyre.me
|
30
|
-
executables:
|
31
|
-
- basefile
|
16
|
+
executables: []
|
32
17
|
extensions: []
|
33
18
|
extra_rdoc_files: []
|
34
19
|
files:
|
20
|
+
- ".github/workflows/ci.yml"
|
35
21
|
- ".gitignore"
|
36
|
-
- ".travis.yml"
|
37
22
|
- Gemfile
|
38
23
|
- Gemfile.lock
|
39
24
|
- LICENSE.txt
|
@@ -43,11 +28,9 @@ files:
|
|
43
28
|
- bin/console
|
44
29
|
- bin/rake
|
45
30
|
- bin/setup
|
46
|
-
-
|
31
|
+
- bin/test-install.sh
|
47
32
|
- lib/basefile.rb
|
48
33
|
- lib/basefile/base64_shim.rb
|
49
|
-
- lib/basefile/exe/decoder.rb
|
50
|
-
- lib/basefile/exe/encoder.rb
|
51
34
|
- lib/basefile/file_handler.rb
|
52
35
|
- lib/basefile/version.rb
|
53
36
|
homepage: https://github.com/tripwyre/basefile
|
data/.travis.yml
DELETED
data/exe/basefile
DELETED
@@ -1,29 +0,0 @@
|
|
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/exe/decoder.rb
DELETED