diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 43a976d..0000000 --- a/.travis.yml +++ /dev/null @@ -1,65 +0,0 @@ -language: ruby - -rvm: - - 2.0.0 - - 2.1 - - 2.2.7 - - 2.3.4 - - 2.4.1 - - ruby-head - - rbx-2 - -gemfile: - - gemfiles/Gemfile-rails-4-2 - -sudo: false - -cache: bundler - -script: bundle exec rake test - -matrix: - allow_failures: - - rvm: rbx-2 - - rvm: ruby-head - fast_finish: true - include: - - gemfile: gemfiles/Gemfile-rails-5-0 - rvm: 2.2.7 - - gemfile: gemfiles/Gemfile-rails-5-1 - rvm: 2.2.7 - - gemfile: gemfiles/Gemfile-rails-5-0 - rvm: 2.3.4 - - gemfile: gemfiles/Gemfile-rails-5-1 - rvm: 2.3.4 - - gemfile: Gemfile - rvm: 2.3.4 - - gemfile: gemfiles/Gemfile-rails-5-0 - rvm: 2.4.1 - - gemfile: gemfiles/Gemfile-rails-5-1 - rvm: 2.4.1 - - gemfile: gemfiles/Gemfile-rails-edge - rvm: 2.4.1 - - gemfile: Gemfile - rvm: 2.4.1 - - gemfile: gemfiles/Gemfile-rails-5-0 - rvm: ruby-head - - gemfile: gemfiles/Gemfile-rails-5-1 - rvm: ruby-head - - gemfile: gemfiles/Gemfile-rails-edge - rvm: 2.5.3 - - gemfile: Gemfile - rvm: ruby-head - -notifications: - email: false - irc: - on_success: change - on_failure: always - channels: - - "irc.freenode.org#rails-contrib" - campfire: - on_success: change - on_failure: always - rooms: - - secure: "CGWvthGkBKNnTnk9YSmf9AXKoiRI33fCl5D3jU4nx3cOPu6kv2R9nMjt9EAo\nOuS4Q85qNSf4VNQ2cUPNiNYSWQ+XiTfivKvDUw/QW9r1FejYyeWarMsSBWA+\n0fADjF1M2dkDIVLgYPfwoXEv7l+j654F1KLKB69F0F/netwP9CQ=" diff --git a/Gemfile b/Gemfile index 709a06a..1ea461c 100644 --- a/Gemfile +++ b/Gemfile @@ -2,9 +2,3 @@ source "https://rubygems.org" # Specify your gem's dependencies in sass-rails.gemspec gemspec - -gem "rails", github: "rails/rails" -gem "arel", github: "rails/arel" -gem "rack", github: "rack/rack" -gem "sprockets", github: "rails/sprockets", branch: "master" -gem "sprockets-rails", github: "rails/sprockets-rails", branch: "master" diff --git a/MIT-LICENSE b/MIT-LICENSE index 0eb2df2..4fb479f 100644 --- a/MIT-LICENSE +++ b/MIT-LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2011-2016 Christopher Eppstein +Copyright (c) 2011-2019 Christopher Eppstein Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff --git a/Rakefile b/Rakefile index 707512e..14cfe0b 100644 --- a/Rakefile +++ b/Rakefile @@ -1,14 +1,2 @@ require 'bundler' Bundler::GemHelper.install_tasks - -require 'rake/testtask' - -Rake::TestTask.new(:test) do |t| - t.libs << 'lib' - t.libs << 'test' - t.pattern = 'test/**/*_test.rb' - t.verbose = false -end - -desc 'Default: run unit tests.' -task default: :test diff --git a/gemfiles/Gemfile-rails-4-2 b/gemfiles/Gemfile-rails-4-2 deleted file mode 100644 index 84f6945..0000000 --- a/gemfiles/Gemfile-rails-4-2 +++ /dev/null @@ -1,11 +0,0 @@ -source "https://rubygems.org" - -# Specify your gem"s dependencies in sass-rails.gemspec -gemspec path: ".." - -gem "rails", "~> 4.2.0" -gem "sprockets", "~> 4.0.0.beta2" -gem "sprockets-rails", "~> 3.0.4" -if RUBY_VERSION < '2.1.0' - gem 'nokogiri', '~> 1.6.8' -end diff --git a/gemfiles/Gemfile-rails-5-0 b/gemfiles/Gemfile-rails-5-0 deleted file mode 100644 index 3eb9941..0000000 --- a/gemfiles/Gemfile-rails-5-0 +++ /dev/null @@ -1,8 +0,0 @@ -source "https://rubygems.org" - -# Specify your gem"s dependencies in sass-rails.gemspec -gemspec path: ".." - -gem "rails", "~> 5.0.0.rc1" -gem "sprockets", "~> 4.0.0.beta2" -gem "sprockets-rails", "~> 3.0.4" diff --git a/gemfiles/Gemfile-rails-5-1 b/gemfiles/Gemfile-rails-5-1 deleted file mode 100644 index 1662693..0000000 --- a/gemfiles/Gemfile-rails-5-1 +++ /dev/null @@ -1,8 +0,0 @@ -source "https://rubygems.org" - -# Specify your gem"s dependencies in sass-rails.gemspec -gemspec path: ".." - -gem "rails", "~> 5.1.0" -gem "sprockets", "~> 4.0.0.beta2" -gem "sprockets-rails", "~> 3.0.4" diff --git a/gemfiles/Gemfile-rails-edge b/gemfiles/Gemfile-rails-edge deleted file mode 100644 index f8c722c..0000000 --- a/gemfiles/Gemfile-rails-edge +++ /dev/null @@ -1,8 +0,0 @@ -source "https://rubygems.org" - -# Specify your gem"s dependencies in sass-rails.gemspec -gemspec path: ".." - -gem "rails", git: "https://github.com/rails/rails.git" -gem "sprockets", "~> 4.0.0.beta2" -gem "sprockets-rails", "~> 3.0.4" diff --git a/lib/rails/generators/sass/assets/assets_generator.rb b/lib/rails/generators/sass/assets/assets_generator.rb deleted file mode 100644 index fd792dc..0000000 --- a/lib/rails/generators/sass/assets/assets_generator.rb +++ /dev/null @@ -1,13 +0,0 @@ -require "rails/generators/named_base" - -module Sass - module Generators - class AssetsGenerator < ::Rails::Generators::NamedBase - source_root File.expand_path("../templates", __FILE__) - - def copy_sass - template "stylesheet.sass", File.join('app/assets/stylesheets', class_path, "#{file_name}.sass") - end - end - end -end diff --git a/lib/rails/generators/sass/assets/templates/stylesheet.sass b/lib/rails/generators/sass/assets/templates/stylesheet.sass deleted file mode 100644 index 25a5df9..0000000 --- a/lib/rails/generators/sass/assets/templates/stylesheet.sass +++ /dev/null @@ -1,3 +0,0 @@ -// Place all the styles related to the <%= name %> controller here. -// They will automatically be included in application.css. -// You can use Sass here: http://sass-lang.com/ diff --git a/lib/rails/generators/sass/scaffold/scaffold_generator.rb b/lib/rails/generators/sass/scaffold/scaffold_generator.rb deleted file mode 100644 index 99cbbe6..0000000 --- a/lib/rails/generators/sass/scaffold/scaffold_generator.rb +++ /dev/null @@ -1,9 +0,0 @@ -require "rails/generators/sass_scaffold" - -module Sass - module Generators - class ScaffoldGenerator < ::Sass::Generators::ScaffoldBase - def syntax() :sass end - end - end -end diff --git a/lib/rails/generators/sass_scaffold.rb b/lib/rails/generators/sass_scaffold.rb deleted file mode 100644 index 968247b..0000000 --- a/lib/rails/generators/sass_scaffold.rb +++ /dev/null @@ -1,15 +0,0 @@ -require "sass/css" -require "rails/generators/named_base" - -module Sass - module Generators - class ScaffoldBase < ::Rails::Generators::NamedBase - def copy_stylesheet - dir = ::Rails::Generators::ScaffoldGenerator.source_root - file = File.join(dir, "scaffold.css") - converted_contents = ::Sass::CSS.new(File.read(file)).render(syntax) - create_file "app/assets/stylesheets/scaffolds.#{syntax}", converted_contents - end - end - end -end diff --git a/lib/rails/generators/scss/assets/assets_generator.rb b/lib/rails/generators/scss/assets/assets_generator.rb deleted file mode 100644 index 403f1eb..0000000 --- a/lib/rails/generators/scss/assets/assets_generator.rb +++ /dev/null @@ -1,13 +0,0 @@ -require "rails/generators/named_base" - -module Scss - module Generators - class AssetsGenerator < ::Rails::Generators::NamedBase - source_root File.expand_path("../templates", __FILE__) - - def copy_scss - template "stylesheet.scss", File.join('app/assets/stylesheets', class_path, "#{file_name}.scss") - end - end - end -end diff --git a/lib/rails/generators/scss/assets/templates/stylesheet.scss b/lib/rails/generators/scss/assets/templates/stylesheet.scss deleted file mode 100644 index 2e92369..0000000 --- a/lib/rails/generators/scss/assets/templates/stylesheet.scss +++ /dev/null @@ -1,3 +0,0 @@ -// Place all the styles related to the <%= name %> controller here. -// They will automatically be included in application.css. -// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/lib/rails/generators/scss/scaffold/scaffold_generator.rb b/lib/rails/generators/scss/scaffold/scaffold_generator.rb deleted file mode 100644 index 1f9ac4e..0000000 --- a/lib/rails/generators/scss/scaffold/scaffold_generator.rb +++ /dev/null @@ -1,10 +0,0 @@ -require "rails/generators/sass_scaffold" - -module Scss - module Generators - class ScaffoldGenerator < ::Sass::Generators::ScaffoldBase - def syntax() :scss end - end - end -end - diff --git a/lib/sass-rails.rb b/lib/sass-rails.rb index 9c50554..adb2a79 100644 --- a/lib/sass-rails.rb +++ b/lib/sass-rails.rb @@ -1 +1 @@ -require 'sass/rails' +require 'sassc/rails' diff --git a/lib/sass/rails.rb b/lib/sass/rails.rb index 455275d..adb2a79 100644 --- a/lib/sass/rails.rb +++ b/lib/sass/rails.rb @@ -1,9 +1 @@ -module Sass - module Rails - autoload :Logger, 'sass/rails/logger' - end -end - -require 'sass/rails/version' -require 'sass/rails/importer' -require 'sass/rails/railtie' +require 'sassc/rails' diff --git a/lib/sass/rails/importer.rb b/lib/sass/rails/importer.rb index 25b7678..0e7d1f5 100644 --- a/lib/sass/rails/importer.rb +++ b/lib/sass/rails/importer.rb @@ -1,158 +1 @@ -require 'active_support/deprecation/reporting' -require 'sass/importers' -require 'sprockets/file_reader' -require 'sprockets/erb_processor' -require 'sprockets/processor_utils' - -module Sass - module Rails - class SassImporter < Sass::Importers::Filesystem - module Globbing - GLOB = /(\A|\/)(\*|\*\*\/\*)\z/ - - def find_relative(name, base, options) - if options[:sprockets] && m = name.match(GLOB) - path = name.sub(m[0], "") - base = File.expand_path(path, File.dirname(base)) - glob_imports(base, m[2], options) - else - super - end - end - - def find(name, options) - # globs must be relative - return if name =~ GLOB - super - end - - private - def glob_imports(base, glob, options) - contents = "" - context = options[:sprockets][:context] - each_globbed_file(base, glob, context) do |filename| - next if filename == options[:filename] - contents << "@import #{filename.inspect};\n" - end - return nil if contents == "" - Sass::Engine.new(contents, options.merge( - :filename => base, - :importer => self, - :syntax => :scss - )) - end - - def each_globbed_file(base, glob, context) - raise ArgumentError unless glob == "*" || glob == "**/*" - - exts = extensions.keys.map { |ext| Regexp.escape(".#{ext}") }.join("|") - sass_re = Regexp.compile("(#{exts})$") - - context.depend_on(base) - - Dir["#{base}/#{glob}"].sort.each do |path| - if File.directory?(path) - context.depend_on(path) - elsif sass_re =~ path - yield path - end - end - end - end - - module ERB - def extensions - { - 'css.erb' => :scss_erb, - 'scss.erb' => :scss_erb, - 'sass.erb' => :sass_erb - }.merge(super) - end - - def erb_extensions - { - :scss_erb => :scss, - :sass_erb => :sass - } - end - - def find_relative(*args) - process_erb_engine(super) - end - - def find(*args) - process_erb_engine(super) - end - - private - def process_erb_engine(engine) - if engine && engine.options[:sprockets] && syntax = erb_extensions[engine.options[:syntax]] - context = engine.options[:sprockets][:context] - - input = { - filename: engine.options[:filename], - environment: context.environment, - content_type: "text/#{syntax}", - metadata: {} - } - - processors = [Sprockets::ERBProcessor, Sprockets::FileReader] - - result = Sprockets::ProcessorUtils.call_processors(processors, input) - - Sass::Engine.new(result[:data], engine.options.merge(:syntax => syntax)) - else - engine - end - end - end - - module Deprecated - def extensions - { - 'css.scss' => :scss, - 'css.sass' => :sass, - 'css.scss.erb' => :scss_erb, - 'css.sass.erb' => :sass_erb - }.merge(super) - end - - def find_relative(*args) - deprecate_extra_css_extension(super) - end - - def find(*args) - deprecate_extra_css_extension(super) - end - - private - def deprecate_extra_css_extension(engine) - if engine && filename = engine.options[:filename] - if filename.end_with?('.css.scss') - msg = "Extra .css in SCSS file is unnecessary. Rename #{filename} to #{filename.sub('.css.scss', '.scss')}." - elsif filename.end_with?('.css.sass') - msg = "Extra .css in SASS file is unnecessary. Rename #{filename} to #{filename.sub('.css.sass', '.sass')}." - elsif filename.end_with?('.css.scss.erb') - msg = "Extra .css in SCSS/ERB file is unnecessary. Rename #{filename} to #{filename.sub('.css.scss.erb', '.scss.erb')}." - elsif filename.end_with?('.css.sass.erb') - msg = "Extra .css in SASS/ERB file is unnecessary. Rename #{filename} to #{filename.sub('.css.sass.erb', '.sass.erb')}." - end - - ActiveSupport::Deprecation.warn(msg) if msg - end - - engine - end - end - - include ERB - include Deprecated - include Globbing - - # Allow .css files to be @import'd - def extensions - { 'css' => :scss }.merge(super) - end - end - end -end +require 'sassc/rails/importer' diff --git a/lib/sass/rails/logger.rb b/lib/sass/rails/logger.rb index c86fa4a..cc356b0 100644 --- a/lib/sass/rails/logger.rb +++ b/lib/sass/rails/logger.rb @@ -1,21 +1,5 @@ -require 'sass/logger' +# frozen_string_literal: true -module Sass - module Rails - class Logger < Sass::Logger::Base - def _log(level, message) +require "active_support/deprecation" - case level - when :trace, :debug - ::Rails.logger.debug message - when :warn - ::Rails.logger.warn message - when :error - ::Rails.logger.error message - when :info - ::Rails.logger.info message - end - end - end - end -end +ActiveSupport::Deprecation.warn "Sass::Rails::Logger has been removed, please stop requiring sass/rails/logger." diff --git a/lib/sass/rails/railtie.rb b/lib/sass/rails/railtie.rb index 8ded6b1..7aeed82 100644 --- a/lib/sass/rails/railtie.rb +++ b/lib/sass/rails/railtie.rb @@ -1,78 +1 @@ -require 'sass' -require 'active_support/core_ext/class/attribute' -require 'sprockets/railtie' -require 'sprockets/sass_processor' - -module Sass::Rails - class Railtie < ::Rails::Railtie - config.sass = ActiveSupport::OrderedOptions.new - - # Establish static configuration defaults - # Emit scss files during stylesheet generation of scaffold - config.sass.preferred_syntax = :scss - # Write sass cache files for performance - config.sass.cache = true - # Read sass cache files for performance - config.sass.read_cache = true - # Display line comments above each selector as a debugging aid - config.sass.line_comments = true - # Initialize the load paths to an empty array - config.sass.load_paths = [] - # Send Sass logs to Rails.logger - config.sass.logger = Sass::Rails::Logger.new - - # Set the default stylesheet engine - # It can be overridden by passing: - # --stylesheet_engine=sass - # to the rails generate command - config.app_generators.stylesheet_engine config.sass.preferred_syntax - - if config.respond_to?(:annotations) - config.annotations.register_extensions("scss", "sass") { |annotation| /\/\/\s*(#{annotation}):?\s*(.*)$/ } - end - - # Remove the sass middleware if it gets inadvertently enabled by applications. - config.after_initialize do |app| - app.config.middleware.delete(Sass::Plugin::Rack) if defined?(Sass::Plugin::Rack) - end - - initializer :setup_sass, group: :all do |app| - # Only emit one kind of syntax because though we have registered two kinds of generators - syntax = app.config.sass.preferred_syntax.to_sym - alt_syntax = syntax == :sass ? "scss" : "sass" - app.config.generators.hide_namespace alt_syntax - - # Override stylesheet engine to the preferred syntax - config.app_generators.stylesheet_engine syntax - - # Set the sass cache location - config.sass.cache_location = File.join(Rails.root, "tmp/cache/sass") - - # Establish configuration defaults that are evironmental in nature - if config.sass.full_exception.nil? - # Display a stack trace in the css output when in development-like environments. - config.sass.full_exception = app.config.consider_all_requests_local - end - - config.assets.configure do |env| - env.register_transformer 'text/sass', 'text/css', - Sprockets::SassProcessor.new(importer: SassImporter, sass_config: app.config.sass) - env.register_transformer 'text/scss', 'text/css', - Sprockets::ScssProcessor.new(importer: SassImporter, sass_config: app.config.sass) - end - - Sass.logger = app.config.sass.logger - end - - initializer :setup_compression, group: :all do |app| - if Rails.env.development? - # Use expanded output instead of the sass default of :nested unless specified - app.config.sass.style ||= :expanded - else - # config.assets.css_compressor may be set to nil in non-dev environments. - # otherwise, the default is sass compression. - app.config.assets.css_compressor = :sass unless app.config.assets.has_key?(:css_compressor) - end - end - end -end +require 'sassc/rails/railtie' diff --git a/sass-rails.gemspec b/sass-rails.gemspec index dfae0d2..f2fd371 100644 --- a/sass-rails.gemspec +++ b/sass-rails.gemspec @@ -13,12 +13,7 @@ Gem::Specification.new do |s| s.description = %q{Sass adapter for the Rails asset pipeline.} s.license = %q{MIT} - s.add_dependency 'railties', '>= 4.0.0' - s.add_dependency 'sass', '~> 3.4' - s.add_dependency 'sprockets-rails', '< 4.0' - s.add_dependency 'sprockets', '~> 4.x' - - s.add_development_dependency 'sqlite3' + s.add_dependency 'sassc-rails', '>= 2.1.0' s.files = Dir["MIT-LICENSE", "README.md", "lib/**/*"] s.require_paths = ["lib"] diff --git a/test/fixtures/alternate_config_project/.gitignore b/test/fixtures/alternate_config_project/.gitignore deleted file mode 100644 index 923b697..0000000 --- a/test/fixtures/alternate_config_project/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -.bundle -db/*.sqlite3 -log/*.log -tmp/ -.sass-cache/ diff --git a/test/fixtures/alternate_config_project/Gemfile b/test/fixtures/alternate_config_project/Gemfile deleted file mode 100644 index c965db0..0000000 --- a/test/fixtures/alternate_config_project/Gemfile +++ /dev/null @@ -1,7 +0,0 @@ -source 'https://rubygems.org' - -gem 'rails', '>= 4.0.0.beta', '< 5.0' -gem 'sqlite3' - -# Asset template engines -gem 'sass-rails', path: File.expand_path('../../../..', __FILE__) diff --git a/test/fixtures/alternate_config_project/README b/test/fixtures/alternate_config_project/README deleted file mode 100644 index 7c36f23..0000000 --- a/test/fixtures/alternate_config_project/README +++ /dev/null @@ -1,261 +0,0 @@ -== Welcome to Rails - -Rails is a web-application framework that includes everything needed to create -database-backed web applications according to the Model-View-Control pattern. - -This pattern splits the view (also called the presentation) into "dumb" -templates that are primarily responsible for inserting pre-built data in between -HTML tags. The model contains the "smart" domain objects (such as Account, -Product, Person, Post) that holds all the business logic and knows how to -persist themselves to a database. The controller handles the incoming requests -(such as Save New Account, Update Product, Show Post) by manipulating the model -and directing data to the view. - -In Rails, the model is handled by what's called an object-relational mapping -layer entitled Active Record. This layer allows you to present the data from -database rows as objects and embellish these data objects with business logic -methods. You can read more about Active Record in -link:files/vendor/rails/activerecord/README.html. - -The controller and view are handled by the Action Pack, which handles both -layers by its two parts: Action View and Action Controller. These two layers -are bundled in a single package due to their heavy interdependence. This is -unlike the relationship between the Active Record and Action Pack that is much -more separate. Each of these packages can be used independently outside of -Rails. You can read more about Action Pack in -link:files/vendor/rails/actionpack/README.html. - - -== Getting Started - -1. At the command prompt, create a new Rails application: - rails new myapp (where myapp is the application name) - -2. Change directory to myapp and start the web server: - cd myapp; rails server (run with --help for options) - -3. Go to http://localhost:3000/ and you'll see: - "Welcome aboard: You're riding Ruby on Rails!" - -4. Follow the guidelines to start developing your application. You can find -the following resources handy: - -* The Getting Started Guide: http://guides.rubyonrails.org/getting_started.html -* Ruby on Rails Tutorial Book: http://www.railstutorial.org/ - - -== Debugging Rails - -Sometimes your application goes wrong. Fortunately there are a lot of tools that -will help you debug it and get it back on the rails. - -First area to check is the application log files. Have "tail -f" commands -running on the server.log and development.log. Rails will automatically display -debugging and runtime information to these files. Debugging info will also be -shown in the browser on requests from 127.0.0.1. - -You can also log your own messages directly into the log file from your code -using the Ruby logger class from inside your controllers. Example: - - class WeblogController < ActionController::Base - def destroy - @weblog = Weblog.find(params[:id]) - @weblog.destroy - logger.info("#{Time.now} Destroyed Weblog ID ##{@weblog.id}!") - end - end - -The result will be a message in your log file along the lines of: - - Mon Oct 08 14:22:29 +1000 2007 Destroyed Weblog ID #1! - -More information on how to use the logger is at http://www.ruby-doc.org/core/ - -Also, Ruby documentation can be found at http://www.ruby-lang.org/. There are -several books available online as well: - -* Programming Ruby: http://www.ruby-doc.org/docs/ProgrammingRuby/ (Pickaxe) -* Learn to Program: http://pine.fm/LearnToProgram/ (a beginners guide) - -These two books will bring you up to speed on the Ruby language and also on -programming in general. - - -== Debugger - -Debugger support is available through the debugger command when you start your -Mongrel or WEBrick server with --debugger. This means that you can break out of -execution at any point in the code, investigate and change the model, and then, -resume execution! You need to install ruby-debug to run the server in debugging -mode. With gems, use sudo gem install ruby-debug. Example: - - class WeblogController < ActionController::Base - def index - @posts = Post.all - debugger - end - end - -So the controller will accept the action, run the first line, then present you -with a IRB prompt in the server window. Here you can do things like: - - >> @posts.inspect - => "[#nil, "body"=>nil, "id"=>"1"}>, - #"Rails", "body"=>"Only ten..", "id"=>"2"}>]" - >> @posts.first.title = "hello from a debugger" - => "hello from a debugger" - -...and even better, you can examine how your runtime objects actually work: - - >> f = @posts.first - => #nil, "body"=>nil, "id"=>"1"}> - >> f. - Display all 152 possibilities? (y or n) - -Finally, when you're ready to resume execution, you can enter "cont". - - -== Console - -The console is a Ruby shell, which allows you to interact with your -application's domain model. Here you'll have all parts of the application -configured, just like it is when the application is running. You can inspect -domain models, change values, and save to the database. Starting the script -without arguments will launch it in the development environment. - -To start the console, run rails console from the application -directory. - -Options: - -* Passing the -s, --sandbox argument will rollback any modifications - made to the database. -* Passing an environment name as an argument will load the corresponding - environment. Example: rails console production. - -To reload your controllers and models after launching the console run -reload! - -More information about irb can be found at: -link:http://www.rubycentral.org/pickaxe/irb.html - - -== dbconsole - -You can go to the command line of your database directly through rails -dbconsole. You would be connected to the database with the credentials -defined in database.yml. Starting the script without arguments will connect you -to the development database. Passing an argument will connect you to a different -database, like rails dbconsole production. Currently works for MySQL, -PostgreSQL and SQLite 3. - -== Description of Contents - -The default directory structure of a generated Ruby on Rails application: - - |-- app - | |-- assets - | |-- images - | |-- javascripts - | `-- stylesheets - | |-- controllers - | |-- helpers - | |-- mailers - | |-- models - | `-- views - | `-- layouts - |-- config - | |-- environments - | |-- initializers - | `-- locales - |-- db - |-- doc - |-- lib - | `-- tasks - |-- log - |-- public - |-- script - |-- test - | |-- fixtures - | |-- functional - | |-- integration - | |-- performance - | `-- unit - |-- tmp - | |-- cache - | |-- pids - | |-- sessions - | `-- sockets - `-- vendor - |-- assets - `-- stylesheets - `-- plugins - -app - Holds all the code that's specific to this particular application. - -app/assets - Contains subdirectories for images, stylesheets, and JavaScript files. - -app/controllers - Holds controllers that should be named like weblogs_controller.rb for - automated URL mapping. All controllers should descend from - ApplicationController which itself descends from ActionController::Base. - -app/models - Holds models that should be named like post.rb. Models descend from - ActiveRecord::Base by default. - -app/views - Holds the template files for the view that should be named like - weblogs/index.html.erb for the WeblogsController#index action. All views use - eRuby syntax by default. - -app/views/layouts - Holds the template files for layouts to be used with views. This models the - common header/footer method of wrapping views. In your views, define a layout - using the layout :default and create a file named default.html.erb. - Inside default.html.erb, call <% yield %> to render the view using this - layout. - -app/helpers - Holds view helpers that should be named like weblogs_helper.rb. These are - generated for you automatically when using generators for controllers. - Helpers can be used to wrap functionality for your views into methods. - -config - Configuration files for the Rails environment, the routing map, the database, - and other dependencies. - -db - Contains the database schema in schema.rb. db/migrate contains all the - sequence of Migrations for your schema. - -doc - This directory is where your application documentation will be stored when - generated using rake doc:app - -lib - Application specific libraries. Basically, any kind of custom code that - doesn't belong under controllers, models, or helpers. This directory is in - the load path. - -public - The directory available for the web server. Also contains the dispatchers and the - default HTML files. This should be set as the DOCUMENT_ROOT of your web - server. - -script - Helper scripts for automation and generation. - -test - Unit and functional tests along with fixtures. When using the rails generate - command, template test files will be generated for you and placed in this - directory. - -vendor - External libraries that the application depends on. Also includes the plugins - subdirectory. If the app has frozen rails, those gems also go here, under - vendor/rails/. This directory is in the load path. diff --git a/test/fixtures/alternate_config_project/Rakefile b/test/fixtures/alternate_config_project/Rakefile deleted file mode 100644 index 99e192f..0000000 --- a/test/fixtures/alternate_config_project/Rakefile +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env rake -# 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__) - -AlternateConfigProject::Application.load_tasks diff --git a/test/fixtures/alternate_config_project/app/assets/config/manifest.js b/test/fixtures/alternate_config_project/app/assets/config/manifest.js deleted file mode 100644 index b16e53d..0000000 --- a/test/fixtures/alternate_config_project/app/assets/config/manifest.js +++ /dev/null @@ -1,3 +0,0 @@ -//= link_tree ../images -//= link_directory ../javascripts .js -//= link_directory ../stylesheets .css diff --git a/test/fixtures/alternate_config_project/app/assets/images/1x1.png b/test/fixtures/alternate_config_project/app/assets/images/1x1.png deleted file mode 100644 index 87b3165..0000000 Binary files a/test/fixtures/alternate_config_project/app/assets/images/1x1.png and /dev/null differ diff --git a/test/fixtures/alternate_config_project/app/assets/images/rails.png b/test/fixtures/alternate_config_project/app/assets/images/rails.png deleted file mode 100644 index d5edc04..0000000 Binary files a/test/fixtures/alternate_config_project/app/assets/images/rails.png and /dev/null differ diff --git a/test/fixtures/alternate_config_project/app/assets/javascripts/application.js b/test/fixtures/alternate_config_project/app/assets/javascripts/application.js deleted file mode 100644 index 37c7bfc..0000000 --- a/test/fixtures/alternate_config_project/app/assets/javascripts/application.js +++ /dev/null @@ -1,9 +0,0 @@ -// This is a manifest file that'll be compiled into including all the files listed below. -// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically -// be included in the compiled file accessible from http://example.com/assets/application.js -// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the -// the compiled file. -// -//= require jquery -//= require jquery_ujs -//= require_tree . diff --git a/test/fixtures/alternate_config_project/app/assets/stylesheets/_top_level_partial.scss b/test/fixtures/alternate_config_project/app/assets/stylesheets/_top_level_partial.scss deleted file mode 100644 index c2d1fd0..0000000 --- a/test/fixtures/alternate_config_project/app/assets/stylesheets/_top_level_partial.scss +++ /dev/null @@ -1,3 +0,0 @@ -.top-level { - font-color: bold; -} \ No newline at end of file diff --git a/test/fixtures/alternate_config_project/app/assets/stylesheets/application.scss b/test/fixtures/alternate_config_project/app/assets/stylesheets/application.scss deleted file mode 100644 index 00e6cb7..0000000 --- a/test/fixtures/alternate_config_project/app/assets/stylesheets/application.scss +++ /dev/null @@ -1,32 +0,0 @@ -@import "partials/sass_import"; -@import "partials/scss_import"; -@import "globbed/**/*"; -@import "subfolder/plain"; -@import "subfolder/second_level"; -@import "partials/without_css_ext"; - -.main { - color: yellow; - @include background-from-partial(red); -} - -.rails { - asset-path: asset-path("rails.png"); - asset-url: asset-url("rails.png"); - image-path: image-path("rails.png"); - image-url: image-url("rails.png"); - video-path: video-path("rails.mp4"); - video-url: video-url("rails.mp4"); - audio-path: audio-path("rails.mp3"); - audio-url: audio-url("rails.mp3"); - font-path: font-path("rails.ttf"); - font-url: font-url("rails.ttf"); - font-url-with-query-hash: font-url("rails.ttf?#iefix"); - javascript-path: javascript-path("rails.js"); - javascript-url: javascript-url("rails.js"); - stylesheet-path: stylesheet-path("rails.css"); - stylesheet-url: stylesheet-url("rails.css"); - asset-data-url: asset-data-url("1x1.png"); -} - -@include without-css-ext; diff --git a/test/fixtures/alternate_config_project/app/assets/stylesheets/css_application.css b/test/fixtures/alternate_config_project/app/assets/stylesheets/css_application.css deleted file mode 100644 index 1fa5e6e..0000000 --- a/test/fixtures/alternate_config_project/app/assets/stylesheets/css_application.css +++ /dev/null @@ -1,11 +0,0 @@ -/* - *= require partials/_sass_import - *= require partials/_scss_import - *= require_tree ./globbed - *= require subfolder/plain - *= require subfolder/second_level - */ - -.css-application { - background: #fff; -} diff --git a/test/fixtures/alternate_config_project/app/assets/stylesheets/globbed/globbed.scss b/test/fixtures/alternate_config_project/app/assets/stylesheets/globbed/globbed.scss deleted file mode 100644 index 8b38cb5..0000000 --- a/test/fixtures/alternate_config_project/app/assets/stylesheets/globbed/globbed.scss +++ /dev/null @@ -1,3 +0,0 @@ -.globbed { - color: green; -} diff --git a/test/fixtures/alternate_config_project/app/assets/stylesheets/globbed/nested/nested_glob.scss b/test/fixtures/alternate_config_project/app/assets/stylesheets/globbed/nested/nested_glob.scss deleted file mode 100644 index b890370..0000000 --- a/test/fixtures/alternate_config_project/app/assets/stylesheets/globbed/nested/nested_glob.scss +++ /dev/null @@ -1,3 +0,0 @@ -.nested-glob { - color: blue; -} \ No newline at end of file diff --git a/test/fixtures/alternate_config_project/app/assets/stylesheets/partials/_sass_import.sass b/test/fixtures/alternate_config_project/app/assets/stylesheets/partials/_sass_import.sass deleted file mode 100644 index cca9192..0000000 --- a/test/fixtures/alternate_config_project/app/assets/stylesheets/partials/_sass_import.sass +++ /dev/null @@ -1,5 +0,0 @@ -.partial-sass - color: green - -@import "top_level_partial" -@import "subfolder/relative_scss" diff --git a/test/fixtures/alternate_config_project/app/assets/stylesheets/partials/_scss_import.scss b/test/fixtures/alternate_config_project/app/assets/stylesheets/partials/_scss_import.scss deleted file mode 100644 index 781df05..0000000 --- a/test/fixtures/alternate_config_project/app/assets/stylesheets/partials/_scss_import.scss +++ /dev/null @@ -1,9 +0,0 @@ -.partial-scss { - color: blue; } - -@mixin background-from-partial($color) { - background-color: $color -} - -@import "subfolder/relative_sass"; -@import "subfolder/relative_not_a_partial"; \ No newline at end of file diff --git a/test/fixtures/alternate_config_project/app/assets/stylesheets/partials/_without_css_ext.scss b/test/fixtures/alternate_config_project/app/assets/stylesheets/partials/_without_css_ext.scss deleted file mode 100644 index d6b7cdc..0000000 --- a/test/fixtures/alternate_config_project/app/assets/stylesheets/partials/_without_css_ext.scss +++ /dev/null @@ -1,3 +0,0 @@ -@mixin without-css-ext { - .without-css-ext { should: work; } -} \ No newline at end of file diff --git a/test/fixtures/alternate_config_project/app/assets/stylesheets/partials/subfolder/_relative_sass.sass b/test/fixtures/alternate_config_project/app/assets/stylesheets/partials/subfolder/_relative_sass.sass deleted file mode 100644 index 86f665e..0000000 --- a/test/fixtures/alternate_config_project/app/assets/stylesheets/partials/subfolder/_relative_sass.sass +++ /dev/null @@ -1,2 +0,0 @@ -.sub-folder-relative-sass - width: 50px \ No newline at end of file diff --git a/test/fixtures/alternate_config_project/app/assets/stylesheets/partials/subfolder/_relative_scss.scss b/test/fixtures/alternate_config_project/app/assets/stylesheets/partials/subfolder/_relative_scss.scss deleted file mode 100644 index dcf02a1..0000000 --- a/test/fixtures/alternate_config_project/app/assets/stylesheets/partials/subfolder/_relative_scss.scss +++ /dev/null @@ -1,3 +0,0 @@ -.sub-folder-relative-scss { - width: 50px * 5; -} diff --git a/test/fixtures/alternate_config_project/app/assets/stylesheets/partials/subfolder/relative_not_a_partial.scss b/test/fixtures/alternate_config_project/app/assets/stylesheets/partials/subfolder/relative_not_a_partial.scss deleted file mode 100644 index cde8539..0000000 --- a/test/fixtures/alternate_config_project/app/assets/stylesheets/partials/subfolder/relative_not_a_partial.scss +++ /dev/null @@ -1,3 +0,0 @@ -.not-a-partial { - border: 1px solid blue; -} \ No newline at end of file diff --git a/test/fixtures/alternate_config_project/app/assets/stylesheets/subfolder/another_plain.css b/test/fixtures/alternate_config_project/app/assets/stylesheets/subfolder/another_plain.css deleted file mode 100644 index 56fc16e..0000000 --- a/test/fixtures/alternate_config_project/app/assets/stylesheets/subfolder/another_plain.css +++ /dev/null @@ -1,3 +0,0 @@ -.another-plain-old-css { - font-style: italic; -} diff --git a/test/fixtures/alternate_config_project/app/assets/stylesheets/subfolder/plain.css b/test/fixtures/alternate_config_project/app/assets/stylesheets/subfolder/plain.css deleted file mode 100644 index 8ba31d6..0000000 --- a/test/fixtures/alternate_config_project/app/assets/stylesheets/subfolder/plain.css +++ /dev/null @@ -1,3 +0,0 @@ -.plain-old-css { - font-style: italic; -} \ No newline at end of file diff --git a/test/fixtures/alternate_config_project/app/assets/stylesheets/subfolder/second_level.scss b/test/fixtures/alternate_config_project/app/assets/stylesheets/subfolder/second_level.scss deleted file mode 100644 index ed73034..0000000 --- a/test/fixtures/alternate_config_project/app/assets/stylesheets/subfolder/second_level.scss +++ /dev/null @@ -1 +0,0 @@ -@import "another_plain"; /* tests whether relative lookups of non-sass files works. */ \ No newline at end of file diff --git a/test/fixtures/alternate_config_project/app/controllers/application_controller.rb b/test/fixtures/alternate_config_project/app/controllers/application_controller.rb deleted file mode 100644 index e8065d9..0000000 --- a/test/fixtures/alternate_config_project/app/controllers/application_controller.rb +++ /dev/null @@ -1,3 +0,0 @@ -class ApplicationController < ActionController::Base - protect_from_forgery -end diff --git a/test/fixtures/alternate_config_project/app/helpers/application_helper.rb b/test/fixtures/alternate_config_project/app/helpers/application_helper.rb deleted file mode 100644 index de6be79..0000000 --- a/test/fixtures/alternate_config_project/app/helpers/application_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module ApplicationHelper -end diff --git a/test/fixtures/alternate_config_project/app/mailers/.gitkeep b/test/fixtures/alternate_config_project/app/mailers/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/test/fixtures/alternate_config_project/app/models/.gitkeep b/test/fixtures/alternate_config_project/app/models/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/test/fixtures/alternate_config_project/app/views/layouts/application.html.erb b/test/fixtures/alternate_config_project/app/views/layouts/application.html.erb deleted file mode 100644 index e2e7877..0000000 --- a/test/fixtures/alternate_config_project/app/views/layouts/application.html.erb +++ /dev/null @@ -1,14 +0,0 @@ - - - - AlternateConfigProject - <%= stylesheet_link_tag "application" %> - <%= javascript_include_tag "application" %> - <%= csrf_meta_tags %> - - - -<%= yield %> - - - diff --git a/test/fixtures/alternate_config_project/config.ru b/test/fixtures/alternate_config_project/config.ru deleted file mode 100644 index 315ca77..0000000 --- a/test/fixtures/alternate_config_project/config.ru +++ /dev/null @@ -1,4 +0,0 @@ -# This file is used by Rack-based servers to start the application. - -require ::File.expand_path('../config/environment', __FILE__) -run AlternateConfigProject::Application diff --git a/test/fixtures/alternate_config_project/config/application.rb b/test/fixtures/alternate_config_project/config/application.rb deleted file mode 100644 index 30f90f0..0000000 --- a/test/fixtures/alternate_config_project/config/application.rb +++ /dev/null @@ -1,49 +0,0 @@ -require File.expand_path('../boot', __FILE__) - -require 'rails/all' - -# If you have a Gemfile, require the gems listed there, including any gems -# you've limited to :test, :development, or :production. -Bundler.require(:default, Rails.env) if defined?(Bundler) - -module AlternateConfigProject - class Application < Rails::Application - # Settings in config/environments/* take precedence over those specified here. - # Application configuration should go into files in config/initializers - # -- all .rb files in that directory are automatically loaded. - - # Custom directories with classes and modules you want to be autoloadable. - # config.autoload_paths += %W(#{config.root}/extras) - - # Only load the plugins named here, in the order given (default is alphabetical). - # :all can be used as a placeholder for all plugins not explicitly named. - # config.plugins = [ :exception_notification, :ssl_requirement, :all ] - - # Activate observers that should always be running. - # config.active_record.observers = :cacher, :garbage_collector, :forum_observer - - # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. - # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. - # config.time_zone = 'Central Time (US & Canada)' - - # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. - # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] - # config.i18n.default_locale = :de - - # Please note that JavaScript expansions are *ignored altogether* if the asset - # pipeline is enabled (see config.assets.enabled below). Put your defaults in - # app/assets/javascripts/application.js in that case. - # - # JavaScript files you want as :defaults (application.js is always included). - # config.action_view.javascript_expansions[:defaults] = %w(prototype prototype_ujs) - - # Configure the default encoding used in templates for Ruby 1.9. - config.encoding = "utf-8" - - # Configure sensitive parameters which will be filtered from the log file. - config.filter_parameters += [:password] - - # Enable the asset pipeline - config.assets.enabled = true - end -end diff --git a/test/fixtures/alternate_config_project/config/boot.rb b/test/fixtures/alternate_config_project/config/boot.rb deleted file mode 100644 index 4489e58..0000000 --- a/test/fixtures/alternate_config_project/config/boot.rb +++ /dev/null @@ -1,6 +0,0 @@ -require 'rubygems' - -# Set up gems listed in the Gemfile. -ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) - -require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE']) diff --git a/test/fixtures/alternate_config_project/config/database.yml b/test/fixtures/alternate_config_project/config/database.yml deleted file mode 100644 index 51a4dd4..0000000 --- a/test/fixtures/alternate_config_project/config/database.yml +++ /dev/null @@ -1,25 +0,0 @@ -# SQLite version 3.x -# gem install sqlite3 -# -# Ensure the SQLite 3 gem is defined in your Gemfile -# gem 'sqlite3' -development: - adapter: sqlite3 - database: db/development.sqlite3 - pool: 5 - timeout: 5000 - -# Warning: The database defined as "test" will be erased and -# re-generated from your development database when you run "rake". -# Do not set this db to the same as development or production. -test: - adapter: sqlite3 - database: db/test.sqlite3 - pool: 5 - timeout: 5000 - -production: - adapter: sqlite3 - database: db/production.sqlite3 - pool: 5 - timeout: 5000 diff --git a/test/fixtures/alternate_config_project/config/environment.rb b/test/fixtures/alternate_config_project/config/environment.rb deleted file mode 100644 index f2ddcad..0000000 --- a/test/fixtures/alternate_config_project/config/environment.rb +++ /dev/null @@ -1,5 +0,0 @@ -# Load the rails application -require File.expand_path('../application', __FILE__) - -# Initialize the rails application -AlternateConfigProject::Application.initialize! diff --git a/test/fixtures/alternate_config_project/config/environments/development.rb b/test/fixtures/alternate_config_project/config/environments/development.rb deleted file mode 100644 index 44a2744..0000000 --- a/test/fixtures/alternate_config_project/config/environments/development.rb +++ /dev/null @@ -1,27 +0,0 @@ -AlternateConfigProject::Application.configure do - # Settings specified here will take precedence over those in config/application.rb - - # In the development environment your application's code is reloaded on - # every request. This slows down response time but is perfect for development - # since you don't have to restart the web server when you make code changes. - config.cache_classes = false - - config.eager_load = false - - # Show full error reports and disable caching - config.consider_all_requests_local = true - config.action_controller.perform_caching = false - - # Don't care if the mailer can't send - config.action_mailer.raise_delivery_errors = false - - # Print deprecation notices to the Rails logger - config.active_support.deprecation = :log - - # Only use best-standards-support built into browsers - config.action_dispatch.best_standards_support = :builtin - - # While not common in development, we are just using this to test alternate configs - # Specifically, does it honor the style attribute - config.sass.style = :compact -end diff --git a/test/fixtures/alternate_config_project/config/environments/production.rb b/test/fixtures/alternate_config_project/config/environments/production.rb deleted file mode 100644 index add1810..0000000 --- a/test/fixtures/alternate_config_project/config/environments/production.rb +++ /dev/null @@ -1,62 +0,0 @@ -AlternateConfigProject::Application.configure do - # Settings specified here will take precedence over those in config/application.rb - - # Code is not reloaded between requests - config.cache_classes = true - - config.eager_load = true - - # Full error reports are disabled and caching is turned on - config.consider_all_requests_local = false - config.action_controller.perform_caching = true - - # Disable Rails's static asset server (Apache or nginx will already do this) - if config.respond_to?(:public_file_server) - config.public_file_server.enabled = false - elsif config.respond_to?(:serve_static_files) - config.serve_static_files = false - else - config.serve_static_assets = false - end - - # Compress JavaScripts and CSS - config.assets.css_compressor = :yui - - # Specify the default JavaScript compressor - config.assets.js_compressor = :uglifier - - # Specifies the header that your server uses for sending files - # (comment out if your front-end server doesn't support this) - config.action_dispatch.x_sendfile_header = "X-Sendfile" # Use 'X-Accel-Redirect' for nginx - - # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. - # config.force_ssl = true - - # See everything in the log (default is :info) - config.log_level = :info - - # Use a different logger for distributed setups - # config.logger = SyslogLogger.new - - # Use a different cache store in production - # config.cache_store = :mem_cache_store - - # Enable serving of images, stylesheets, and JavaScripts from an asset server - # config.action_controller.asset_host = "http://assets.example.com" - - # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added) - # config.assets.precompile += %w( search.js ) - - # Disable delivery errors, bad email addresses will be ignored - # config.action_mailer.raise_delivery_errors = false - - # Enable threaded mode - # config.threadsafe! - - # Enable locale fallbacks for I18n (makes lookups for any locale fall back to - # the I18n.default_locale when a translation can not be found) - config.i18n.fallbacks = true - - # Send deprecation notices to registered listeners - config.active_support.deprecation = :notify -end diff --git a/test/fixtures/alternate_config_project/config/environments/test.rb b/test/fixtures/alternate_config_project/config/environments/test.rb deleted file mode 100644 index 45de9ed..0000000 --- a/test/fixtures/alternate_config_project/config/environments/test.rb +++ /dev/null @@ -1,52 +0,0 @@ -AlternateConfigProject::Application.configure do - # Settings specified here will take precedence over those in config/application.rb - - # The test environment is used exclusively to run your application's - # test suite. You never need to work with it otherwise. Remember that - # your test database is "scratch space" for the test suite and is wiped - # and recreated between test runs. Don't rely on the data there! - config.cache_classes = true - - # Configure static asset server for tests with Cache-Control for performance - if config.respond_to?(:public_file_server) - config.public_file_server.enabled = true - elsif config.respond_to?(:serve_static_files) - config.serve_static_files = true - else - config.serve_static_assets = true - end - - if config.respond_to?(:public_file_server) - config.public_file_server.headers = { 'Cache-Control' => 'public, max-age=3600' } - else - config.static_cache_control = "public, max-age=3600" - end - - config.eager_load = false - - # Show full error reports and disable caching - config.consider_all_requests_local = true - config.action_controller.perform_caching = false - - # Raise exceptions instead of rendering exception templates - config.action_dispatch.show_exceptions = false - - # Disable request forgery protection in test environment - config.action_controller.allow_forgery_protection = false - - # Tell Action Mailer not to deliver emails to the real world. - # The :test delivery method accumulates sent emails in the - # ActionMailer::Base.deliveries array. - config.action_mailer.delivery_method = :test - - # Use SQL instead of Active Record's schema dumper when creating the test database. - # This is necessary if your schema can't be completely dumped by the schema dumper, - # like if you have constraints or database-specific column types - # config.active_record.schema_format = :sql - - # Print deprecation notices to the stderr - config.active_support.deprecation = :stderr - - # Decide not to use sass compression - config.assets.css_compressor = nil -end diff --git a/test/fixtures/alternate_config_project/config/initializers/backtrace_silencers.rb b/test/fixtures/alternate_config_project/config/initializers/backtrace_silencers.rb deleted file mode 100644 index 59385cd..0000000 --- a/test/fixtures/alternate_config_project/config/initializers/backtrace_silencers.rb +++ /dev/null @@ -1,7 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. -# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } - -# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. -# Rails.backtrace_cleaner.remove_silencers! diff --git a/test/fixtures/alternate_config_project/config/initializers/inflections.rb b/test/fixtures/alternate_config_project/config/initializers/inflections.rb deleted file mode 100644 index 9e8b013..0000000 --- a/test/fixtures/alternate_config_project/config/initializers/inflections.rb +++ /dev/null @@ -1,10 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Add new inflection rules using the following format -# (all these examples are active by default): -# ActiveSupport::Inflector.inflections do |inflect| -# inflect.plural /^(ox)$/i, '\1en' -# inflect.singular /^(ox)en/i, '\1' -# inflect.irregular 'person', 'people' -# inflect.uncountable %w( fish sheep ) -# end diff --git a/test/fixtures/alternate_config_project/config/initializers/mime_types.rb b/test/fixtures/alternate_config_project/config/initializers/mime_types.rb deleted file mode 100644 index 72aca7e..0000000 --- a/test/fixtures/alternate_config_project/config/initializers/mime_types.rb +++ /dev/null @@ -1,5 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Add new mime types for use in respond_to blocks: -# Mime::Type.register "text/richtext", :rtf -# Mime::Type.register_alias "text/html", :iphone diff --git a/test/fixtures/alternate_config_project/config/initializers/secret_token.rb b/test/fixtures/alternate_config_project/config/initializers/secret_token.rb deleted file mode 100644 index e91c7e2..0000000 --- a/test/fixtures/alternate_config_project/config/initializers/secret_token.rb +++ /dev/null @@ -1,7 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Your secret key for verifying the integrity of signed cookies. -# If you change this key, all old signed cookies will become invalid! -# Make sure the secret is at least 30 characters and all random, -# no regular words or you'll be exposed to dictionary attacks. -AlternateConfigProject::Application.config.secret_token = 'aad80c771c1b2b13b67b0b2d03ee3fa8a1d5a8e8dce2e8bc8b382f197927b789afdc9355f8bc7256faf650015d75d8eb541e9ab96a88f0bd63c4bd7552174849' diff --git a/test/fixtures/alternate_config_project/config/initializers/session_store.rb b/test/fixtures/alternate_config_project/config/initializers/session_store.rb deleted file mode 100644 index fa93d1d..0000000 --- a/test/fixtures/alternate_config_project/config/initializers/session_store.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Be sure to restart your server when you modify this file. - -AlternateConfigProject::Application.config.session_store :cookie_store, :key => '_scss_project_session' - -# Use the database for sessions instead of the cookie-based default, -# which shouldn't be used to store highly confidential information -# (create the session table with "rails generate session_migration") -# AlternateConfigProject::Application.config.session_store :active_record_store diff --git a/test/fixtures/alternate_config_project/config/initializers/wrap_parameters.rb b/test/fixtures/alternate_config_project/config/initializers/wrap_parameters.rb deleted file mode 100644 index 32ffbee..0000000 --- a/test/fixtures/alternate_config_project/config/initializers/wrap_parameters.rb +++ /dev/null @@ -1,12 +0,0 @@ -# Be sure to restart your server when you modify this file. -# -# This file contains the settings for ActionController::ParametersWrapper -# which will be enabled by default in the upcoming version of Ruby on Rails. - -# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. -ActionController::Base.wrap_parameters :format => [:json] - -# Disable root element in JSON by default. -if defined?(ActiveRecord) - ActiveRecord::Base.include_root_in_json = false -end diff --git a/test/fixtures/alternate_config_project/config/locales/en.yml b/test/fixtures/alternate_config_project/config/locales/en.yml deleted file mode 100644 index 179c14c..0000000 --- a/test/fixtures/alternate_config_project/config/locales/en.yml +++ /dev/null @@ -1,5 +0,0 @@ -# Sample localization file for English. Add more files in this directory for other locales. -# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. - -en: - hello: "Hello world" diff --git a/test/fixtures/alternate_config_project/config/routes.rb b/test/fixtures/alternate_config_project/config/routes.rb deleted file mode 100644 index 62343c9..0000000 --- a/test/fixtures/alternate_config_project/config/routes.rb +++ /dev/null @@ -1,58 +0,0 @@ -AlternateConfigProject::Application.routes.draw do - # The priority is based upon order of creation: - # first created -> highest priority. - - # Sample of regular route: - # match 'products/:id' => 'catalog#view' - # Keep in mind you can assign values other than :controller and :action - - # Sample of named route: - # match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase - # This route can be invoked with purchase_url(:id => product.id) - - # Sample resource route (maps HTTP verbs to controller actions automatically): - # resources :products - - # Sample resource route with options: - # resources :products do - # member do - # get 'short' - # post 'toggle' - # end - # - # collection do - # get 'sold' - # end - # end - - # Sample resource route with sub-resources: - # resources :products do - # resources :comments, :sales - # resource :seller - # end - - # Sample resource route with more complex sub-resources - # resources :products do - # resources :comments - # resources :sales do - # get 'recent', :on => :collection - # end - # end - - # Sample resource route within a namespace: - # namespace :admin do - # # Directs /admin/products/* to Admin::ProductsController - # # (app/controllers/admin/products_controller.rb) - # resources :products - # end - - # You can have the root of your site routed with "root" - # just remember to delete public/index.html. - # root :to => 'welcome#index' - - # See how all your routes lay out with "rake routes" - - # This is a legacy wild controller route that's not recommended for RESTful applications. - # Note: This route will make all actions in every controller accessible via GET requests. - # match ':controller(/:action(/:id(.:format)))' -end diff --git a/test/fixtures/alternate_config_project/db/seeds.rb b/test/fixtures/alternate_config_project/db/seeds.rb deleted file mode 100644 index 4edb1e8..0000000 --- a/test/fixtures/alternate_config_project/db/seeds.rb +++ /dev/null @@ -1,7 +0,0 @@ -# This file should contain all the record creation needed to seed the database with its default values. -# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup). -# -# Examples: -# -# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }]) -# Mayor.create(name: 'Emanuel', city: cities.first) diff --git a/test/fixtures/alternate_config_project/doc/README_FOR_APP b/test/fixtures/alternate_config_project/doc/README_FOR_APP deleted file mode 100644 index fe41f5c..0000000 --- a/test/fixtures/alternate_config_project/doc/README_FOR_APP +++ /dev/null @@ -1,2 +0,0 @@ -Use this README file to introduce your application and point to useful places in the API for learning more. -Run "rake doc:app" to generate API documentation for your models, controllers, helpers, and libraries. diff --git a/test/fixtures/alternate_config_project/lib/tasks/.gitkeep b/test/fixtures/alternate_config_project/lib/tasks/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/test/fixtures/alternate_config_project/log/.gitkeep b/test/fixtures/alternate_config_project/log/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/test/fixtures/alternate_config_project/public/404.html b/test/fixtures/alternate_config_project/public/404.html deleted file mode 100644 index 9a48320..0000000 --- a/test/fixtures/alternate_config_project/public/404.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - The page you were looking for doesn't exist (404) - - - - - -
-

