-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from ngs/develop
1.4.0
- Loading branch information
Showing
22 changed files
with
300 additions
and
201 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Publish to RubyGems | ||
on: | ||
push: | ||
tags: | ||
- v[1-9].[0-9]+.[0-9]+ | ||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 2.7 | ||
- run: bundle install | ||
- run: bundle exec rake build | ||
- name: Export RubyGems Credentials | ||
run: | | ||
CRED=~/.gem/credentials | ||
mkdir -p ~/.gem | ||
echo "---" > $CRED | ||
echo ":rubygems_api_key: ${{ secrets.RUBYGEMS_API_KEY }}" >> $CRED | ||
chmod 0600 $CRED | ||
- name: Push gem | ||
run: | | ||
VERSION=$(bundle exec rake print_version) | ||
if [ "refs/tags/v${VERSION}" != $GITHUB_REF ]; then | ||
echo "Ref ${GITHUB_REF} not match" | ||
exit 1 | ||
fi | ||
gem push "pkg/middleman-ogp-${VERSION}.gem" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Run tests | ||
on: | ||
push: | ||
branches: | ||
- '*' | ||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
ruby: [2.5, 2.6, 2.7, head, debug] | ||
continue-on-error: ${{ endsWith(matrix.ruby, 'head') || matrix.ruby == 'debug' }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby }} | ||
- run: bundle install | ||
- run: bundle exec rake rubocop | ||
- run: bundle exec rake spec | ||
- run: bundle exec rake cucumber |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,4 +17,3 @@ Makefile | |
.mm-pid-* | ||
*.gem | ||
.ruby-version | ||
Gemfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
Naming/FileName: | ||
Enabled: false | ||
Layout/EmptyLinesAroundAttributeAccessor: | ||
Enabled: true | ||
Layout/SpaceAroundMethodCallOperator: | ||
Enabled: true | ||
Lint/DeprecatedOpenSSLConstant: | ||
Enabled: true | ||
Lint/RaiseException: | ||
Enabled: true | ||
Lint/StructNewOverride: | ||
Enabled: true | ||
Style/ExponentialNotation: | ||
Enabled: true | ||
Style/HashEachMethods: | ||
Enabled: true | ||
Style/HashTransformKeys: | ||
Enabled: true | ||
Style/HashTransformValues: | ||
Enabled: true | ||
Style/SlicingWithRange: | ||
Enabled: true | ||
Metrics/AbcSize: | ||
Enabled: false | ||
Metrics/CyclomaticComplexity: | ||
Enabled: false | ||
Metrics/PerceivedComplexity: | ||
Enabled: false |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# frozen_string_literal: true | ||
|
||
source 'https://rubygems.org' | ||
|
||
gem 'middleman-blog', '~> 4.0' | ||
gem 'middleman-cli', '~> 4.3' | ||
gem 'middleman-core', '~> 4.3' | ||
|
||
# Specify your gem's dependencies in middleman-ogp.gemspec | ||
gemspec | ||
|
||
gem 'rake', '~> 13.0.1', require: false | ||
gem 'rubocop', '~> 0.84.0', require: false | ||
gem 'yard', '~> 0.9.25', require: false | ||
|
||
# Test tools | ||
gem 'aruba', '~> 0.14.0' | ||
gem 'capybara', '~> 3.32.2' | ||
gem 'cucumber', '~> 3.1.2' | ||
gem 'fivemat' | ||
gem 'rspec' | ||
|
||
gem 'slim' | ||
|
||
# Code Quality | ||
gem 'cane', platforms: %i[mri_19 mri_20], require: false |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,45 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'bundler' | ||
Bundler::GemHelper.install_tasks | ||
|
||
require 'cucumber/rake/task' | ||
require 'rspec/core/rake_task' | ||
require 'rubocop/rake_task' | ||
|
||
RSpec::Core::RakeTask.new(:spec) | ||
RuboCop::RakeTask.new | ||
|
||
Cucumber::Rake::Task.new(:cucumber, 'Run features that should pass') do |t| | ||
exempt_tags = "" | ||
exempt_tags << "--tags ~@nojava " if RUBY_PLATFORM == "java" | ||
exempt_tags = '' | ||
exempt_tags << '--tags ~@nojava ' if RUBY_PLATFORM == 'java' | ||
t.cucumber_opts = "--color --tags ~@wip #{exempt_tags} --strict --format #{ENV['CUCUMBER_FORMAT'] || 'pretty'}" | ||
end | ||
|
||
require 'rake/clean' | ||
|
||
task :test => ["spec", "cucumber"] | ||
task test: %w[spec cucumber] | ||
|
||
begin | ||
require 'cane/rake_task' | ||
|
||
desc "Run cane to check quality metrics" | ||
desc 'Run cane to check quality metrics' | ||
Cane::RakeTask.new(:quality) do |cane| | ||
cane.no_style = true | ||
cane.no_doc = true | ||
cane.abc_glob = "lib/middleman-ogp/**/*.rb" | ||
cane.abc_glob = 'lib/middleman-ogp/**/*.rb' | ||
end | ||
rescue LoadError | ||
# warn "cane not available, quality task not provided." | ||
end | ||
|
||
desc "Build HTML documentation" | ||
desc 'Build HTML documentation' | ||
task :doc do | ||
sh 'bundle exec yard' | ||
end | ||
|
||
desc 'Print version' | ||
task :print_version do | ||
require 'rubygems' | ||
print Gem::Specification.load('middleman-ogp.gemspec').version | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
# frozen_string_literal: true | ||
|
||
PROJECT_ROOT_PATH = File.dirname(File.dirname(File.dirname(__FILE__))) | ||
ENV['TEST'] = 'true' | ||
ENV['TZ'] = 'UTC' | ||
require "middleman-core" | ||
require "middleman-blog" | ||
require "middleman-core/step_definitions" | ||
require 'middleman-core' | ||
require 'middleman-blog' | ||
require 'middleman-core/step_definitions' | ||
require File.join(PROJECT_ROOT_PATH, 'lib', 'middleman-ogp') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
activate :ogp do |ogp| | ||
# | ||
# register namespace with default options | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
activate :blog do |blog| | ||
end | ||
|
||
|
Oops, something went wrong.