diff --git a/.gitignore b/.gitignore index ae3fdc29..957f69ad 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,5 @@ *.o *.a mkmf.log +/log/ +spec/dummy/my-app/ diff --git a/.rspec b/.rspec new file mode 100644 index 00000000..83e16f80 --- /dev/null +++ b/.rspec @@ -0,0 +1,2 @@ +--color +--require spec_helper diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 00000000..58594069 --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +2.2.3 diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..bae50f23 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,20 @@ +language: ruby +sudo: false +cache: bundler + +notifications: + email: false + +rvm: +- 2.2.0 +- 2.1.0 +- 2.0.0 + +before_install: + - qmake -version + - "echo '--colour' > ~/.rspec" + - "echo 'gem: --no-document' > ~/.gemrc" + - export DISPLAY=:99.0 + - sh -e /etc/init.d/xvfb start +before_script: bin/setup +script: xvfb-run -a bin/rspec diff --git a/Gemfile b/Gemfile index 7c38f02f..8ba739c2 100644 --- a/Gemfile +++ b/Gemfile @@ -2,4 +2,13 @@ source "https://rubygems.org" gemspec +gem "rails", "4.2.4" gem "pry" + +group :development, :test do + gem "rspec-rails", "~> 3.3.0" +end + +group :test do + gem "capybara-webkit", "~> 1.7.0" +end diff --git a/bin/bundle b/bin/bundle new file mode 100755 index 00000000..66e9889e --- /dev/null +++ b/bin/bundle @@ -0,0 +1,3 @@ +#!/usr/bin/env ruby +ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) +load Gem.bin_path('bundler', 'bundle') diff --git a/bin/rspec b/bin/rspec new file mode 100755 index 00000000..0c86b5c6 --- /dev/null +++ b/bin/rspec @@ -0,0 +1,16 @@ +#!/usr/bin/env ruby +# +# This file was generated by Bundler. +# +# The application 'rspec' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +require 'pathname' +ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", + Pathname.new(__FILE__).realpath) + +require 'rubygems' +require 'bundler/setup' + +load Gem.bin_path('rspec-core', 'rspec') diff --git a/bin/setup b/bin/setup new file mode 100755 index 00000000..930fcc21 --- /dev/null +++ b/bin/setup @@ -0,0 +1,26 @@ +#!/bin/sh + +set -e + +# Set up Ruby dependencies via Bundler +gem install bundler --conservative +bundle check || bundle install + +# Add binstubs to PATH via export PATH=".git/safe/../../bin:$PATH" in ~/.zshenv +mkdir -p .git/safe + +if ! command -v bower > /dev/null; then + npm install -g bower +fi + +if ! [ -d spec/dummy/my-app ]; then + git clone https://github.com/kellyselden/ember-cli-output.git spec/dummy/my-app +fi + +root="$(pwd)" + +cd ${root}/spec/dummy/my-app && + npm install --save-dev ember-cli-rails-addon && + bower install + +cd ${root}/spec/dummy && bundle exec rake ember:install diff --git a/spec/dummy/.gitignore b/spec/dummy/.gitignore new file mode 100644 index 00000000..1a572b5c --- /dev/null +++ b/spec/dummy/.gitignore @@ -0,0 +1,14 @@ +!.keep +*.DS_Store +*.swo +*.swp +/.bundle +/.env +/.foreman +/coverage/* +/db/*.sqlite3 +/log/* +/public/system +/public/assets +/tags +/tmp/* diff --git a/spec/dummy/Rakefile b/spec/dummy/Rakefile new file mode 100644 index 00000000..b48da4e5 --- /dev/null +++ b/spec/dummy/Rakefile @@ -0,0 +1,3 @@ +require File.expand_path("../application", __FILE__) + +Rails.application.load_tasks diff --git a/spec/dummy/app/controllers/application_controller.rb b/spec/dummy/app/controllers/application_controller.rb new file mode 100644 index 00000000..d83690e1 --- /dev/null +++ b/spec/dummy/app/controllers/application_controller.rb @@ -0,0 +1,5 @@ +class ApplicationController < ActionController::Base + # Prevent CSRF attacks by raising an exception. + # For APIs, you may want to use :null_session instead. + protect_from_forgery with: :exception +end diff --git a/spec/dummy/app/views/application/index.html.erb b/spec/dummy/app/views/application/index.html.erb new file mode 100644 index 00000000..8d07285c --- /dev/null +++ b/spec/dummy/app/views/application/index.html.erb @@ -0,0 +1,2 @@ +<%= include_ember_script_tags "my-app" %> +<%= include_ember_stylesheet_tags "my-app" %> diff --git a/spec/dummy/app/views/layouts/application.html.erb b/spec/dummy/app/views/layouts/application.html.erb new file mode 100644 index 00000000..bdb7dd94 --- /dev/null +++ b/spec/dummy/app/views/layouts/application.html.erb @@ -0,0 +1,12 @@ + + +
+