The page you were looking for doesn't exist.

-

You may have mistyped the address or the page may have moved.

-
- - diff --git a/test/fixtures/alternate_config_project/public/422.html b/test/fixtures/alternate_config_project/public/422.html deleted file mode 100644 index 83660ab..0000000 --- a/test/fixtures/alternate_config_project/public/422.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - The change you wanted was rejected (422) - - - - - -
-

The change you wanted was rejected.

-

Maybe you tried to change something you didn't have access to.

-
- - diff --git a/test/fixtures/alternate_config_project/public/500.html b/test/fixtures/alternate_config_project/public/500.html deleted file mode 100644 index b80307f..0000000 --- a/test/fixtures/alternate_config_project/public/500.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - We're sorry, but something went wrong (500) - - - - - -
-

We're sorry, but something went wrong.

-

We've been notified about this issue and we'll take a look at it shortly.

-
- - diff --git a/test/fixtures/alternate_config_project/public/favicon.ico b/test/fixtures/alternate_config_project/public/favicon.ico deleted file mode 100644 index e69de29..0000000 diff --git a/test/fixtures/alternate_config_project/public/index.html b/test/fixtures/alternate_config_project/public/index.html deleted file mode 100644 index 9d9811a..0000000 --- a/test/fixtures/alternate_config_project/public/index.html +++ /dev/null @@ -1,241 +0,0 @@ - - - - Ruby on Rails: Welcome aboard - - - - -
- - -
- - - - -
-

