basefile 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a744ac5dfa008b751a51999c233bf4f8bfdd65147deec2d2a74e010b0312913a
4
- data.tar.gz: 7eb9460f8e53158030f42d6dae4f59324230de1e81749be1afdf4db5cccbbde7
3
+ metadata.gz: b14dccaf00f9b0102034cc0b3bcf33406f7020f62d4346b3ab33a7900af8ffc2
4
+ data.tar.gz: 147539c1075d307b4f8228022f39f2e7b9082628286d00b257a99fca9882c78c
5
5
  SHA512:
6
- metadata.gz: 78a355107834b5027f8c3a4beb9d1095d466276c16be8859a0465830e0d13744e22f5fd835e6130302dcd8791fd8d84c8f34a809612668a0f0219767e2b3051c
7
- data.tar.gz: 0c41f6fd28533bce7f05db94cf49f8cafb9784d07c1a3e7484874f9eb059e9184fbf8d3665944091887a41d1d67db2b60cb5c6369d3559da0c07c173d66217c0
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
@@ -1,15 +1,13 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- basefile (0.2.0)
5
- slop (~> 4.8.2)
4
+ basefile (0.2.1)
6
5
 
7
6
  GEM
8
7
  remote: https://rubygems.org/
9
8
  specs:
10
9
  minitest (5.14.1)
11
10
  rake (12.3.3)
12
- slop (4.8.2)
13
11
 
14
12
  PLATFORMS
15
13
  ruby
data/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Basefile
2
2
 
3
+ ![Gem Version](https://badge.fury.io/rb/basefile.svg)
4
+ ![Gem Downloads](https://img.shields.io/gem/dt/basefile?style=plastic)
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
 
@@ -23,6 +23,4 @@ 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'
28
26
  end
@@ -0,0 +1,6 @@
1
+ #!/bin/sh
2
+
3
+
4
+ gem uninstall basefile
5
+ bin/rake install
6
+ asdf reshim
@@ -1,3 +1,3 @@
1
1
  module Basefile
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
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.0
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-24 00:00:00.000000000 Z
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
- - exe/basefile
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
@@ -1,6 +0,0 @@
1
- ---
2
- language: ruby
3
- cache: bundler
4
- rvm:
5
- - 2.7.1
6
- before_install: gem install bundler -v 2.1.4
@@ -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
@@ -1,16 +0,0 @@
1
- module Basefile
2
- module Exe
3
- class Decoder
4
- def initialize(enc_str, file)
5
- @enc_str = enc_str
6
- @file = file
7
- end
8
-
9
- def call
10
- f = ::Basefile::FileHandler.new
11
- f.fileout = @file
12
- puts f.decode_file(@enc_str)
13
- end
14
- end
15
- end
16
- end
@@ -1,15 +0,0 @@
1
- module Basefile
2
- module Exe
3
- class Encoder
4
- def initialize(file)
5
- @file = file
6
- end
7
-
8
- def call
9
- f = ::Basefile::FileHandler.new
10
- f.filein = @file
11
- puts f.encode_file
12
- end
13
- end
14
- end
15
- end