Skip to content

Commit

Permalink
Add appraisal config for Rails 5.1 (#56)
Browse files Browse the repository at this point in the history
* Add appraisal config for Rails 5.1

* Configure travis to run for Rails 5.1

* Fix a few standardrb issues

These only warn on the 5.1 branch, not sure why.
  • Loading branch information
latortuga authored Sep 22, 2020
1 parent f66be3d commit f52e6eb
Show file tree
Hide file tree
Showing 6 changed files with 281 additions and 8 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ rvm:
- 2.7.1

gemfile:
- gemfiles/rails_5_1.gemfile
- gemfiles/rails_5_2.gemfile
- gemfiles/rails_6_0.gemfile
- gemfiles/rails_master.gemfile
Expand Down
7 changes: 7 additions & 0 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
appraise "rails-5-1" do
gem "rails", "~> 5.1"

# Rails 5 does not have built-in support for ActionCable tests.
gem "action-cable-testing"
end

appraise "rails-5-2" do
gem "rails", "~> 5.2"

Expand Down
22 changes: 22 additions & 0 deletions gemfiles/rails_5_1.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "pry"
gem "rake", "~> 12.0"
gem "rspec", "~> 3.0"
gem "rspec-rails"
gem "standard"
gem "view_component"
gem "simplecov", "< 0.18", require: false
gem "generator_spec"
gem "capybara", ">= 2.15", "< 4.0"
gem "selenium-webdriver"
gem "puma"
gem "webpacker"
gem "sqlite3"
gem "appraisal"
gem "rails", "~> 5.1"
gem "action-cable-testing"

gemspec path: "../"
243 changes: 243 additions & 0 deletions gemfiles/rails_5_1.gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,243 @@
PATH
remote: ..
specs:
motion (0.4.2)
lz4-ruby (>= 0.3.3)
nokogiri
rails (>= 5.2)

GEM
remote: https://rubygems.org/
specs:
action-cable-testing (0.6.1)
actioncable (>= 5.0)
actioncable (5.2.4.4)
actionpack (= 5.2.4.4)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailer (5.2.4.4)
actionpack (= 5.2.4.4)
actionview (= 5.2.4.4)
activejob (= 5.2.4.4)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (5.2.4.4)
actionview (= 5.2.4.4)
activesupport (= 5.2.4.4)
rack (~> 2.0, >= 2.0.8)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.2.4.4)
activesupport (= 5.2.4.4)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (5.2.4.4)
activesupport (= 5.2.4.4)
globalid (>= 0.3.6)
activemodel (5.2.4.4)
activesupport (= 5.2.4.4)
activerecord (5.2.4.4)
activemodel (= 5.2.4.4)
activesupport (= 5.2.4.4)
arel (>= 9.0)
activestorage (5.2.4.4)
actionpack (= 5.2.4.4)
activerecord (= 5.2.4.4)
marcel (~> 0.3.1)
activesupport (5.2.4.4)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
appraisal (2.3.0)
bundler
rake
thor (>= 0.14.0)
arel (9.0.0)
ast (2.4.1)
builder (3.2.4)
capybara (3.33.0)
addressable
mini_mime (>= 0.1.3)
nokogiri (~> 1.8)
rack (>= 1.6.0)
rack-test (>= 0.6.3)
regexp_parser (~> 1.5)
xpath (~> 3.2)
childprocess (3.0.0)
coderay (1.1.3)
concurrent-ruby (1.1.7)
crass (1.0.6)
diff-lcs (1.4.4)
docile (1.3.2)
erubi (1.9.0)
generator_spec (0.9.4)
activesupport (>= 3.0.0)
railties (>= 3.0.0)
globalid (0.4.2)
activesupport (>= 4.2.0)
i18n (1.8.5)
concurrent-ruby (~> 1.0)
json (2.3.1)
loofah (2.7.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
lz4-ruby (0.3.3)
mail (2.7.1)
mini_mime (>= 0.1.1)
marcel (0.3.3)
mimemagic (~> 0.3.2)
method_source (1.0.0)
mimemagic (0.3.5)
mini_mime (1.0.2)
mini_portile2 (2.4.0)
minitest (5.14.2)
nio4r (2.5.4)
nokogiri (1.10.10)
mini_portile2 (~> 2.4.0)
parallel (1.19.2)
parser (2.7.1.4)
ast (~> 2.4.1)
pry (0.13.1)
coderay (~> 1.1)
method_source (~> 1.0)
public_suffix (4.0.6)
puma (5.0.0)
nio4r (~> 2.0)
rack (2.2.3)
rack-proxy (0.6.5)
rack
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (5.2.4.4)
actioncable (= 5.2.4.4)
actionmailer (= 5.2.4.4)
actionpack (= 5.2.4.4)
actionview (= 5.2.4.4)
activejob (= 5.2.4.4)
activemodel (= 5.2.4.4)
activerecord (= 5.2.4.4)
activestorage (= 5.2.4.4)
activesupport (= 5.2.4.4)
bundler (>= 1.3.0)
railties (= 5.2.4.4)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.3.0)
loofah (~> 2.3)
railties (5.2.4.4)
actionpack (= 5.2.4.4)
activesupport (= 5.2.4.4)
method_source
rake (>= 0.8.7)
thor (>= 0.19.0, < 2.0)
rainbow (3.0.0)
rake (12.3.3)
regexp_parser (1.8.0)
rexml (3.2.4)
rspec (3.9.0)
rspec-core (~> 3.9.0)
rspec-expectations (~> 3.9.0)
rspec-mocks (~> 3.9.0)
rspec-core (3.9.2)
rspec-support (~> 3.9.3)
rspec-expectations (3.9.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0)
rspec-mocks (3.9.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0)
rspec-rails (4.0.1)
actionpack (>= 4.2)
activesupport (>= 4.2)
railties (>= 4.2)
rspec-core (~> 3.9)
rspec-expectations (~> 3.9)
rspec-mocks (~> 3.9)
rspec-support (~> 3.9)
rspec-support (3.9.3)
rubocop (0.91.0)
parallel (~> 1.10)
parser (>= 2.7.1.1)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.7)
rexml
rubocop-ast (>= 0.4.0, < 1.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 2.0)
rubocop-ast (0.4.2)
parser (>= 2.7.1.4)
rubocop-performance (1.8.1)
rubocop (>= 0.87.0)
rubocop-ast (>= 0.4.0)
ruby-progressbar (1.10.1)
rubyzip (2.3.0)
selenium-webdriver (3.142.7)
childprocess (>= 0.5, < 4.0)
rubyzip (>= 1.2.2)
semantic_range (2.3.0)
simplecov (0.17.1)
docile (~> 1.1)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.2)
sprockets (4.0.2)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.2)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
sqlite3 (1.4.2)
standard (0.6.1)
rubocop (~> 0.90)
rubocop-performance (~> 1.8.0)
thor (1.0.1)
thread_safe (0.3.6)
tzinfo (1.2.7)
thread_safe (~> 0.1)
unicode-display_width (1.7.0)
view_component (2.19.1)
activesupport (>= 5.0.0, < 7.0)
webpacker (5.2.1)
activesupport (>= 5.2)
rack-proxy (>= 0.6.1)
railties (>= 5.2)
semantic_range (>= 2.3.0)
websocket-driver (0.7.3)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
xpath (3.2.0)
nokogiri (~> 1.8)