Getting started

-

Here’s how to get rolling:

- -
    -
  1. -

    Use rails generate to create your models and controllers

    -

    To see all available options, run it without parameters.

    -
  2. - -
  3. -

    Set up a default route and remove public/index.html

    -

    Routes are set up in config/routes.rb.

    -
  4. - -
  5. -

    Create your database

    -

    Run rake db:create to create your database. If you're not using SQLite (the default), edit config/database.yml with your username and password.

    -
  6. -
-
-
- - -
- - diff --git a/test/fixtures/alternate_config_project/public/robots.txt b/test/fixtures/alternate_config_project/public/robots.txt deleted file mode 100644 index 085187f..0000000 --- a/test/fixtures/alternate_config_project/public/robots.txt +++ /dev/null @@ -1,5 +0,0 @@ -# See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file -# -# To ban all spiders from the entire site uncomment the next two lines: -# User-Agent: * -# Disallow: / diff --git a/test/fixtures/alternate_config_project/script/rails b/test/fixtures/alternate_config_project/script/rails deleted file mode 100755 index f8da2cf..0000000 --- a/test/fixtures/alternate_config_project/script/rails +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env ruby -# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application. - -APP_PATH = File.expand_path('../../config/application', __FILE__) -require File.expand_path('../../config/boot', __FILE__) -require 'rails/commands' diff --git a/test/fixtures/alternate_config_project/vendor/assets/stylesheets/.gitkeep b/test/fixtures/alternate_config_project/vendor/assets/stylesheets/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/test/fixtures/alternate_config_project/vendor/plugins/.gitkeep b/test/fixtures/alternate_config_project/vendor/plugins/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/test/fixtures/engine_project/.gitignore b/test/fixtures/engine_project/.gitignore deleted file mode 100644 index de5d954..0000000 --- a/test/fixtures/engine_project/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -.bundle/ -log/*.log -pkg/ -test/dummy/db/*.sqlite3 -test/dummy/db/*.sqlite3-journal -test/dummy/log/*.log -test/dummy/tmp/ -test/dummy/.sass-cache diff --git a/test/fixtures/engine_project/Gemfile b/test/fixtures/engine_project/Gemfile deleted file mode 100644 index f68fe49..0000000 --- a/test/fixtures/engine_project/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source "https://rubygems.org" - -# Declare your gem's dependencies in engine_project.gemspec. -# Bundler will treat runtime dependencies like base dependencies, and -# development dependencies will be added by default to the :development group. -gemspec - -# Declare any dependencies that are still in development here instead of in -# your gemspec. These might include edge Rails or gems from your path or -# Git. Remember to move these dependencies to your gemspec before releasing -# your gem to rubygems.org. - -# To use debugger -# gem 'debugger' diff --git a/test/fixtures/engine_project/MIT-LICENSE b/test/fixtures/engine_project/MIT-LICENSE deleted file mode 100644 index 5146945..0000000 --- a/test/fixtures/engine_project/MIT-LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright 2013 YOURNAME - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/test/fixtures/engine_project/README.rdoc b/test/fixtures/engine_project/README.rdoc deleted file mode 100644 index 9ed9393..0000000 --- a/test/fixtures/engine_project/README.rdoc +++ /dev/null @@ -1,3 +0,0 @@ -= EngineProject - -This project rocks and uses MIT-LICENSE. \ No newline at end of file diff --git a/test/fixtures/engine_project/Rakefile b/test/fixtures/engine_project/Rakefile deleted file mode 100644 index dd2cde5..0000000 --- a/test/fixtures/engine_project/Rakefile +++ /dev/null @@ -1,34 +0,0 @@ -begin - require 'bundler/setup' -rescue LoadError - puts 'You must `gem install bundler` and `bundle install` to run rake tasks' -end - -require 'rdoc/task' - -RDoc::Task.new(:rdoc) do |rdoc| - rdoc.rdoc_dir = 'rdoc' - rdoc.title = 'EngineProject' - rdoc.options << '--line-numbers' - rdoc.rdoc_files.include('README.rdoc') - rdoc.rdoc_files.include('lib/**/*.rb') -end - -APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__) -load 'rails/tasks/engine.rake' - - - -Bundler::GemHelper.install_tasks - -require 'rake/testtask' - -Rake::TestTask.new(:test) do |t| - t.libs << 'lib' - t.libs << 'test' - t.pattern = 'test/**/*_test.rb' - t.verbose = false -end - - -task default: :test diff --git a/test/fixtures/engine_project/app/assets/config/manifest.js b/test/fixtures/engine_project/app/assets/config/manifest.js deleted file mode 100644 index b16e53d..0000000 --- a/test/fixtures/engine_project/app/assets/config/manifest.js +++ /dev/null @@ -1,3 +0,0 @@ -//= link_tree ../images -//= link_directory ../javascripts .js -//= link_directory ../stylesheets .css diff --git a/test/fixtures/engine_project/app/assets/images/engine_project/.keep b/test/fixtures/engine_project/app/assets/images/engine_project/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/test/fixtures/engine_project/app/assets/javascripts/engine_project/application.js b/test/fixtures/engine_project/app/assets/javascripts/engine_project/application.js deleted file mode 100644 index 9e83eb5..0000000 --- a/test/fixtures/engine_project/app/assets/javascripts/engine_project/application.js +++ /dev/null @@ -1,16 +0,0 @@ -// This is a manifest file that'll be compiled into application.js, which will include all the files -// listed below. -// -// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, -// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path. -// -// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the -// compiled file. -// -// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD -// GO AFTER THE REQUIRES BELOW. -// -//= require jquery -//= require jquery_ujs -//= require turbolinks -//= require_tree . diff --git a/test/fixtures/engine_project/app/assets/stylesheets/engine_project/application.css b/test/fixtures/engine_project/app/assets/stylesheets/engine_project/application.css deleted file mode 100644 index 3192ec8..0000000 --- a/test/fixtures/engine_project/app/assets/stylesheets/engine_project/application.css +++ /dev/null @@ -1,13 +0,0 @@ -/* - * 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 vendor/assets/stylesheets of plugins, if any, 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 top of the - * compiled file, but it's generally better to create a new file per style scope. - * - *= require_self - *= require_tree . - */ diff --git a/test/fixtures/engine_project/app/controllers/engine_project/application_controller.rb b/test/fixtures/engine_project/app/controllers/engine_project/application_controller.rb deleted file mode 100644 index 4053e75..0000000 --- a/test/fixtures/engine_project/app/controllers/engine_project/application_controller.rb +++ /dev/null @@ -1,4 +0,0 @@ -module EngineProject - class ApplicationController < ActionController::Base - end -end diff --git a/test/fixtures/engine_project/app/helpers/engine_project/application_helper.rb b/test/fixtures/engine_project/app/helpers/engine_project/application_helper.rb deleted file mode 100644 index eaf3a8f..0000000 --- a/test/fixtures/engine_project/app/helpers/engine_project/application_helper.rb +++ /dev/null @@ -1,4 +0,0 @@ -module EngineProject - module ApplicationHelper - end -end diff --git a/test/fixtures/engine_project/app/views/layouts/engine_project/application.html.erb b/test/fixtures/engine_project/app/views/layouts/engine_project/application.html.erb deleted file mode 100644 index 35ead87..0000000 --- a/test/fixtures/engine_project/app/views/layouts/engine_project/application.html.erb +++ /dev/null @@ -1,14 +0,0 @@ - - - - EngineProject - <%= stylesheet_link_tag "engine_project/application", media: "all" %> - <%= javascript_include_tag "engine_project/application" %> - <%= csrf_meta_tags %> - - - -<%= yield %> - - - diff --git a/test/fixtures/engine_project/config/routes.rb b/test/fixtures/engine_project/config/routes.rb deleted file mode 100644 index bd95ffb..0000000 --- a/test/fixtures/engine_project/config/routes.rb +++ /dev/null @@ -1,2 +0,0 @@ -EngineProject::Engine.routes.draw do -end diff --git a/test/fixtures/engine_project/engine_project.gemspec b/test/fixtures/engine_project/engine_project.gemspec deleted file mode 100644 index 596a54b..0000000 --- a/test/fixtures/engine_project/engine_project.gemspec +++ /dev/null @@ -1,22 +0,0 @@ -$:.push File.expand_path("../lib", __FILE__) - -# Maintain your gem's version: -require "engine_project/version" - -# Describe your gem and declare its dependencies: -Gem::Specification.new do |s| - s.name = "engine_project" - s.version = EngineProject::VERSION - s.authors = ["Your name"] - s.email = ["Your email"] - s.summary = "Summary of EngineProject." - s.description = "Description of EngineProject." - - s.files = Dir["{app,config,db,lib}/**/*", "MIT-LICENSE", "Rakefile", "README.rdoc"] - s.test_files = Dir["test/**/*"] - - s.add_dependency "rails", ">= 4.0.0.beta" - # s.add_dependency "jquery-rails" - - s.add_development_dependency "sqlite3" -end diff --git a/test/fixtures/engine_project/lib/engine_project.rb b/test/fixtures/engine_project/lib/engine_project.rb deleted file mode 100644 index c8d9a41..0000000 --- a/test/fixtures/engine_project/lib/engine_project.rb +++ /dev/null @@ -1,4 +0,0 @@ -require "engine_project/engine" - -module EngineProject -end diff --git a/test/fixtures/engine_project/lib/engine_project/engine.rb b/test/fixtures/engine_project/lib/engine_project/engine.rb deleted file mode 100644 index d23a797..0000000 --- a/test/fixtures/engine_project/lib/engine_project/engine.rb +++ /dev/null @@ -1,5 +0,0 @@ -module EngineProject - class Engine < ::Rails::Engine - isolate_namespace EngineProject - end -end diff --git a/test/fixtures/engine_project/lib/engine_project/version.rb b/test/fixtures/engine_project/lib/engine_project/version.rb deleted file mode 100644 index f1d3022..0000000 --- a/test/fixtures/engine_project/lib/engine_project/version.rb +++ /dev/null @@ -1,3 +0,0 @@ -module EngineProject - VERSION = "0.0.1" -end diff --git a/test/fixtures/engine_project/lib/tasks/engine_project_tasks.rake b/test/fixtures/engine_project/lib/tasks/engine_project_tasks.rake deleted file mode 100644 index c03bd9f..0000000 --- a/test/fixtures/engine_project/lib/tasks/engine_project_tasks.rake +++ /dev/null @@ -1,4 +0,0 @@ -# desc "Explaining what the task does" -# task :engine_project do -# # Task goes here -# end diff --git a/test/fixtures/engine_project/script/rails b/test/fixtures/engine_project/script/rails deleted file mode 100755 index 633a119..0000000 --- a/test/fixtures/engine_project/script/rails +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env ruby -# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application. - -ENGINE_ROOT = File.expand_path('../..', __FILE__) -ENGINE_PATH = File.expand_path('../../lib/engine_project/engine', __FILE__) - -require 'rails/all' -require 'rails/engine/commands' diff --git a/test/fixtures/engine_project/test/dummy/README.rdoc b/test/fixtures/engine_project/test/dummy/README.rdoc deleted file mode 100644 index dd4e97e..0000000 --- a/test/fixtures/engine_project/test/dummy/README.rdoc +++ /dev/null @@ -1,28 +0,0 @@ -== README - -This README would normally document whatever steps are necessary to get the -application up and running. - -Things you may want to cover: - -* Ruby version - -* System dependencies - -* Configuration - -* Database creation - -* Database initialization - -* How to run the test suite - -* Services (job queues, cache servers, search engines, etc.) - -* Deployment instructions - -* ... - - -Please feel free to use a different markup language if you do not plan to run -rake doc:app. diff --git a/test/fixtures/engine_project/test/dummy/Rakefile b/test/fixtures/engine_project/test/dummy/Rakefile deleted file mode 100644 index 4135d7a..0000000 --- a/test/fixtures/engine_project/test/dummy/Rakefile +++ /dev/null @@ -1,6 +0,0 @@ -# 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__) - -Dummy::Application.load_tasks diff --git a/test/fixtures/engine_project/test/dummy/app/assets/config/manifest.js b/test/fixtures/engine_project/test/dummy/app/assets/config/manifest.js deleted file mode 100644 index b16e53d..0000000 --- a/test/fixtures/engine_project/test/dummy/app/assets/config/manifest.js +++ /dev/null @@ -1,3 +0,0 @@ -//= link_tree ../images -//= link_directory ../javascripts .js -//= link_directory ../stylesheets .css diff --git a/test/fixtures/engine_project/test/dummy/app/assets/javascripts/application.js b/test/fixtures/engine_project/test/dummy/app/assets/javascripts/application.js deleted file mode 100644 index 9e83eb5..0000000 --- a/test/fixtures/engine_project/test/dummy/app/assets/javascripts/application.js +++ /dev/null @@ -1,16 +0,0 @@ -// This is a manifest file that'll be compiled into application.js, which will include all the files -// listed below. -// -// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, -// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path. -// -// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the -// compiled file. -// -// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD -// GO AFTER THE REQUIRES BELOW. -// -//= require jquery -//= require jquery_ujs -//= require turbolinks -//= require_tree . diff --git a/test/fixtures/engine_project/test/dummy/app/assets/stylesheets/application.css b/test/fixtures/engine_project/test/dummy/app/assets/stylesheets/application.css deleted file mode 100644 index 3192ec8..0000000 --- a/test/fixtures/engine_project/test/dummy/app/assets/stylesheets/application.css +++ /dev/null @@ -1,13 +0,0 @@ -/* - * 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 vendor/assets/stylesheets of plugins, if any, 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 top of the - * compiled file, but it's generally better to create a new file per style scope. - * - *= require_self - *= require_tree . - */ diff --git a/test/fixtures/engine_project/test/dummy/app/controllers/application_controller.rb b/test/fixtures/engine_project/test/dummy/app/controllers/application_controller.rb deleted file mode 100644 index d83690e..0000000 --- a/test/fixtures/engine_project/test/dummy/app/controllers/application_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -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/test/fixtures/engine_project/test/dummy/app/controllers/concerns/.keep b/test/fixtures/engine_project/test/dummy/app/controllers/concerns/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/test/fixtures/engine_project/test/dummy/app/helpers/application_helper.rb b/test/fixtures/engine_project/test/dummy/app/helpers/application_helper.rb deleted file mode 100644 index de6be79..0000000 --- a/test/fixtures/engine_project/test/dummy/app/helpers/application_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module ApplicationHelper -end diff --git a/test/fixtures/engine_project/test/dummy/app/mailers/.keep b/test/fixtures/engine_project/test/dummy/app/mailers/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/test/fixtures/engine_project/test/dummy/app/models/.keep b/test/fixtures/engine_project/test/dummy/app/models/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/test/fixtures/engine_project/test/dummy/app/models/concerns/.keep b/test/fixtures/engine_project/test/dummy/app/models/concerns/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/test/fixtures/engine_project/test/dummy/app/views/layouts/application.html.erb b/test/fixtures/engine_project/test/dummy/app/views/layouts/application.html.erb deleted file mode 100644 index 670d187..0000000 --- a/test/fixtures/engine_project/test/dummy/app/views/layouts/application.html.erb +++ /dev/null @@ -1,14 +0,0 @@ - - - - Dummy - <%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %> - <%= javascript_include_tag "application", "data-turbolinks-track" => true %> - <%= csrf_meta_tags %> - - - -<%= yield %> - - - diff --git a/test/fixtures/engine_project/test/dummy/bin/bundle b/test/fixtures/engine_project/test/dummy/bin/bundle deleted file mode 100755 index 66e9889..0000000 --- a/test/fixtures/engine_project/test/dummy/bin/bundle +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env ruby -ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) -load Gem.bin_path('bundler', 'bundle') diff --git a/test/fixtures/engine_project/test/dummy/bin/rails b/test/fixtures/engine_project/test/dummy/bin/rails deleted file mode 100755 index 728cd85..0000000 --- a/test/fixtures/engine_project/test/dummy/bin/rails +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env ruby -APP_PATH = File.expand_path('../../config/application', __FILE__) -require_relative '../config/boot' -require 'rails/commands' diff --git a/test/fixtures/engine_project/test/dummy/bin/rake b/test/fixtures/engine_project/test/dummy/bin/rake deleted file mode 100755 index 1724048..0000000 --- a/test/fixtures/engine_project/test/dummy/bin/rake +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env ruby -require_relative '../config/boot' -require 'rake' -Rake.application.run diff --git a/test/fixtures/engine_project/test/dummy/config.ru b/test/fixtures/engine_project/test/dummy/config.ru deleted file mode 100644 index 1989ed8..0000000 --- a/test/fixtures/engine_project/test/dummy/config.ru +++ /dev/null @@ -1,4 +0,0 @@ -# This file is used by Rack-based servers to start the application. - -require ::File.expand_path('../config/environment', __FILE__) -run Dummy::Application diff --git a/test/fixtures/engine_project/test/dummy/config/application.rb b/test/fixtures/engine_project/test/dummy/config/application.rb deleted file mode 100644 index 9847aa1..0000000 --- a/test/fixtures/engine_project/test/dummy/config/application.rb +++ /dev/null @@ -1,23 +0,0 @@ -require File.expand_path('../boot', __FILE__) - -require 'rails/all' - -Bundler.require(*Rails.groups) -require "engine_project" - -module Dummy - class Application < Rails::Application - # Settings in config/environments/* take precedence over those specified here. - # Application configuration should go into files in config/initializers - # -- all .rb files in that directory are automatically loaded. - - # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. - # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. - # config.time_zone = 'Central Time (US & Canada)' - - # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. - # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] - # config.i18n.default_locale = :de - end -end - diff --git a/test/fixtures/engine_project/test/dummy/config/boot.rb b/test/fixtures/engine_project/test/dummy/config/boot.rb deleted file mode 100644 index c78bfb7..0000000 --- a/test/fixtures/engine_project/test/dummy/config/boot.rb +++ /dev/null @@ -1,9 +0,0 @@ -gemfile = File.expand_path('../../../../Gemfile', __FILE__) - -if File.exist?(gemfile) - ENV['BUNDLE_GEMFILE'] = gemfile - require 'bundler' - Bundler.setup -end - -$:.unshift File.expand_path('../../../../lib', __FILE__) \ No newline at end of file diff --git a/test/fixtures/engine_project/test/dummy/config/database.yml b/test/fixtures/engine_project/test/dummy/config/database.yml deleted file mode 100644 index 51a4dd4..0000000 --- a/test/fixtures/engine_project/test/dummy/config/database.yml +++ /dev/null @@ -1,25 +0,0 @@ -# SQLite version 3.x -# gem install sqlite3 -# -# Ensure the SQLite 3 gem is defined in your Gemfile -# gem 'sqlite3' -development: - adapter: sqlite3 - database: db/development.sqlite3 - pool: 5 - timeout: 5000 - -# Warning: The database defined as "test" will be erased and -# re-generated from your development database when you run "rake". -# Do not set this db to the same as development or production. -test: - adapter: sqlite3 - database: db/test.sqlite3 - pool: 5 - timeout: 5000 - -production: - adapter: sqlite3 - database: db/production.sqlite3 - pool: 5 - timeout: 5000 diff --git a/test/fixtures/engine_project/test/dummy/config/environment.rb b/test/fixtures/engine_project/test/dummy/config/environment.rb deleted file mode 100644 index 82be82d..0000000 --- a/test/fixtures/engine_project/test/dummy/config/environment.rb +++ /dev/null @@ -1,5 +0,0 @@ -# Load the rails application. -require File.expand_path('../application', __FILE__) - -# Initialize the rails application. -Dummy::Application.initialize! diff --git a/test/fixtures/engine_project/test/dummy/config/environments/development.rb b/test/fixtures/engine_project/test/dummy/config/environments/development.rb deleted file mode 100644 index f353746..0000000 --- a/test/fixtures/engine_project/test/dummy/config/environments/development.rb +++ /dev/null @@ -1,27 +0,0 @@ -Dummy::Application.configure do - # Settings specified here will take precedence over those in config/application.rb. - - # In the development environment your application's code is reloaded on - # every request. This slows down response time but is perfect for development - # since you don't have to restart the web server when you make code changes. - config.cache_classes = false - - # Do not eager load code on boot. - config.eager_load = false - - # Show full error reports and disable caching. - config.consider_all_requests_local = true - config.action_controller.perform_caching = false - - # Don't care if the mailer can't send. - config.action_mailer.raise_delivery_errors = false - - # Print deprecation notices to the Rails logger. - config.active_support.deprecation = :log - - # Raise an error on page load if there are pending migrations - config.active_record.migration_error = :page_load - - # Debug mode disables concatenation and preprocessing of assets. - config.assets.debug = true -end diff --git a/test/fixtures/engine_project/test/dummy/config/environments/production.rb b/test/fixtures/engine_project/test/dummy/config/environments/production.rb deleted file mode 100644 index 2e3f7c5..0000000 --- a/test/fixtures/engine_project/test/dummy/config/environments/production.rb +++ /dev/null @@ -1,86 +0,0 @@ -Dummy::Application.configure do - # Settings specified here will take precedence over those in config/application.rb. - - # Code is not reloaded between requests. - config.cache_classes = true - - # Eager load code on boot. This eager loads most of Rails and - # your application in memory, allowing both thread web servers - # and those relying on copy on write to perform better. - # Rake tasks automatically ignore this option for performance. - config.eager_load = true - - # Full error reports are disabled and caching is turned on. - config.consider_all_requests_local = false - config.action_controller.perform_caching = true - - # Enable Rack::Cache to put a simple HTTP cache in front of your application - # Add `rack-cache` to your Gemfile before enabling this. - # For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid. - # config.action_dispatch.rack_cache = true - - # Disable Rails's static asset server (Apache or nginx will already do this). - if config.respond_to?(:public_file_server) - config.public_file_server.enabled = false - elsif config.respond_to?(:serve_static_files) - config.serve_static_files = false - else - config.serve_static_assets = false - end - - # Compress JavaScripts and CSS. - config.assets.js_compressor = :uglifier - # config.assets.css_compressor = :sass - - # Whether to fallback to assets pipeline if a precompiled asset is missed. - config.assets.compile = false - - # Generate digests for assets URLs. - config.assets.digest = true - - # Version of your assets, change this if you want to expire all your assets. - config.assets.version = '1.0' - - # Specifies the header that your server uses for sending files. - # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache - # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx - - # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. - # config.force_ssl = true - - # Set to :debug to see everything in the log. - config.log_level = :info - - # Prepend all log lines with the following tags. - # config.log_tags = [ :subdomain, :uuid ] - - # Use a different logger for distributed setups. - # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new) - - # Use a different cache store in production. - # config.cache_store = :mem_cache_store - - # Enable serving of images, stylesheets, and JavaScripts from an asset server. - # config.action_controller.asset_host = "http://assets.example.com" - - # Precompile additional assets. - # application.js, application.css, and all non-JS/CSS in app/assets folder are already added. - # config.assets.precompile += %w( search.js ) - - # Ignore bad email addresses and do not raise email delivery errors. - # Set this to true and configure the email server for immediate delivery to raise delivery errors. - # config.action_mailer.raise_delivery_errors = false - - # Enable locale fallbacks for I18n (makes lookups for any locale fall back to - # the I18n.default_locale when a translation can not be found). - config.i18n.fallbacks = true - - # Send deprecation notices to registered listeners. - config.active_support.deprecation = :notify - - # Disable automatic flushing of the log to improve performance. - # config.autoflush_log = false - - # Use default logging formatter so that PID and timestamp are not suppressed. - config.log_formatter = ::Logger::Formatter.new -end diff --git a/test/fixtures/engine_project/test/dummy/config/environments/test.rb b/test/fixtures/engine_project/test/dummy/config/environments/test.rb deleted file mode 100644 index e9ed4ed..0000000 --- a/test/fixtures/engine_project/test/dummy/config/environments/test.rb +++ /dev/null @@ -1,47 +0,0 @@ -Dummy::Application.configure do - # Settings specified here will take precedence over those in config/application.rb. - - # The test environment is used exclusively to run your application's - # test suite. You never need to work with it otherwise. Remember that - # your test database is "scratch space" for the test suite and is wiped - # and recreated between test runs. Don't rely on the data there! - config.cache_classes = true - - # Do not eager load code on boot. This avoids loading your whole application - # just for the purpose of running a single test. If you are using a tool that - # preloads Rails for running tests, you may have to set it to true. - config.eager_load = false - - # Configure static asset server for tests with Cache-Control for performance. - if config.respond_to?(:public_file_server) - config.public_file_server.enabled = true - elsif config.respond_to?(:serve_static_files) - config.serve_static_files = true - else - config.serve_static_assets = true - end - - if config.respond_to?(:public_file_server) - config.public_file_server.headers = { 'Cache-Control' => 'public, max-age=3600' } - else - config.static_cache_control = "public, max-age=3600" - end - - # Show full error reports and disable caching. - config.consider_all_requests_local = true - config.action_controller.perform_caching = false - - # Raise exceptions instead of rendering exception templates. - config.action_dispatch.show_exceptions = false - - # Disable request forgery protection in test environment. - config.action_controller.allow_forgery_protection = false - - # Tell Action Mailer not to deliver emails to the real world. - # The :test delivery method accumulates sent emails in the - # ActionMailer::Base.deliveries array. - config.action_mailer.delivery_method = :test - - # Print deprecation notices to the stderr. - config.active_support.deprecation = :stderr -end diff --git a/test/fixtures/engine_project/test/dummy/config/initializers/backtrace_silencers.rb b/test/fixtures/engine_project/test/dummy/config/initializers/backtrace_silencers.rb deleted file mode 100644 index 59385cd..0000000 --- a/test/fixtures/engine_project/test/dummy/config/initializers/backtrace_silencers.rb +++ /dev/null @@ -1,7 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. -# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } - -# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. -# Rails.backtrace_cleaner.remove_silencers! diff --git a/test/fixtures/engine_project/test/dummy/config/initializers/filter_parameter_logging.rb b/test/fixtures/engine_project/test/dummy/config/initializers/filter_parameter_logging.rb deleted file mode 100644 index 4a994e1..0000000 --- a/test/fixtures/engine_project/test/dummy/config/initializers/filter_parameter_logging.rb +++ /dev/null @@ -1,4 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Configure sensitive parameters which will be filtered from the log file. -Rails.application.config.filter_parameters += [:password] diff --git a/test/fixtures/engine_project/test/dummy/config/initializers/inflections.rb b/test/fixtures/engine_project/test/dummy/config/initializers/inflections.rb deleted file mode 100644 index ac033bf..0000000 --- a/test/fixtures/engine_project/test/dummy/config/initializers/inflections.rb +++ /dev/null @@ -1,16 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Add new inflection rules using the following format. Inflections -# are locale specific, and you may define rules for as many different -# locales as you wish. All of these examples are active by default: -# ActiveSupport::Inflector.inflections(:en) do |inflect| -# inflect.plural /^(ox)$/i, '\1en' -# inflect.singular /^(ox)en/i, '\1' -# inflect.irregular 'person', 'people' -# inflect.uncountable %w( fish sheep ) -# end - -# These inflection rules are supported but not enabled by default: -# ActiveSupport::Inflector.inflections(:en) do |inflect| -# inflect.acronym 'RESTful' -# end diff --git a/test/fixtures/engine_project/test/dummy/config/initializers/mime_types.rb b/test/fixtures/engine_project/test/dummy/config/initializers/mime_types.rb deleted file mode 100644 index 72aca7e..0000000 --- a/test/fixtures/engine_project/test/dummy/config/initializers/mime_types.rb +++ /dev/null @@ -1,5 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Add new mime types for use in respond_to blocks: -# Mime::Type.register "text/richtext", :rtf -# Mime::Type.register_alias "text/html", :iphone diff --git a/test/fixtures/engine_project/test/dummy/config/initializers/secret_token.rb b/test/fixtures/engine_project/test/dummy/config/initializers/secret_token.rb deleted file mode 100644 index 79191e6..0000000 --- a/test/fixtures/engine_project/test/dummy/config/initializers/secret_token.rb +++ /dev/null @@ -1,12 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Your secret key for verifying the integrity of signed cookies. -# If you change this key, all old signed cookies will become invalid! - -# Make sure the secret is at least 30 characters and all random, -# no regular words or you'll be exposed to dictionary attacks. -# You can use `rake secret` to generate a secure secret key. - -# Make sure your secret_key_base is kept private -# if you're sharing your code publicly. -Dummy::Application.config.secret_key_base = '868d5f3233e4ffc2280b4ce3ba53cbe670ecefcca857cbf731795b8f2987f97d04b5175e2d014dd0d711203d2a45d1a52ed66bda51892f08eb828b0136a36437' diff --git a/test/fixtures/engine_project/test/dummy/config/initializers/wrap_parameters.rb b/test/fixtures/engine_project/test/dummy/config/initializers/wrap_parameters.rb deleted file mode 100644 index 33725e9..0000000 --- a/test/fixtures/engine_project/test/dummy/config/initializers/wrap_parameters.rb +++ /dev/null @@ -1,14 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# This file contains settings for ActionController::ParamsWrapper which -# is enabled by default. - -# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. -ActiveSupport.on_load(:action_controller) do - wrap_parameters format: [:json] if respond_to?(:wrap_parameters) -end - -# To enable root element in JSON for ActiveRecord objects. -# ActiveSupport.on_load(:active_record) do -# self.include_root_in_json = true -# end diff --git a/test/fixtures/engine_project/test/dummy/config/locales/en.yml b/test/fixtures/engine_project/test/dummy/config/locales/en.yml deleted file mode 100644 index 0653957..0000000 --- a/test/fixtures/engine_project/test/dummy/config/locales/en.yml +++ /dev/null @@ -1,23 +0,0 @@ -# Files in the config/locales directory are used for internationalization -# and are automatically loaded by Rails. If you want to use locales other -# than English, add the necessary files in this directory. -# -# To use the locales, use `I18n.t`: -# -# I18n.t 'hello' -# -# In views, this is aliased to just `t`: -# -# <%= t('hello') %> -# -# To use a different locale, set it with `I18n.locale`: -# -# I18n.locale = :es -# -# This would use the information in config/locales/es.yml. -# -# To learn more, please read the Rails Internationalization guide -# available at http://guides.rubyonrails.org/i18n.html. - -en: - hello: "Hello world" diff --git a/test/fixtures/engine_project/test/dummy/config/routes.rb b/test/fixtures/engine_project/test/dummy/config/routes.rb deleted file mode 100644 index db3c3b3..0000000 --- a/test/fixtures/engine_project/test/dummy/config/routes.rb +++ /dev/null @@ -1,4 +0,0 @@ -Rails.application.routes.draw do - - mount EngineProject::Engine => "/engine_project" -end diff --git a/test/fixtures/engine_project/test/dummy/lib/assets/.keep b/test/fixtures/engine_project/test/dummy/lib/assets/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/test/fixtures/engine_project/test/dummy/log/.keep b/test/fixtures/engine_project/test/dummy/log/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/test/fixtures/engine_project/test/dummy/public/404.html b/test/fixtures/engine_project/test/dummy/public/404.html deleted file mode 100644 index 3d875c3..0000000 --- a/test/fixtures/engine_project/test/dummy/public/404.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - The page you were looking for doesn't exist (404) - - - - - -
-

