Merge branch 'dev' into args-refactor-forrealsies
commit
ca96a0e857
|
|
@ -0,0 +1,18 @@
|
||||||
|
|
||||||
|
name: Squib Unit Tests
|
||||||
|
|
||||||
|
on: [push]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
tests:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
- name: Set up Ruby 2.6
|
||||||
|
uses: ruby/setup-ruby@v1
|
||||||
|
with:
|
||||||
|
ruby-version: 2.6
|
||||||
|
# bundler-cache: true
|
||||||
|
- run: bundle install
|
||||||
|
- run: bundle exec rake
|
||||||
|
|
||||||
17
.travis.yml
17
.travis.yml
|
|
@ -1,17 +0,0 @@
|
||||||
language: ruby
|
|
||||||
sudo: true # need this for libgirepository1.0-dev
|
|
||||||
addons:
|
|
||||||
apt:
|
|
||||||
packages:
|
|
||||||
- libgirepository1.0-dev # for gobject-introspection
|
|
||||||
rvm:
|
|
||||||
- 2.4.2
|
|
||||||
- 2.5.3
|
|
||||||
- 2.6.3
|
|
||||||
- ruby-head
|
|
||||||
before_install:
|
|
||||||
- gem update --system
|
|
||||||
- gem install bundler
|
|
||||||
matrix:
|
|
||||||
allow_failures:
|
|
||||||
- rvm: ruby-head
|
|
||||||
34
Dockerfile
34
Dockerfile
|
|
@ -1,25 +1,31 @@
|
||||||
FROM ruby:2.5-alpine
|
# This is the official Squib Docker image.
|
||||||
|
#
|
||||||
|
FROM ruby:2.6-alpine
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
LABEL org.squib.url=http://squib.rocks \
|
LABEL org.squib.url=http://squib.rocks \
|
||||||
org.squib.github=https://github.com/andymeneely/squib
|
org.squib.github=https://github.com/andymeneely/squib
|
||||||
|
|
||||||
RUN apk --no-cache add --update \
|
# This works, but it really bloats the image
|
||||||
ruby-dev \
|
RUN apk --no-cache --update --upgrade add \
|
||||||
build-base \
|
build-base \
|
||||||
libxml2-dev \
|
cairo-dev \
|
||||||
libxslt-dev \
|
pango-dev \
|
||||||
pcre-dev \
|
gobject-introspection-dev \
|
||||||
libffi-dev \
|
gdk-pixbuf-dev \
|
||||||
cairo
|
librsvg-dev
|
||||||
|
|
||||||
|
RUN gem install squib
|
||||||
|
|
||||||
|
# Remove some of the dev tools
|
||||||
|
RUN apk del build-base
|
||||||
|
|
||||||
|
RUN apk --no-cache --update --upgrade add \
|
||||||
|
ttf-opensans
|
||||||
|
|
||||||
# Just for devving on
|
# Just for devving on
|
||||||
COPY . /app
|
# CMD ["sh"]
|
||||||
|
# RUN apk --no-cache add ncdu
|
||||||
|
|
||||||
CMD ["sh"]
|
|
||||||
|
|
||||||
# RUN gem install \
|
|
||||||
# squib \
|
|
||||||
# -- --use-system-libraries
|
|
||||||
|
|
||||||
# NOTE: STILL UNDER DEVELOPMENT! Don't use this just yet.
|
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@ Go [read the docs!](http://squib.readthedocs.org/)
|
||||||
|
|
||||||
Also:
|
Also:
|
||||||
* The `samples` directory in the [source repository](https://github.com/andymeneely/squib) has lots of examples.
|
* The `samples` directory in the [source repository](https://github.com/andymeneely/squib) has lots of examples.
|
||||||
* [Your Last Heist](http://yourlastheist.com) is my own creation, and it was made with Squib. Go through the repository and watch how it evolved!
|
* [Masters of the Heist](http://mastersoftheheist.com) is my own creation, and it was made with Squib. Go through the repository and watch how it evolved!
|
||||||
* [Junk Land](https://github.com/andymeneely/junk-land) is my own creation that's uses Squib for full-color rendering, and makes use of Ruby in a lot of interesting ways. The port is still in process.
|
* [Junk Land](https://github.com/andymeneely/junk-land) is my own creation that's uses Squib for full-color rendering, and makes use of Ruby in a lot of interesting ways. The port is still in process.
|
||||||
* [Project Spider Monkey](https://github.com/andymeneely/project-spider-monkey) is another of my own creations. This one was started from scratch with Squib, but it's still in its early stages.
|
* [Project Spider Monkey](https://github.com/andymeneely/project-spider-monkey) is another of my own creations. This one was started from scratch with Squib, but it's still in its early stages.
|
||||||
|
|
||||||
|
|
|
||||||
3
Rakefile
3
Rakefile
|
|
@ -6,6 +6,9 @@ require 'benchmark'
|
||||||
desc 'install + spec'
|
desc 'install + spec'
|
||||||
task default: ['install:local', :spec]
|
task default: ['install:local', :spec]
|
||||||
|
|
||||||
|
desc 'test => spec'
|
||||||
|
task test: [:spec]
|
||||||
|
|
||||||
# Useful for hooking up with SublimeText.
|
# Useful for hooking up with SublimeText.
|
||||||
# e.g. rake sample[basic.rb]
|
# e.g. rake sample[basic.rb]
|
||||||
desc 'Run a specific sample'
|
desc 'Run a specific sample'
|
||||||
|
|
|
||||||
25
appveyor.yml
25
appveyor.yml
|
|
@ -1,25 +0,0 @@
|
||||||
version: '{build}'
|
|
||||||
|
|
||||||
skip_tags: true
|
|
||||||
|
|
||||||
environment:
|
|
||||||
matrix:
|
|
||||||
- ruby_version: "24"
|
|
||||||
- ruby_version: "24-x64"
|
|
||||||
- ruby_version: "25"
|
|
||||||
- ruby_version: "25-x64"
|
|
||||||
- ruby_version: "26"
|
|
||||||
- ruby_version: "26-x64"
|
|
||||||
|
|
||||||
install:
|
|
||||||
- SET PATH=C:\Ruby%ruby_version%\bin;%PATH%
|
|
||||||
- ruby --version
|
|
||||||
- gem --version
|
|
||||||
- gem install bundler
|
|
||||||
- bundler --version
|
|
||||||
- bundle install
|
|
||||||
|
|
||||||
test_script:
|
|
||||||
- rake
|
|
||||||
|
|
||||||
build: off
|
|
||||||
|
|
@ -39,7 +39,7 @@ module Squib
|
||||||
file = Args::InputFile.new(file: 'deck.csv').load!(opts).file[0]
|
file = Args::InputFile.new(file: 'deck.csv').load!(opts).file[0]
|
||||||
data = opts.key?(:data) ? opts[:data] : File.read(file)
|
data = opts.key?(:data) ? opts[:data] : File.read(file)
|
||||||
csv_opts = Args::CSV_Opts.new(opts)
|
csv_opts = Args::CSV_Opts.new(opts)
|
||||||
table = CSV.parse(data, csv_opts.to_hash)
|
table = CSV.parse(data, **csv_opts.to_hash)
|
||||||
check_duplicate_csv_headers(table)
|
check_duplicate_csv_headers(table)
|
||||||
hash = Squib::DataFrame.new
|
hash = Squib::DataFrame.new
|
||||||
table.headers.each do |header|
|
table.headers.each do |header|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ require_relative '../../lib/squib'
|
||||||
# black snake cards with white text
|
# black snake cards with white text
|
||||||
color = 'white'
|
color = 'white'
|
||||||
|
|
||||||
cards = Squib.csv file: '_switch_color_data.csv', col_sep: "\t"
|
cards = Squib.csv file: '_switch_color_data.csv'
|
||||||
|
|
||||||
Squib::Deck.new cards: cards['Type'].size do
|
Squib::Deck.new cards: cards['Type'].size do
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
Type Text
|
Type,Text
|
||||||
Snake This is a snake.
|
Snake,This is a snake.
|
||||||
Lion This is a lion.
|
Lion,This is a lion.
|
||||||
|
|
|
||||||
|
|
|
@ -1,13 +1,6 @@
|
||||||
require 'simplecov'
|
|
||||||
require 'coveralls'
|
|
||||||
require 'byebug'
|
require 'byebug'
|
||||||
|
require 'coveralls'
|
||||||
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new([
|
Coveralls.wear!
|
||||||
SimpleCov::Formatter::HTMLFormatter,
|
|
||||||
Coveralls::SimpleCov::Formatter
|
|
||||||
])
|
|
||||||
SimpleCov.start
|
|
||||||
|
|
||||||
require 'squib'
|
require 'squib'
|
||||||
require 'rainbow/refinement'
|
require 'rainbow/refinement'
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue