wireframe-sass-rails 3.1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (168) hide show
  1. data/.gitignore +5 -0
  2. data/Gemfile +13 -0
  3. data/README.markdown +68 -0
  4. data/Rakefile +12 -0
  5. data/lib/rails/generators/sass/assets/assets_generator.rb +13 -0
  6. data/lib/rails/generators/sass/assets/templates/stylesheet.css.sass +3 -0
  7. data/lib/rails/generators/sass/scaffold/scaffold_generator.rb +9 -0
  8. data/lib/rails/generators/sass_scaffold.rb +16 -0
  9. data/lib/rails/generators/scss/assets/assets_generator.rb +13 -0
  10. data/lib/rails/generators/scss/assets/templates/stylesheet.css.scss +3 -0
  11. data/lib/rails/generators/scss/scaffold/scaffold_generator.rb +10 -0
  12. data/lib/sass-rails.rb +1 -0
  13. data/lib/sass/rails.rb +12 -0
  14. data/lib/sass/rails/compressor.rb +15 -0
  15. data/lib/sass/rails/helpers.rb +38 -0
  16. data/lib/sass/rails/importer.rb +122 -0
  17. data/lib/sass/rails/logger.rb +21 -0
  18. data/lib/sass/rails/railtie.rb +74 -0
  19. data/lib/sass/rails/template_handlers.rb +86 -0
  20. data/lib/sass/rails/version.rb +5 -0
  21. data/sass-rails.gemspec +25 -0
  22. data/test/fixtures/engine_project/.gitignore +6 -0
  23. data/test/fixtures/engine_project/Gemfile +7 -0
  24. data/test/fixtures/engine_project/README.rdoc +3 -0
  25. data/test/fixtures/engine_project/Rakefile +39 -0
  26. data/test/fixtures/engine_project/app/assets/images/engine_project/.gitkeep +0 -0
  27. data/test/fixtures/engine_project/app/assets/javascripts/engine_project/application.js +9 -0
  28. data/test/fixtures/engine_project/app/assets/stylesheets/engine_project/application.css +7 -0
  29. data/test/fixtures/engine_project/app/controllers/engine_project/application_controller.rb +4 -0
  30. data/test/fixtures/engine_project/app/helpers/engine_project/application_helper.rb +4 -0
  31. data/test/fixtures/engine_project/app/views/layouts/engine_project/application.html.erb +14 -0
  32. data/test/fixtures/engine_project/config/routes.rb +2 -0
  33. data/test/fixtures/engine_project/lib/engine_project.rb +4 -0
  34. data/test/fixtures/engine_project/lib/engine_project/engine.rb +5 -0
  35. data/test/fixtures/engine_project/lib/engine_project/version.rb +3 -0
  36. data/test/fixtures/engine_project/lib/tasks/engine_project_tasks.rake +4 -0
  37. data/test/fixtures/engine_project/script/rails +6 -0
  38. data/test/fixtures/engine_project/test/dummy/Rakefile +7 -0
  39. data/test/fixtures/engine_project/test/dummy/app/assets/javascripts/application.js +9 -0
  40. data/test/fixtures/engine_project/test/dummy/app/assets/stylesheets/application.css +7 -0
  41. data/test/fixtures/engine_project/test/dummy/app/controllers/application_controller.rb +3 -0
  42. data/test/fixtures/engine_project/test/dummy/app/helpers/application_helper.rb +2 -0
  43. data/test/fixtures/engine_project/test/dummy/app/mailers/.gitkeep +0 -0
  44. data/test/fixtures/engine_project/test/dummy/app/models/.gitkeep +0 -0
  45. data/test/fixtures/engine_project/test/dummy/app/views/layouts/application.html.erb +14 -0
  46. data/test/fixtures/engine_project/test/dummy/config.ru +4 -0
  47. data/test/fixtures/engine_project/test/dummy/config/application.rb +42 -0
  48. data/test/fixtures/engine_project/test/dummy/config/boot.rb +10 -0
  49. data/test/fixtures/engine_project/test/dummy/config/database.yml +25 -0
  50. data/test/fixtures/engine_project/test/dummy/config/environment.rb +5 -0
  51. data/test/fixtures/engine_project/test/dummy/config/environments/development.rb +27 -0
  52. data/test/fixtures/engine_project/test/dummy/config/environments/production.rb +51 -0
  53. data/test/fixtures/engine_project/test/dummy/config/environments/test.rb +39 -0
  54. data/test/fixtures/engine_project/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  55. data/test/fixtures/engine_project/test/dummy/config/initializers/inflections.rb +10 -0
  56. data/test/fixtures/engine_project/test/dummy/config/initializers/mime_types.rb +5 -0
  57. data/test/fixtures/engine_project/test/dummy/config/initializers/secret_token.rb +7 -0
  58. data/test/fixtures/engine_project/test/dummy/config/initializers/session_store.rb +8 -0
  59. data/test/fixtures/engine_project/test/dummy/config/initializers/wrap_parameters.rb +12 -0
  60. data/test/fixtures/engine_project/test/dummy/config/locales/en.yml +5 -0
  61. data/test/fixtures/engine_project/test/dummy/config/routes.rb +4 -0
  62. data/test/fixtures/engine_project/test/dummy/lib/assets/.gitkeep +0 -0
  63. data/test/fixtures/engine_project/test/dummy/log/.gitkeep +0 -0
  64. data/test/fixtures/engine_project/test/dummy/public/404.html +26 -0
  65. data/test/fixtures/engine_project/test/dummy/public/422.html +26 -0
  66. data/test/fixtures/engine_project/test/dummy/public/500.html +26 -0
  67. data/test/fixtures/engine_project/test/dummy/public/favicon.ico +0 -0
  68. data/test/fixtures/engine_project/test/dummy/script/rails +6 -0
  69. data/test/fixtures/sass_project/.gitignore +5 -0
  70. data/test/fixtures/sass_project/Gemfile +7 -0
  71. data/test/fixtures/sass_project/README +261 -0
  72. data/test/fixtures/sass_project/Rakefile +7 -0
  73. data/test/fixtures/sass_project/app/assets/images/rails.png +0 -0
  74. data/test/fixtures/sass_project/app/assets/javascripts/application.js +9 -0
  75. data/test/fixtures/sass_project/app/assets/stylesheets/application.css +7 -0
  76. data/test/fixtures/sass_project/app/controllers/application_controller.rb +3 -0
  77. data/test/fixtures/sass_project/app/helpers/application_helper.rb +2 -0
  78. data/test/fixtures/sass_project/app/mailers/.gitkeep +0 -0
  79. data/test/fixtures/sass_project/app/models/.gitkeep +0 -0
  80. data/test/fixtures/sass_project/app/views/layouts/application.html.erb +14 -0
  81. data/test/fixtures/sass_project/config.ru +4 -0
  82. data/test/fixtures/sass_project/config/application.rb +52 -0
  83. data/test/fixtures/sass_project/config/boot.rb +6 -0
  84. data/test/fixtures/sass_project/config/database.yml +25 -0
  85. data/test/fixtures/sass_project/config/environment.rb +5 -0
  86. data/test/fixtures/sass_project/config/environments/development.rb +27 -0
  87. data/test/fixtures/sass_project/config/environments/production.rb +54 -0
  88. data/test/fixtures/sass_project/config/environments/test.rb +39 -0
  89. data/test/fixtures/sass_project/config/initializers/backtrace_silencers.rb +7 -0
  90. data/test/fixtures/sass_project/config/initializers/inflections.rb +10 -0
  91. data/test/fixtures/sass_project/config/initializers/mime_types.rb +5 -0
  92. data/test/fixtures/sass_project/config/initializers/secret_token.rb +7 -0
  93. data/test/fixtures/sass_project/config/initializers/session_store.rb +8 -0
  94. data/test/fixtures/sass_project/config/initializers/wrap_parameters.rb +12 -0
  95. data/test/fixtures/sass_project/config/locales/en.yml +5 -0
  96. data/test/fixtures/sass_project/config/routes.rb +58 -0
  97. data/test/fixtures/sass_project/db/seeds.rb +7 -0
  98. data/test/fixtures/sass_project/doc/README_FOR_APP +2 -0
  99. data/test/fixtures/sass_project/lib/tasks/.gitkeep +0 -0
  100. data/test/fixtures/sass_project/log/.gitkeep +0 -0
  101. data/test/fixtures/sass_project/public/404.html +26 -0
  102. data/test/fixtures/sass_project/public/422.html +26 -0
  103. data/test/fixtures/sass_project/public/500.html +26 -0
  104. data/test/fixtures/sass_project/public/favicon.ico +0 -0
  105. data/test/fixtures/sass_project/public/index.html +241 -0
  106. data/test/fixtures/sass_project/public/robots.txt +5 -0
  107. data/test/fixtures/sass_project/script/rails +6 -0
  108. data/test/fixtures/sass_project/vendor/assets/stylesheets/.gitkeep +0 -0
  109. data/test/fixtures/sass_project/vendor/plugins/.gitkeep +0 -0
  110. data/test/fixtures/scss_project/.gitignore +5 -0
  111. data/test/fixtures/scss_project/Gemfile +7 -0
  112. data/test/fixtures/scss_project/README +261 -0
  113. data/test/fixtures/scss_project/Rakefile +7 -0
  114. data/test/fixtures/scss_project/app/assets/images/rails.png +0 -0
  115. data/test/fixtures/scss_project/app/assets/javascripts/application.js +9 -0
  116. data/test/fixtures/scss_project/app/assets/stylesheets/_top_level_partial.css.scss +3 -0
  117. data/test/fixtures/scss_project/app/assets/stylesheets/application.css.scss +19 -0
  118. data/test/fixtures/scss_project/app/assets/stylesheets/css_application.css +7 -0
  119. data/test/fixtures/scss_project/app/assets/stylesheets/globbed/globbed.css.scss +3 -0
  120. data/test/fixtures/scss_project/app/assets/stylesheets/globbed/nested/nested_glob.css.scss +3 -0
  121. data/test/fixtures/scss_project/app/assets/stylesheets/partials/_sass_import.css.sass +5 -0
  122. data/test/fixtures/scss_project/app/assets/stylesheets/partials/_scss_import.css.scss +9 -0
  123. data/test/fixtures/scss_project/app/assets/stylesheets/partials/_without_css_ext.scss +3 -0
  124. data/test/fixtures/scss_project/app/assets/stylesheets/partials/subfolder/_relative_sass.css.sass +2 -0
  125. data/test/fixtures/scss_project/app/assets/stylesheets/partials/subfolder/_relative_scss.css.scss +3 -0
  126. data/test/fixtures/scss_project/app/assets/stylesheets/partials/subfolder/relative_not_a_partial.css.scss +3 -0
  127. data/test/fixtures/scss_project/app/assets/stylesheets/subfolder/another_plain.css +3 -0
  128. data/test/fixtures/scss_project/app/assets/stylesheets/subfolder/plain.css +3 -0
  129. data/test/fixtures/scss_project/app/assets/stylesheets/subfolder/second_level.css.scss +1 -0
  130. data/test/fixtures/scss_project/app/controllers/application_controller.rb +3 -0
  131. data/test/fixtures/scss_project/app/helpers/application_helper.rb +2 -0
  132. data/test/fixtures/scss_project/app/mailers/.gitkeep +0 -0
  133. data/test/fixtures/scss_project/app/models/.gitkeep +0 -0
  134. data/test/fixtures/scss_project/app/views/layouts/application.html.erb +14 -0
  135. data/test/fixtures/scss_project/config.ru +4 -0
  136. data/test/fixtures/scss_project/config/application.rb +49 -0
  137. data/test/fixtures/scss_project/config/boot.rb +6 -0
  138. data/test/fixtures/scss_project/config/database.yml +25 -0
  139. data/test/fixtures/scss_project/config/environment.rb +5 -0
  140. data/test/fixtures/scss_project/config/environments/development.rb +27 -0
  141. data/test/fixtures/scss_project/config/environments/production.rb +54 -0
  142. data/test/fixtures/scss_project/config/environments/test.rb +39 -0
  143. data/test/fixtures/scss_project/config/initializers/backtrace_silencers.rb +7 -0
  144. data/test/fixtures/scss_project/config/initializers/inflections.rb +10 -0
  145. data/test/fixtures/scss_project/config/initializers/mime_types.rb +5 -0
  146. data/test/fixtures/scss_project/config/initializers/secret_token.rb +7 -0
  147. data/test/fixtures/scss_project/config/initializers/session_store.rb +8 -0
  148. data/test/fixtures/scss_project/config/initializers/wrap_parameters.rb +12 -0
  149. data/test/fixtures/scss_project/config/locales/en.yml +5 -0
  150. data/test/fixtures/scss_project/config/routes.rb +58 -0
  151. data/test/fixtures/scss_project/db/seeds.rb +7 -0
  152. data/test/fixtures/scss_project/doc/README_FOR_APP +2 -0
  153. data/test/fixtures/scss_project/lib/tasks/.gitkeep +0 -0
  154. data/test/fixtures/scss_project/log/.gitkeep +0 -0
  155. data/test/fixtures/scss_project/public/404.html +26 -0
  156. data/test/fixtures/scss_project/public/422.html +26 -0
  157. data/test/fixtures/scss_project/public/500.html +26 -0
  158. data/test/fixtures/scss_project/public/favicon.ico +0 -0
  159. data/test/fixtures/scss_project/public/index.html +241 -0
  160. data/test/fixtures/scss_project/public/robots.txt +5 -0
  161. data/test/fixtures/scss_project/script/rails +6 -0
  162. data/test/fixtures/scss_project/vendor/assets/stylesheets/.gitkeep +0 -0
  163. data/test/fixtures/scss_project/vendor/plugins/.gitkeep +0 -0
  164. data/test/sass_rails_logger_test.rb +26 -0
  165. data/test/sass_rails_test.rb +88 -0
  166. data/test/support/sass_rails_test_case.rb +151 -0
  167. data/test/test_helper.rb +28 -0
  168. metadata +427 -0