The page you were looking for doesn't exist.

-

You may have mistyped the address or the page may have moved.

-
-

If you are the application owner check the logs for more information.

- - diff --git a/test/fixtures/engine_project/test/dummy/public/422.html b/test/fixtures/engine_project/test/dummy/public/422.html deleted file mode 100644 index 3f1bfb3..0000000 --- a/test/fixtures/engine_project/test/dummy/public/422.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - The change you wanted was rejected (422) - - - - - -
-

The change you wanted was rejected.

-

Maybe you tried to change something you didn't have access to.

-
- - diff --git a/test/fixtures/engine_project/test/dummy/public/500.html b/test/fixtures/engine_project/test/dummy/public/500.html deleted file mode 100644 index 012977d..0000000 --- a/test/fixtures/engine_project/test/dummy/public/500.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - We're sorry, but something went wrong (500) - - - - - -
-

We're sorry, but something went wrong.

-
-

If you are the application owner check the logs for more information.

- - diff --git a/test/fixtures/engine_project/test/dummy/public/favicon.ico b/test/fixtures/engine_project/test/dummy/public/favicon.ico deleted file mode 100644 index e69de29..0000000 diff --git a/test/fixtures/sass_project/.gitignore b/test/fixtures/sass_project/.gitignore deleted file mode 100644 index 923b697..0000000 --- a/test/fixtures/sass_project/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -.bundle -db/*.sqlite3 -log/*.log -tmp/ -.sass-cache/ diff --git a/test/fixtures/sass_project/Gemfile b/test/fixtures/sass_project/Gemfile deleted file mode 100644 index c965db0..0000000 --- a/test/fixtures/sass_project/Gemfile +++ /dev/null @@ -1,7 +0,0 @@ -source 'https://rubygems.org' - -gem 'rails', '>= 4.0.0.beta', '< 5.0' -gem 'sqlite3' - -# Asset template engines -gem 'sass-rails', path: File.expand_path('../../../..', __FILE__) diff --git a/test/fixtures/sass_project/README b/test/fixtures/sass_project/README deleted file mode 100644 index 7c36f23..0000000 --- a/test/fixtures/sass_project/README +++ /dev/null @@ -1,261 +0,0 @@ -== Welcome to Rails - -Rails is a web-application framework that includes everything needed to create -database-backed web applications according to the Model-View-Control pattern. - -This pattern splits the view (also called the presentation) into "dumb" -templates that are primarily responsible for inserting pre-built data in between -HTML tags. The model contains the "smart" domain objects (such as Account, -Product, Person, Post) that holds all the business logic and knows how to -persist themselves to a database. The controller handles the incoming requests -(such as Save New Account, Update Product, Show Post) by manipulating the model -and directing data to the view. - -In Rails, the model is handled by what's called an object-relational mapping -layer entitled Active Record. This layer allows you to present the data from -database rows as objects and embellish these data objects with business logic -methods. You can read more about Active Record in -link:files/vendor/rails/activerecord/README.html. - -The controller and view are handled by the Action Pack, which handles both -layers by its two parts: Action View and Action Controller. These two layers -are bundled in a single package due to their heavy interdependence. This is -unlike the relationship between the Active Record and Action Pack that is much -more separate. Each of these packages can be used independently outside of -Rails. You can read more about Action Pack in -link:files/vendor/rails/actionpack/README.html. - - -== Getting Started - -1. At the command prompt, create a new Rails application: - rails new myapp (where myapp is the application name) - -2. Change directory to myapp and start the web server: - cd myapp; rails server (run with --help for options) - -3. Go to http://localhost:3000/ and you'll see: - "Welcome aboard: You're riding Ruby on Rails!" - -4. Follow the guidelines to start developing your application. You can find -the following resources handy: - -* The Getting Started Guide: http://guides.rubyonrails.org/getting_started.html -* Ruby on Rails Tutorial Book: http://www.railstutorial.org/ - - -== Debugging Rails - -Sometimes your application goes wrong. Fortunately there are a lot of tools that -will help you debug it and get it back on the rails. - -First area to check is the application log files. Have "tail -f" commands -running on the server.log and development.log. Rails will automatically display -debugging and runtime information to these files. Debugging info will also be -shown in the browser on requests from 127.0.0.1. - -You can also log your own messages directly into the log file from your code -using the Ruby logger class from inside your controllers. Example: - - class WeblogController < ActionController::Base - def destroy - @weblog = Weblog.find(params[:id]) - @weblog.destroy - logger.info("#{Time.now} Destroyed Weblog ID ##{@weblog.id}!") - end - end - -The result will be a message in your log file along the lines of: - - Mon Oct 08 14:22:29 +1000 2007 Destroyed Weblog ID #1! - -More information on how to use the logger is at http://www.ruby-doc.org/core/ - -Also, Ruby documentation can be found at http://www.ruby-lang.org/. There are -several books available online as well: - -* Programming Ruby: http://www.ruby-doc.org/docs/ProgrammingRuby/ (Pickaxe) -* Learn to Program: http://pine.fm/LearnToProgram/ (a beginners guide) - -These two books will bring you up to speed on the Ruby language and also on -programming in general. - - -== Debugger - -Debugger support is available through the debugger command when you start your -Mongrel or WEBrick server with --debugger. This means that you can break out of -execution at any point in the code, investigate and change the model, and then, -resume execution! You need to install ruby-debug to run the server in debugging -mode. With gems, use sudo gem install ruby-debug. Example: - - class WeblogController < ActionController::Base - def index - @posts = Post.all - debugger - end - end - -So the controller will accept the action, run the first line, then present you -with a IRB prompt in the server window. Here you can do things like: - - >> @posts.inspect - => "[#nil, "body"=>nil, "id"=>"1"}>, - #"Rails", "body"=>"Only ten..", "id"=>"2"}>]" - >> @posts.first.title = "hello from a debugger" - => "hello from a debugger" - -...and even better, you can examine how your runtime objects actually work: - - >> f = @posts.first - => #nil, "body"=>nil, "id"=>"1"}> - >> f. - Display all 152 possibilities? (y or n) - -Finally, when you're ready to resume execution, you can enter "cont". - - -== Console - -The console is a Ruby shell, which allows you to interact with your -application's domain model. Here you'll have all parts of the application -configured, just like it is when the application is running. You can inspect -domain models, change values, and save to the database. Starting the script -without arguments will launch it in the development environment. - -To start the console, run rails console from the application -directory. - -Options: - -* Passing the -s, --sandbox argument will rollback any modifications - made to the database. -* Passing an environment name as an argument will load the corresponding - environment. Example: rails console production. - -To reload your controllers and models after launching the console run -reload! - -More information about irb can be found at: -link:http://www.rubycentral.org/pickaxe/irb.html - - -== dbconsole - -You can go to the command line of your database directly through rails -dbconsole. You would be connected to the database with the credentials -defined in database.yml. Starting the script without arguments will connect you -to the development database. Passing an argument will connect you to a different -database, like rails dbconsole production. Currently works for MySQL, -PostgreSQL and SQLite 3. - -== Description of Contents - -The default directory structure of a generated Ruby on Rails application: - - |-- app - | |-- assets - | |-- images - | |-- javascripts - | `-- stylesheets - | |-- controllers - | |-- helpers - | |-- mailers - | |-- models - | `-- views - | `-- layouts - |-- config - | |-- environments - | |-- initializers - | `-- locales - |-- db - |-- doc - |-- lib - | `-- tasks - |-- log - |-- public - |-- script - |-- test - | |-- fixtures - | |-- functional - | |-- integration - | |-- performance - | `-- unit - |-- tmp - | |-- cache - | |-- pids - | |-- sessions - | `-- sockets - `-- vendor - |-- assets - `-- stylesheets - `-- plugins - -app - Holds all the code that's specific to this particular application. - -app/assets - Contains subdirectories for images, stylesheets, and JavaScript files. - -app/controllers - Holds controllers that should be named like weblogs_controller.rb for - automated URL mapping. All controllers should descend from - ApplicationController which itself descends from ActionController::Base. - -app/models - Holds models that should be named like post.rb. Models descend from - ActiveRecord::Base by default. - -app/views - Holds the template files for the view that should be named like - weblogs/index.html.erb for the WeblogsController#index action. All views use - eRuby syntax by default. - -app/views/layouts - Holds the template files for layouts to be used with views. This models the - common header/footer method of wrapping views. In your views, define a layout - using the layout :default and create a file named default.html.erb. - Inside default.html.erb, call <% yield %> to render the view using this - layout. - -app/helpers - Holds view helpers that should be named like weblogs_helper.rb. These are - generated for you automatically when using generators for controllers. - Helpers can be used to wrap functionality for your views into methods. - -config - Configuration files for the Rails environment, the routing map, the database, - and other dependencies. - -db - Contains the database schema in schema.rb. db/migrate contains all the - sequence of Migrations for your schema. - -doc - This directory is where your application documentation will be stored when - generated using rake doc:app - -lib - Application specific libraries. Basically, any kind of custom code that - doesn't belong under controllers, models, or helpers. This directory is in - the load path. - -public - The directory available for the web server. Also contains the dispatchers and the - default HTML files. This should be set as the DOCUMENT_ROOT of your web - server. - -script - Helper scripts for automation and generation. - -test - Unit and functional tests along with fixtures. When using the rails generate - command, template test files will be generated for you and placed in this - directory. - -vendor - External libraries that the application depends on. Also includes the plugins - subdirectory. If the app has frozen rails, those gems also go here, under - vendor/rails/. This directory is in the load path. diff --git a/test/fixtures/sass_project/Rakefile b/test/fixtures/sass_project/Rakefile deleted file mode 100644 index 1e86f6c..0000000 --- a/test/fixtures/sass_project/Rakefile +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env rake -# 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__) - -ScssProject::Application.load_tasks diff --git a/test/fixtures/sass_project/app/assets/config/manifest.js b/test/fixtures/sass_project/app/assets/config/manifest.js deleted file mode 100644 index b16e53d..0000000 --- a/test/fixtures/sass_project/app/assets/config/manifest.js +++ /dev/null @@ -1,3 +0,0 @@ -//= link_tree ../images -//= link_directory ../javascripts .js -//= link_directory ../stylesheets .css diff --git a/test/fixtures/sass_project/app/assets/images/rails.png b/test/fixtures/sass_project/app/assets/images/rails.png deleted file mode 100644 index d5edc04..0000000 Binary files a/test/fixtures/sass_project/app/assets/images/rails.png and /dev/null differ diff --git a/test/fixtures/sass_project/app/assets/javascripts/application.js b/test/fixtures/sass_project/app/assets/javascripts/application.js deleted file mode 100644 index 37c7bfc..0000000 --- a/test/fixtures/sass_project/app/assets/javascripts/application.js +++ /dev/null @@ -1,9 +0,0 @@ -// This is a manifest file that'll be compiled into including all the files listed below. -// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically -// be included in the compiled file accessible from http://example.com/assets/application.js -// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the -// the compiled file. -// -//= require jquery -//= require jquery_ujs -//= require_tree . diff --git a/test/fixtures/sass_project/app/assets/stylesheets/application.css b/test/fixtures/sass_project/app/assets/stylesheets/application.css deleted file mode 100644 index fc25b57..0000000 --- a/test/fixtures/sass_project/app/assets/stylesheets/application.css +++ /dev/null @@ -1,7 +0,0 @@ -/* - * This is a manifest file that'll automatically include all the stylesheets available in this directory - * and any sub-directories. You're free to add application-wide styles to this file and they'll appear at - * the top of the compiled file, but it's generally better to create a new file per style scope. - *= require_self - *= require_tree . -*/ \ No newline at end of file diff --git a/test/fixtures/sass_project/app/controllers/application_controller.rb b/test/fixtures/sass_project/app/controllers/application_controller.rb deleted file mode 100644 index e8065d9..0000000 --- a/test/fixtures/sass_project/app/controllers/application_controller.rb +++ /dev/null @@ -1,3 +0,0 @@ -class ApplicationController < ActionController::Base - protect_from_forgery -end diff --git a/test/fixtures/sass_project/app/helpers/application_helper.rb b/test/fixtures/sass_project/app/helpers/application_helper.rb deleted file mode 100644 index de6be79..0000000 --- a/test/fixtures/sass_project/app/helpers/application_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module ApplicationHelper -end diff --git a/test/fixtures/sass_project/app/mailers/.gitkeep b/test/fixtures/sass_project/app/mailers/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/test/fixtures/sass_project/app/models/.gitkeep b/test/fixtures/sass_project/app/models/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/test/fixtures/sass_project/app/views/layouts/application.html.erb b/test/fixtures/sass_project/app/views/layouts/application.html.erb deleted file mode 100644 index 3321f10..0000000 --- a/test/fixtures/sass_project/app/views/layouts/application.html.erb +++ /dev/null @@ -1,14 +0,0 @@ - - - - ScssProject - <%= stylesheet_link_tag "application" %> - <%= javascript_include_tag "application" %> - <%= csrf_meta_tags %> - - - -<%= yield %> - - - diff --git a/test/fixtures/sass_project/config.ru b/test/fixtures/sass_project/config.ru deleted file mode 100644 index b3a1bea..0000000 --- a/test/fixtures/sass_project/config.ru +++ /dev/null @@ -1,4 +0,0 @@ -# This file is used by Rack-based servers to start the application. - -require ::File.expand_path('../config/environment', __FILE__) -run ScssProject::Application diff --git a/test/fixtures/sass_project/config/application.rb b/test/fixtures/sass_project/config/application.rb deleted file mode 100644 index ba55c8c..0000000 --- a/test/fixtures/sass_project/config/application.rb +++ /dev/null @@ -1,52 +0,0 @@ -require File.expand_path('../boot', __FILE__) - -require 'rails/all' - -# If you have a Gemfile, require the gems listed there, including any gems -# you've limited to :test, :development, or :production. -Bundler.require(:default, Rails.env) if defined?(Bundler) - -module ScssProject - class Application < Rails::Application - # Settings in config/environments/* take precedence over those specified here. - # Application configuration should go into files in config/initializers - # -- all .rb files in that directory are automatically loaded. - - # Custom directories with classes and modules you want to be autoloadable. - # config.autoload_paths += %W(#{config.root}/extras) - - # Only load the plugins named here, in the order given (default is alphabetical). - # :all can be used as a placeholder for all plugins not explicitly named. - # config.plugins = [ :exception_notification, :ssl_requirement, :all ] - - # Activate observers that should always be running. - # config.active_record.observers = :cacher, :garbage_collector, :forum_observer - - # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. - # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. - # config.time_zone = 'Central Time (US & Canada)' - - # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. - # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] - # config.i18n.default_locale = :de - - # Please note that JavaScript expansions are *ignored altogether* if the asset - # pipeline is enabled (see config.assets.enabled below). Put your defaults in - # app/assets/javascripts/application.js in that case. - # - # JavaScript files you want as :defaults (application.js is always included). - # config.action_view.javascript_expansions[:defaults] = %w(prototype prototype_ujs) - - # Configure the default encoding used in templates for Ruby 1.9. - config.encoding = "utf-8" - - # Configure sensitive parameters which will be filtered from the log file. - config.filter_parameters += [:password] - - # Enable the asset pipeline - config.assets.enabled = true - - # Prefer sass for generated assets. - config.sass.preferred_syntax = :sass - end -end diff --git a/test/fixtures/sass_project/config/boot.rb b/test/fixtures/sass_project/config/boot.rb deleted file mode 100644 index 4489e58..0000000 --- a/test/fixtures/sass_project/config/boot.rb +++ /dev/null @@ -1,6 +0,0 @@ -require 'rubygems' - -# Set up gems listed in the Gemfile. -ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) - -require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE']) diff --git a/test/fixtures/sass_project/config/database.yml b/test/fixtures/sass_project/config/database.yml deleted file mode 100644 index 51a4dd4..0000000 --- a/test/fixtures/sass_project/config/database.yml +++ /dev/null @@ -1,25 +0,0 @@ -# SQLite version 3.x -# gem install sqlite3 -# -# Ensure the SQLite 3 gem is defined in your Gemfile -# gem 'sqlite3' -development: - adapter: sqlite3 - database: db/development.sqlite3 - pool: 5 - timeout: 5000 - -# Warning: The database defined as "test" will be erased and -# re-generated from your development database when you run "rake". -# Do not set this db to the same as development or production. -test: - adapter: sqlite3 - database: db/test.sqlite3 - pool: 5 - timeout: 5000 - -production: - adapter: sqlite3 - database: db/production.sqlite3 - pool: 5 - timeout: 5000 diff --git a/test/fixtures/sass_project/config/environment.rb b/test/fixtures/sass_project/config/environment.rb deleted file mode 100644 index b9db43a..0000000 --- a/test/fixtures/sass_project/config/environment.rb +++ /dev/null @@ -1,5 +0,0 @@ -# Load the rails application -require File.expand_path('../application', __FILE__) - -# Initialize the rails application -ScssProject::Application.initialize! diff --git a/test/fixtures/sass_project/config/environments/development.rb b/test/fixtures/sass_project/config/environments/development.rb deleted file mode 100644 index 91a278c..0000000 --- a/test/fixtures/sass_project/config/environments/development.rb +++ /dev/null @@ -1,24 +0,0 @@ -ScssProject::Application.configure do - # Settings specified here will take precedence over those in config/application.rb - - # In the development environment your application's code is reloaded on - # every request. This slows down response time but is perfect for development - # since you don't have to restart the web server when you make code changes. - config.cache_classes = false - - # Do not eager load code on boot. - config.eager_load = false - - # Show full error reports and disable caching - config.consider_all_requests_local = true - config.action_controller.perform_caching = false - - # Don't care if the mailer can't send - config.action_mailer.raise_delivery_errors = false - - # Print deprecation notices to the Rails logger - config.active_support.deprecation = :log - - # Only use best-standards-support built into browsers - config.action_dispatch.best_standards_support = :builtin -end diff --git a/test/fixtures/sass_project/config/environments/production.rb b/test/fixtures/sass_project/config/environments/production.rb deleted file mode 100644 index 23b85a3..0000000 --- a/test/fixtures/sass_project/config/environments/production.rb +++ /dev/null @@ -1,60 +0,0 @@ -ScssProject::Application.configure do - # Settings specified here will take precedence over those in config/application.rb - - # Code is not reloaded between requests - config.cache_classes = true - - # Eager load code on boot. - config.eager_load = true - - # Full error reports are disabled and caching is turned on - config.consider_all_requests_local = false - config.action_controller.perform_caching = true - - # Disable Rails's static asset server (Apache or nginx will already do this) - if config.respond_to?(:public_file_server) - config.public_file_server.enabled = false - elsif config.respond_to?(:serve_static_files) - config.serve_static_files = false - else - config.serve_static_assets = false - end - - # Specify the default JavaScript compressor - config.assets.js_compressor = :uglifier - - # Specifies the header that your server uses for sending files - # (comment out if your front-end server doesn't support this) - config.action_dispatch.x_sendfile_header = "X-Sendfile" # Use 'X-Accel-Redirect' for nginx - - # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. - # config.force_ssl = true - - # See everything in the log (default is :info) - config.log_level = :info - - # Use a different logger for distributed setups - # config.logger = SyslogLogger.new - - # Use a different cache store in production - # config.cache_store = :mem_cache_store - - # Enable serving of images, stylesheets, and JavaScripts from an asset server - # config.action_controller.asset_host = "http://assets.example.com" - - # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added) - # config.assets.precompile += %w( search.js ) - - # Disable delivery errors, bad email addresses will be ignored - # config.action_mailer.raise_delivery_errors = false - - # Enable threaded mode - # config.threadsafe! - - # Enable locale fallbacks for I18n (makes lookups for any locale fall back to - # the I18n.default_locale when a translation can not be found) - config.i18n.fallbacks = true - - # Send deprecation notices to registered listeners - config.active_support.deprecation = :notify -end diff --git a/test/fixtures/sass_project/config/environments/test.rb b/test/fixtures/sass_project/config/environments/test.rb deleted file mode 100644 index f6ae4a6..0000000 --- a/test/fixtures/sass_project/config/environments/test.rb +++ /dev/null @@ -1,50 +0,0 @@ -ScssProject::Application.configure do - # Settings specified here will take precedence over those in config/application.rb - - # The test environment is used exclusively to run your application's - # test suite. You never need to work with it otherwise. Remember that - # your test database is "scratch space" for the test suite and is wiped - # and recreated between test runs. Don't rely on the data there! - config.cache_classes = true - - # Do not eager load code on boot. - config.eager_load = false - - # Configure static asset server for tests with Cache-Control for performance - if config.respond_to?(:public_file_server) - config.public_file_server.enabled = true - elsif config.respond_to?(:serve_static_files) - config.serve_static_files = true - else - config.serve_static_assets = true - end - - if config.respond_to?(:public_file_server) - config.public_file_server.headers = { 'Cache-Control' => 'public, max-age=3600' } - else - config.static_cache_control = "public, max-age=3600" - end - - # Show full error reports and disable caching - config.consider_all_requests_local = true - config.action_controller.perform_caching = false - - # Raise exceptions instead of rendering exception templates - config.action_dispatch.show_exceptions = false - - # Disable request forgery protection in test environment - config.action_controller.allow_forgery_protection = false - - # Tell Action Mailer not to deliver emails to the real world. - # The :test delivery method accumulates sent emails in the - # ActionMailer::Base.deliveries array. - config.action_mailer.delivery_method = :test - - # Use SQL instead of Active Record's schema dumper when creating the test database. - # This is necessary if your schema can't be completely dumped by the schema dumper, - # like if you have constraints or database-specific column types - # config.active_record.schema_format = :sql - - # Print deprecation notices to the stderr - config.active_support.deprecation = :stderr -end diff --git a/test/fixtures/sass_project/config/initializers/backtrace_silencers.rb b/test/fixtures/sass_project/config/initializers/backtrace_silencers.rb deleted file mode 100644 index 59385cd..0000000 --- a/test/fixtures/sass_project/config/initializers/backtrace_silencers.rb +++ /dev/null @@ -1,7 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. -# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } - -# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. -# Rails.backtrace_cleaner.remove_silencers! diff --git a/test/fixtures/sass_project/config/initializers/inflections.rb b/test/fixtures/sass_project/config/initializers/inflections.rb deleted file mode 100644 index 9e8b013..0000000 --- a/test/fixtures/sass_project/config/initializers/inflections.rb +++ /dev/null @@ -1,10 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Add new inflection rules using the following format -# (all these examples are active by default): -# ActiveSupport::Inflector.inflections do |inflect| -# inflect.plural /^(ox)$/i, '\1en' -# inflect.singular /^(ox)en/i, '\1' -# inflect.irregular 'person', 'people' -# inflect.uncountable %w( fish sheep ) -# end diff --git a/test/fixtures/sass_project/config/initializers/mime_types.rb b/test/fixtures/sass_project/config/initializers/mime_types.rb deleted file mode 100644 index 72aca7e..0000000 --- a/test/fixtures/sass_project/config/initializers/mime_types.rb +++ /dev/null @@ -1,5 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Add new mime types for use in respond_to blocks: -# Mime::Type.register "text/richtext", :rtf -# Mime::Type.register_alias "text/html", :iphone diff --git a/test/fixtures/sass_project/config/initializers/secret_token.rb b/test/fixtures/sass_project/config/initializers/secret_token.rb deleted file mode 100644 index e8888a2..0000000 --- a/test/fixtures/sass_project/config/initializers/secret_token.rb +++ /dev/null @@ -1,7 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Your secret key for verifying the integrity of signed cookies. -# If you change this key, all old signed cookies will become invalid! -# Make sure the secret is at least 30 characters and all random, -# no regular words or you'll be exposed to dictionary attacks. -ScssProject::Application.config.secret_token = 'aad80c771c1b2b13b67b0b2d03ee3fa8a1d5a8e8dce2e8bc8b382f197927b789afdc9355f8bc7256faf650015d75d8eb541e9ab96a88f0bd63c4bd7552174849' diff --git a/test/fixtures/sass_project/config/initializers/session_store.rb b/test/fixtures/sass_project/config/initializers/session_store.rb deleted file mode 100644 index 0a955a5..0000000 --- a/test/fixtures/sass_project/config/initializers/session_store.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Be sure to restart your server when you modify this file. - -ScssProject::Application.config.session_store :cookie_store, :key => '_scss_project_session' - -# Use the database for sessions instead of the cookie-based default, -# which shouldn't be used to store highly confidential information -# (create the session table with "rails generate session_migration") -# ScssProject::Application.config.session_store :active_record_store diff --git a/test/fixtures/sass_project/config/initializers/wrap_parameters.rb b/test/fixtures/sass_project/config/initializers/wrap_parameters.rb deleted file mode 100644 index 32ffbee..0000000 --- a/test/fixtures/sass_project/config/initializers/wrap_parameters.rb +++ /dev/null @@ -1,12 +0,0 @@ -# Be sure to restart your server when you modify this file. -# -# This file contains the settings for ActionController::ParametersWrapper -# which will be enabled by default in the upcoming version of Ruby on Rails. - -# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. -ActionController::Base.wrap_parameters :format => [:json] - -# Disable root element in JSON by default. -if defined?(ActiveRecord) - ActiveRecord::Base.include_root_in_json = false -end diff --git a/test/fixtures/sass_project/config/locales/en.yml b/test/fixtures/sass_project/config/locales/en.yml deleted file mode 100644 index 179c14c..0000000 --- a/test/fixtures/sass_project/config/locales/en.yml +++ /dev/null @@ -1,5 +0,0 @@ -# Sample localization file for English. Add more files in this directory for other locales. -# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. - -en: - hello: "Hello world" diff --git a/test/fixtures/sass_project/config/routes.rb b/test/fixtures/sass_project/config/routes.rb deleted file mode 100644 index 4e737ff..0000000 --- a/test/fixtures/sass_project/config/routes.rb +++ /dev/null @@ -1,58 +0,0 @@ -ScssProject::Application.routes.draw do - # The priority is based upon order of creation: - # first created -> highest priority. - - # Sample of regular route: - # match 'products/:id' => 'catalog#view' - # Keep in mind you can assign values other than :controller and :action - - # Sample of named route: - # match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase - # This route can be invoked with purchase_url(:id => product.id) - - # Sample resource route (maps HTTP verbs to controller actions automatically): - # resources :products - - # Sample resource route with options: - # resources :products do - # member do - # get 'short' - # post 'toggle' - # end - # - # collection do - # get 'sold' - # end - # end - - # Sample resource route with sub-resources: - # resources :products do - # resources :comments, :sales - # resource :seller - # end - - # Sample resource route with more complex sub-resources - # resources :products do - # resources :comments - # resources :sales do - # get 'recent', :on => :collection - # end - # end - - # Sample resource route within a namespace: - # namespace :admin do - # # Directs /admin/products/* to Admin::ProductsController - # # (app/controllers/admin/products_controller.rb) - # resources :products - # end - - # You can have the root of your site routed with "root" - # just remember to delete public/index.html. - # root :to => 'welcome#index' - - # See how all your routes lay out with "rake routes" - - # This is a legacy wild controller route that's not recommended for RESTful applications. - # Note: This route will make all actions in every controller accessible via GET requests. - # match ':controller(/:action(/:id(.:format)))' -end diff --git a/test/fixtures/sass_project/db/seeds.rb b/test/fixtures/sass_project/db/seeds.rb deleted file mode 100644 index 4edb1e8..0000000 --- a/test/fixtures/sass_project/db/seeds.rb +++ /dev/null @@ -1,7 +0,0 @@ -# This file should contain all the record creation needed to seed the database with its default values. -# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup). -# -# Examples: -# -# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }]) -# Mayor.create(name: 'Emanuel', city: cities.first) diff --git a/test/fixtures/sass_project/doc/README_FOR_APP b/test/fixtures/sass_project/doc/README_FOR_APP deleted file mode 100644 index fe41f5c..0000000 --- a/test/fixtures/sass_project/doc/README_FOR_APP +++ /dev/null @@ -1,2 +0,0 @@ -Use this README file to introduce your application and point to useful places in the API for learning more. -Run "rake doc:app" to generate API documentation for your models, controllers, helpers, and libraries. diff --git a/test/fixtures/sass_project/lib/tasks/.gitkeep b/test/fixtures/sass_project/lib/tasks/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/test/fixtures/sass_project/log/.gitkeep b/test/fixtures/sass_project/log/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/test/fixtures/sass_project/public/404.html b/test/fixtures/sass_project/public/404.html deleted file mode 100644 index 9a48320..0000000 --- a/test/fixtures/sass_project/public/404.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - The page you were looking for doesn't exist (404) - - - - - -
-

