diff --git a/.rubocop.yml b/.rubocop.yml index 79e82fd..65109ee 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -9,12 +9,13 @@ AllCops: - 'db/seeds.rb' - '.bundle/**/*' - 'vendor/**/*' + - 'spec/dummy/**/*' ################ Disable cops ############################ Documentation: Enabled: false -Style/MultilineOperationIndentation: +Layout/MultilineOperationIndentation: Enabled: false Style/CommandLiteral: @@ -32,13 +33,16 @@ Style/FrozenStringLiteralComment: Style/Lambda: Enabled: false +Style/ExpandPathArguments: + Enabled: false + Rails/Delegate: Enabled: false Rails/OutputSafety: Enabled: false -Style/FileName: +Naming/FileName: Enabled: false ################ Enable cops ############################# @@ -76,10 +80,10 @@ Style/PercentLiteralDelimiters: '%W': '[]' '%x': '()' -Style/EmptyLinesAroundClassBody: +Layout/EmptyLinesAroundClassBody: EnforcedStyle: empty_lines -Style/VariableNumber: +Naming/VariableNumber: EnforcedStyle: 'snake_case' Metrics/LineLength: diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..beca4bc --- /dev/null +++ b/.travis.yml @@ -0,0 +1,22 @@ +language: ruby +cache: bundler +sudo: required +dist: trusty +rvm: + - 2.3.7 + - 2.4.4 + - 2.5.1 +env: + global: + - QMAKE=/usr/lib/x86_64-linux-gnu/qt5/bin/qmake +addons: + apt: + sources: + - ubuntu-sdk-team + packages: + - libqt5webkit5-dev + - qtdeclarative5-dev +before_install: + - gem update --system +script: + - bundle exec rubocop && xvfb-run bundle exec rspec spec diff --git a/Gemfile b/Gemfile index 7423cd4..aeedb8b 100644 --- a/Gemfile +++ b/Gemfile @@ -4,6 +4,7 @@ source 'https://rubygems.org' # Bundler will treat runtime dependencies like base dependencies, and # development dependencies will be added by default to the :development group. gemspec +gem 'puma' # Declare any dependencies that are still in development here instead of in # your gemspec. These might include edge Rails or gems from your path or diff --git a/rosetta.gemspec b/rosetta.gemspec index 1d20e95..c2a3c58 100644 --- a/rosetta.gemspec +++ b/rosetta.gemspec @@ -15,7 +15,6 @@ Gem::Specification.new do |s| s.files = Dir['{app,config,db,lib}/**/*', 'MIT-LICENSE', 'Rakefile', 'README.md'] s.add_dependency 'rails' - s.add_dependency 'request_store' # Development/Test dependencies @@ -25,5 +24,6 @@ Gem::Specification.new do |s| s.add_development_dependency 'pry-rails' s.add_development_dependency 'rspec-its' s.add_development_dependency 'rspec-rails' + s.add_development_dependency 'rubocop' s.add_development_dependency 'sqlite3' end diff --git a/spec/dummy/config/application.rb b/spec/dummy/config/application.rb index dde519f..ca53ee9 100644 --- a/spec/dummy/config/application.rb +++ b/spec/dummy/config/application.rb @@ -4,6 +4,8 @@ Bundler.require(*Rails.groups) +require 'rosetta' + module Dummy class Application < Rails::Application diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 0d594ab..0faae7b 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,6 +1,8 @@ require File.expand_path('../dummy/config/environment', __FILE__) require 'rspec/rails' +require 'rspec/its' require 'capybara/rspec' +require 'capybara/webkit' Capybara.javascript_driver = :webkit diff --git a/spec/visual_i18n/config_spec.rb b/spec/visual_i18n/config_spec.rb index a2ae080..8c32898 100644 --- a/spec/visual_i18n/config_spec.rb +++ b/spec/visual_i18n/config_spec.rb @@ -48,5 +48,4 @@ end end -module Rosetta - ; module Repositories; class FooBar; end end end +module Rosetta; module Repositories; class FooBar; end end end