зеркало из
https://github.com/rs-pro/activeadmin-quill_editor.git
synced 2026-08-28 15:36:17 +03:00
GitHub Actions improvements
Этот коммит содержится в:
11
.github/workflows/specs.yml
поставляемый
11
.github/workflows/specs.yml
поставляемый
@@ -17,10 +17,19 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: ${{ matrix.ruby }}
|
||||
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
||||
bundler-cache: true
|
||||
|
||||
- name: Run tests
|
||||
run: bundle exec rake
|
||||
|
||||
- name: Archive screenshots for failed tests
|
||||
uses: actions/upload-artifact@v2
|
||||
if: failure()
|
||||
with:
|
||||
name: test-failed-screenshots
|
||||
path: spec/dummy/tmp/screenshots
|
||||
|
||||
11
.reek.yml
Обычный файл
11
.reek.yml
Обычный файл
@@ -0,0 +1,11 @@
|
||||
---
|
||||
exclude_paths:
|
||||
- spec/dummy
|
||||
- vendor
|
||||
|
||||
detectors:
|
||||
IrresponsibleModule:
|
||||
enabled: false
|
||||
TooManyStatements:
|
||||
# default 5
|
||||
max_statements: 10
|
||||
14
.rubocop.yml
14
.rubocop.yml
@@ -1,6 +1,12 @@
|
||||
inherit_from:
|
||||
- https://relaxed.ruby.style/rubocop.yml
|
||||
|
||||
require:
|
||||
- rubocop-packaging
|
||||
- rubocop-performance
|
||||
- rubocop-rails
|
||||
- rubocop-rspec
|
||||
|
||||
AllCops:
|
||||
Exclude:
|
||||
- bin/*
|
||||
@@ -17,6 +23,14 @@ Layout/LineLength:
|
||||
Enabled: true
|
||||
Max: 120
|
||||
|
||||
RSpec/ExampleLength:
|
||||
# default 5
|
||||
Max: 12
|
||||
|
||||
RSpec/MultipleExpectations:
|
||||
# default 1
|
||||
Max: 4
|
||||
|
||||
Style/HashEachMethods:
|
||||
Enabled: true
|
||||
|
||||
|
||||
11
Gemfile
11
Gemfile
@@ -4,13 +4,22 @@ source 'https://rubygems.org'
|
||||
|
||||
gemspec
|
||||
|
||||
# Linters
|
||||
gem 'brakeman'
|
||||
gem 'fasterer'
|
||||
gem 'reek'
|
||||
gem 'rubocop'
|
||||
gem 'rubocop-packaging'
|
||||
gem 'rubocop-performance'
|
||||
gem 'rubocop-rails'
|
||||
gem 'rubocop-rspec'
|
||||
|
||||
group :development, :test do
|
||||
gem 'activestorage', '~> 6.0'
|
||||
gem 'capybara', '~> 3.33'
|
||||
gem 'puma', '~> 4.3'
|
||||
gem 'rspec_junit_formatter', '~> 0.4'
|
||||
gem 'rspec-rails', '~> 4.0'
|
||||
gem 'rubocop', '~> 1.0'
|
||||
gem 'selenium-webdriver', '~> 3.142'
|
||||
gem 'sprockets-rails', '~> 3.2'
|
||||
gem 'sqlite3', '~> 1.4'
|
||||
|
||||
29
bin/brakeman
Исполняемый файл
29
bin/brakeman
Исполняемый файл
@@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env ruby
|
||||
# frozen_string_literal: true
|
||||
|
||||
#
|
||||
# This file was generated by Bundler.
|
||||
#
|
||||
# The application 'brakeman' is installed as part of a gem, and
|
||||
# this file is here to facilitate running it.
|
||||
#
|
||||
|
||||
require "pathname"
|
||||
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
||||
Pathname.new(__FILE__).realpath)
|
||||
|
||||
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
||||
|
||||
if File.file?(bundle_binstub)
|
||||
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
||||
load(bundle_binstub)
|
||||
else
|
||||
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
||||
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
||||
end
|
||||
end
|
||||
|
||||
require "rubygems"
|
||||
require "bundler/setup"
|
||||
|
||||
load Gem.bin_path("brakeman", "brakeman")
|
||||
29
bin/code_climate_reek
Исполняемый файл
29
bin/code_climate_reek
Исполняемый файл
@@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env ruby
|
||||
# frozen_string_literal: true
|
||||
|
||||
#
|
||||
# This file was generated by Bundler.
|
||||
#
|
||||
# The application 'code_climate_reek' is installed as part of a gem, and
|
||||
# this file is here to facilitate running it.
|
||||
#
|
||||
|
||||
require "pathname"
|
||||
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
||||
Pathname.new(__FILE__).realpath)
|
||||
|
||||
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
||||
|
||||
if File.file?(bundle_binstub)
|
||||
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
||||
load(bundle_binstub)
|
||||
else
|
||||
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
||||
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
||||
end
|
||||
end
|
||||
|
||||
require "rubygems"
|
||||
require "bundler/setup"
|
||||
|
||||
load Gem.bin_path("reek", "code_climate_reek")
|
||||
29
bin/fasterer
Исполняемый файл
29
bin/fasterer
Исполняемый файл
@@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env ruby
|
||||
# frozen_string_literal: true
|
||||
|
||||
#
|
||||
# This file was generated by Bundler.
|
||||
#
|
||||
# The application 'fasterer' is installed as part of a gem, and
|
||||
# this file is here to facilitate running it.
|
||||
#
|
||||
|
||||
require "pathname"
|
||||
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
||||
Pathname.new(__FILE__).realpath)
|
||||
|
||||
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
||||
|
||||
if File.file?(bundle_binstub)
|
||||
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
||||
load(bundle_binstub)
|
||||
else
|
||||
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
||||
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
||||
end
|
||||
end
|
||||
|
||||
require "rubygems"
|
||||
require "bundler/setup"
|
||||
|
||||
load Gem.bin_path("fasterer", "fasterer")
|
||||
29
bin/reek
Исполняемый файл
29
bin/reek
Исполняемый файл
@@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env ruby
|
||||
# frozen_string_literal: true
|
||||
|
||||
#
|
||||
# This file was generated by Bundler.
|
||||
#
|
||||
# The application 'reek' is installed as part of a gem, and
|
||||
# this file is here to facilitate running it.
|
||||
#
|
||||
|
||||
require "pathname"
|
||||
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
||||
Pathname.new(__FILE__).realpath)
|
||||
|
||||
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
||||
|
||||
if File.file?(bundle_binstub)
|
||||
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
||||
load(bundle_binstub)
|
||||
else
|
||||
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
||||
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
||||
end
|
||||
end
|
||||
|
||||
require "rubygems"
|
||||
require "bundler/setup"
|
||||
|
||||
load Gem.bin_path("reek", "reek")
|
||||
@@ -41,7 +41,7 @@ ActiveAdmin.register Post do
|
||||
row :images do |resurce|
|
||||
resurce.images.each do |image|
|
||||
div do
|
||||
link_to image.filename, image, target: '_blank'
|
||||
link_to image.filename, image, target: '_blank', rel: 'noopener'
|
||||
end
|
||||
end
|
||||
nil
|
||||
|
||||
Ссылка в новой задаче
Block a user