The page you were looking for doesn't exist.

-

You may have mistyped the address or the page may have moved.

-
- - diff --git a/test/fixtures/sass_project/public/422.html b/test/fixtures/sass_project/public/422.html deleted file mode 100644 index 83660ab..0000000 --- a/test/fixtures/sass_project/public/422.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - The change you wanted was rejected (422) - - - - - -
-

The change you wanted was rejected.

-

Maybe you tried to change something you didn't have access to.

-
- - diff --git a/test/fixtures/sass_project/public/500.html b/test/fixtures/sass_project/public/500.html deleted file mode 100644 index b80307f..0000000 --- a/test/fixtures/sass_project/public/500.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - We're sorry, but something went wrong (500) - - - - - -
-

We're sorry, but something went wrong.

-

We've been notified about this issue and we'll take a look at it shortly.

-
- - diff --git a/test/fixtures/sass_project/public/favicon.ico b/test/fixtures/sass_project/public/favicon.ico deleted file mode 100644 index e69de29..0000000 diff --git a/test/fixtures/sass_project/public/index.html b/test/fixtures/sass_project/public/index.html deleted file mode 100644 index 9d9811a..0000000 --- a/test/fixtures/sass_project/public/index.html +++ /dev/null @@ -1,241 +0,0 @@ - - - - Ruby on Rails: Welcome aboard - - - - -
- - -
- - - - -
-

