Skip to content

Instantly share code, notes, and snippets.

@osamutake
Created October 12, 2016 14:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save osamutake/0ccbdf96a5ac70a36ebce38db0a33137 to your computer and use it in GitHub Desktop.
Save osamutake/0ccbdf96a5ac70a36ebce38db0a33137 to your computer and use it in GitHub Desktop.
Shell scripts for testing riot_js-rails with various versions of sprockets
#!/bin/sh
# execute this script after testing the following scripts
cd ..
rm -r riot-test
rvm gemset delete riot-test
#!/bin/sh
rvm install 1.9.3-p551
rvm use 1.9.3-p551
rvm gemset create riot-test
rvm use 1.9.3-p551@riot-test
gem uninstall --all --force
gem install rails -N -v 3.1.12
rails new riot-test
cd riot-test
rm public/index.html
echo "\
RiotTest::Application.routes.draw do
root :to => 'main#index'
end
" >config/routes.rb
rails g controller main index
# rails s # to test sprockets works well
echo "
gem 'therubyracer', platforms: :ruby
gem 'haml-rails'
gem 'riot_js-rails', :git => 'git://github.com/osamutake/riot_js-rails',
:branch => 'support_sprockets_2_3_and_4'
" >>Gemfile
bundle install
mkdir app/assets/javascripts/riot-tags
echo "\
<test>
<div>&lt;test&gt; tag is working.</div>
</test>
" >app/assets/javascripts/riot-tags/test.js.tag
echo '
%haml-test
%div
&="<haml-test> tag is working."
' >app/assets/javascripts/riot-tags/haml-test.js.tag.haml
echo '
<test data-riot></test>
<haml-test data-riot></haml-test>
' >app/views/main/index.html.erb
echo "\
//= require jquery
//= require jquery_ujs
//= require riot
//= require riot_rails
//= require_tree .
" >app/assets/javascripts/application.js
grep sprockets Gemfile.lock
rails s
# Now, browse http://localhost:3000/
# If you see
# <test> tag is working.
# <haml-test> tag is working.
# it is working correctly.
#!/bin/sh
rvm install 1.9.3
rvm use 1.9.3
rvm gemset create riot-test
rvm use 1.9.3@riot-test
gem uninstall --all --force
gem install rails -N -v 4.0.0
rails new riot-test
cd riot-test
echo "\
RiotTest::Application.routes.draw do
root :to => 'main#index'
end
" >config/routes.rb
rails g controller main index
# rails s # to test sprockets works well
echo "
source 'https://rubygems.org'
gem 'rails', '4.0.0'
gem 'sqlite3'
gem 'sass-rails', '~> 4.0.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'jquery-rails'
gem 'therubyracer', platforms: :ruby
gem 'haml-rails'
gem 'riot_js-rails', :git => 'git://github.com/osamutake/riot_js-rails',
:branch => 'support_sprockets_2_3_and_4'
" >Gemfile
bundle install
mkdir app/assets/javascripts/riot-tags
echo "\
<test>
<div>&lt;test&gt; tag is working.</div>
</test>
" >app/assets/javascripts/riot-tags/test.js.tag
echo '
%haml-test
%div
&="<haml-test> tag is working."
' >app/assets/javascripts/riot-tags/haml-test.js.tag.haml
echo '
<test data-riot></test>
<haml-test data-riot></haml-test>
' >app/views/main/index.html.erb
echo "\
//= require jquery
//= require jquery_ujs
//= require riot
//= require riot_rails
//= require_tree .
" >app/assets/javascripts/application.js
grep sprockets Gemfile.lock
rails s
# Now, browse http://localhost:3000/
# If you see
# <test> tag is working.
# <haml-test> tag is working.
# it is working correctly.
#!/bin/sh
rvm install 2.2.1
rvm use 2.2.1
rvm gemset create riot-test
rvm use 2.2.1@riot-test
gem uninstall --all --force
gem install rails -N -v 4.0.13
rails new riot-test
cd riot-test
echo "\
RiotTest::Application.routes.draw do
root :to => 'main#index'
end
" >config/routes.rb
rails g controller main index
# rails s # to test sprockets works well
echo "
source 'https://rubygems.org'
gem 'rails', '4.0.13'
gem 'sqlite3'
gem 'sass-rails', '~> 4.0.2'
gem 'coffee-rails', '~> 4.0.0'
gem 'jquery-rails'
gem 'therubyracer', platforms: :ruby
gem 'haml-rails'
gem 'riot_js-rails', :git => 'git://github.com/osamutake/riot_js-rails',
:branch => 'support_sprockets_2_3_and_4'
" >Gemfile
bundle install
mkdir app/assets/javascripts/riot-tags
echo "\
<test>
<div>&lt;test&gt; tag is working.</div>
</test>
" >app/assets/javascripts/riot-tags/test.js.tag
echo '
%haml-test
%div
&="<haml-test> tag is working."
' >app/assets/javascripts/riot-tags/haml-test.js.tag.haml
echo '
<test data-riot></test>
<haml-test data-riot></haml-test>
' >app/views/main/index.html.erb
echo "\
//= require jquery
//= require jquery_ujs
//= require riot
//= require riot_rails
//= require_tree .
" >app/assets/javascripts/application.js
grep sprockets Gemfile.lock
rails s
# Now, browse http://localhost:3000/
# If you see
# <test> tag is working.
# <haml-test> tag is working.
# it is working correctly.
#!/bin/sh
rvm install 1.9.3
rvm use 1.9.3
rvm gemset create riot-test
rvm use 1.9.3@riot-test
gem uninstall --all --force
gem install rails -N -v 4.1.16
rails new riot-test
cd riot-test
echo "\
RiotTest::Application.routes.draw do
root :to => 'main#index'
end
" >config/routes.rb
echo "
source 'https://rubygems.org'
gem 'rails', '4.1.16'
gem 'sqlite3'
gem 'sass-rails', '~> 4.0.3'
gem 'coffee-rails', '~> 4.0.0'
gem 'jquery-rails'
gem 'therubyracer', platforms: :ruby
gem 'haml-rails'
gem 'riot_js-rails', :git => 'git://github.com/osamutake/riot_js-rails',
:branch => 'support_sprockets_2_3_and_4'
" >Gemfile
bundle install
rails g controller main index
# rails s # to test sprockets works well
mkdir app/assets/javascripts/riot-tags
echo "\
<test>
<div>&lt;test&gt; tag is working.</div>
</test>
" >app/assets/javascripts/riot-tags/test.js.tag
echo '
%haml-test
%div
&="<haml-test> tag is working."
' >app/assets/javascripts/riot-tags/haml-test.js.tag.haml
echo '
<test data-riot></test>
<haml-test data-riot></haml-test>
' >app/views/main/index.html.erb
echo "\
//= require jquery
//= require jquery_ujs
//= require riot
//= require riot_rails
//= require_tree .
" >app/assets/javascripts/application.js
grep sprockets Gemfile.lock
rails s
# Now, browse http://localhost:3000/
# If you see
# <test> tag is working.
# <haml-test> tag is working.
# it is working correctly.
#!/bin/sh
rvm install 1.9.3-p551
rvm use 1.9.3-p551
rvm gemset create riot-test
rvm use 1.9.3-p551@riot-test
gem uninstall --all --force
gem install rails -N -v 3.2.11
rails new riot-test
cd riot-test
rm public/index.html
echo "\
RiotTest::Application.routes.draw do
root :to => 'main#index'
end
" >config/routes.rb
rails g controller main index
# rails s # to test sprockets works well
echo "
gem 'therubyracer', platforms: :ruby
gem 'haml-rails'
gem 'riot_js-rails', :git => 'git://github.com/osamutake/riot_js-rails',
:branch => 'support_sprockets_2_3_and_4'
" >>Gemfile
bundle install
mkdir app/assets/javascripts/riot-tags
echo "\
<test>
<div>&lt;test&gt; tag is working.</div>
</test>
" >app/assets/javascripts/riot-tags/test.js.tag
echo '
%haml-test
%div
&="<haml-test> tag is working."
' >app/assets/javascripts/riot-tags/haml-test.js.tag.haml
echo '
<test data-riot></test>
<haml-test data-riot></haml-test>
' >app/views/main/index.html.erb
echo "\
//= require jquery
//= require jquery_ujs
//= require riot
//= require riot_rails
//= require_tree .
" >app/assets/javascripts/application.js
grep sprockets Gemfile.lock
rails s
# Now, browse http://localhost:3000/
# If you see
# <test> tag is working.
# <haml-test> tag is working.
# it is working correctly.
#!/bin/sh
rvm use 2.2.1
rvm gemset create riot-test
rvm use 2.2.1@riot-test
gem uninstall --all --force
gem install rails -N -v 4.2
rails _4.2.0_ new riot-test
cd riot-test
echo "\
RiotTest::Application.routes.draw do
root :to => 'main#index'
end
" >config/routes.rb
rails g controller main index
# rails s # to test sprockets works well
echo "
source 'https://rubygems.org'
gem 'rails', '4.2.0'
gem 'sqlite3'
gem 'sass-rails', '~> 5.0'
gem 'coffee-rails', '~> 4.1.0'
gem 'jquery-rails'
gem 'therubyracer', platforms: :ruby
gem 'haml-rails'
gem 'riot_js-rails', :git => 'git://github.com/osamutake/riot_js-rails',
:branch => 'support_sprockets_2_3_and_4'
" >Gemfile
bundle install
mkdir app/assets/javascripts/riot-tags
echo "\
<test>
<div>&lt;test&gt; tag is working.</div>
</test>
" >app/assets/javascripts/riot-tags/test.tag
echo '
%haml-test
%div
&="<haml-test> tag is working."
' >app/assets/javascripts/riot-tags/haml-test.tag.haml
echo '
<test data-riot></test>
<haml-test data-riot></haml-test>
' >app/views/main/index.html.erb
echo "\
//= require jquery
//= require jquery_ujs
//= require riot
//= require riot_rails
//= require_tree .
" >app/assets/javascripts/application.js
grep sprockets Gemfile.lock
rails s
# Now, browse http://localhost:3000/
# If you see
# <test> tag is working.
# <haml-test> tag is working.
# it is working correctly.
#!/bin/sh
rvm use 2.3.1
rvm gemset create riot-test
rvm use 2.3.1@riot-test
gem uninstall --all --force
gem install rails -N -v 5.0.0.1
rails _5.0.0.1_ new riot-test
cd riot-test
echo "\
RiotTest::Application.routes.draw do
root :to => 'main#index'
end
" >config/routes.rb
rails g controller main index
# rails s # to test sprockets works well
echo "
source 'https://rubygems.org'
gem 'rails', '~> 5.0.0', '>= 5.0.0.1'
gem 'sqlite3'
gem 'sass-rails', '~> 5.0'
gem 'coffee-rails', '~> 4.2'
gem 'jquery-rails'
gem 'listen', '~> 3.0.5'
gem 'therubyracer', platforms: :ruby
gem 'haml-rails'
gem 'riot_js-rails', :git => 'git://github.com/osamutake/riot_js-rails',
:branch => 'support_sprockets_2_3_and_4'
" >Gemfile
bundle install
mkdir app/assets/javascripts/riot-tags
echo "\
<test>
<div>&lt;test&gt; tag is working.</div>
</test>
" >app/assets/javascripts/riot-tags/test.tag
echo '
%haml-test
%div
&="<haml-test> tag is working."
' >app/assets/javascripts/riot-tags/haml-test.tag.haml
echo '
<test data-riot></test>
<haml-test data-riot></haml-test>
' >app/views/main/index.html.erb
echo "\
//= require jquery
//= require jquery_ujs
//= require riot
//= require riot_rails
//= require_tree .
" >app/assets/javascripts/application.js
grep sprockets Gemfile.lock
rails s
# Now, browse http://localhost:3000/
# If you see
# <test> tag is working.
# <haml-test> tag is working.
# it is working correctly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment