Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: CI Tests
on:
pull_request:
push:
branches:
- master
- dev
schedule:
- cron: "0 7 * * SUN"
jobs:
test:
strategy:
fail-fast: false
matrix:
include:
- { os: ubuntu-20.04, ruby: "3.0" }
- { os: macos-10.15, ruby: "3.0" }
- { os: windows-2019, ruby: "3.0" }
name: test ${{ matrix.os }} ${{ matrix.ruby }}
runs-on: ${{ matrix.os }}
timeout-minutes: 5
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@master
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: false
- name: Install Dependencies
run: |
gem install bundler
bundle install --jobs 4 --retry 3
- name: Test
run: bundle exec rake test
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,12 @@ build-iPhoneSimulator/

# for a library or gem, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# Gemfile.lock
Gemfile.lock
# .ruby-version
# .ruby-gemset

# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
.rvmrc
dev*.rb
Rienfile
compiled*
17 changes: 17 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
AllCops:
NewCops: enable
Exclude:
- tmp/**/*
- pkg/**/*
- test/samples/**/*
- rien_output/**/*
Style/Documentation:
Enabled: false
Metrics/MethodLength:
Enabled: false
Metrics/ModuleLength:
Enabled: false
Metrics/AbcSize:
Enabled: false
Metrics/BlockLength:
Enabled: false
4 changes: 3 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
source "https://rubygems.org"
# frozen_string_literal: true

source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

# Declare your gem's dependencies in flow_core.gemspec.
Expand Down
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@

Ruby IR Encoding Gem (Experimental)

[![Build Status](https://dev.azure.com/dsh0416/rien/_apis/build/status/coderemixer.rien?branchName=master)](https://dev.azure.com/dsh0416/rien/_build/latest?definitionId=1&branchName=master)
[![CI Tests](https://github.com/coderemixer/rien/workflows/CI%20Tests/badge.svg)](https://github.com/coderemixer/rien/actions?query=workflow%3A%22CI+Tests%22)

# Example

```
Usage: rien [options]
-v, --version Show current version
-e, --encode [FILE] Encode specific ruby file
-p, --pack [DIR] Pack ruby directory into encoded files
-o, --out [FILE/DIR] Indicate the output of the encoded file(s)
Expand Down Expand Up @@ -71,6 +72,14 @@ Rien.configure do |config|
# aka. /tmp/rien for linux
config.tmpdir = "tmpdir/rien"

# Ruar: https://github.com/DarkKowalski/ruar
# [Optional] Ruar mode
config.ruar = true
# Set key/iv or use generated ones
config.ruar_key = Base64.encode64(your_key_binary)
config.ruar_iv = Base64.encode64(your_iv_binary)
# You must set auth data
config.ruar_auth_data = Base64.encode64(your_auth_data)
end
```

Expand Down Expand Up @@ -101,4 +110,4 @@ Use `Rinefile` to exclude `lib/plugins/**/init.rb`

Rien uses a `tmpdir` to store intermediate results and timestamps to distinguish them.

Check your `tmpdir` (`/tmp/rien` for linux by default) to clean unsuccessful build results.
Check your `tmpdir` (`/tmp/rien` for linux by default) to clean unsuccessful build results.
15 changes: 8 additions & 7 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# frozen_string_literal: true

require 'bundler/gem_tasks'
require 'rake/testtask'
require 'ci/reporter/rake/minitest'

Rake::TestTask.new(:minitest) do |t|
t.libs << "lib"
t.libs << "test"
t.test_files = FileList['test/**/*_test.rb']
Rake::TestTask.new(:test) do |t|
t.libs << 'lib'
t.libs << 'test'
t.test_files = FileList['test/**/*_test.rb'].exclude('test/samples')
t.verbose = true
end

task :minitest => 'ci:setup:minitest'
task :default => 'minitest'
task default: %w[test]
21 changes: 0 additions & 21 deletions azure-pipelines.yml

This file was deleted.

5 changes: 3 additions & 2 deletions bin/rien
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/ruby
# frozen_string_literal: true

require "rien"
require 'rien'

Rien::Cli.new.start
Rien::Cli.new.start
13 changes: 12 additions & 1 deletion lib/rien.rb
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
# frozen_string_literal: true

require 'fileutils'
require 'optparse'
require 'tmpdir'
require 'zlib'

require 'ruar'

require 'ruby-progressbar'

require_relative 'rien/core_ext/string'

require_relative 'rien/version'
require_relative 'rien/const'
require_relative 'rien/error'

require_relative 'rien/configurable'

require_relative 'rien/decoder'
require_relative 'rien/encoder'

require_relative 'rien/cli'
require_relative 'rien/cli/helper'
require_relative 'rien/cli/cli'
Loading