Getting started

-

Here’s how to get rolling:

- -
    -
  1. -

    Use rails generate to create your models and controllers

    -

    To see all available options, run it without parameters.

    -
  2. - -
  3. -

    Set up a default route and remove public/index.html

    -

    Routes are set up in config/routes.rb.

    -
  4. - -
  5. -

    Create your database

    -

    Run rake db:create to create your database. If you're not using SQLite (the default), edit config/database.yml with your username and password.

    -
  6. -
-
-
- - -
- - diff --git a/test/fixtures/sass_project/public/robots.txt b/test/fixtures/sass_project/public/robots.txt deleted file mode 100644 index 085187f..0000000 --- a/test/fixtures/sass_project/public/robots.txt +++ /dev/null @@ -1,5 +0,0 @@ -# See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file -# -# To ban all spiders from the entire site uncomment the next two lines: -# User-Agent: * -# Disallow: / diff --git a/test/fixtures/sass_project/script/rails b/test/fixtures/sass_project/script/rails deleted file mode 100755 index f8da2cf..0000000 --- a/test/fixtures/sass_project/script/rails +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env ruby -# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application. - -APP_PATH = File.expand_path('../../config/application', __FILE__) -require File.expand_path('../../config/boot', __FILE__) -require 'rails/commands' diff --git a/test/fixtures/sass_project/vendor/assets/stylesheets/.gitkeep b/test/fixtures/sass_project/vendor/assets/stylesheets/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/test/fixtures/sass_project/vendor/plugins/.gitkeep b/test/fixtures/sass_project/vendor/plugins/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/test/fixtures/scss_project/.gitignore b/test/fixtures/scss_project/.gitignore deleted file mode 100644 index 923b697..0000000 --- a/test/fixtures/scss_project/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -.bundle -db/*.sqlite3 -log/*.log -tmp/ -.sass-cache/ diff --git a/test/fixtures/scss_project/Gemfile b/test/fixtures/scss_project/Gemfile deleted file mode 100644 index c965db0..0000000 --- a/test/fixtures/scss_project/Gemfile +++ /dev/null @@ -1,7 +0,0 @@ -source 'https://rubygems.org' - -gem 'rails', '>= 4.0.0.beta', '< 5.0' -gem 'sqlite3' - -# Asset template engines -gem 'sass-rails', path: File.expand_path('../../../..', __FILE__) diff --git a/test/fixtures/scss_project/README b/test/fixtures/scss_project/README deleted file mode 100644 index 7c36f23..0000000 --- a/test/fixtures/scss_project/README +++ /dev/null @@ -1,261 +0,0 @@ -== Welcome to Rails - -Rails is a web-application framework that includes everything needed to create -database-backed web applications according to the Model-View-Control pattern. - -This pattern splits the view (also called the presentation) into "dumb" -templates that are primarily responsible for inserting pre-built data in between -HTML tags. The model contains the "smart" domain objects (such as Account, -Product, Person, Post) that holds all the business logic and knows how to -persist themselves to a database. The controller handles the incoming requests -(such as Save New Account, Update Product, Show Post) by manipulating the model -and directing data to the view. - -In Rails, the model is handled by what's called an object-relational mapping -layer entitled Active Record. This layer allows you to present the data from -database rows as objects and embellish these data objects with business logic -methods. You can read more about Active Record in -link:files/vendor/rails/activerecord/README.html. - -The controller and view are handled by the Action Pack, which handles both -layers by its two parts: Action View and Action Controller. These two layers -are bundled in a single package due to their heavy interdependence. This is -unlike the relationship between the Active Record and Action Pack that is much -more separate. Each of these packages can be used independently outside of -Rails. You can read more about Action Pack in -link:files/vendor/rails/actionpack/README.html. - - -== Getting Started - -1. At the command prompt, create a new Rails application: - rails new myapp (where myapp is the application name) - -2. Change directory to myapp and start the web server: - cd myapp; rails server (run with --help for options) - -3. Go to http://localhost:3000/ and you'll see: - "Welcome aboard: You're riding Ruby on Rails!" - -4. Follow the guidelines to start developing your application. You can find -the following resources handy: - -* The Getting Started Guide: http://guides.rubyonrails.org/getting_started.html -* Ruby on Rails Tutorial Book: http://www.railstutorial.org/ - - -== Debugging Rails - -Sometimes your application goes wrong. Fortunately there are a lot of tools that -will help you debug it and get it back on the rails. - -First area to check is the application log files. Have "tail -f" commands -running on the server.log and development.log. Rails will automatically display -debugging and runtime information to these files. Debugging info will also be -shown in the browser on requests from 127.0.0.1. - -You can also log your own messages directly into the log file from your code -using the Ruby logger class from inside your controllers. Example: - - class WeblogController < ActionController::Base - def destroy - @weblog = Weblog.find(params[:id]) - @weblog.destroy - logger.info("#{Time.now} Destroyed Weblog ID ##{@weblog.id}!") - end - end - -The result will be a message in your log file along the lines of: - - Mon Oct 08 14:22:29 +1000 2007 Destroyed Weblog ID #1! - -More information on how to use the logger is at http://www.ruby-doc.org/core/ - -Also, Ruby documentation can be found at http://www.ruby-lang.org/. There are -several books available online as well: - -* Programming Ruby: http://www.ruby-doc.org/docs/ProgrammingRuby/ (Pickaxe) -* Learn to Program: http://pine.fm/LearnToProgram/ (a beginners guide) - -These two books will bring you up to speed on the Ruby language and also on -programming in general. - - -== Debugger - -Debugger support is available through the debugger command when you start your -Mongrel or WEBrick server with --debugger. This means that you can break out of -execution at any point in the code, investigate and change the model, and then, -resume execution! You need to install ruby-debug to run the server in debugging -mode. With gems, use sudo gem install ruby-debug. Example: - - class WeblogController < ActionController::Base - def index - @posts = Post.all - debugger - end - end - -So the controller will accept the action, run the first line, then present you -with a IRB prompt in the server window. Here you can do things like: - - >> @posts.inspect - => "[#nil, "body"=>nil, "id"=>"1"}>, - #"Rails", "body"=>"Only ten..", "id"=>"2"}>]" - >> @posts.first.title = "hello from a debugger" - => "hello from a debugger" - -...and even better, you can examine how your runtime objects actually work: - - >> f = @posts.first - => #nil, "body"=>nil, "id"=>"1"}> - >> f. - Display all 152 possibilities? (y or n) - -Finally, when you're ready to resume execution, you can enter "cont". - - -== Console - -The console is a Ruby shell, which allows you to interact with your -application's domain model. Here you'll have all parts of the application -configured, just like it is when the application is running. You can inspect -domain models, change values, and save to the database. Starting the script -without arguments will launch it in the development environment. - -To start the console, run rails console from the application -directory. - -Options: - -* Passing the -s, --sandbox argument will rollback any modifications - made to the database. -* Passing an environment name as an argument will load the corresponding - environment. Example: rails console production. - -To reload your controllers and models after launching the console run -reload! - -More information about irb can be found at: -link:http://www.rubycentral.org/pickaxe/irb.html - - -== dbconsole - -You can go to the command line of your database directly through rails -dbconsole. You would be connected to the database with the credentials -defined in database.yml. Starting the script without arguments will connect you -to the development database. Passing an argument will connect you to a different -database, like rails dbconsole production. Currently works for MySQL, -PostgreSQL and SQLite 3. - -== Description of Contents - -The default directory structure of a generated Ruby on Rails application: - - |-- app - | |-- assets - | |-- images - | |-- javascripts - | `-- stylesheets - | |-- controllers - | |-- helpers - | |-- mailers - | |-- models - | `-- views - | `-- layouts - |-- config - | |-- environments - | |-- initializers - | `-- locales - |-- db - |-- doc - |-- lib - | `-- tasks - |-- log - |-- public - |-- script - |-- test - | |-- fixtures - | |-- functional - | |-- integration - | |-- performance - | `-- unit - |-- tmp - | |-- cache - | |-- pids - | |-- sessions - | `-- sockets - `-- vendor - |-- assets - `-- stylesheets - `-- plugins - -app - Holds all the code that's specific to this particular application. - -app/assets - Contains subdirectories for images, stylesheets, and JavaScript files. - -app/controllers - Holds controllers that should be named like weblogs_controller.rb for - automated URL mapping. All controllers should descend from - ApplicationController which itself descends from ActionController::Base. - -app/models - Holds models that should be named like post.rb. Models descend from - ActiveRecord::Base by default. - -app/views - Holds the template files for the view that should be named like - weblogs/index.html.erb for the WeblogsController#index action. All views use - eRuby syntax by default. - -app/views/layouts - Holds the template files for layouts to be used with views. This models the - common header/footer method of wrapping views. In your views, define a layout - using the layout :default and create a file named default.html.erb. - Inside default.html.erb, call <% yield %> to render the view using this - layout. - -app/helpers - Holds view helpers that should be named like weblogs_helper.rb. These are - generated for you automatically when using generators for controllers. - Helpers can be used to wrap functionality for your views into methods. - -config - Configuration files for the Rails environment, the routing map, the database, - and other dependencies. - -db - Contains the database schema in schema.rb. db/migrate contains all the - sequence of Migrations for your schema. - -doc - This directory is where your application documentation will be stored when - generated using rake doc:app - -lib - Application specific libraries. Basically, any kind of custom code that - doesn't belong under controllers, models, or helpers. This directory is in - the load path. - -public - The directory available for the web server. Also contains the dispatchers and the - default HTML files. This should be set as the DOCUMENT_ROOT of your web - server. - -script - Helper scripts for automation and generation. - -test - Unit and functional tests along with fixtures. When using the rails generate - command, template test files will be generated for you and placed in this - directory. - -vendor - External libraries that the application depends on. Also includes the plugins - subdirectory. If the app has frozen rails, those gems also go here, under - vendor/rails/. This directory is in the load path. diff --git a/test/fixtures/scss_project/Rakefile b/test/fixtures/scss_project/Rakefile deleted file mode 100644 index 1e86f6c..0000000 --- a/test/fixtures/scss_project/Rakefile +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env rake -# 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__) - -ScssProject::Application.load_tasks diff --git a/test/fixtures/scss_project/app/assets/config/manifest.js b/test/fixtures/scss_project/app/assets/config/manifest.js deleted file mode 100644 index b16e53d..0000000 --- a/test/fixtures/scss_project/app/assets/config/manifest.js +++ /dev/null @@ -1,3 +0,0 @@ -//= link_tree ../images -//= link_directory ../javascripts .js -//= link_directory ../stylesheets .css diff --git a/test/fixtures/scss_project/app/assets/images/1x1.png b/test/fixtures/scss_project/app/assets/images/1x1.png deleted file mode 100644 index 87b3165..0000000 Binary files a/test/fixtures/scss_project/app/assets/images/1x1.png and /dev/null differ diff --git a/test/fixtures/scss_project/app/assets/images/rails.png b/test/fixtures/scss_project/app/assets/images/rails.png deleted file mode 100644 index d5edc04..0000000 Binary files a/test/fixtures/scss_project/app/assets/images/rails.png and /dev/null differ diff --git a/test/fixtures/scss_project/app/assets/javascripts/application.js b/test/fixtures/scss_project/app/assets/javascripts/application.js deleted file mode 100644 index 37c7bfc..0000000 --- a/test/fixtures/scss_project/app/assets/javascripts/application.js +++ /dev/null @@ -1,9 +0,0 @@ -// This is a manifest file that'll be compiled into including all the files listed below. -// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically -// be included in the compiled file accessible from http://example.com/assets/application.js -// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the -// the compiled file. -// -//= require jquery -//= require jquery_ujs -//= require_tree . diff --git a/test/fixtures/scss_project/app/assets/stylesheets/_top_level_partial.scss b/test/fixtures/scss_project/app/assets/stylesheets/_top_level_partial.scss deleted file mode 100644 index c2d1fd0..0000000 --- a/test/fixtures/scss_project/app/assets/stylesheets/_top_level_partial.scss +++ /dev/null @@ -1,3 +0,0 @@ -.top-level { - font-color: bold; -} \ No newline at end of file diff --git a/test/fixtures/scss_project/app/assets/stylesheets/application.scss b/test/fixtures/scss_project/app/assets/stylesheets/application.scss deleted file mode 100644 index 6f0508e..0000000 --- a/test/fixtures/scss_project/app/assets/stylesheets/application.scss +++ /dev/null @@ -1,38 +0,0 @@ -@import "partials/css_sass_import"; -@import "partials/sass_import"; -@import "partials/scss_import"; -@import "globbed/**/*"; -@import "subfolder/plain"; -@import "subfolder/second_level"; -@import "partials/without_css_ext"; -@import "css_erb_handler"; -@import "scss_erb_handler"; -@import "sass_erb_handler"; -@import "css_scss_erb_handler"; -@import "css_sass_erb_handler"; - -.main { - color: yellow; - @include background-from-partial(red); -} - -.rails { - asset-path: asset-path("rails.png"); - asset-url: asset-url("rails.png"); - image-path: image-path("rails.png"); - image-url: image-url("rails.png"); - video-path: video-path("rails.mp4"); - video-url: video-url("rails.mp4"); - audio-path: audio-path("rails.mp3"); - audio-url: audio-url("rails.mp3"); - font-path: font-path("rails.ttf"); - font-url: font-url("rails.ttf"); - font-url-with-query-hash: font-url("rails.ttf?#iefix"); - javascript-path: javascript-path("rails.js"); - javascript-url: javascript-url("rails.js"); - stylesheet-path: stylesheet-path("rails.css"); - stylesheet-url: stylesheet-url("rails.css"); - asset-data-url: asset-data-url("1x1.png"); -} - -@include without-css-ext; diff --git a/test/fixtures/scss_project/app/assets/stylesheets/css_application.css b/test/fixtures/scss_project/app/assets/stylesheets/css_application.css deleted file mode 100644 index e54f821..0000000 --- a/test/fixtures/scss_project/app/assets/stylesheets/css_application.css +++ /dev/null @@ -1,11 +0,0 @@ -/* - *= require partials/_sass_import - *= require partials/_scss_import - *= require_tree ./globbed - *= require subfolder/plain - *= require subfolder/second_level - */ - - .css-application { - background: #fff; - } diff --git a/test/fixtures/scss_project/app/assets/stylesheets/css_erb_handler.css.erb b/test/fixtures/scss_project/app/assets/stylesheets/css_erb_handler.css.erb deleted file mode 100644 index 7ef2392..0000000 --- a/test/fixtures/scss_project/app/assets/stylesheets/css_erb_handler.css.erb +++ /dev/null @@ -1,3 +0,0 @@ -.css-erb-handler { - margin: <%= 0 %>; -} diff --git a/test/fixtures/scss_project/app/assets/stylesheets/css_sass_erb_handler.sass.erb b/test/fixtures/scss_project/app/assets/stylesheets/css_sass_erb_handler.sass.erb deleted file mode 100644 index c74d642..0000000 --- a/test/fixtures/scss_project/app/assets/stylesheets/css_sass_erb_handler.sass.erb +++ /dev/null @@ -1,2 +0,0 @@ -.css-sass-erb-handler - margin: <%= 0 %> diff --git a/test/fixtures/scss_project/app/assets/stylesheets/css_scss_erb_handler.scss.erb b/test/fixtures/scss_project/app/assets/stylesheets/css_scss_erb_handler.scss.erb deleted file mode 100644 index 3b97da8..0000000 --- a/test/fixtures/scss_project/app/assets/stylesheets/css_scss_erb_handler.scss.erb +++ /dev/null @@ -1,3 +0,0 @@ -.css-scss-erb-handler { - margin: <%= 0 %>; -} diff --git a/test/fixtures/scss_project/app/assets/stylesheets/globbed/globbed.scss b/test/fixtures/scss_project/app/assets/stylesheets/globbed/globbed.scss deleted file mode 100644 index 8b38cb5..0000000 --- a/test/fixtures/scss_project/app/assets/stylesheets/globbed/globbed.scss +++ /dev/null @@ -1,3 +0,0 @@ -.globbed { - color: green; -} diff --git a/test/fixtures/scss_project/app/assets/stylesheets/globbed/nested/nested_glob.scss b/test/fixtures/scss_project/app/assets/stylesheets/globbed/nested/nested_glob.scss deleted file mode 100644 index b890370..0000000 --- a/test/fixtures/scss_project/app/assets/stylesheets/globbed/nested/nested_glob.scss +++ /dev/null @@ -1,3 +0,0 @@ -.nested-glob { - color: blue; -} \ No newline at end of file diff --git a/test/fixtures/scss_project/app/assets/stylesheets/globbed/nested/nested_glob_erb.scss.erb b/test/fixtures/scss_project/app/assets/stylesheets/globbed/nested/nested_glob_erb.scss.erb deleted file mode 100644 index f289ddc..0000000 --- a/test/fixtures/scss_project/app/assets/stylesheets/globbed/nested/nested_glob_erb.scss.erb +++ /dev/null @@ -1,3 +0,0 @@ -.nested-glob-erb { - color: <%= 'blue' %>; -} diff --git a/test/fixtures/scss_project/app/assets/stylesheets/globbed/nested/nested_glob_erb_css_scss.css.scss.erb b/test/fixtures/scss_project/app/assets/stylesheets/globbed/nested/nested_glob_erb_css_scss.css.scss.erb deleted file mode 100644 index b7a1120..0000000 --- a/test/fixtures/scss_project/app/assets/stylesheets/globbed/nested/nested_glob_erb_css_scss.css.scss.erb +++ /dev/null @@ -1,3 +0,0 @@ -.nested-glob-erb-css-scss { - color: <%= 'blue' %>; -} diff --git a/test/fixtures/scss_project/app/assets/stylesheets/import_css_application.scss b/test/fixtures/scss_project/app/assets/stylesheets/import_css_application.scss deleted file mode 100644 index 6574c8d..0000000 --- a/test/fixtures/scss_project/app/assets/stylesheets/import_css_application.scss +++ /dev/null @@ -1,5 +0,0 @@ -@import "css_application"; - -.import-css-application { - background: #000; -} diff --git a/test/fixtures/scss_project/app/assets/stylesheets/partials/_css_sass_import.sass b/test/fixtures/scss_project/app/assets/stylesheets/partials/_css_sass_import.sass deleted file mode 100644 index 039ebdf..0000000 --- a/test/fixtures/scss_project/app/assets/stylesheets/partials/_css_sass_import.sass +++ /dev/null @@ -1,5 +0,0 @@ -.partial-css-sass - color: green - -@import "top_level_partial" -@import "subfolder/relative_scss" diff --git a/test/fixtures/scss_project/app/assets/stylesheets/partials/_sass_import.sass b/test/fixtures/scss_project/app/assets/stylesheets/partials/_sass_import.sass deleted file mode 100644 index 6cf5845..0000000 --- a/test/fixtures/scss_project/app/assets/stylesheets/partials/_sass_import.sass +++ /dev/null @@ -1,2 +0,0 @@ -.partial-sass - color: green diff --git a/test/fixtures/scss_project/app/assets/stylesheets/partials/_scss_import.scss b/test/fixtures/scss_project/app/assets/stylesheets/partials/_scss_import.scss deleted file mode 100644 index 781df05..0000000 --- a/test/fixtures/scss_project/app/assets/stylesheets/partials/_scss_import.scss +++ /dev/null @@ -1,9 +0,0 @@ -.partial-scss { - color: blue; } - -@mixin background-from-partial($color) { - background-color: $color -} - -@import "subfolder/relative_sass"; -@import "subfolder/relative_not_a_partial"; \ No newline at end of file diff --git a/test/fixtures/scss_project/app/assets/stylesheets/partials/_without_css_ext.scss b/test/fixtures/scss_project/app/assets/stylesheets/partials/_without_css_ext.scss deleted file mode 100644 index d6b7cdc..0000000 --- a/test/fixtures/scss_project/app/assets/stylesheets/partials/_without_css_ext.scss +++ /dev/null @@ -1,3 +0,0 @@ -@mixin without-css-ext { - .without-css-ext { should: work; } -} \ No newline at end of file diff --git a/test/fixtures/scss_project/app/assets/stylesheets/partials/subfolder/_relative_sass.sass b/test/fixtures/scss_project/app/assets/stylesheets/partials/subfolder/_relative_sass.sass deleted file mode 100644 index 86f665e..0000000 --- a/test/fixtures/scss_project/app/assets/stylesheets/partials/subfolder/_relative_sass.sass +++ /dev/null @@ -1,2 +0,0 @@ -.sub-folder-relative-sass - width: 50px \ No newline at end of file diff --git a/test/fixtures/scss_project/app/assets/stylesheets/partials/subfolder/_relative_scss.scss b/test/fixtures/scss_project/app/assets/stylesheets/partials/subfolder/_relative_scss.scss deleted file mode 100644 index dcf02a1..0000000 --- a/test/fixtures/scss_project/app/assets/stylesheets/partials/subfolder/_relative_scss.scss +++ /dev/null @@ -1,3 +0,0 @@ -.sub-folder-relative-scss { - width: 50px * 5; -} diff --git a/test/fixtures/scss_project/app/assets/stylesheets/partials/subfolder/relative_not_a_partial.scss b/test/fixtures/scss_project/app/assets/stylesheets/partials/subfolder/relative_not_a_partial.scss deleted file mode 100644 index cde8539..0000000 --- a/test/fixtures/scss_project/app/assets/stylesheets/partials/subfolder/relative_not_a_partial.scss +++ /dev/null @@ -1,3 +0,0 @@ -.not-a-partial { - border: 1px solid blue; -} \ No newline at end of file diff --git a/test/fixtures/scss_project/app/assets/stylesheets/sass_erb_handler.sass.erb b/test/fixtures/scss_project/app/assets/stylesheets/sass_erb_handler.sass.erb deleted file mode 100644 index 29ad71e..0000000 --- a/test/fixtures/scss_project/app/assets/stylesheets/sass_erb_handler.sass.erb +++ /dev/null @@ -1,2 +0,0 @@ -.sass-erb-handler - margin: <%= 0 %> diff --git a/test/fixtures/scss_project/app/assets/stylesheets/scss_erb_handler.scss.erb b/test/fixtures/scss_project/app/assets/stylesheets/scss_erb_handler.scss.erb deleted file mode 100644 index 48a840b..0000000 --- a/test/fixtures/scss_project/app/assets/stylesheets/scss_erb_handler.scss.erb +++ /dev/null @@ -1,3 +0,0 @@ -.scss-erb-handler { - margin: <%= 0 %>; -} diff --git a/test/fixtures/scss_project/app/assets/stylesheets/subfolder/_defaults.scss b/test/fixtures/scss_project/app/assets/stylesheets/subfolder/_defaults.scss deleted file mode 100644 index 8fe623f..0000000 --- a/test/fixtures/scss_project/app/assets/stylesheets/subfolder/_defaults.scss +++ /dev/null @@ -1,3 +0,0 @@ -.default-old-css { - margin: 0px; -} diff --git a/test/fixtures/scss_project/app/assets/stylesheets/subfolder/another_plain.css b/test/fixtures/scss_project/app/assets/stylesheets/subfolder/another_plain.css deleted file mode 100644 index 56fc16e..0000000 --- a/test/fixtures/scss_project/app/assets/stylesheets/subfolder/another_plain.css +++ /dev/null @@ -1,3 +0,0 @@ -.another-plain-old-css { - font-style: italic; -} diff --git a/test/fixtures/scss_project/app/assets/stylesheets/subfolder/plain.css b/test/fixtures/scss_project/app/assets/stylesheets/subfolder/plain.css deleted file mode 100644 index 8ba31d6..0000000 --- a/test/fixtures/scss_project/app/assets/stylesheets/subfolder/plain.css +++ /dev/null @@ -1,3 +0,0 @@ -.plain-old-css { - font-style: italic; -} \ No newline at end of file diff --git a/test/fixtures/scss_project/app/assets/stylesheets/subfolder/second_level.scss b/test/fixtures/scss_project/app/assets/stylesheets/subfolder/second_level.scss deleted file mode 100644 index 0ec9389..0000000 --- a/test/fixtures/scss_project/app/assets/stylesheets/subfolder/second_level.scss +++ /dev/null @@ -1,2 +0,0 @@ -@import "another_plain"; /* tests whether relative lookups of non-sass files works. */ -@import "defaults"; /* tests wheter relative lookups partials in the same directory. */ diff --git a/test/fixtures/scss_project/app/controllers/application_controller.rb b/test/fixtures/scss_project/app/controllers/application_controller.rb deleted file mode 100644 index e8065d9..0000000 --- a/test/fixtures/scss_project/app/controllers/application_controller.rb +++ /dev/null @@ -1,3 +0,0 @@ -class ApplicationController < ActionController::Base - protect_from_forgery -end diff --git a/test/fixtures/scss_project/app/helpers/application_helper.rb b/test/fixtures/scss_project/app/helpers/application_helper.rb deleted file mode 100644 index de6be79..0000000 --- a/test/fixtures/scss_project/app/helpers/application_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module ApplicationHelper -end diff --git a/test/fixtures/scss_project/app/mailers/.gitkeep b/test/fixtures/scss_project/app/mailers/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/test/fixtures/scss_project/app/models/.gitkeep b/test/fixtures/scss_project/app/models/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/test/fixtures/scss_project/app/views/layouts/application.html.erb b/test/fixtures/scss_project/app/views/layouts/application.html.erb deleted file mode 100644 index 3321f10..0000000 --- a/test/fixtures/scss_project/app/views/layouts/application.html.erb +++ /dev/null @@ -1,14 +0,0 @@ - - - - ScssProject - <%= stylesheet_link_tag "application" %> - <%= javascript_include_tag "application" %> - <%= csrf_meta_tags %> - - - -<%= yield %> - - - diff --git a/test/fixtures/scss_project/config.ru b/test/fixtures/scss_project/config.ru deleted file mode 100644 index b3a1bea..0000000 --- a/test/fixtures/scss_project/config.ru +++ /dev/null @@ -1,4 +0,0 @@ -# This file is used by Rack-based servers to start the application. - -require ::File.expand_path('../config/environment', __FILE__) -run ScssProject::Application diff --git a/test/fixtures/scss_project/config/application.rb b/test/fixtures/scss_project/config/application.rb deleted file mode 100644 index 9565048..0000000 --- a/test/fixtures/scss_project/config/application.rb +++ /dev/null @@ -1,49 +0,0 @@ -require File.expand_path('../boot', __FILE__) - -require 'rails/all' - -# If you have a Gemfile, require the gems listed there, including any gems -# you've limited to :test, :development, or :production. -Bundler.require(:default, Rails.env) if defined?(Bundler) - -module ScssProject - class Application < Rails::Application - # Settings in config/environments/* take precedence over those specified here. - # Application configuration should go into files in config/initializers - # -- all .rb files in that directory are automatically loaded. - - # Custom directories with classes and modules you want to be autoloadable. - # config.autoload_paths += %W(#{config.root}/extras) - - # Only load the plugins named here, in the order given (default is alphabetical). - # :all can be used as a placeholder for all plugins not explicitly named. - # config.plugins = [ :exception_notification, :ssl_requirement, :all ] - - # Activate observers that should always be running. - # config.active_record.observers = :cacher, :garbage_collector, :forum_observer - - # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. - # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. - # config.time_zone = 'Central Time (US & Canada)' - - # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. - # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] - # config.i18n.default_locale = :de - - # Please note that JavaScript expansions are *ignored altogether* if the asset - # pipeline is enabled (see config.assets.enabled below). Put your defaults in - # app/assets/javascripts/application.js in that case. - # - # JavaScript files you want as :defaults (application.js is always included). - # config.action_view.javascript_expansions[:defaults] = %w(prototype prototype_ujs) - - # Configure the default encoding used in templates for Ruby 1.9. - config.encoding = "utf-8" - - # Configure sensitive parameters which will be filtered from the log file. - config.filter_parameters += [:password] - - # Enable the asset pipeline - config.assets.enabled = true - end -end diff --git a/test/fixtures/scss_project/config/boot.rb b/test/fixtures/scss_project/config/boot.rb deleted file mode 100644 index 4489e58..0000000 --- a/test/fixtures/scss_project/config/boot.rb +++ /dev/null @@ -1,6 +0,0 @@ -require 'rubygems' - -# Set up gems listed in the Gemfile. -ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) - -require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE']) diff --git a/test/fixtures/scss_project/config/database.yml b/test/fixtures/scss_project/config/database.yml deleted file mode 100644 index 51a4dd4..0000000 --- a/test/fixtures/scss_project/config/database.yml +++ /dev/null @@ -1,25 +0,0 @@ -# SQLite version 3.x -# gem install sqlite3 -# -# Ensure the SQLite 3 gem is defined in your Gemfile -# gem 'sqlite3' -development: - adapter: sqlite3 - database: db/development.sqlite3 - pool: 5 - timeout: 5000 - -# Warning: The database defined as "test" will be erased and -# re-generated from your development database when you run "rake". -# Do not set this db to the same as development or production. -test: - adapter: sqlite3 - database: db/test.sqlite3 - pool: 5 - timeout: 5000 - -production: - adapter: sqlite3 - database: db/production.sqlite3 - pool: 5 - timeout: 5000 diff --git a/test/fixtures/scss_project/config/environment.rb b/test/fixtures/scss_project/config/environment.rb deleted file mode 100644 index b9db43a..0000000 --- a/test/fixtures/scss_project/config/environment.rb +++ /dev/null @@ -1,5 +0,0 @@ -# Load the rails application -require File.expand_path('../application', __FILE__) - -# Initialize the rails application -ScssProject::Application.initialize! diff --git a/test/fixtures/scss_project/config/environments/development.rb b/test/fixtures/scss_project/config/environments/development.rb deleted file mode 100644 index c53c95f..0000000 --- a/test/fixtures/scss_project/config/environments/development.rb +++ /dev/null @@ -1,23 +0,0 @@ -ScssProject::Application.configure do - # Settings specified here will take precedence over those in config/application.rb - - # In the development environment your application's code is reloaded on - # every request. This slows down response time but is perfect for development - # since you don't have to restart the web server when you make code changes. - config.cache_classes = false - - config.eager_load = false - - # Show full error reports and disable caching - config.consider_all_requests_local = true - config.action_controller.perform_caching = false - - # Don't care if the mailer can't send - config.action_mailer.raise_delivery_errors = false - - # Print deprecation notices to the Rails logger - config.active_support.deprecation = :log - - # Only use best-standards-support built into browsers - config.action_dispatch.best_standards_support = :builtin -end diff --git a/test/fixtures/scss_project/config/environments/production.rb b/test/fixtures/scss_project/config/environments/production.rb deleted file mode 100644 index a9066f1..0000000 --- a/test/fixtures/scss_project/config/environments/production.rb +++ /dev/null @@ -1,59 +0,0 @@ -ScssProject::Application.configure do - # Settings specified here will take precedence over those in config/application.rb - - # Code is not reloaded between requests - config.cache_classes = true - - config.eager_load = true - - # Full error reports are disabled and caching is turned on - config.consider_all_requests_local = false - config.action_controller.perform_caching = true - - # Disable Rails's static asset server (Apache or nginx will already do this) - if config.respond_to?(:public_file_server) - config.public_file_server.enabled = false - elsif config.respond_to?(:serve_static_files) - config.serve_static_files = false - else - config.serve_static_assets = false - end - - # Specify the default JavaScript compressor - config.assets.js_compressor = :uglifier - - # Specifies the header that your server uses for sending files - # (comment out if your front-end server doesn't support this) - config.action_dispatch.x_sendfile_header = "X-Sendfile" # Use 'X-Accel-Redirect' for nginx - - # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. - # config.force_ssl = true - - # See everything in the log (default is :info) - config.log_level = :info - - # Use a different logger for distributed setups - # config.logger = SyslogLogger.new - - # Use a different cache store in production - # config.cache_store = :mem_cache_store - - # Enable serving of images, stylesheets, and JavaScripts from an asset server - # config.action_controller.asset_host = "http://assets.example.com" - - # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added) - # config.assets.precompile += %w( search.js ) - - # Disable delivery errors, bad email addresses will be ignored - # config.action_mailer.raise_delivery_errors = false - - # Enable threaded mode - # config.threadsafe! - - # Enable locale fallbacks for I18n (makes lookups for any locale fall back to - # the I18n.default_locale when a translation can not be found) - config.i18n.fallbacks = true - - # Send deprecation notices to registered listeners - config.active_support.deprecation = :notify -end diff --git a/test/fixtures/scss_project/config/environments/test.rb b/test/fixtures/scss_project/config/environments/test.rb deleted file mode 100644 index ce3fc4b..0000000 --- a/test/fixtures/scss_project/config/environments/test.rb +++ /dev/null @@ -1,49 +0,0 @@ -ScssProject::Application.configure do - # Settings specified here will take precedence over those in config/application.rb - - # The test environment is used exclusively to run your application's - # test suite. You never need to work with it otherwise. Remember that - # your test database is "scratch space" for the test suite and is wiped - # and recreated between test runs. Don't rely on the data there! - config.cache_classes = true - - config.eager_load = false - - # Configure static asset server for tests with Cache-Control for performance - if config.respond_to?(:public_file_server) - config.public_file_server.enabled = true - elsif config.respond_to?(:serve_static_files) - config.serve_static_files = true - else - config.serve_static_assets = true - end - - if config.respond_to?(:public_file_server) - config.public_file_server.headers = { 'Cache-Control' => 'public, max-age=3600' } - else - config.static_cache_control = "public, max-age=3600" - end - - # Show full error reports and disable caching - config.consider_all_requests_local = true - config.action_controller.perform_caching = false - - # Raise exceptions instead of rendering exception templates - config.action_dispatch.show_exceptions = false - - # Disable request forgery protection in test environment - config.action_controller.allow_forgery_protection = false - - # Tell Action Mailer not to deliver emails to the real world. - # The :test delivery method accumulates sent emails in the - # ActionMailer::Base.deliveries array. - config.action_mailer.delivery_method = :test - - # Use SQL instead of Active Record's schema dumper when creating the test database. - # This is necessary if your schema can't be completely dumped by the schema dumper, - # like if you have constraints or database-specific column types - # config.active_record.schema_format = :sql - - # Print deprecation notices to the stderr - config.active_support.deprecation = :stderr -end diff --git a/test/fixtures/scss_project/config/initializers/backtrace_silencers.rb b/test/fixtures/scss_project/config/initializers/backtrace_silencers.rb deleted file mode 100644 index 59385cd..0000000 --- a/test/fixtures/scss_project/config/initializers/backtrace_silencers.rb +++ /dev/null @@ -1,7 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. -# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } - -# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. -# Rails.backtrace_cleaner.remove_silencers! diff --git a/test/fixtures/scss_project/config/initializers/inflections.rb b/test/fixtures/scss_project/config/initializers/inflections.rb deleted file mode 100644 index 9e8b013..0000000 --- a/test/fixtures/scss_project/config/initializers/inflections.rb +++ /dev/null @@ -1,10 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Add new inflection rules using the following format -# (all these examples are active by default): -# ActiveSupport::Inflector.inflections do |inflect| -# inflect.plural /^(ox)$/i, '\1en' -# inflect.singular /^(ox)en/i, '\1' -# inflect.irregular 'person', 'people' -# inflect.uncountable %w( fish sheep ) -# end diff --git a/test/fixtures/scss_project/config/initializers/mime_types.rb b/test/fixtures/scss_project/config/initializers/mime_types.rb deleted file mode 100644 index 72aca7e..0000000 --- a/test/fixtures/scss_project/config/initializers/mime_types.rb +++ /dev/null @@ -1,5 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Add new mime types for use in respond_to blocks: -# Mime::Type.register "text/richtext", :rtf -# Mime::Type.register_alias "text/html", :iphone diff --git a/test/fixtures/scss_project/config/initializers/postprocessor.rb b/test/fixtures/scss_project/config/initializers/postprocessor.rb deleted file mode 100644 index 18728e0..0000000 --- a/test/fixtures/scss_project/config/initializers/postprocessor.rb +++ /dev/null @@ -1,5 +0,0 @@ -Rails.application.config.assets.configure do |env| - env.register_postprocessor 'text/css' do |input| - input[:data].gsub /@import/, 'fail engine' - end -end diff --git a/test/fixtures/scss_project/config/initializers/secret_token.rb b/test/fixtures/scss_project/config/initializers/secret_token.rb deleted file mode 100644 index e8888a2..0000000 --- a/test/fixtures/scss_project/config/initializers/secret_token.rb +++ /dev/null @@ -1,7 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Your secret key for verifying the integrity of signed cookies. -# If you change this key, all old signed cookies will become invalid! -# Make sure the secret is at least 30 characters and all random, -# no regular words or you'll be exposed to dictionary attacks. -ScssProject::Application.config.secret_token = 'aad80c771c1b2b13b67b0b2d03ee3fa8a1d5a8e8dce2e8bc8b382f197927b789afdc9355f8bc7256faf650015d75d8eb541e9ab96a88f0bd63c4bd7552174849' diff --git a/test/fixtures/scss_project/config/initializers/session_store.rb b/test/fixtures/scss_project/config/initializers/session_store.rb deleted file mode 100644 index 0a955a5..0000000 --- a/test/fixtures/scss_project/config/initializers/session_store.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Be sure to restart your server when you modify this file. - -ScssProject::Application.config.session_store :cookie_store, :key => '_scss_project_session' - -# Use the database for sessions instead of the cookie-based default, -# which shouldn't be used to store highly confidential information -# (create the session table with "rails generate session_migration") -# ScssProject::Application.config.session_store :active_record_store diff --git a/test/fixtures/scss_project/config/initializers/wrap_parameters.rb b/test/fixtures/scss_project/config/initializers/wrap_parameters.rb deleted file mode 100644 index 32ffbee..0000000 --- a/test/fixtures/scss_project/config/initializers/wrap_parameters.rb +++ /dev/null @@ -1,12 +0,0 @@ -# Be sure to restart your server when you modify this file. -# -# This file contains the settings for ActionController::ParametersWrapper -# which will be enabled by default in the upcoming version of Ruby on Rails. - -# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. -ActionController::Base.wrap_parameters :format => [:json] - -# Disable root element in JSON by default. -if defined?(ActiveRecord) - ActiveRecord::Base.include_root_in_json = false -end diff --git a/test/fixtures/scss_project/config/locales/en.yml b/test/fixtures/scss_project/config/locales/en.yml deleted file mode 100644 index 179c14c..0000000 --- a/test/fixtures/scss_project/config/locales/en.yml +++ /dev/null @@ -1,5 +0,0 @@ -# Sample localization file for English. Add more files in this directory for other locales. -# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. - -en: - hello: "Hello world" diff --git a/test/fixtures/scss_project/config/routes.rb b/test/fixtures/scss_project/config/routes.rb deleted file mode 100644 index 4e737ff..0000000 --- a/test/fixtures/scss_project/config/routes.rb +++ /dev/null @@ -1,58 +0,0 @@ -ScssProject::Application.routes.draw do - # The priority is based upon order of creation: - # first created -> highest priority. - - # Sample of regular route: - # match 'products/:id' => 'catalog#view' - # Keep in mind you can assign values other than :controller and :action - - # Sample of named route: - # match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase - # This route can be invoked with purchase_url(:id => product.id) - - # Sample resource route (maps HTTP verbs to controller actions automatically): - # resources :products - - # Sample resource route with options: - # resources :products do - # member do - # get 'short' - # post 'toggle' - # end - # - # collection do - # get 'sold' - # end - # end - - # Sample resource route with sub-resources: - # resources :products do - # resources :comments, :sales - # resource :seller - # end - - # Sample resource route with more complex sub-resources - # resources :products do - # resources :comments - # resources :sales do - # get 'recent', :on => :collection - # end - # end - - # Sample resource route within a namespace: - # namespace :admin do - # # Directs /admin/products/* to Admin::ProductsController - # # (app/controllers/admin/products_controller.rb) - # resources :products - # end - - # You can have the root of your site routed with "root" - # just remember to delete public/index.html. - # root :to => 'welcome#index' - - # See how all your routes lay out with "rake routes" - - # This is a legacy wild controller route that's not recommended for RESTful applications. - # Note: This route will make all actions in every controller accessible via GET requests. - # match ':controller(/:action(/:id(.:format)))' -end diff --git a/test/fixtures/scss_project/db/seeds.rb b/test/fixtures/scss_project/db/seeds.rb deleted file mode 100644 index 4edb1e8..0000000 --- a/test/fixtures/scss_project/db/seeds.rb +++ /dev/null @@ -1,7 +0,0 @@ -# This file should contain all the record creation needed to seed the database with its default values. -# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup). -# -# Examples: -# -# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }]) -# Mayor.create(name: 'Emanuel', city: cities.first) diff --git a/test/fixtures/scss_project/doc/README_FOR_APP b/test/fixtures/scss_project/doc/README_FOR_APP deleted file mode 100644 index fe41f5c..0000000 --- a/test/fixtures/scss_project/doc/README_FOR_APP +++ /dev/null @@ -1,2 +0,0 @@ -Use this README file to introduce your application and point to useful places in the API for learning more. -Run "rake doc:app" to generate API documentation for your models, controllers, helpers, and libraries. diff --git a/test/fixtures/scss_project/lib/tasks/.gitkeep b/test/fixtures/scss_project/lib/tasks/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/test/fixtures/scss_project/log/.gitkeep b/test/fixtures/scss_project/log/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/test/fixtures/scss_project/public/404.html b/test/fixtures/scss_project/public/404.html deleted file mode 100644 index 9a48320..0000000 --- a/test/fixtures/scss_project/public/404.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - The page you were looking for doesn't exist (404) - - - - - -
-

