Skip to content

Commit

Permalink
Merge pull request #46 from trailblazer/railsversion
Browse files Browse the repository at this point in the history
Add Rails 5.2 test
  • Loading branch information
seuros authored Apr 24, 2018
2 parents 074e496 + db61cd9 commit 9f2c060
Show file tree
Hide file tree
Showing 95 changed files with 1,693 additions and 40 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/.bundle/
.bundle/
/.yardoc
/Gemfile.lock
/_yardoc/
Expand All @@ -9,3 +9,4 @@
/log
tmp
.DS_Store
log/
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ env:
- "RAILS_VERSION=4.2"
- "RAILS_VERSION=5.0"
- "RAILS_VERSION=5.1"
- "RAILS_VERSION=5.2"
matrix:
fast_finish: true
exclude:
Expand Down
13 changes: 0 additions & 13 deletions test/rails4.2/.gitignore

This file was deleted.

13 changes: 0 additions & 13 deletions test/rails5.0/.gitignore

This file was deleted.

13 changes: 0 additions & 13 deletions test/rails5.1/.gitignore

This file was deleted.

20 changes: 20 additions & 0 deletions test/rails5.2/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
source 'https://rubygems.org'

gem 'rails', '~> 5.2.0'

gem "my_engine", path: "engines/my_engine"

gem 'sass-rails'
gem "sprockets"

group :development, :test do
gem "minitest-spec-rails"
gem "capybara_minitest_spec"
end

gem "cells", ">= 4.1.6"
# gem "cells", path: "../../../cells"# ">= 4.1.0"
gem "cells-rails", path: "../../../cells-rails"# ">= 4.1.0"
gem "cells-erb"
gem "simple_form"
gem "formtastic"
198 changes: 198 additions & 0 deletions test/rails5.2/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,198 @@
PATH
remote: ../..
specs:
cells-rails (0.0.9)
actionpack (>= 3.0)
cells (>= 4.1.6, < 5.0.0)

PATH
remote: engines/my_engine
specs:
my_engine (0.0.1)
cells (>= 4.0.0.beta5)
cells-erb
rails (>= 4.2.1)

GEM
remote: https://rubygems.org/
specs:
actioncable (5.2.0)
actionpack (= 5.2.0)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailer (5.2.0)
actionpack (= 5.2.0)
actionview (= 5.2.0)
activejob (= 5.2.0)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (5.2.0)
actionview (= 5.2.0)
activesupport (= 5.2.0)
rack (~> 2.0)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.2.0)
activesupport (= 5.2.0)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (5.2.0)
activesupport (= 5.2.0)
globalid (>= 0.3.6)
activemodel (5.2.0)
activesupport (= 5.2.0)
activerecord (5.2.0)
activemodel (= 5.2.0)
activesupport (= 5.2.0)
arel (>= 9.0)
activestorage (5.2.0)
actionpack (= 5.2.0)
activerecord (= 5.2.0)
marcel (~> 0.3.1)
activesupport (5.2.0)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
addressable (2.5.2)
public_suffix (>= 2.0.2, < 4.0)
arel (9.0.0)
builder (3.2.3)
capybara (3.0.2)
addressable
mini_mime (>= 0.1.3)
nokogiri (~> 1.8)
rack (>= 1.6.0)
rack-test (>= 0.6.3)
xpath (~> 3.0)
capybara_minitest_spec (1.0.7)
capybara (>= 2)
minitest (>= 4)
cells (4.1.7)
declarative-builder (< 0.2.0)
declarative-option (< 0.2.0)
tilt (>= 1.4, < 3)
uber (< 0.2.0)
cells-erb (0.1.0)
cells (~> 4.0)
erbse (>= 0.1.1)
concurrent-ruby (1.0.5)
crass (1.0.4)
declarative-builder (0.1.0)
declarative-option (< 0.2.0)
declarative-option (0.1.0)
erbse (0.1.3)
temple
erubi (1.7.1)
ffi (1.9.23)
formtastic (3.1.5)
actionpack (>= 3.2.13)
globalid (0.4.1)
activesupport (>= 4.2.0)
i18n (1.0.1)
concurrent-ruby (~> 1.0)
loofah (2.2.2)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.7.0)
mini_mime (>= 0.1.1)
marcel (0.3.2)
mimemagic (~> 0.3.2)
method_source (0.9.0)
mimemagic (0.3.2)
mini_mime (1.0.0)
mini_portile2 (2.3.0)
minitest (5.11.3)
minitest-spec-rails (5.4.0)
minitest (~> 5.0)
rails (>= 4.1)
nio4r (2.3.0)
nokogiri (1.8.2)
mini_portile2 (~> 2.3.0)
public_suffix (3.0.2)
rack (2.0.5)
rack-test (1.0.0)
rack (>= 1.0, < 3)
rails (5.2.0)
actioncable (= 5.2.0)
actionmailer (= 5.2.0)
actionpack (= 5.2.0)
actionview (= 5.2.0)
activejob (= 5.2.0)
activemodel (= 5.2.0)
activerecord (= 5.2.0)
activestorage (= 5.2.0)
activesupport (= 5.2.0)
bundler (>= 1.3.0)
railties (= 5.2.0)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.0.4)
loofah (~> 2.2, >= 2.2.2)
railties (5.2.0)
actionpack (= 5.2.0)
activesupport (= 5.2.0)
method_source
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (12.3.1)
rb-fsevent (0.10.3)
rb-inotify (0.9.10)
ffi (>= 0.5.0, < 2)
sass (3.5.6)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sass-rails (5.0.7)
railties (>= 4.0.0, < 6)
sass (~> 3.1)
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
simple_form (4.0.0)
actionpack (> 4)
activemodel (> 4)
sprockets (3.7.1)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.1)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
temple (0.8.0)
thor (0.20.0)
thread_safe (0.3.6)
tilt (2.0.8)
tzinfo (1.2.5)
thread_safe (~> 0.1)
uber (0.1.0)
websocket-driver (0.7.0)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.3)
xpath (3.0.0)
nokogiri (~> 1.8)

