From 4cde78fe9609581b5052ad3632b876e6a8abb365 Mon Sep 17 00:00:00 2001 From: cn Date: Sun, 1 Mar 2020 22:05:43 +0100 Subject: [PATCH] gem: add solargraph support --- .gitignore | 1 + .solargraph.yml | 16 ++++++++++++++++ .travis.yml | 3 +++ Rakefile | 12 ++++++++++++ openvpn-status-web.gemspec | 1 + 5 files changed, 33 insertions(+) create mode 100644 .solargraph.yml diff --git a/.gitignore b/.gitignore index 8c23188..36f26a3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .DS_Store *.lock pkg/* +.yardoc diff --git a/.solargraph.yml b/.solargraph.yml new file mode 100644 index 0000000..0b51f91 --- /dev/null +++ b/.solargraph.yml @@ -0,0 +1,16 @@ +--- +include: +- "**/*.rb" +- "bin/openvpn-status-web" +exclude: +- spec/**/* +- test/**/* +- vendor/**/* +- ".bundle/**/*" +require: [] +domains: [] +reporters: +- rubocop +- require_not_found +require_paths: [] +max_files: 5000 diff --git a/.travis.yml b/.travis.yml index a305b63..2920897 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,3 +7,6 @@ rvm: - 2.5 - 2.4 - 2.3 + +script: +- bundle exec rake travis diff --git a/Rakefile b/Rakefile index ce2b809..d964e6a 100644 --- a/Rakefile +++ b/Rakefile @@ -5,4 +5,16 @@ require 'bundler/audit/task' RSpec::Core::RakeTask.new(:spec) Bundler::Audit::Task.new +desc 'Should be run by developer once to prepare initial solargraph usage (fill caches etc.)' +task :'solargraph:init' do + sh 'solargraph download-core' +end + +desc 'Run experimental solargraph type checker' +task :'solargraph:tc' do + sh 'solargraph typecheck' +end + task :default => [:spec, 'bundle:audit'] + +task travis: [:default, :'solargraph:tc'] diff --git a/openvpn-status-web.gemspec b/openvpn-status-web.gemspec index aeebff1..eff5bdf 100644 --- a/openvpn-status-web.gemspec +++ b/openvpn-status-web.gemspec @@ -30,4 +30,5 @@ Gem::Specification.new do |s| s.add_development_dependency 'bundler-audit' s.add_development_dependency 'better_errors' s.add_development_dependency 'binding_of_caller' + s.add_development_dependency 'solargraph' end