The page you were looking for doesn't exist.

-

You may have mistyped the address or the page may have moved.

-
- - diff --git a/test/fixtures/scss_project/public/422.html b/test/fixtures/scss_project/public/422.html deleted file mode 100644 index 83660ab..0000000 --- a/test/fixtures/scss_project/public/422.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - The change you wanted was rejected (422) - - - - - -
-

The change you wanted was rejected.

-

Maybe you tried to change something you didn't have access to.

-
- - diff --git a/test/fixtures/scss_project/public/500.html b/test/fixtures/scss_project/public/500.html deleted file mode 100644 index b80307f..0000000 --- a/test/fixtures/scss_project/public/500.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - We're sorry, but something went wrong (500) - - - - - -
-

We're sorry, but something went wrong.

-

We've been notified about this issue and we'll take a look at it shortly.

-
- - diff --git a/test/fixtures/scss_project/public/favicon.ico b/test/fixtures/scss_project/public/favicon.ico deleted file mode 100644 index e69de29..0000000 diff --git a/test/fixtures/scss_project/public/index.html b/test/fixtures/scss_project/public/index.html deleted file mode 100644 index 9d9811a..0000000 --- a/test/fixtures/scss_project/public/index.html +++ /dev/null @@ -1,241 +0,0 @@ - - - - Ruby on Rails: Welcome aboard - - - - -
- - -
- - - - -
-

