Skip to content
Merged
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
25 changes: 25 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Test

on: [push, pull_request]

permissions:
contents: read

jobs:
test:
strategy:
fail-fast: false
matrix:
ruby:
- '3.3'
- '3.4'
- '4.0'
- ruby-head
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: ruby/setup-ruby@6e5d382445ae5590b7449d8b3bc8cb1c2c27f617 # v1.317.0
with:
ruby-version: ${{matrix.ruby}}
bundler-cache: true
- run: bundle exec rake
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/Gemfile.lock
/pkg/
/*.gem
5 changes: 5 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# frozen_string_literal: true

source "https://rubygems.org"

gemspec
11 changes: 11 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# frozen_string_literal: true

require "bundler/gem_tasks"
require "rake/testtask"

Rake::TestTask.new(:test) do |t|
t.libs << "test"
t.test_files = FileList["test/test_*.rb"]
end

task default: :test
3 changes: 3 additions & 0 deletions lib/nack.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# frozen_string_literal: true

require_relative "nack/version"
5 changes: 5 additions & 0 deletions lib/nack/version.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# frozen_string_literal: true

module Nack
VERSION = "0.1.0"
end
31 changes: 31 additions & 0 deletions nack.gemspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# frozen_string_literal: true

require_relative "lib/nack/version"

Gem::Specification.new do |spec|
spec.name = "nack"
spec.version = Nack::VERSION
spec.summary = "Ruby toolkit for NSGI applications"
spec.description = <<~DESCRIPTION
Middleware with a composition DSL, request/response conveniences,
path-based dispatch, and a host-free test kit for applications
targeting the NSGI Ruby application contract.
DESCRIPTION
spec.authors = ["himura467"]
spec.homepage = "https://github.com/nsgi-org/nack-ruby"
spec.license = "MIT"
spec.required_ruby_version = ">= 3.3"

spec.metadata = {
"source_code_uri" => "https://github.com/nsgi-org/nack-ruby",
"bug_tracker_uri" => "https://github.com/nsgi-org/nack-ruby/issues",
"rubygems_mfa_required" => "true"
}

spec.files = Dir["lib/**/*.rb", "README.md", "LICENSE"]
spec.require_paths = ["lib"]

spec.add_development_dependency "bundler"
spec.add_development_dependency "rake"
spec.add_development_dependency "minitest"
end
6 changes: 6 additions & 0 deletions test/helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# frozen_string_literal: true

$LOAD_PATH.unshift(File.expand_path("../lib", __dir__))

require "nack"
require "minitest/autorun"