@@ -0,0 +1,86 @@
1
+ require 'tilt'
2
+ require 'sprockets'
3
+
4
+ module Sass::Rails
5
+
6
+ class Resolver
7
+
8
+ attr_accessor :context
9
+
10
+ def initialize(context)
11
+ @context = context
12
+ end
13
+
14
+ def resolve(path, content_type = :self)
15
+ options = {}
16
+ options[:content_type] = content_type unless content_type.nil?
17
+ context.resolve(path, options)
18
+ rescue Sprockets::FileNotFound, Sprockets::ContentTypeMismatch
19
+ nil
20
+ end
21
+
22
+ def public_path(path, scope)
23
+ context.asset_paths.compute_public_path(path, scope)
24
+ end
25
+
26
+ def process(path)
27
+ context.environment[path].to_s
28
+ end
29
+ end
30
+
31
+ class SassTemplate < Tilt::SassTemplate
32
+ self.default_mime_type = 'text/css'
33
+
34
+ def self.engine_initialized?
35
+ defined?(::Sass::Engine)
36
+ end
37
+
38
+ def initialize_engine
39
+ require_template_library 'sass'
40
+ end
41
+
42
+ def syntax
43
+ :sass
44
+ end
45
+
46
+ def sass_options_from_rails(scope)
47
+ scope.environment.context_class.sass_config
48
+ end
49
+
50
+ def sass_options(scope)
51
+ importer = self.importer(scope)
52
+ options = sass_options_from_rails(scope)
53
+ load_paths = (options[:load_paths] || []).dup
54
+ load_paths.unshift(importer)
55
+ options.merge(
56
+ :filename => eval_file,
57
+ :line => line,
58
+ :syntax => syntax,
59
+ :importer => importer,
60
+ :load_paths => load_paths,
61
+ :custom => {
62
+ :resolver => Resolver.new(scope)
63
+ }
64
+ )
65
+ end
66
+
67
+ def importer(scope)
68
+ Sass::Rails::Importer.new(scope)
69
+ end
70
+
71
+ def prepare
72
+ end
73
+
74
+ def evaluate(scope, locals, &block)
75
+ Sass::Engine.new(data, sass_options(scope)).render
76
+ end
77
+ end
78
+
79
+ class ScssTemplate < SassTemplate
80
+ self.default_mime_type = 'text/css'
81
+
82
+ def syntax
83
+ :scss
84
+ end
85
+ end
86
+ end
@@ -0,0 +1,5 @@
1
+ module Sass
2
+ module Rails
3
+ VERSION = "3.1.0.1"
4
+ end
5
+ end
@@ -0,0 +1,25 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "sass/rails/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "wireframe-sass-rails"
7
+ s.version = Sass::Rails::VERSION
8
+ s.platform = Gem::Platform::RUBY
9
+ s.authors = ["wycats", "chriseppstein"]
10
+ s.email = ["wycats@gmail.com", "chris@eppsteins.net"]
11
+ s.homepage = ""
12
+ s.summary = %q{Sass adapter for the Rails asset pipeline.}
13
+ s.description = %q{Sass adapter for the Rails asset pipeline.}
14
+
15
+ s.rubyforge_project = "sass-rails"
16
+
17
+ s.add_runtime_dependency 'sass', '>= 3.1.4'
18
+ s.add_runtime_dependency 'railties', '~> 3.1.0'
19
+ s.add_runtime_dependency 'actionpack', '~> 3.1.0'
20
+
21
+ s.files = `git ls-files`.split("\n")
22
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
23
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
24
+ s.require_paths = ["lib"]
25
+ end
@@ -0,0 +1,6 @@
1
+ .bundle/
2
+ log/*.log
3
+ pkg/
4
+ test/dummy/db/*.sqlite3
5
+ test/dummy/log/*.log
6
+ test/dummy/tmp/
@@ -0,0 +1,7 @@
1
+ source 'http://rubygems.org'
2
+
3
+ gem 'rails', "~> 3.1.0.rc4"
4
+ gem 'sqlite3'
5
+
6
+ # Asset template engines
7
+ gem 'sass-rails'
@@ -0,0 +1,3 @@
1
+ = EngineProject
2
+
3
+ This project rocks and uses MIT-LICENSE.
@@ -0,0 +1,39 @@
1
+ #!/usr/bin/env rake
2
+ begin
3
+ require 'bundler/setup'
4
+ rescue LoadError
5
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
6
+ end
7
+ begin
8
+ require 'rdoc/task'
9
+ rescue LoadError
10
+ require 'rdoc/rdoc'
11
+ require 'rake/rdoctask'
12
+ RDoc::Task = Rake::RDocTask
13
+ end
14
+
15
+ RDoc::Task.new(:rdoc) do |rdoc|
16
+ rdoc.rdoc_dir = 'rdoc'
17
+ rdoc.title = 'EngineProject'
18
+ rdoc.options << '--line-numbers'
19
+ rdoc.rdoc_files.include('README.rdoc')
20
+ rdoc.rdoc_files.include('lib/**/*.rb')
21
+ end
22
+
23
+ APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__)
24
+ load 'rails/tasks/engine.rake'
25
+
26
+
27
+ Bundler::GemHelper.install_tasks
28
+
29
+ require 'rake/testtask'
30
+
31
+ Rake::TestTask.new(:test) do |t|
32
+ t.libs << 'lib'
33
+ t.libs << 'test'
34
+ t.pattern = 'test/**/*_test.rb'
35
+ t.verbose = false
36
+ end
37
+
38
+
39
+ task :default => :test
@@ -0,0 +1,9 @@
1
+ // This is a manifest file that'll be compiled into including all the files listed below.
2
+ // Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
3
+ // be included in the compiled file accessible from http://example.com/assets/application.js
4
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
5
+ // the compiled file.
6
+ //
7
+ //= require jquery
8
+ //= require jquery_ujs
9
+ //= require_tree .
@@ -0,0 +1,7 @@
1
+ /*
2
+ * This is a manifest file that'll automatically include all the stylesheets available in this directory
3
+ * and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
4
+ * the top of the compiled file, but it's generally better to create a new file per style scope.
5
+ *= require_self
6
+ *= require_tree .
7
+ */
@@ -0,0 +1,4 @@
1
+ module EngineProject
2
+ class ApplicationController < ActionController::Base
3
+ end
4
+ end
@@ -0,0 +1,4 @@
1
+ module EngineProject
2
+ module ApplicationHelper
3
+ end
4
+ end
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>EngineProject</title>
5
+ <%= stylesheet_link_tag "engine_project/application" %>
6
+ <%= javascript_include_tag "engine_project/application" %>
7
+ <%= csrf_meta_tags %>
8
+ </head>
9
+ <body>
10
+
11
+ <%= yield %>
12
+
13
+ </body>
14
+ </html>
@@ -0,0 +1,2 @@
1
+ EngineProject::Engine.routes.draw do
2
+ end
@@ -0,0 +1,4 @@
1
+ require "engine_project/engine"
2
+
3
+ module EngineProject
4
+ end
@@ -0,0 +1,5 @@
1
+ module EngineProject
2
+ class Engine < Rails::Engine
3
+ isolate_namespace EngineProject
4
+ end
5
+ end
@@ -0,0 +1,3 @@
1
+ module EngineProject
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1,4 @@
1
+ # desc "Explaining what the task does"
2
+ # task :engine_project do
3
+ # # Task goes here
4
+ # end
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ #!/usr/bin/env ruby
3
+ # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
4
+
5
+ ENGINE_PATH = File.expand_path('../..', __FILE__)
6
+ load File.expand_path('../../test/dummy/script/rails', __FILE__)
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env rake
2
+ # Add your own tasks in files placed in lib/tasks ending in .rake,
3
+ # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
4
+
5
+ require File.expand_path('../config/application', __FILE__)
6
+
7
+ Dummy::Application.load_tasks
@@ -0,0 +1,9 @@
1
+ // This is a manifest file that'll be compiled into including all the files listed below.
2
+ // Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
3
+ // be included in the compiled file accessible from http://example.com/assets/application.js
4
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
5
+ // the compiled file.
6
+ //
7
+ //= require jquery
8
+ //= require jquery_ujs
9
+ //= require_tree .
@@ -0,0 +1,7 @@
1
+ /*
2
+ * This is a manifest file that'll automatically include all the stylesheets available in this directory
3
+ * and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
4
+ * the top of the compiled file, but it's generally better to create a new file per style scope.
5
+ *= require_self
6
+ *= require_tree .
7
+ */
@@ -0,0 +1,3 @@
1
+ class ApplicationController < ActionController::Base
2
+ protect_from_forgery
3
+ end
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Dummy</title>
5
+ <%= stylesheet_link_tag "application" %>
6
+ <%= javascript_include_tag "application" %>
7
+ <%= csrf_meta_tags %>
8
+ </head>
9
+ <body>
10
+
11
+ <%= yield %>
12
+
13
+ </body>
14
+ </html>
@@ -0,0 +1,4 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require ::File.expand_path('../config/environment', __FILE__)
4
+ run Dummy::Application
@@ -0,0 +1,42 @@
1
+ require File.expand_path('../boot', __FILE__)
2
+
3
+ require 'rails/all'
4
+
5
+ Bundler.require
6
+ require "engine_project"
7
+
8
+ module Dummy
9
+ class Application < Rails::Application
10
+ # Settings in config/environments/* take precedence over those specified here.
11
+ # Application configuration should go into files in config/initializers
12
+ # -- all .rb files in that directory are automatically loaded.
13
+
14
+ # Custom directories with classes and modules you want to be autoloadable.
15
+ # config.autoload_paths += %W(#{config.root}/extras)
16
+
17
+ # Only load the plugins named here, in the order given (default is alphabetical).
18
+ # :all can be used as a placeholder for all plugins not explicitly named.
19
+ # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
20
+
21
+ # Activate observers that should always be running.
22
+ # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
23
+
24
+ # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
25
+ # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
26
+ # config.time_zone = 'Central Time (US & Canada)'
27
+
28
+ # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
29
+ # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
30
+ # config.i18n.default_locale = :de
31
+
32
+ # Configure the default encoding used in templates for Ruby 1.9.
33
+ config.encoding = "utf-8"
34
+
35
+ # Configure sensitive parameters which will be filtered from the log file.
36
+ config.filter_parameters += [:password]
37
+
38
+ # Enable the asset pipeline
39
+ config.assets.enabled = true
40
+ end
41
+ end
42
+
@@ -0,0 +1,10 @@
1
+ require 'rubygems'
2
+ gemfile = File.expand_path('../../../../Gemfile', __FILE__)
3
+
4
+ if File.exist?(gemfile)
5
+ ENV['BUNDLE_GEMFILE'] = gemfile
6
+ require 'bundler'
7
+ Bundler.setup
8
+ end
9
+
10
+ $:.unshift File.expand_path('../../../../lib', __FILE__)
@@ -0,0 +1,25 @@
1
+ # SQLite version 3.x
2
+ # gem install sqlite3
3
+ #
4
+ # Ensure the SQLite 3 gem is defined in your Gemfile
5
+ # gem 'sqlite3'
6
+ development:
7
+ adapter: sqlite3
8
+ database: db/development.sqlite3
9
+ pool: 5
10
+ timeout: 5000
11
+
12
+ # Warning: The database defined as "test" will be erased and
13
+ # re-generated from your development database when you run "rake".
14
+ # Do not set this db to the same as development or production.
15
+ test:
16
+ adapter: sqlite3
17
+ database: db/test.sqlite3
18
+ pool: 5
19
+ timeout: 5000
20
+
21
+ production:
22
+ adapter: sqlite3
23
+ database: db/production.sqlite3
24
+ pool: 5
25
+ timeout: 5000
@@ -0,0 +1,5 @@
1
+ # Load the rails application
2
+ require File.expand_path('../application', __FILE__)
3
+
4
+ # Initialize the rails application
5
+ Dummy::Application.initialize!
@@ -0,0 +1,27 @@
1
+ Dummy::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb
3
+
4
+ # In the development environment your application's code is reloaded on
5
+ # every request. This slows down response time but is perfect for development
6
+ # since you don't have to restart the web server when you make code changes.
7
+ config.cache_classes = false
8
+
9
+ # Log error messages when you accidentally call methods on nil.
10
+ config.whiny_nils = true
11
+
12
+ # Show full error reports and disable caching
13
+ config.consider_all_requests_local = true
14
+ config.action_controller.perform_caching = false
15
+
16
+ # Don't care if the mailer can't send
17
+ config.action_mailer.raise_delivery_errors = false
18
+
19
+ # Print deprecation notices to the Rails logger
20
+ config.active_support.deprecation = :log
21
+
22
+ # Only use best-standards-support built into browsers
23
+ config.action_dispatch.best_standards_support = :builtin
24
+
25
+ # Do not compress assets
26
+ config.assets.compress = false
27
+ end