diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..ae31dd9 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,16 @@ +--- +version: 2 +updates: + - package-ecosystem: github-actions + directory: / + schedule: + interval: daily + time: "10:00" + timezone: Europe/Amsterdam + - package-ecosystem: bundler + directory: / + registries: "*" + schedule: + interval: daily + time: "09:00" + timezone: Europe/Amsterdam diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..7fd2262 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,15 @@ +name: CI +on: + pull_request: + branches: + - master + # dependabot PRs only have read permission so cannot run this workflow. + paths-ignore: + - "**/*.md" + - ".gitignore" + - "README.md" + - ".env.example" + - "docs/*" +jobs: + validate: + uses: ./.github/workflows/validate.yml diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml new file mode 100644 index 0000000..e5e2df4 --- /dev/null +++ b/.github/workflows/validate.yml @@ -0,0 +1,28 @@ +name: Validate +on: + workflow_call: + +jobs: + validate: + name: Validate + runs-on: ubuntu-latest + strategy: + matrix: + ruby-version: + - '2.6' + - '2.7' + - '3.0' + - '3.2' + - '3.3' + steps: + - uses: actions/checkout@v4 + + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby-version }} + bundler-cache: true + + - name: Run tests + run: | + bundle exec rspec diff --git a/apiculture.gemspec b/apiculture.gemspec index 3e37ed9..86d3cc8 100644 --- a/apiculture.gemspec +++ b/apiculture.gemspec @@ -15,13 +15,7 @@ Gem::Specification.new do |s| # Prevent pushing this gem to RubyGems.org. # To allow pushes either set the 'allowed_push_host' # To allow pushing to a single host or delete this section to allow pushing to any host. - if s.respond_to?(:metadata) - s.metadata['allowed_push_host'] = 'https://rubygems.org' - else - raise 'RubyGems 2.0 or newer is required to protect against ' \ - 'public gem pushes.' - end - + s.metadata['allowed_push_host'] = 'https://rubygems.org' s.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^spec/}) } s.extra_rdoc_files = [ 'LICENSE.txt', diff --git a/gemfiles/Gemfile.rack-1.x b/gemfiles/Gemfile.rack-1.x deleted file mode 100644 index ed8da16..0000000 --- a/gemfiles/Gemfile.rack-1.x +++ /dev/null @@ -1,16 +0,0 @@ -source "http://rubygems.org" -gem 'rack', "~> 1" - -gem 'mustermann', '~> 1' -gem 'builder', '~> 3' -gem 'rdiscount', '~> 2' -gem 'github-markup', '~> 1' -gem 'mustache', '~> 1' - -group :development do - gem 'rack-test' - gem "rspec", "~> 3" - gem "rdoc", "~> 6.0" - gem "rake" - gem "bundler" -end diff --git a/gemfiles/Gemfile.rack-2.x b/gemfiles/Gemfile.rack-2.x deleted file mode 100644 index b755829..0000000 --- a/gemfiles/Gemfile.rack-2.x +++ /dev/null @@ -1,16 +0,0 @@ -source "http://rubygems.org" -gem 'rack', "~> 2" - -gem 'mustermann', '~> 1' -gem 'builder', '~> 3' -gem 'rdiscount', '~> 2' -gem 'github-markup', '~> 1' -gem 'mustache', '~> 1' - -group :development do - gem 'rack-test' - gem "rspec", "~> 3" - gem "rdoc", "~> 6.0" - gem "rake" - gem "bundler" -end