PLATFORMS
ruby

DEPENDENCIES
action-cable-testing
appraisal
capybara (>= 2.15, < 4.0)
generator_spec
motion!
pry
puma
rails (~> 5.1)
rake (~> 12.0)
rspec (~> 3.0)
rspec-rails
selenium-webdriver
simplecov (< 0.18)
sqlite3
standard
view_component
webpacker

BUNDLED WITH
2.1.4
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# frozen_string_literal: true

class TestChannel < ApplicationCable::Channel
include Motion::ActionCableExtentions::DeclarativeStreams
end

# TODO: These unit tests are very lacking because of the stubbing done by the
# ActionCable test helpers. There currently does not seem to be any way to setup
# and handle a real broadcast.
RSpec.describe Motion::ActionCableExtentions::DeclarativeStreams do
class TestChannel < ApplicationCable::Channel
include Motion::ActionCableExtentions::DeclarativeStreams
end

describe TestChannel, type: :channel do
before(:each) { subscribe }

Expand Down
8 changes: 4 additions & 4 deletions spec/motion/action_cable_extentions/log_suppression_spec.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# frozen_string_literal: true

RSpec.describe Motion::ActionCableExtentions::LogSuppression do
class TestChannel < ApplicationCable::Channel
include Motion::ActionCableExtentions::LogSuppression
end
class TestChannel < ApplicationCable::Channel
include Motion::ActionCableExtentions::LogSuppression
end

RSpec.describe Motion::ActionCableExtentions::LogSuppression do
describe TestChannel, type: :channel do
before(:each) { subscribe }

Expand Down

0 comments on commit f52e6eb

Please sign in to comment.