Sha256: 2fe8a179017d1fbd3dca48d5376130b39c3105bbd635dd583492aa9c635fa48b
Contents?: true
Size: 1.16 KB
Versions: 3
Compression:
Stored size: 1.16 KB
Contents
require "bundler/gem_tasks" require "rspec/core/rake_task" require 'pry' RSpec::Core::RakeTask.new(:spec) namespace :spec do task :prepare do rails_version = `bundle info rails`.match(/\* rails \((.+)\)/)[1] opal_version = `bundle info opal`.match(/\* opal \((.+)\)/)[1] Dir.chdir('spec') do sh('rm -rf test_app') Bundler.with_unbundled_env do sh("rails _#{rails_version}_ new test_app -T") end Bundler.with_unbundled_env do Dir.chdir('test_app') do sh('cat ../gems.rb >> Gemfile') sh("echo 'gem \"opal\", \"#{opal_version}\"' >> Gemfile") sh("bundle update") sh('spring stop') sh('bundle exec rails g hyperstack:install') sh('bundle exec rails generate model Sample name:string description:text') sh('mv app/models/sample.rb app/hyperstack/models/sample.rb') sh("cat ../server_side_sample.rb >> app/models/sample.rb") sh('bundle exec rake db:migrate') sh('RAILS_ENV=test bundle exec rake db:setup') # sh('bundle exec rails dev:cache') # not tested yet... end end end end end task :default => :spec
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rails-hyperstack-1.0.alpha1.8 | Rakefile |
rails-hyperstack-1.0.alpha1.7 | Rakefile |
rails-hyperstack-1.0.alpha1.6 | Rakefile |