Getting started

-

Here’s how to get rolling:

- -
    -
  1. -

    Use rails generate to create your models and controllers

    -

    To see all available options, run it without parameters.

    -
  2. - -
  3. -

    Set up a default route and remove public/index.html

    -

    Routes are set up in config/routes.rb.

    -
  4. - -
  5. -

    Create your database

    -

    Run rake db:create to create your database. If you're not using SQLite (the default), edit config/database.yml with your username and password.

    -
  6. -
-
-
- - -
- - diff --git a/test/fixtures/scss_project/public/robots.txt b/test/fixtures/scss_project/public/robots.txt deleted file mode 100644 index 085187f..0000000 --- a/test/fixtures/scss_project/public/robots.txt +++ /dev/null @@ -1,5 +0,0 @@ -# See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file -# -# To ban all spiders from the entire site uncomment the next two lines: -# User-Agent: * -# Disallow: / diff --git a/test/fixtures/scss_project/script/rails b/test/fixtures/scss_project/script/rails deleted file mode 100755 index f8da2cf..0000000 --- a/test/fixtures/scss_project/script/rails +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env ruby -# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application. - -APP_PATH = File.expand_path('../../config/application', __FILE__) -require File.expand_path('../../config/boot', __FILE__) -require 'rails/commands' diff --git a/test/fixtures/scss_project/vendor/assets/stylesheets/.gitkeep b/test/fixtures/scss_project/vendor/assets/stylesheets/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/test/fixtures/scss_project/vendor/plugins/.gitkeep b/test/fixtures/scss_project/vendor/plugins/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/test/sass_rails_generators_test.rb b/test/sass_rails_generators_test.rb deleted file mode 100644 index b62f0e5..0000000 --- a/test/sass_rails_generators_test.rb +++ /dev/null @@ -1,62 +0,0 @@ -require 'test_helper' - -class ScaffoldGeneratorTest < Sass::Rails::TestCase - test "scss files are generated during scaffold generation of scss projects" do - within_rails_app "scss_project" do - generate_scaffold - assert_file_exists "app/assets/stylesheets/foos.scss" - assert_file_exists "app/assets/stylesheets/scaffolds.scss" - assert_not_output %r{conflict} - end - end - - test "sass files are generated during scaffold generation of sass projects" do - within_rails_app "sass_project" do - generate_scaffold - assert_file_exists "app/assets/stylesheets/foos.sass" - assert_file_exists "app/assets/stylesheets/scaffolds.sass" - assert_not_output %r{conflict} - end - end - - test "scss files are generated during scaffold generation of a engine project, if is called with --stylesheet-engine=scss" do - within_rails_app "engine_project" do - generate_scaffold "--stylesheet-engine=scss" - assert_file_exists "app/assets/stylesheets/engine_project/foos.scss" - assert_file_exists "app/assets/stylesheets/scaffolds.scss" - assert_not_output %r{conflict} - end - end - - test "sass files are generated during scaffold generation of a engine project, if is called with --stylesheet-engine=sass" do - within_rails_app "engine_project" do - generate_scaffold "--stylesheet-engine=sass" - assert_file_exists "app/assets/stylesheets/engine_project/foos.sass" - assert_file_exists "app/assets/stylesheets/scaffolds.sass" - assert_not_output %r{conflict} - end - end - - # DISABLED because we've removed the feature for now. - # test "scss template has correct dasherized css class for namespaced controllers" do - # within_rails_app "scss_project" do - # runcmd "rails generate controller foo/bar" - # assert_file_exists "app/assets/stylesheets/foo/bar.scss" - # assert_match /\.foo-bar/, File.read("app/assets/stylesheets/foo/bar.scss") - # end - # end - # - # test "sass template has correct dasherized css class for namespaced controllers" do - # within_rails_app "sass_project" do - # runcmd "rails generate controller foo/bar" - # assert_file_exists "app/assets/stylesheets/foo/bar.sass" - # assert_match /\.foo-bar/, File.read("app/assets/stylesheets/foo/bar.sass") - # end - # end - -private - - def generate_scaffold(args = nil) - runcmd "bundle exec rails generate scaffold foo #{args}" - end -end diff --git a/test/sass_rails_logger_test.rb b/test/sass_rails_logger_test.rb deleted file mode 100644 index 56bb100..0000000 --- a/test/sass_rails_logger_test.rb +++ /dev/null @@ -1,27 +0,0 @@ -require 'test_helper' - -class SassRailsLoggerTest < Sass::Rails::TestCase - test "setting a sass-rails logger as the sass default logger" do - within_rails_app "scss_project" do - logger_class_name = runcmd 'ruby script/rails runner "print Sass::logger.class.name"' - assert logger_class_name =~ /#{Regexp.escape(Sass::Rails::Logger.name)}/ - end - end - - test "sending a log messages to the sass logger writes to the environment log file" do - within_rails_app "scss_project" do |app_root| - [:debug, :warn, :info, :error, :trace].each do |level| - message = "[#{level}]: sass message" - - runner 'development' do - "Sass::logger.log_level = :#{level}; Sass::logger.log(:#{level}, %Q|#{message}|)" - end - - assert File.exist?("#{app_root}/log/development.log"), "log file was not created" - - log_output = File.open("#{app_root}/log/development.log").read - assert log_output.include?(message), "the #{level} log message was not found in the log file" - end - end - end -end diff --git a/test/sass_rails_test.rb b/test/sass_rails_test.rb deleted file mode 100644 index 4e2bdbb..0000000 --- a/test/sass_rails_test.rb +++ /dev/null @@ -1,205 +0,0 @@ -require 'test_helper' - -class SassRailsTest < Sass::Rails::TestCase - test 'classes are loaded' do - assert_kind_of Module, Sass::Rails - assert_kind_of Class, Sass::Rails::Railtie - end - - test 'style config item is honored in development mode' do - within_rails_app 'alternate_config_project' do - runner 'development' do - "puts Rails.application.config.sass.style" - end - - assert_output %r{compact} - end - end - - test 'style config item is not honored if environment is not development' do - within_rails_app 'alternate_config_project' do - runner 'production' do - "p Rails.application.config.sass.style" - end - - assert_equal 'nil', $last_output.chomp - end - end - - test 'css_compressor config item is not honored in development mode' do - within_rails_app 'alternate_config_project' do - runner 'development' do - "p Rails.application.config.assets.css_compressor" - end - - assert_equal 'nil', $last_output.chomp - end - end - - test 'css_compressor config item is honored if environment is not development' do - within_rails_app 'alternate_config_project' do - runner 'production' do - "puts Rails.application.config.assets.css_compressor" - end - - assert_output %r{yui} - end - end - - test 'sass uses expanded style by default in development mode' do - within_rails_app 'scss_project' do - runner 'development' do - "puts Rails.application.config.sass.style" - end - - assert_output %r{expanded} - end - end - - test 'sass not defines compressor in development mode' do - within_rails_app 'scss_project' do - runner 'development' do - "p Rails.application.config.assets.css_compressor" - end - - assert_equal 'nil', $last_output.chomp - end - end - - test 'sass defines compressor by default in test mode' do - within_rails_app 'scss_project' do - runner 'test' do - "puts Rails.application.config.assets.css_compressor" - end - - assert_equal 'sass', $last_output.chomp - end - end - - test 'sass allows compressor override in test mode' do - within_rails_app 'alternate_config_project' do - runner 'test' do - "puts Rails.application.config.assets.css_compressor.nil?" - end - - assert_equal 'true', $last_output.chomp - end - end - - test 'sass defines compressor by default in production mode' do - within_rails_app 'scss_project' do - runner 'production' do - "puts Rails.application.config.assets.css_compressor" - end - - assert_equal 'sass', $last_output.chomp - end - end - - test 'sprockets require works correctly' do - within_rails_app('scss_project') do |app_root| - css_output = asset_output('css_application.css') - assert_match %r{globbed}, css_output - - if File.exist?("#{app_root}/log/development.log") - log_file = "#{app_root}/log/development.log" - elsif File.exist?("#{app_root}/log/test.log") - log_file = "#{app_root}/log/test.log" - else - flunk "log file was not created" - end - - log_output = File.open(log_file).read - refute_match %r{Warning}, log_output - end - end - - test 'sass imports work correctly' do - css_output = sprockets_render('scss_project', 'application.css') - assert_match %r{main}, css_output - assert_match %r{top-level}, css_output - assert_match %r{partial-sass}, css_output - assert_match %r{partial-scss}, css_output - assert_match %r{sub-folder-relative-sass}, css_output - assert_match %r{sub-folder-relative-scss}, css_output - assert_match %r{not-a-partial}, css_output - assert_match %r{globbed}, css_output - assert_match %r{nested-glob}, css_output - assert_match %r{nested-glob-erb}, css_output - assert_match %r{nested-glob-erb-css-scss}, css_output - assert_match %r{plain-old-css}, css_output - assert_match %r{another-plain-old-css}, css_output - assert_match %r{without-css-ext}, css_output - assert_match %r{css-erb-handler}, css_output - assert_match %r{scss-erb-handler}, css_output - assert_match %r{sass-erb-handler}, css_output - assert_match %r{css-sass-erb-handler}, css_output - assert_match %r{css-scss-erb-handler}, css_output - assert_match %r{default-old-css}, css_output - end - - test 'sprockets directives are ignored within an import' do - css_output = sprockets_render('scss_project', 'import_css_application.css') - assert_match %r{\.css-application}, css_output - assert_match %r{\.import-css-application}, css_output - end - - test 'globbed imports work when new file is added' do - project = 'scss_project' - filename = 'application.css' - - within_rails_app(project) do |tmpdir| - asset_output(filename) - - new_file = File.join(tmpdir, 'app', 'assets', 'stylesheets', 'globbed', 'new.scss') - File.open(new_file, 'w') do |file| - file.puts '.new-file-test { color: #000; }' - end - - css_output = asset_output(filename) - assert_match %r{new-file-test}, css_output - end - end - - test 'globbed imports work when globbed file is changed' do - project = 'scss_project' - filename = 'application.css' - - within_rails_app(project) do |tmpdir| - asset_output(filename) - - new_file = File.join(tmpdir, 'app', 'assets', 'stylesheets', 'globbed', 'globbed.scss') - File.open(new_file, 'w') do |file| - file.puts '.changed-file-test { color: #000; }' - end - - css_output = asset_output(filename) - assert_match %r{changed-file-test}, css_output - end - end - - test 'sass asset paths work' do - css_output = sprockets_render('scss_project', 'application.css') - assert_match %r{asset-path:\s*"/assets/rails(-[0-9a-f]+)?.png"}, css_output, 'asset-path:\s*"/assets/rails.png"' - assert_match %r{asset-url:\s*url\(/assets/rails(-[0-9a-f]+)?.png\)}, css_output, 'asset-url:\s*url\(/assets/rails.png\)' - assert_match %r{image-path:\s*"/assets/rails(-[0-9a-f]+)?.png"}, css_output, 'image-path:\s*"/assets/rails.png"' - assert_match %r{image-url:\s*url\(/assets/rails(-[0-9a-f]+)?.png\)}, css_output, 'image-url:\s*url\(/assets/rails.png\)' - assert_match %r{video-path:\s*"/videos/rails(-[0-9a-f]+)?.mp4"}, css_output, 'video-path:\s*"/videos/rails.mp4"' - assert_match %r{video-url:\s*url\(/videos/rails(-[0-9a-f]+)?.mp4\)}, css_output, 'video-url:\s*url\(/videos/rails.mp4\)' - assert_match %r{audio-path:\s*"/audios/rails(-[0-9a-f]+)?.mp3"}, css_output, 'audio-path:\s*"/audios/rails.mp3"' - assert_match %r{audio-url:\s*url\(/audios/rails(-[0-9a-f]+)?.mp3\)}, css_output, 'audio-url:\s*url\(/audios/rails.mp3\)' - assert_match %r{font-path:\s*"/fonts/rails(-[0-9a-f]+)?.ttf"}, css_output, 'font-path:\s*"/fonts/rails.ttf"' - assert_match %r{font-url:\s*url\(/fonts/rails(-[0-9a-f]+)?.ttf\)}, css_output, 'font-url:\s*url\(/fonts/rails.ttf\)' - assert_match %r{font-url-with-query-hash:\s*url\(/fonts/rails(-[0-9a-f]+)?.ttf\?#iefix\)}, css_output, 'font-url:\s*url\(/fonts/rails.ttf?#iefix\)' - assert_match %r{javascript-path:\s*"/javascripts/rails(-[0-9a-f]+)?.js"}, css_output, 'javascript-path:\s*"/javascripts/rails.js"' - assert_match %r{javascript-url:\s*url\(/javascripts/rails(-[0-9a-f]+)?.js\)}, css_output, 'javascript-url:\s*url\(/javascripts/rails.js\)' - assert_match %r{stylesheet-path:\s*"/stylesheets/rails(-[0-9a-f]+)?.css"}, css_output, 'stylesheet-path:\s*"/stylesheets/rails.css"' - assert_match %r{stylesheet-url:\s*url\(/stylesheets/rails(-[0-9a-f]+)?.css\)}, css_output, 'stylesheet-url:\s*url\(/stylesheets/rails.css\)' - - asset_data_url_regexp = %r{asset-data-url:\s*url\((.*?)\)} - assert_match asset_data_url_regexp, css_output, 'asset-data-url:\s*url\((.*?)\)' - asset_data_url_match = css_output.match(asset_data_url_regexp)[1] - asset_data_url_expected = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw%2FeHBhY2tldCBiZWdpbj0i77u%2FIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8%2BIDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIE1hY2ludG9zaCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpCNzY5NDE1QkQ2NkMxMUUwOUUzM0E5Q0E2RTgyQUExQiIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpCNzY5NDE1Q0Q2NkMxMUUwOUUzM0E5Q0E2RTgyQUExQiI%2BIDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkE3MzcyNTQ2RDY2QjExRTA5RTMzQTlDQTZFODJBQTFCIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkI3Njk0MTVBRDY2QzExRTA5RTMzQTlDQTZFODJBQTFCIi8%2BIDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY%2BIDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8%2B0HhJ9AAAABBJREFUeNpi%2BP%2F%2FPwNAgAEACPwC%2FtuiTRYAAAAASUVORK5CYII%3D' - assert_equal asset_data_url_expected, asset_data_url_match - end -end diff --git a/test/support/sass_rails_test_case.rb b/test/support/sass_rails_test_case.rb deleted file mode 100644 index 791725f..0000000 --- a/test/support/sass_rails_test_case.rb +++ /dev/null @@ -1,181 +0,0 @@ -unless defined?(Bundler) - $stderr.puts "You didn't run bundle exec did you? Try again: bundle exec rake test" - exit 1 -end -require 'fileutils' -require 'tmpdir' - -class Sass::Rails::TestCase < ActiveSupport::TestCase - - class ExecutionError < StandardError - attr_accessor :output - - def initialize(message, output = nil) - super(message) - self.output = output - end - - def message - "#{super}\nOutput was:\n#{output}" - end - end - - module SilentError - attr_accessor :output - - def message - "#{super}\nOutput was:\n#{output}" - end - end - - protected - - def fixture_path(path) - File.expand_path("../../fixtures/#{path}", __FILE__) - end - - module TestAssetPaths - attr_accessor :assets - end - - def sprockets_render(project, filename) - within_rails_app(project) do - asset_output(filename) - end - end - - def asset_output(filename) - runcmd "ruby script/rails runner 'puts Rails.application.assets[#{filename.inspect}]'" - end - - def assert_file_exists(filename) - assert File.exist?(filename), "could not find #{filename}. PWD=#{Dir.pwd}\nDid find: #{Dir.glob(File.dirname(filename)+"/*").join(", ")}" - end - - def assert_not_output(match) - assert_no_match match, $last_output - end - - def assert_output(match) - assert $last_output.to_s =~ match, "#{match} was not found in #{$last_output.inspect}" - end - - def assert_line_count(count) - last_count = $last_output.lines.count - assert last_count == count, "Wrong line count, expected: #{count} but got: #{last_count}" - end - # Copies a rails app fixture to a temp directory - # and changes to that directory during the yield. - # - # Automatically changes back to the working directory - # and removes the temp directory when done. - def within_rails_app(name, without_gems = [], gem_options = $gem_options) - sourcedir = File.expand_path("../../fixtures/#{name}", __FILE__) - - Dir.mktmpdir do |tmpdir| - FileUtils.cp_r "#{sourcedir}/.", tmpdir - - Dir.chdir(tmpdir) do - gem_options.each { |gem_name, options| modify_gem_entry gem_name, options } - without_gems.each { |gem_name| remove_gem name } - - yield tmpdir - end - end - end - - def process_gemfile(gemfile = "Gemfile", &blk) - gem_contents = File.readlines(gemfile) - gem_contents.map!(&blk) - gem_contents.compact! - - File.open(gemfile, "w") do |f| - f.print(gem_contents.join("")) - end - end - - def modify_gem_entry(gemname, options, gemfile = "Gemfile") - found = false - - process_gemfile(gemfile) do |line| - if line =~ /gem *(["'])#{Regexp.escape(gemname)}\1/ - found = true - gem_entry(gemname, options) + "\n" - else - line - end - end - - unless found - File.open(gemfile, "a") do |f| - f.print("\n#{gem_entry(gemname, options)}\n") - end - end - end - - def gem_entry(gemname, options) - entry = %Q{gem "#{gemname}", "~> #{options[:version]}"} - entry += ", :path => #{options[:path].inspect}" if options[:path] - entry - end - - def remove_gem(gemname) - process_gemfile(gemfile) do |line| - line unless line =~ /gem *(["'])#{Regexp.escape(gemname)}\1/ - end - end - - def silently - output = StringIO.new - $stderr, old_stderr = output, $stderr - $stdout, old_stdout = output, $stdout - - begin - yield - rescue ExecutionError => e - raise - rescue => e - e.extend(SilentError) - e.output = output.string - raise - end - ensure - $stderr = old_stderr - $stdout = old_stdout - end - - # executes a system command - # raises an error if it does not complete successfully - # returns the output as a string if it does complete successfully - def runcmd(cmd, working_directory = Dir.pwd, clean_env = true, gemfile = "Gemfile", env = {}) - # There's a bug in bundler where with_clean_env doesn't clear out the BUNDLE_GEMFILE environment setting - # https://github.com/carlhuda/bundler/issues/1133 - env["BUNDLE_GEMFILE"] = "#{working_directory}/#{gemfile}" if clean_env - - todo = Proc.new do - r, w = IO.pipe - Kernel.spawn(env, cmd, :out => w , :err => w, :chdir => working_directory) - w.close - Process.wait - output = r.read - r.close - - unless $?.exitstatus == 0 - raise ExecutionError, "Command failed with exit status #{$?.exitstatus}: #{cmd}", output - end - - $last_output = output - end - - if clean_env - Bundler.with_clean_env(&todo) - else - todo.call - end - end - - # A thin wrapper around runcmd to be DRY in tests - def runner(environment) - runcmd "ruby script/rails runner '#{yield}'", Dir.pwd, true, 'Gemfile', {'RAILS_ENV' => environment} - end -end diff --git a/test/test_helper.rb b/test/test_helper.rb deleted file mode 100644 index 521de86..0000000 --- a/test/test_helper.rb +++ /dev/null @@ -1,27 +0,0 @@ -# Configure Rails Envinronment -ENV["RAILS_ENV"] = "test" - -require 'bundler/setup' -require 'rails' -require 'rails/test_help' -require 'sass/rails' - -Rails.backtrace_cleaner.remove_silencers! - -# If developing against local dependencies, this code will ensure they get picked up -# in the project fixtures that have their own bundle environment -$gem_options = {} -possible_dev_dependencies = %w(sass-rails sass rails arel actionpack rack railties sprockets journey sprockets-rails activerecord-deprecated_finders) -Bundler.load.specs.each do |s| - if possible_dev_dependencies.include?(s.name) - gem_path = s.full_gem_path - gem_options = { version: s.version } - gem_options[:path] = gem_path if File.exist?("#{gem_path}/#{s.name}.gemspec") - $gem_options[s.name] = gem_options - end -end - -# Load support files -Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f } - -ActiveSupport::TestCase.test_order = :random if ActiveSupport::TestCase.respond_to?(:test_order=)