PLATFORMS
ruby

DEPENDENCIES
capybara_minitest_spec
cells (>= 4.1.6)
cells-erb
cells-rails!
formtastic
minitest-spec-rails
my_engine!
rails (~> 5.2.0)
sass-rails
simple_form
sprockets

BUNDLED WITH
1.16.1
6 changes: 6 additions & 0 deletions test/rails5.2/Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.

require File.expand_path('../config/application', __FILE__)

Rails.application.load_tasks
Empty file.
Binary file added test/rails5.2/app/assets/images/logo.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions test/rails5.2/app/assets/stylesheets/application.css.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
* This is a manifest file that'll be compiled into application.css, which will include all the files
* listed below.
*
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
* compiled file so the styles you add here take precedence over styles defined in any styles
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new
* file per style scope.
*
*= require_tree .
*= require_self
*= require user
*= require song
*/
<%# capture do %>
<%# end %>
7 changes: 7 additions & 0 deletions test/rails5.2/app/cells/form_for/show.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<%= form_for Song.new do |f| %>
First
<%= f.text_field :id %>
<%= f.fields_for :artist do |a| %>
<%= a.text_field :id %>
<% end %>
<% end %>
7 changes: 7 additions & 0 deletions test/rails5.2/app/cells/form_for_cell.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
class FormForCell < Cell::ViewModel
include ActionView::RecordIdentifier

def show
render
end
end
5 changes: 5 additions & 0 deletions test/rails5.2/app/cells/form_tag/show.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<%= form_tag songs_path do %>
Second
<%= text_field_tag :id %>
<%= submit_tag "Save" %>
<% end %>
5 changes: 5 additions & 0 deletions test/rails5.2/app/cells/form_tag_cell.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class FormTagCell < Cell::ViewModel
def show
render
end
end
12 changes: 12 additions & 0 deletions test/rails5.2/app/cells/formtastic/show.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<%= semantic_form_for Song.new do |f| %>
First
<%= f.input :id %>
<%= f.semantic_fields_for :artist do |a| %>
<%= a.input :id %>
<% end %>
<%= f.actions do %>
<%= f.submit 'Go!', as: :button, class: 'btn btn-primary' %>
<% end %>
<% end %>
9 changes: 9 additions & 0 deletions test/rails5.2/app/cells/formtastic_cell.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
class FormtasticCell < Cell::ViewModel
include ActionView::RecordIdentifier
include Formtastic::Helpers::FormHelper
include ActionView::Helpers::FormOptionsHelper

def show
render
end
end
7 changes: 7 additions & 0 deletions test/rails5.2/app/cells/simple_form/show.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<%= simple_form_for Song.new do |f| %>
First
<%= f.input :id %>
<%= f.fields_for :artist do |a| %>
<%= a.input :id %>
<% end %>
<% end %>
11 changes: 11 additions & 0 deletions test/rails5.2/app/cells/simple_form_cell.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
class SimpleFormCell < Cell::ViewModel
include ActionView::RecordIdentifier
include SimpleForm::ActionViewExtensions::FormHelper

# include ActiveSupport::Configurable
# include ActionController::RequestForgeryProtection # FIXME: this does NOT activate any protection.

def show
render
end
end
1 change: 1 addition & 0 deletions test/rails5.2/app/cells/song/song.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.song { background: red; }
1 change: 1 addition & 0 deletions test/rails5.2/app/cells/song/with_escaped.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<b><%= title %></b>
Loading

0 comments on commit 9f2c060

Please sign in to comment.