├── .buildpacks ├── .gitignore ├── .ruby-version ├── Gemfile ├── Gemfile.lock ├── LICENSE.txt ├── README.md ├── Rakefile ├── app ├── .gitignore ├── assets │ ├── javascripts │ │ └── application.js │ └── stylesheets │ │ └── application.css ├── controllers │ ├── application_controller.rb │ ├── concerns │ │ └── .keep │ └── welcome_controller.rb ├── helpers │ ├── application_helper.rb │ └── welcome_helper.rb ├── mailers │ └── .keep ├── models │ ├── .keep │ └── concerns │ │ └── .keep └── views │ ├── layouts │ └── application.html.erb │ └── welcome │ └── index.html.erb ├── bin ├── bundle ├── rails ├── rake ├── setup └── spring ├── config.ru ├── config ├── application.rb ├── boot.rb ├── database.yml ├── environment.rb ├── environments │ ├── development.rb │ ├── production.rb │ └── test.rb ├── initializers │ ├── assets.rb │ ├── backtrace_silencers.rb │ ├── cookies_serializer.rb │ ├── filter_parameter_logging.rb │ ├── inflections.rb │ ├── mime_types.rb │ ├── rev_manifest.rb │ ├── session_store.rb │ └── wrap_parameters.rb ├── locales │ └── en.yml ├── routes.rb └── secrets.yml ├── db ├── development.sqlite3 └── seeds.rb ├── file-structure.png ├── gulp ├── assets │ ├── icons │ │ ├── uE001-facebook.svg │ │ ├── uE002-linkedin.svg │ │ ├── uE003-pinterest.svg │ │ └── uE004-twitter.svg │ ├── images │ │ └── gulp.png │ ├── javascripts │ │ ├── global.coffee │ │ └── message.js │ └── stylesheets │ │ ├── base │ │ └── _iconFont.sass │ │ └── global.sass ├── config.js ├── tasks │ ├── browserSync.js │ ├── browserify.js │ ├── build.js │ ├── clean.js │ ├── default.js │ ├── iconFont │ │ ├── generateIconSass.js │ │ ├── index.js │ │ └── template.sass │ ├── images.js │ ├── rev │ │ ├── index.js │ │ ├── rev-assets.js │ │ └── rev-font-workaround.js │ ├── sass.js │ ├── watch.js │ └── watchify.js └── util │ ├── bundleLogger.js │ └── handleErrors.js ├── gulpfile.js ├── lib ├── assets │ └── .keep └── tasks │ └── .keep ├── log └── .keep ├── package.json ├── public ├── 404.html ├── 422.html ├── 500.html ├── favicon.ico └── robots.txt ├── test ├── controllers │ ├── .keep │ └── welcome_controller_test.rb ├── fixtures │ └── .keep ├── helpers │ └── .keep ├── integration │ └── .keep ├── mailers │ └── .keep ├── models │ └── .keep └── test_helper.rb └── vendor └── assets ├── javascripts └── .keep └── stylesheets └── .keep /.buildpacks: -------------------------------------------------------------------------------- 1 | https://github.com/heroku/heroku-buildpack-nodejs.git 2 | https://github.com/heroku/heroku-buildpack-ruby.git -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # From https://github.com/github/gitignore 2 | *.rbc 3 | capybara-*.html 4 | .rspec 5 | /log 6 | /tmp 7 | /db/*.sqlite3 8 | /db/*.sqlite3-journal 9 | /public/system 10 | /coverage/ 11 | /spec/tmp 12 | /node_modules 13 | /app/assets/*/compiled/ 14 | /public/assets/* 15 | 16 | **.orig 17 | rerun.txt 18 | pickle-email-*.html 19 | 20 | # TODO Comment out these rules if you are OK with secrets being uploaded to the repo 21 | config/initializers/secret_token.rb 22 | config/secrets.yml 23 | 24 | ## Environment normalisation: 25 | /.bundle 26 | /vendor/bundle 27 | 28 | # these should all be checked in to normalise the environment: 29 | # Gemfile.lock, .ruby-version, .ruby-gemset 30 | 31 | # unless supporting rvm < 1.11.0 or doing something fancy, ignore this: 32 | .rvmrc 33 | 34 | # if using bower-rails ignore default bower_components path bower.json files 35 | /vendor/assets/bower_components 36 | *.bowerrc 37 | bower.json 38 | 39 | # Ignore pow environment settings 40 | .powenv 41 | -------------------------------------------------------------------------------- /.ruby-version: -------------------------------------------------------------------------------- 1 | 2.1.4 2 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gem 'rails', '4.2.0' 4 | gem 'sass-rails', '~> 5.0' 5 | gem 'uglifier', '>= 1.3.0' 6 | gem 'coffee-rails', '~> 4.1.0' 7 | gem 'jquery-rails' 8 | gem 'turbolinks' 9 | gem 'sqlite3', group: :development 10 | gem 'pg', group: :production # For heroku 11 | -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://rubygems.org/ 3 | specs: 4 | actionmailer (4.2.0) 5 | actionpack (= 4.2.0) 6 | actionview (= 4.2.0) 7 | activejob (= 4.2.0) 8 | mail (~> 2.5, >= 2.5.4) 9 | rails-dom-testing (~> 1.0, >= 1.0.5) 10 | actionpack (4.2.0) 11 | actionview (= 4.2.0) 12 | activesupport (= 4.2.0) 13 | rack (~> 1.6.0) 14 | rack-test (~> 0.6.2) 15 | rails-dom-testing (~> 1.0, >= 1.0.5) 16 | rails-html-sanitizer (~> 1.0, >= 1.0.1) 17 | actionview (4.2.0) 18 | activesupport (= 4.2.0) 19 | builder (~> 3.1) 20 | erubis (~> 2.7.0) 21 | rails-dom-testing (~> 1.0, >= 1.0.5) 22 | rails-html-sanitizer (~> 1.0, >= 1.0.1) 23 | activejob (4.2.0) 24 | activesupport (= 4.2.0) 25 | globalid (>= 0.3.0) 26 | activemodel (4.2.0) 27 | activesupport (= 4.2.0) 28 | builder (~> 3.1) 29 | activerecord (4.2.0) 30 | activemodel (= 4.2.0) 31 | activesupport (= 4.2.0) 32 | arel (~> 6.0) 33 | activesupport (4.2.0) 34 | i18n (~> 0.7) 35 | json (~> 1.7, >= 1.7.7) 36 | minitest (~> 5.1) 37 | thread_safe (~> 0.3, >= 0.3.4) 38 | tzinfo (~> 1.1) 39 | arel (6.0.0) 40 | builder (3.2.2) 41 | coffee-rails (4.1.0) 42 | coffee-script (>= 2.2.0) 43 | railties (>= 4.0.0, < 5.0) 44 | coffee-script (2.3.0) 45 | coffee-script-source 46 | execjs 47 | coffee-script-source (1.9.0) 48 | erubis (2.7.0) 49 | execjs (2.3.0) 50 | globalid (0.3.2) 51 | activesupport (>= 4.1.0) 52 | hike (1.2.3) 53 | i18n (0.7.0) 54 | jquery-rails (4.0.3) 55 | rails-dom-testing (~> 1.0) 56 | railties (>= 4.2.0) 57 | thor (>= 0.14, < 2.0) 58 | json (1.8.2) 59 | loofah (2.0.1) 60 | nokogiri (>= 1.5.9) 61 | mail (2.6.3) 62 | mime-types (>= 1.16, < 3) 63 | mime-types (2.4.3) 64 | mini_portile (0.6.2) 65 | minitest (5.5.1) 66 | multi_json (1.10.1) 67 | nokogiri (1.6.6.2) 68 | mini_portile (~> 0.6.0) 69 | pg (0.18.1) 70 | rack (1.6.0) 71 | rack-test (0.6.3) 72 | rack (>= 1.0) 73 | rails (4.2.0) 74 | actionmailer (= 4.2.0) 75 | actionpack (= 4.2.0) 76 | actionview (= 4.2.0) 77 | activejob (= 4.2.0) 78 | activemodel (= 4.2.0) 79 | activerecord (= 4.2.0) 80 | activesupport (= 4.2.0) 81 | bundler (>= 1.3.0, < 2.0) 82 | railties (= 4.2.0) 83 | sprockets-rails 84 | rails-deprecated_sanitizer (1.0.3) 85 | activesupport (>= 4.2.0.alpha) 86 | rails-dom-testing (1.0.5) 87 | activesupport (>= 4.2.0.beta, < 5.0) 88 | nokogiri (~> 1.6.0) 89 | rails-deprecated_sanitizer (>= 1.0.1) 90 | rails-html-sanitizer (1.0.1) 91 | loofah (~> 2.0) 92 | railties (4.2.0) 93 | actionpack (= 4.2.0) 94 | activesupport (= 4.2.0) 95 | rake (>= 0.8.7) 96 | thor (>= 0.18.1, < 2.0) 97 | rake (10.4.2) 98 | sass (3.4.11) 99 | sass-rails (5.0.1) 100 | railties (>= 4.0.0, < 5.0) 101 | sass (~> 3.1) 102 | sprockets (>= 2.8, < 4.0) 103 | sprockets-rails (>= 2.0, < 4.0) 104 | tilt (~> 1.1) 105 | sprockets (2.12.3) 106 | hike (~> 1.2) 107 | multi_json (~> 1.0) 108 | rack (~> 1.0) 109 | tilt (~> 1.1, != 1.3.0) 110 | sprockets-rails (2.2.4) 111 | actionpack (>= 3.0) 112 | activesupport (>= 3.0) 113 | sprockets (>= 2.8, < 4.0) 114 | sqlite3 (1.3.10) 115 | thor (0.19.1) 116 | thread_safe (0.3.4) 117 | tilt (1.4.1) 118 | turbolinks (2.5.3) 119 | coffee-rails 120 | tzinfo (1.2.2) 121 | thread_safe (~> 0.1) 122 | uglifier (2.7.0) 123 | execjs (>= 0.3.0) 124 | json (>= 1.8.0) 125 | 126 | PLATFORMS 127 | ruby 128 | 129 | DEPENDENCIES 130 | coffee-rails (~> 4.1.0) 131 | jquery-rails 132 | pg 133 | rails (= 4.2.0) 134 | sass-rails (~> 5.0) 135 | sqlite3 136 | turbolinks 137 | uglifier (>= 1.3.0) 138 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Viget Labs 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DEPRECATED: [Use Blendid!](https://github.com/vigetlabs/blendid) 2 | 3 | The work done in this repo has been rolled into a single dependency solution: [Blendid!](https://github.com/vigetlabs/blendid). You can set up your Rails project with the `yarn run blendid -- init-rails` command. 4 | 5 | 6 | # The Gulp Asset Pipeline on Rails 7 | - **Leaves Sprockets and manifest files intact** for use with gem installed assets 8 | - Transform and bundle CommonJS modules (js or coffee) with Browserify 9 | - Compile .sass/.scss with Libsass (node-sass through gulp-sass) 10 | - Autoprefix css 11 | - Optimize images (could be expanded to further process or resize images) 12 | - Compile an icon font + sass from a folder of SVGs 13 | - Full BrowserSync integration (the original Rails Asset Pipeline didn't work with live stylesheet injection) 14 | - Revision filenames in production for caching 15 | - Build assets on deploy with Heroku 16 | 17 | [Production Environment Demo](https://gulp-rails-pipeline.herokuapp.com/) _(notice the revisioned asset filenames for caching)_ 18 | 19 | **This repo is only meant to be an example.** You should fork and customize it with your own Rails setup and relevant Gulp tasks, or copy the relevant files into an existing project. To understand more about individual modules, read the documentation on their respective websites and repositories. Based on [gulp-starter](https://github.com/vigetlabs/gulp-starter). 20 | 21 | ## Running the Demo 22 | Clone the repository 23 | ``` 24 | git clone https://github.com/vigetlabs/gulp-rails-pipeline.git 25 | ``` 26 | 27 | Enter into the directory and run bundle install 28 | ``` 29 | cd gulp-rails-pipeline 30 | bundle install 31 | ``` 32 | 33 | Install javascript dependencies. Once npm install runs, the `postinstall` setting in `package.json` will run `gulp build` and do an initial build of your assets. 34 | ``` 35 | npm install 36 | ``` 37 | 38 | Start the rails server. 39 | ``` 40 | rails s 41 | ``` 42 | 43 | Run gulp and rejoice! This will start watching and recompiling files on the fly, as well as open a browser with BrowserSync running. 44 | ``` 45 | gulp 46 | ``` 47 | 48 | Try editing `global.sass` and watch how fast it reloads the css! Once you taste the speed of Libsass + BrowserSync, you'll never go back. Test out changing view code and javascript as well. 49 | 50 | ## Asset File Structure 51 | ![Asset File Structure](file-structure.png) 52 | ### gulp/assets 53 | This is where all your source files will live. Your source icons for icon fonts, sass files, js modules, and images. Anything that needs to get processed by Gulp. All assets are set up to compile to `public/assets`. 54 | 55 | ### public/assets 56 | The destination of your compiled and processed assets. The `application.css` and `application.js` manifest files in `app/assets` pull compiled code from this folder. 57 | 58 | ### app/assets 59 | The old default asset directory should only include manifest files, which are necessary if you need to require gem installed assets (e.g., jquery_ujs, turbolinks) with Sprockets. The manifest files pull in gem assets, as well as our compiled js and css files from `/public/assets`. 60 | 61 | ## Rails setup notes: 62 | 63 | ### config/application.rb 64 | ```rb 65 | # Make public assets requireable in manifest files 66 | config.assets.paths << Rails.root.join("public", "assets", "stylesheets") 67 | config.assets.paths << Rails.root.join("public", "assets", "javascripts") 68 | ``` 69 | If you plan on continuing to use Sprockets to `//require=` gem assets, you'll include your compiled js and css files in the `application.js` and `application.css` manifests files. The snippet above tells Sprockets to look in our `public/assets` directories when searching for required files. With this implementation, you'll continue using the Rails `javascript_include_tag` and `stylesheet_link_tag` asset pipeline helpers to pull in your manifest files (and everything they require). If you end up *not* needing the pipeline at all, you can pull in your compiled css and js directly with the `gulp_asset_path` helper (see below) and regular html. 70 | 71 | ### config/environments/development.rb 72 | ```rb 73 | config.assets.debug = true 74 | config.assets.digest = false 75 | ``` 76 | To fully take advantage of BrowserSync's live stylesheet injection, be sure to configure the two values above. Setting `config.assets.debug` to `true` tells Rails to output each individual file required in your `application.js` and `application.css` manifests, rather than concatenating them. This is the default setting in development. Setting `config.assets.digest` to `false` disables appending md5 hashes for caching with future `Expires` headers. With your individual files referenced and their file names unchanged, BrowserSync can reference and replace them properly as they get changed. 77 | 78 | ### package.json 79 | ```json 80 | "scripts": { 81 | "postinstall": "gulp build" 82 | }, 83 | "dependencies": {...} 84 | ``` 85 | After running `npm install`, Node will search the `scripts` object in `package.json` for `postinstall`, and will run the script if specified. `gulp build` compiles your assets. The build can be set up differently for different Rails environments. See below. A note about `dependencies`. Services like Heroku will ignore anything in `devDependences`, since it's technically a production environment. So be sure to put anything your build process needs to run in `dependencies`, NOT `devDependencies.` 86 | 87 | ### gulp/tasks/build.js 88 | ```js 89 | // line 6 90 | if(process.env.RAILS_ENV === 'production') tasks.push('rev'); 91 | ``` 92 | If the RAILS_ENV is set to `production`, assets will be renamed with an appended md5 hash for caching with far future `Expires` headers, and any references in stylesheets or javascript files will be updated accordingly. For inline asset references in Rails Views, you can use the following asset helper. 93 | 94 | ### app/helpers/application_helper.rb 95 | ```rb 96 | def gulp_asset_path(path) 97 | path = REV_MANIFEST[path] if defined?(REV_MANIFEST) 98 | "/assets/#{path}" 99 | end 100 | ``` 101 | Because we're storing our assets outside of the Rails Asset Pipeline, we need to re-implement the `asset_path` path helper as `gulp_asset_path` to reference un-hashed files in `development`, and the cacheable hashed versions of the files in `production`. This goes for other Rails Asset Pipeline helpers, such as `<%= image_tag, 'asset.png' %>`. Instead, use ``. 102 | 103 | ### config/initializers/rev_manifest.rb 104 | ```rb 105 | rev_manifest_path = 'public/assets/rev-manifest.json' 106 | 107 | if File.exist?(rev_manifest_path) 108 | REV_MANIFEST = JSON.parse(File.read(rev_manifest_path)) 109 | end 110 | ``` 111 | 112 | You'll notice this constant referenced in the `gulp_asset_path` helper above. The `gulp/tasks/rev.js` that gets run in production outputs a `rev-manifest.json` file, mapping the original filenames to the revisioned ones. If that file exists when the app starts, the hashed filenames are used. If it doesn't exist, the filename references remain unchanged. 113 | 114 | ## Deploying 115 | To avoid git messiness and redundant rebases and merge conflicts, it's usually a good idea to `.gitignore` your compiled assets. This means you'll have to have them compile as part of your deploy process. In short, you'll need to ensure the following: 116 | 117 | 1. Node is installed 118 | 2. `npm install` runs 119 | 3. `gulp build` runs on `postinstall` (specified in package.json) 120 | 121 | These steps must complete **before** starting the Rails server. 122 | 123 | ### Heroku 124 | Heroku makes deploying SUPER easy, but there are a couple of things you'll need to do to get this running. 125 | 126 | Since we're using Ruby (to run Rails) AND Node (to compile our assets with Gulp) in our setup, we need both running on our server. Heroku will automatically detect ONE of these at a time based on the presense of a `Gemfile` or `package.json`, but to get both running simultaneously, we need to [specify multiple buildpacks](https://devcenter.heroku.com/articles/using-multiple-buildpacks-for-an-app) in the order we want. 127 | 128 | ```bash 129 | heroku buildpacks # view current buildpacks 130 | heroku buildpacks:clear # clear current buildpacks, if necessary 131 | heroku buildpacks:add heroku/nodejs # add the buildpacks we want ... 132 | heroku buildpacks:add heroku/ruby # ... in the order we want them 133 | ``` 134 | 135 | Now, when we deploy to Heroku, first `npm install` will run, then our `postinstall` script specified in `package.json`, and then `bundle install` will run. 136 | 137 | Take note of the following: 138 | ```rb 139 | #production.rb line 25 140 | config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present? 141 | ``` 142 | Heroku requires `config.serve_static_files` to be enabled, so be sure to either add `RAILS_SERVE_STATIC_FILES` as a config var in your Heroku settings, or manually set this to true in your `production.rb` file. 143 | 144 | ### Capistrano 145 | 146 | All we need to do is add a task to run `npm install` before we compile the assets. 147 | 148 | The example below shows an example of using [nvm](https://github.com/creationix/nvm) (node version manager) to use the specified node version for your application. 149 | 150 | ```rb 151 | # ./config/deploy.rb 152 | 153 | before "deploy:assets:precompile", "deploy:npm_install" 154 | 155 | namespace :deploy do 156 | desc "Run npm install" 157 | task :npm_install do 158 | invoke_command "bash -c '. /home/deploy/.nvm/nvm.sh && cd #{release_path} && npm install'" 159 | end 160 | end 161 | ``` 162 | 163 | --- 164 | Original Blog Post: [viget.com/extend/gulp-rails-asset-pipeline](http://viget.com/extend/gulp-rails-asset-pipeline) 165 | 166 | *** 167 | 168 | 169 | Code At Viget 170 | 171 | 172 | Visit [code.viget.com](http://code.viget.com) to see more projects from [Viget.](https://viget.com) 173 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | # Add your own tasks in files placed in lib/tasks ending in .rake, 2 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. 3 | 4 | require File.expand_path('../config/application', __FILE__) 5 | 6 | Rails.application.load_tasks 7 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files for more about ignoring files. 2 | # 3 | # If you find yourself ignoring temporary files generated by your text editor 4 | # or operating system, you probably want to add a global ignore instead: 5 | # git config --global core.excludesfile '~/.gitignore_global' 6 | 7 | # Ignore bundler config. 8 | /.bundle 9 | 10 | # Ignore the default SQLite database. 11 | /db/*.sqlite3 12 | /db/*.sqlite3-journal 13 | 14 | # Ignore all logfiles and tempfiles. 15 | /log/* 16 | !/log/.keep 17 | /tmp 18 | -------------------------------------------------------------------------------- /app/assets/javascripts/application.js: -------------------------------------------------------------------------------- 1 | // This is a manifest file that'll be compiled into application.js, which will include all the files 2 | // listed below. 3 | // 4 | // Only include gem installed javascript assets here. All other js develoment should use Common JS 5 | // and will be compiled with Gulp and Browserify 6 | // 7 | //= require jquery 8 | //= require jquery_ujs 9 | //= require turbolinks 10 | // 11 | // Pull compiled from /public/assets/javascripts 12 | //= require global 13 | -------------------------------------------------------------------------------- /app/assets/stylesheets/application.css: -------------------------------------------------------------------------------- 1 | /* 2 | * This is a manifest file that'll be compiled into application.css, which will include all the files 3 | * listed below. 4 | * 5 | * Use this file to include any stylesheet assets from installed gems. All other css is compiled with 6 | * libsass with Gulp. 7 | * 8 | * Pull compiled from /public/assets/stylesheets 9 | *= require global 10 | */ 11 | -------------------------------------------------------------------------------- /app/controllers/application_controller.rb: -------------------------------------------------------------------------------- 1 | class ApplicationController < ActionController::Base 2 | # Prevent CSRF attacks by raising an exception. 3 | # For APIs, you may want to use :null_session instead. 4 | protect_from_forgery with: :exception 5 | end 6 | -------------------------------------------------------------------------------- /app/controllers/concerns/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vigetlabs/gulp-rails-pipeline/708f1848030a5272f3e152b4fe3bb59536647b66/app/controllers/concerns/.keep -------------------------------------------------------------------------------- /app/controllers/welcome_controller.rb: -------------------------------------------------------------------------------- 1 | class WelcomeController < ApplicationController 2 | def index 3 | end 4 | end 5 | -------------------------------------------------------------------------------- /app/helpers/application_helper.rb: -------------------------------------------------------------------------------- 1 | module ApplicationHelper 2 | def gulp_asset_path(path) 3 | path = REV_MANIFEST[path] if defined?(REV_MANIFEST) 4 | "/assets/#{path}" 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /app/helpers/welcome_helper.rb: -------------------------------------------------------------------------------- 1 | module WelcomeHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/mailers/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vigetlabs/gulp-rails-pipeline/708f1848030a5272f3e152b4fe3bb59536647b66/app/mailers/.keep -------------------------------------------------------------------------------- /app/models/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vigetlabs/gulp-rails-pipeline/708f1848030a5272f3e152b4fe3bb59536647b66/app/models/.keep -------------------------------------------------------------------------------- /app/models/concerns/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vigetlabs/gulp-rails-pipeline/708f1848030a5272f3e152b4fe3bb59536647b66/app/models/concerns/.keep -------------------------------------------------------------------------------- /app/views/layouts/application.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | App 5 | <%= stylesheet_link_tag 'application' %> 6 | <%= javascript_include_tag 'application' %> 7 | <%= csrf_meta_tags %> 8 | 9 | 10 | 11 | <%= yield %> 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /app/views/welcome/index.html.erb: -------------------------------------------------------------------------------- 1 |

Gulp Asset Pipeline on Rails

2 | 3 |

Ditch the Rails Asset Pipeline and roll your own with Gulp.

4 |

5 | 6 | 7 | <-- generated icon font 8 |

9 |

Made with ♥ at Viget

10 | -------------------------------------------------------------------------------- /bin/bundle: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) 3 | load Gem.bin_path('bundler', 'bundle') 4 | -------------------------------------------------------------------------------- /bin/rails: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | begin 3 | load File.expand_path("../spring", __FILE__) 4 | rescue LoadError 5 | end 6 | APP_PATH = File.expand_path('../../config/application', __FILE__) 7 | require_relative '../config/boot' 8 | require 'rails/commands' 9 | -------------------------------------------------------------------------------- /bin/rake: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | begin 3 | load File.expand_path("../spring", __FILE__) 4 | rescue LoadError 5 | end 6 | require_relative '../config/boot' 7 | require 'rake' 8 | Rake.application.run 9 | -------------------------------------------------------------------------------- /bin/setup: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require 'pathname' 3 | 4 | # path to your application root. 5 | APP_ROOT = Pathname.new File.expand_path('../../', __FILE__) 6 | 7 | Dir.chdir APP_ROOT do 8 | # This script is a starting point to setup your application. 9 | # Add necessary setup steps to this file: 10 | 11 | puts "== Installing dependencies ==" 12 | system "gem install bundler --conservative" 13 | system "bundle check || bundle install" 14 | 15 | # puts "\n== Copying sample files ==" 16 | # unless File.exist?("config/database.yml") 17 | # system "cp config/database.yml.sample config/database.yml" 18 | # end 19 | 20 | puts "\n== Preparing database ==" 21 | system "bin/rake db:setup" 22 | 23 | puts "\n== Removing old logs and tempfiles ==" 24 | system "rm -f log/*" 25 | system "rm -rf tmp/cache" 26 | 27 | puts "\n== Restarting application server ==" 28 | system "touch tmp/restart.txt" 29 | end 30 | -------------------------------------------------------------------------------- /bin/spring: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | # This file loads spring without using Bundler, in order to be fast 4 | # It gets overwritten when you run the `spring binstub` command 5 | 6 | unless defined?(Spring) 7 | require "rubygems" 8 | require "bundler" 9 | 10 | if match = Bundler.default_lockfile.read.match(/^GEM$.*?^ (?: )*spring \((.*?)\)$.*?^$/m) 11 | ENV["GEM_PATH"] = ([Bundler.bundle_path.to_s] + Gem.path).join(File::PATH_SEPARATOR) 12 | ENV["GEM_HOME"] = nil 13 | Gem.paths = ENV 14 | 15 | gem "spring", match[1] 16 | require "spring/binstub" 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /config.ru: -------------------------------------------------------------------------------- 1 | # This file is used by Rack-based servers to start the application. 2 | 3 | require ::File.expand_path('../config/environment', __FILE__) 4 | run Rails.application 5 | -------------------------------------------------------------------------------- /config/application.rb: -------------------------------------------------------------------------------- 1 | require File.expand_path('../boot', __FILE__) 2 | 3 | require 'rails/all' 4 | 5 | # Require the gems listed in Gemfile, including any gems 6 | # you've limited to :test, :development, or :production. 7 | Bundler.require(*Rails.groups) 8 | 9 | module App 10 | class Application < Rails::Application 11 | # Settings in config/environments/* take precedence over those specified here. 12 | # Application configuration should go into files in config/initializers 13 | # -- all .rb files in that directory are automatically loaded. 14 | 15 | # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. 16 | # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. 17 | # config.time_zone = 'Central Time (US & Canada)' 18 | 19 | # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. 20 | # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] 21 | # config.i18n.default_locale = :de 22 | 23 | # Do not swallow errors in after_commit/after_rollback callbacks. 24 | config.active_record.raise_in_transactional_callbacks = true 25 | 26 | # Make public assets requireable in manifest files 27 | config.assets.paths << Rails.root.join("public", "assets", "stylesheets") 28 | config.assets.paths << Rails.root.join("public", "assets", "javascripts") 29 | end 30 | end 31 | -------------------------------------------------------------------------------- /config/boot.rb: -------------------------------------------------------------------------------- 1 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) 2 | 3 | require 'bundler/setup' # Set up gems listed in the Gemfile. 4 | -------------------------------------------------------------------------------- /config/database.yml: -------------------------------------------------------------------------------- 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 | # 7 | default: &default 8 | adapter: sqlite3 9 | pool: 5 10 | timeout: 5000 11 | 12 | development: 13 | <<: *default 14 | database: db/development.sqlite3 15 | 16 | # Warning: The database defined as "test" will be erased and 17 | # re-generated from your development database when you run "rake". 18 | # Do not set this db to the same as development or production. 19 | test: 20 | <<: *default 21 | database: db/test.sqlite3 22 | 23 | production: 24 | <<: *default 25 | database: db/production.sqlite3 26 | -------------------------------------------------------------------------------- /config/environment.rb: -------------------------------------------------------------------------------- 1 | # Load the Rails application. 2 | require File.expand_path('../application', __FILE__) 3 | 4 | # Initialize the Rails application. 5 | Rails.application.initialize! 6 | -------------------------------------------------------------------------------- /config/environments/development.rb: -------------------------------------------------------------------------------- 1 | Rails.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 | # Do not eager load code on boot. 10 | config.eager_load = false 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 | # Raise an error on page load if there are pending migrations. 23 | config.active_record.migration_error = :page_load 24 | 25 | # Debug mode disables concatenation and preprocessing of assets. 26 | # This option may cause significant delays in view rendering with a large 27 | # number of complex assets. 28 | config.assets.debug = true 29 | 30 | # Asset digests allow you to set far-future HTTP expiration dates on all assets, 31 | # yet still be able to expire them through the digest params. 32 | config.assets.digest = false 33 | 34 | # Adds additional error checking when serving assets at runtime. 35 | # Checks for improperly declared sprockets dependencies. 36 | # Raises helpful error messages. 37 | config.assets.raise_runtime_errors = true 38 | 39 | # Raises error for missing translations 40 | # config.action_view.raise_on_missing_translations = true 41 | end 42 | -------------------------------------------------------------------------------- /config/environments/production.rb: -------------------------------------------------------------------------------- 1 | Rails.application.configure do 2 | # Settings specified here will take precedence over those in config/application.rb. 3 | 4 | # Code is not reloaded between requests. 5 | config.cache_classes = true 6 | 7 | # Eager load code on boot. This eager loads most of Rails and 8 | # your application in memory, allowing both threaded web servers 9 | # and those relying on copy on write to perform better. 10 | # Rake tasks automatically ignore this option for performance. 11 | config.eager_load = true 12 | 13 | # Full error reports are disabled and caching is turned on. 14 | config.consider_all_requests_local = false 15 | config.action_controller.perform_caching = true 16 | 17 | # Enable Rack::Cache to put a simple HTTP cache in front of your application 18 | # Add `rack-cache` to your Gemfile before enabling this. 19 | # For large-scale production use, consider using a caching reverse proxy like 20 | # NGINX, varnish or squid. 21 | # config.action_dispatch.rack_cache = true 22 | 23 | # Disable serving static files from the `/public` folder by default since 24 | # Apache or NGINX already handles this. 25 | config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present? 26 | 27 | # Compress JavaScripts and CSS. 28 | config.assets.js_compressor = :uglifier 29 | # config.assets.css_compressor = :sass 30 | 31 | # Do not fallback to assets pipeline if a precompiled asset is missed. 32 | config.assets.compile = false 33 | 34 | # Asset digests allow you to set far-future HTTP expiration dates on all assets, 35 | # yet still be able to expire them through the digest params. 36 | config.assets.digest = true 37 | 38 | # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb 39 | 40 | # Specifies the header that your server uses for sending files. 41 | # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache 42 | # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX 43 | 44 | # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. 45 | # config.force_ssl = true 46 | 47 | # Use the lowest log level to ensure availability of diagnostic information 48 | # when problems arise. 49 | config.log_level = :debug 50 | 51 | # Prepend all log lines with the following tags. 52 | # config.log_tags = [ :subdomain, :uuid ] 53 | 54 | # Use a different logger for distributed setups. 55 | # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new) 56 | 57 | # Use a different cache store in production. 58 | # config.cache_store = :mem_cache_store 59 | 60 | # Enable serving of images, stylesheets, and JavaScripts from an asset server. 61 | # config.action_controller.asset_host = 'http://assets.example.com' 62 | 63 | # Ignore bad email addresses and do not raise email delivery errors. 64 | # Set this to true and configure the email server for immediate delivery to raise delivery errors. 65 | # config.action_mailer.raise_delivery_errors = false 66 | 67 | # Enable locale fallbacks for I18n (makes lookups for any locale fall back to 68 | # the I18n.default_locale when a translation cannot be found). 69 | config.i18n.fallbacks = true 70 | 71 | # Send deprecation notices to registered listeners. 72 | config.active_support.deprecation = :notify 73 | 74 | # Use default logging formatter so that PID and timestamp are not suppressed. 75 | config.log_formatter = ::Logger::Formatter.new 76 | 77 | # Do not dump schema after migrations. 78 | config.active_record.dump_schema_after_migration = false 79 | end 80 | -------------------------------------------------------------------------------- /config/environments/test.rb: -------------------------------------------------------------------------------- 1 | Rails.application.configure do 2 | # Settings specified here will take precedence over those in config/application.rb. 3 | 4 | # The test environment is used exclusively to run your application's 5 | # test suite. You never need to work with it otherwise. Remember that 6 | # your test database is "scratch space" for the test suite and is wiped 7 | # and recreated between test runs. Don't rely on the data there! 8 | config.cache_classes = true 9 | 10 | # Do not eager load code on boot. This avoids loading your whole application 11 | # just for the purpose of running a single test. If you are using a tool that 12 | # preloads Rails for running tests, you may have to set it to true. 13 | config.eager_load = false 14 | 15 | # Configure static file server for tests with Cache-Control for performance. 16 | config.serve_static_files = true 17 | config.static_cache_control = 'public, max-age=3600' 18 | 19 | # Show full error reports and disable caching. 20 | config.consider_all_requests_local = true 21 | config.action_controller.perform_caching = false 22 | 23 | # Raise exceptions instead of rendering exception templates. 24 | config.action_dispatch.show_exceptions = false 25 | 26 | # Disable request forgery protection in test environment. 27 | config.action_controller.allow_forgery_protection = false 28 | 29 | # Tell Action Mailer not to deliver emails to the real world. 30 | # The :test delivery method accumulates sent emails in the 31 | # ActionMailer::Base.deliveries array. 32 | config.action_mailer.delivery_method = :test 33 | 34 | # Randomize the order test cases are executed. 35 | config.active_support.test_order = :random 36 | 37 | # Print deprecation notices to the stderr. 38 | config.active_support.deprecation = :stderr 39 | 40 | # Raises error for missing translations 41 | # config.action_view.raise_on_missing_translations = true 42 | end 43 | -------------------------------------------------------------------------------- /config/initializers/assets.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Version of your assets, change this if you want to expire all your assets. 4 | Rails.application.config.assets.version = '1.0' 5 | 6 | # Add additional assets to the asset load path 7 | # Rails.application.config.assets.paths << Emoji.images_path 8 | 9 | # Precompile additional assets. 10 | # application.js, application.css, and all non-JS/CSS in app/assets folder are already added. 11 | # Rails.application.config.assets.precompile += %w( search.js ) 12 | -------------------------------------------------------------------------------- /config/initializers/backtrace_silencers.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. 4 | # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } 5 | 6 | # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. 7 | # Rails.backtrace_cleaner.remove_silencers! 8 | -------------------------------------------------------------------------------- /config/initializers/cookies_serializer.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | Rails.application.config.action_dispatch.cookies_serializer = :json 4 | -------------------------------------------------------------------------------- /config/initializers/filter_parameter_logging.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Configure sensitive parameters which will be filtered from the log file. 4 | Rails.application.config.filter_parameters += [:password] 5 | -------------------------------------------------------------------------------- /config/initializers/inflections.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Add new inflection rules using the following format. Inflections 4 | # are locale specific, and you may define rules for as many different 5 | # locales as you wish. All of these examples are active by default: 6 | # ActiveSupport::Inflector.inflections(:en) do |inflect| 7 | # inflect.plural /^(ox)$/i, '\1en' 8 | # inflect.singular /^(ox)en/i, '\1' 9 | # inflect.irregular 'person', 'people' 10 | # inflect.uncountable %w( fish sheep ) 11 | # end 12 | 13 | # These inflection rules are supported but not enabled by default: 14 | # ActiveSupport::Inflector.inflections(:en) do |inflect| 15 | # inflect.acronym 'RESTful' 16 | # end 17 | -------------------------------------------------------------------------------- /config/initializers/mime_types.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Add new mime types for use in respond_to blocks: 4 | # Mime::Type.register "text/richtext", :rtf 5 | -------------------------------------------------------------------------------- /config/initializers/rev_manifest.rb: -------------------------------------------------------------------------------- 1 | rev_manifest_path = 'public/assets/rev-manifest.json' 2 | 3 | if File.exist?(rev_manifest_path) 4 | REV_MANIFEST = JSON.parse(File.read(rev_manifest_path)) 5 | end 6 | -------------------------------------------------------------------------------- /config/initializers/session_store.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | Rails.application.config.session_store :cookie_store, key: '_app_session' 4 | -------------------------------------------------------------------------------- /config/initializers/wrap_parameters.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # This file contains settings for ActionController::ParamsWrapper which 4 | # is enabled by default. 5 | 6 | # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. 7 | ActiveSupport.on_load(:action_controller) do 8 | wrap_parameters format: [:json] if respond_to?(:wrap_parameters) 9 | end 10 | 11 | # To enable root element in JSON for ActiveRecord objects. 12 | # ActiveSupport.on_load(:active_record) do 13 | # self.include_root_in_json = true 14 | # end 15 | -------------------------------------------------------------------------------- /config/locales/en.yml: -------------------------------------------------------------------------------- 1 | # Files in the config/locales directory are used for internationalization 2 | # and are automatically loaded by Rails. If you want to use locales other 3 | # than English, add the necessary files in this directory. 4 | # 5 | # To use the locales, use `I18n.t`: 6 | # 7 | # I18n.t 'hello' 8 | # 9 | # In views, this is aliased to just `t`: 10 | # 11 | # <%= t('hello') %> 12 | # 13 | # To use a different locale, set it with `I18n.locale`: 14 | # 15 | # I18n.locale = :es 16 | # 17 | # This would use the information in config/locales/es.yml. 18 | # 19 | # To learn more, please read the Rails Internationalization guide 20 | # available at http://guides.rubyonrails.org/i18n.html. 21 | 22 | en: 23 | hello: "Hello world" 24 | -------------------------------------------------------------------------------- /config/routes.rb: -------------------------------------------------------------------------------- 1 | Rails.application.routes.draw do 2 | get 'welcome/index' 3 | 4 | # The priority is based upon order of creation: first created -> highest priority. 5 | # See how all your routes lay out with "rake routes". 6 | 7 | # You can have the root of your site routed with "root" 8 | root 'welcome#index' 9 | 10 | # Example of regular route: 11 | # get 'products/:id' => 'catalog#view' 12 | 13 | # Example of named route that can be invoked with purchase_url(id: product.id) 14 | # get 'products/:id/purchase' => 'catalog#purchase', as: :purchase 15 | 16 | # Example resource route (maps HTTP verbs to controller actions automatically): 17 | # resources :products 18 | 19 | # Example resource route with options: 20 | # resources :products do 21 | # member do 22 | # get 'short' 23 | # post 'toggle' 24 | # end 25 | # 26 | # collection do 27 | # get 'sold' 28 | # end 29 | # end 30 | 31 | # Example resource route with sub-resources: 32 | # resources :products do 33 | # resources :comments, :sales 34 | # resource :seller 35 | # end 36 | 37 | # Example resource route with more complex sub-resources: 38 | # resources :products do 39 | # resources :comments 40 | # resources :sales do 41 | # get 'recent', on: :collection 42 | # end 43 | # end 44 | 45 | # Example resource route with concerns: 46 | # concern :toggleable do 47 | # post 'toggle' 48 | # end 49 | # resources :posts, concerns: :toggleable 50 | # resources :photos, concerns: :toggleable 51 | 52 | # Example resource route within a namespace: 53 | # namespace :admin do 54 | # # Directs /admin/products/* to Admin::ProductsController 55 | # # (app/controllers/admin/products_controller.rb) 56 | # resources :products 57 | # end 58 | end 59 | -------------------------------------------------------------------------------- /config/secrets.yml: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Your secret key is used for verifying the integrity of signed cookies. 4 | # If you change this key, all old signed cookies will become invalid! 5 | 6 | # Make sure the secret is at least 30 characters and all random, 7 | # no regular words or you'll be exposed to dictionary attacks. 8 | # You can use `rake secret` to generate a secure secret key. 9 | 10 | # Make sure the secrets in this file are kept private 11 | # if you're sharing your code publicly. 12 | 13 | development: 14 | secret_key_base: 9a8f0df5b8ea365e56f8ba2d1f90c60abb7be3ac4231057f82cd575da6a60a56feb5a54fd3006842efef8488b9332fe01fc318f38e6bf362a09284ac1086e5f4 15 | 16 | test: 17 | secret_key_base: 232ba5dc04f6945938b18bede845f0a2b7d2924c31e8af6a33eb9f60a415ec4b6b0f6ea89b8d998fa75f5de09339c4897aa461af827f62cb66fd830da3efe5d4 18 | 19 | # Do not keep production secrets in the repository, 20 | # instead read values from the environment. 21 | production: 22 | secret_key_base: <%= ENV["SECRET_KEY_BASE"] %> 23 | -------------------------------------------------------------------------------- /db/development.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vigetlabs/gulp-rails-pipeline/708f1848030a5272f3e152b4fe3bb59536647b66/db/development.sqlite3 -------------------------------------------------------------------------------- /db/seeds.rb: -------------------------------------------------------------------------------- 1 | # This file should contain all the record creation needed to seed the database with its default values. 2 | # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup). 3 | # 4 | # Examples: 5 | # 6 | # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }]) 7 | # Mayor.create(name: 'Emanuel', city: cities.first) 8 | -------------------------------------------------------------------------------- /file-structure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vigetlabs/gulp-rails-pipeline/708f1848030a5272f3e152b4fe3bb59536647b66/file-structure.png -------------------------------------------------------------------------------- /gulp/assets/icons/uE001-facebook.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /gulp/assets/icons/uE002-linkedin.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /gulp/assets/icons/uE003-pinterest.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /gulp/assets/icons/uE004-twitter.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /gulp/assets/images/gulp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vigetlabs/gulp-rails-pipeline/708f1848030a5272f3e152b4fe3bb59536647b66/gulp/assets/images/gulp.png -------------------------------------------------------------------------------- /gulp/assets/javascripts/global.coffee: -------------------------------------------------------------------------------- 1 | message = require './message' 2 | 3 | console.log message 4 | -------------------------------------------------------------------------------- /gulp/assets/javascripts/message.js: -------------------------------------------------------------------------------- 1 | module.exports = 'yay modules!'; 2 | -------------------------------------------------------------------------------- /gulp/assets/stylesheets/base/_iconFont.sass: -------------------------------------------------------------------------------- 1 | // DO NOT EDIT DIRECTLY! 2 | Generated by gulp/tasks/iconFont.js 3 | from ./gulp/tasks/iconFont/template.sass 4 | 5 | @font-face 6 | font-family: gulp-rails-icons 7 | src: url("/assets/fonts/gulp-rails-icons.eot") 8 | src: url("/assets/fonts/gulp-rails-icons.eot?#iefix") format('embedded-opentype'), url("/assets/fonts/gulp-rails-icons.woff") format('woff'), url("/assets/fonts/gulp-rails-icons.ttf") format('truetype'), url("/assets/fonts/gulp-rails-icons.svg#gulp-rails-icons") format('svg') 9 | font-weight: normal 10 | font-style: normal 11 | 12 | =icon($content) 13 | &:before 14 | -moz-osx-font-smoothing: grayscale 15 | -webkit-font-smoothing: antialiased 16 | content: $content 17 | font-family: 'gulp-rails-icons' 18 | font-style: normal 19 | font-variant: normal 20 | font-weight: normal 21 | line-height: 1 22 | speak: none 23 | text-transform: none 24 | @content 25 | 26 | =icon--facebook 27 | +icon("\e001") 28 | @content 29 | 30 | .icon 31 | &.-facebook 32 | +icon--facebook 33 | 34 | =icon--linkedin 35 | +icon("\e002") 36 | @content 37 | 38 | .icon 39 | &.-linkedin 40 | +icon--linkedin 41 | 42 | =icon--pinterest 43 | +icon("\e003") 44 | @content 45 | 46 | .icon 47 | &.-pinterest 48 | +icon--pinterest 49 | 50 | =icon--twitter 51 | +icon("\e004") 52 | @content 53 | 54 | .icon 55 | &.-twitter 56 | +icon--twitter 57 | 58 | 59 | -------------------------------------------------------------------------------- /gulp/assets/stylesheets/global.sass: -------------------------------------------------------------------------------- 1 | @import base/iconFont 2 | 3 | body 4 | background: #dd3435 image-url('gulp.png') 5 | font-family: sans-serif 6 | 7 | img 8 | background-color: white 9 | 10 | p 11 | font-size: 18px 12 | 13 | a 14 | text-decoration: none 15 | color: white 16 | -------------------------------------------------------------------------------- /gulp/config.js: -------------------------------------------------------------------------------- 1 | var publicAssets = "./public/assets"; 2 | var sourceFiles = "./gulp/assets"; 3 | 4 | module.exports = { 5 | publicAssets: publicAssets, 6 | browserSync: { 7 | proxy: 'localhost:3000', 8 | files: ['./app/views/**'] 9 | }, 10 | sass: { 11 | src: sourceFiles + "/stylesheets/**/*.{sass,scss}", 12 | dest: publicAssets + "/stylesheets", 13 | settings: { 14 | indentedSyntax: true, // Enable .sass syntax! 15 | imagePath: '/assets/images' // Used by the image-url helper 16 | } 17 | }, 18 | images: { 19 | src: sourceFiles + "/images/**", 20 | dest: publicAssets + "/images" 21 | }, 22 | iconFont: { 23 | name: 'Gulp Rails Icons', 24 | src: sourceFiles + "/icons/*.svg", 25 | dest: publicAssets + '/fonts', 26 | sassDest: sourceFiles + '/stylesheets/base', 27 | template: './gulp/tasks/iconFont/template.sass', 28 | sassOutputName: '_iconFont.sass', 29 | fontPath: '/assets/fonts', 30 | className: 'icon', 31 | options: { 32 | fontName: 'gulp-rails-icons', 33 | appendCodepoints: true, 34 | normalize: false 35 | } 36 | }, 37 | browserify: { 38 | bundleConfigs: [{ 39 | entries: sourceFiles + '/javascripts/global.coffee', 40 | dest: publicAssets + '/javascripts', 41 | outputName: 'global.js', 42 | extensions: ['.js','.coffee'] 43 | }] 44 | } 45 | }; 46 | -------------------------------------------------------------------------------- /gulp/tasks/browserSync.js: -------------------------------------------------------------------------------- 1 | var browserSync = require('browser-sync'); 2 | var gulp = require('gulp'); 3 | var config = require('../config').browserSync; 4 | 5 | gulp.task('browserSync', function() { 6 | browserSync(config); 7 | }); 8 | -------------------------------------------------------------------------------- /gulp/tasks/browserify.js: -------------------------------------------------------------------------------- 1 | var _ = require('lodash'); 2 | var browserify = require('browserify'); 3 | var browserSync = require('browser-sync'); 4 | var bundleLogger = require('../util/bundleLogger'); 5 | var config = require('../config').browserify; 6 | var gulp = require('gulp'); 7 | var handleErrors = require('../util/handleErrors'); 8 | var source = require('vinyl-source-stream'); 9 | var watchify = require('watchify'); 10 | 11 | var browserifyTask = function(callback, devMode) { 12 | 13 | var bundleQueue = config.bundleConfigs.length; 14 | 15 | var browserifyThis = function(bundleConfig) { 16 | 17 | if(devMode) { 18 | _.extend(bundleConfig, watchify.args, { debug: true }); 19 | bundleConfig = _.omit(bundleConfig, ['external', 'require']); 20 | } 21 | 22 | var b = browserify(bundleConfig); 23 | 24 | var bundle = function() { 25 | bundleLogger.start(bundleConfig.outputName); 26 | 27 | return b 28 | .bundle() 29 | .on('error', handleErrors) 30 | .pipe(source(bundleConfig.outputName)) 31 | .pipe(gulp.dest(bundleConfig.dest)) 32 | .on('end', reportFinished) 33 | .pipe(browserSync.reload({stream:true})); 34 | }; 35 | 36 | if(devMode) { 37 | b = watchify(b); 38 | b.on('update', bundle); 39 | bundleLogger.watch(bundleConfig.outputName); 40 | } else { 41 | if(bundleConfig.require) b.require(bundleConfig.require); 42 | if(bundleConfig.external) b.external(bundleConfig.external); 43 | } 44 | 45 | var reportFinished = function() { 46 | bundleLogger.end(bundleConfig.outputName); 47 | 48 | if(bundleQueue) { 49 | bundleQueue--; 50 | if(bundleQueue === 0) { 51 | callback(); 52 | } 53 | } 54 | }; 55 | 56 | return bundle(); 57 | }; 58 | 59 | config.bundleConfigs.forEach(browserifyThis); 60 | }; 61 | 62 | gulp.task('browserify', browserifyTask); 63 | 64 | module.exports = browserifyTask; 65 | -------------------------------------------------------------------------------- /gulp/tasks/build.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | var gulpSequence = require('gulp-sequence') 3 | 4 | gulp.task('build', function(cb) { 5 | var tasks = ['clean',['iconFont', 'images'], ['sass', 'browserify']]; 6 | if(process.env.RAILS_ENV === 'production') tasks.push('rev'); 7 | tasks.push(cb); 8 | gulpSequence.apply(this, tasks); 9 | }); 10 | -------------------------------------------------------------------------------- /gulp/tasks/clean.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | var del = require('del'); 3 | var config = require('../config'); 4 | 5 | gulp.task('clean', function (cb) { 6 | del([config.publicAssets], cb); 7 | }); -------------------------------------------------------------------------------- /gulp/tasks/default.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | 3 | gulp.task('default', ['images', 'iconFont', 'sass', 'watch']); 4 | -------------------------------------------------------------------------------- /gulp/tasks/iconFont/generateIconSass.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | var config = require('../../config').iconFont; 3 | var template = require('gulp-swig'); 4 | var rename = require('gulp-rename'); 5 | 6 | module.exports = function(glyphs, options) { 7 | 8 | var iconSass = template({ 9 | data: { 10 | icons: glyphs.map(function(glyph) { 11 | return { 12 | name: glyph.name, 13 | code: glyph.unicode[0].charCodeAt(0).toString(16).toUpperCase() 14 | } 15 | }), 16 | fontName: config.options.fontName, 17 | fontPath: config.fontPath, 18 | className: config.className, 19 | comment: 'DO NOT EDIT DIRECTLY!\n Generated by gulp/tasks/iconFont.js\n from ' + config.template 20 | } 21 | }); 22 | 23 | gulp.src(config.template) 24 | .pipe(iconSass) 25 | .pipe(rename(config.sassOutputName)) 26 | .pipe(gulp.dest(config.sassDest)); 27 | }; 28 | -------------------------------------------------------------------------------- /gulp/tasks/iconFont/index.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | var iconfont = require('gulp-iconfont'); 3 | var config = require('../../config').iconFont; 4 | var generateIconSass = require('./generateIconSass'); 5 | 6 | gulp.task('iconFont', function() { 7 | return gulp.src(config.src) 8 | .pipe(iconfont(config.options)) 9 | .on('glyphs', generateIconSass) 10 | .pipe(gulp.dest(config.dest)); 11 | }); 12 | -------------------------------------------------------------------------------- /gulp/tasks/iconFont/template.sass: -------------------------------------------------------------------------------- 1 | // {{comment}} 2 | 3 | @font-face 4 | font-family: {{fontName}} 5 | src: url("{{fontPath}}/{{fontName}}.eot") 6 | src: url("{{fontPath}}/{{fontName}}.eot?#iefix") format('embedded-opentype'), url("{{fontPath}}/{{fontName}}.woff") format('woff'), url("{{fontPath}}/{{fontName}}.ttf") format('truetype'), url("{{fontPath}}/{{fontName}}.svg#{{fontName}}") format('svg') 7 | font-weight: normal 8 | font-style: normal 9 | 10 | =icon($content) 11 | &:before 12 | -moz-osx-font-smoothing: grayscale 13 | -webkit-font-smoothing: antialiased 14 | content: $content 15 | font-family: '{{fontName}}' 16 | font-style: normal 17 | font-variant: normal 18 | font-weight: normal 19 | line-height: 1 20 | speak: none 21 | text-transform: none 22 | @content 23 | 24 | {% for icon in icons -%} 25 | =icon--{{icon.name}} 26 | +icon("\{{icon.code}}") 27 | @content 28 | 29 | .icon 30 | &.-{{icon.name}} 31 | +icon--{{icon.name}} 32 | 33 | {% endfor %} 34 | -------------------------------------------------------------------------------- /gulp/tasks/images.js: -------------------------------------------------------------------------------- 1 | var changed = require('gulp-changed'); 2 | var gulp = require('gulp'); 3 | var imagemin = require('gulp-imagemin'); 4 | var config = require('../config').images; 5 | var browserSync = require('browser-sync'); 6 | 7 | gulp.task('images', function() { 8 | return gulp.src(config.src) 9 | .pipe(changed(config.dest)) // Ignore unchanged files 10 | .pipe(imagemin()) // Optimize 11 | .pipe(gulp.dest(config.dest)) 12 | .pipe(browserSync.reload({stream:true})); 13 | }); 14 | -------------------------------------------------------------------------------- /gulp/tasks/rev/index.js: -------------------------------------------------------------------------------- 1 | var config = require('../../config'); 2 | var gulp = require('gulp'); 3 | var revCollector = require('gulp-rev-collector'); 4 | 5 | // Replace asset references in compiled css and js files 6 | gulp.task('rev', ['rev-assets', 'rev-font-workaround'], function(){ 7 | return gulp.src([config.publicAssets + '/rev-manifest.json', config.publicAssets + '/**/*.{css,js}']) 8 | .pipe(revCollector()) 9 | .pipe(gulp.dest(config.publicAssets)); 10 | }); 11 | -------------------------------------------------------------------------------- /gulp/tasks/rev/rev-assets.js: -------------------------------------------------------------------------------- 1 | var config = require('../../config'); 2 | var gulp = require('gulp'); 3 | var rev = require('gulp-rev'); 4 | 5 | // Add md5 hashes to assets 6 | gulp.task('rev-assets', function(){ 7 | return gulp.src(config.publicAssets + '/**/**.!(css|js|eot|woff|ttf)') 8 | .pipe(rev()) 9 | .pipe(gulp.dest(config.publicAssets)) 10 | .pipe(rev.manifest()) 11 | .pipe(gulp.dest(config.publicAssets)); 12 | }); 13 | -------------------------------------------------------------------------------- /gulp/tasks/rev/rev-font-workaround.js: -------------------------------------------------------------------------------- 1 | // 2) Font rev workaround 2 | var _ = require('lodash'); 3 | var config = require('../../config'); 4 | var fs = require('fs'); 5 | var gulp = require('gulp'); 6 | var merge = require('merge-stream'); 7 | var rename = require("gulp-rename"); 8 | var rev = require('gulp-rev'); 9 | 10 | // .ttf fonts have an embedded timestamp, which cause the contents 11 | // of the file to change ever-so-slightly. This was a problem for 12 | // file reving, which generates a hash based on the contents of the file. 13 | // This meant that even if source files had not changed, the hash would 14 | // change with every recompile, as well as .eot, and .woff files, which 15 | // are derived from a source svg font 16 | 17 | // The solution is to only hash svg font files, then append the 18 | // generated hash to the ttf, eot, and woff files (instead of 19 | // leting each file generate its own hash) 20 | 21 | gulp.task('rev-font-workaround', ['rev-assets'], function() { 22 | var manifest = require('../../.' + config.publicAssets + '/rev-manifest.json'); 23 | var fontList = []; 24 | 25 | _.each(manifest, function(reference, key) { 26 | var fontPath = config.iconFont.dest.split(config.publicAssets)[1].substr(1); 27 | 28 | if (key.match(fontPath + '/' + config.iconFont.options.fontName)) { 29 | var path = key.split('.svg')[0]; 30 | var hash = reference.split(path)[1].split('.svg')[0]; 31 | 32 | fontList.push({ 33 | path: path, 34 | hash: hash 35 | }); 36 | } 37 | }); 38 | 39 | // Add hash to non-svg font files 40 | var streams = fontList.map(function(file) { 41 | // Add references in manifest 42 | ['.eot', '.woff', '.ttf'].forEach(function(ext){ 43 | manifest[file.path + ext] = file.path + file.hash + ext; 44 | }); 45 | 46 | return gulp.src(config.publicAssets + '/' + file.path + '*.!(svg)') 47 | .pipe(rename({suffix: file.hash})) 48 | .pipe(gulp.dest(config.iconFont.dest)); 49 | }); 50 | 51 | // Re-write rev-manifest.json to disk 52 | fs.writeFile(config.publicAssets + '/rev-manifest.json', JSON.stringify(manifest, null, 2)); 53 | 54 | return merge.apply(this, streams); 55 | }); 56 | -------------------------------------------------------------------------------- /gulp/tasks/sass.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | var browserSync = require('browser-sync'); 3 | var sass = require('gulp-sass'); 4 | var sourcemaps = require('gulp-sourcemaps'); 5 | var handleErrors = require('../util/handleErrors'); 6 | var config = require('../config').sass; 7 | var autoprefixer = require('gulp-autoprefixer'); 8 | 9 | gulp.task('sass', function () { 10 | return gulp.src(config.src) 11 | .pipe(sourcemaps.init()) 12 | .pipe(sass(config.settings)) 13 | .on('error', handleErrors) 14 | .pipe(autoprefixer({ browsers: ['last 2 version'] })) 15 | .pipe(sourcemaps.write()) 16 | .pipe(gulp.dest(config.dest)) 17 | .pipe(browserSync.reload({stream:true})); 18 | }); 19 | -------------------------------------------------------------------------------- /gulp/tasks/watch.js: -------------------------------------------------------------------------------- 1 | /* Notes: 2 | - gulp/tasks/browserify.js handles js recompiling with watchify 3 | - gulp/tasks/browserSync.js watches and reloads compiled files 4 | */ 5 | 6 | var gulp = require('gulp'); 7 | var config = require('../config'); 8 | var watch = require('gulp-watch'); 9 | 10 | gulp.task('watch', ['watchify','browserSync'], function(callback) { 11 | watch(config.sass.src, function() { gulp.start('sass'); }); 12 | watch(config.images.src, function() { gulp.start('images'); }); 13 | watch(config.iconFont.src, function() { gulp.start('iconFont'); }); 14 | // Watchify will watch and recompile our JS, so no need to gulp.watch it 15 | }); 16 | -------------------------------------------------------------------------------- /gulp/tasks/watchify.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | var browserifyTask = require('./browserify'); 3 | 4 | gulp.task('watchify', function(callback) { 5 | // Start browserify task with devMode === true 6 | browserifyTask(callback, true); 7 | }); 8 | -------------------------------------------------------------------------------- /gulp/util/bundleLogger.js: -------------------------------------------------------------------------------- 1 | /* bundleLogger 2 | ------------ 3 | Provides gulp style logs to the bundle method in browserify.js 4 | */ 5 | 6 | var gutil = require('gulp-util'); 7 | var prettyHrtime = require('pretty-hrtime'); 8 | var startTime; 9 | 10 | module.exports = { 11 | start: function(filepath) { 12 | startTime = process.hrtime(); 13 | gutil.log('Bundling', gutil.colors.green(filepath) + '...'); 14 | }, 15 | 16 | watch: function(bundleName) { 17 | gutil.log('Watching files required by', gutil.colors.yellow(bundleName)); 18 | }, 19 | 20 | end: function(filepath) { 21 | var taskTime = process.hrtime(startTime); 22 | var prettyTime = prettyHrtime(taskTime); 23 | gutil.log('Bundled', gutil.colors.green(filepath), 'in', gutil.colors.magenta(prettyTime)); 24 | } 25 | }; 26 | -------------------------------------------------------------------------------- /gulp/util/handleErrors.js: -------------------------------------------------------------------------------- 1 | var notify = require("gulp-notify"); 2 | 3 | module.exports = function() { 4 | 5 | var args = Array.prototype.slice.call(arguments); 6 | 7 | // Send error to notification center with gulp-notify 8 | notify.onError({ 9 | title: "Compile Error", 10 | message: "<%= error %>" 11 | }).apply(this, args); 12 | 13 | // Keep gulp from hanging on this task 14 | this.emit('end'); 15 | }; -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- 1 | /* 2 | gulpfile.js 3 | =========== 4 | Rather than manage one giant configuration file responsible 5 | for creating multiple tasks, each task has been broken out into 6 | its own file in gulp/tasks. Any files in that directory get 7 | automatically required below. 8 | 9 | To add a new task, simply add a new task file that directory. 10 | gulp/tasks/default.js specifies the default set of tasks to run 11 | when you run `gulp`. 12 | */ 13 | 14 | var requireDir = require('require-dir'); 15 | 16 | // Require all tasks in gulp/tasks, including subfolders 17 | requireDir('./gulp/tasks', { recurse: true }); 18 | -------------------------------------------------------------------------------- /lib/assets/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vigetlabs/gulp-rails-pipeline/708f1848030a5272f3e152b4fe3bb59536647b66/lib/assets/.keep -------------------------------------------------------------------------------- /lib/tasks/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vigetlabs/gulp-rails-pipeline/708f1848030a5272f3e152b4fe3bb59536647b66/lib/tasks/.keep -------------------------------------------------------------------------------- /log/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vigetlabs/gulp-rails-pipeline/708f1848030a5272f3e152b4fe3bb59536647b66/log/.keep -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "gulp-rails", 3 | "description": "Gulp Asset Pipeline with Rails", 4 | "engines": { 5 | "node": "0.10.36", 6 | "npm": "2.3.0" 7 | }, 8 | "repository": { 9 | "type": "git", 10 | "url": "git://github.com/greypants/gulp-rails.git" 11 | }, 12 | "scripts": { 13 | "postinstall": "gulp build" 14 | }, 15 | "browserify": { 16 | "transform": [ 17 | "coffeeify" 18 | ] 19 | }, 20 | "dependencies": { 21 | "browser-sync": "~2.4.0", 22 | "browserify": "^8.0.2", 23 | "coffeeify": "~0.7.0", 24 | "del": "^1.1.1", 25 | "gulp": "^3.8.7", 26 | "gulp-autoprefixer": "^2.0.0", 27 | "gulp-changed": "^0.4.1", 28 | "gulp-filesize": "0.0.6", 29 | "gulp-iconfont": "^3.0.0", 30 | "gulp-imagemin": "^0.6.2", 31 | "gulp-notify": "^1.4.2", 32 | "gulp-rename": "^1.2.0", 33 | "gulp-rev": "^3.0.1", 34 | "gulp-rev-collector": "^0.1.3", 35 | "gulp-sass": "^2.0.4", 36 | "gulp-sequence": "^0.3.2", 37 | "gulp-sourcemaps": "^1.2.8", 38 | "gulp-swig": "^0.7.4", 39 | "gulp-util": "^3.0.0", 40 | "gulp-watch": "^4.1.1", 41 | "lodash": "^2.4.1", 42 | "merge-stream": "^0.1.7", 43 | "pretty-hrtime": "~0.2.1", 44 | "require-dir": "^0.1.0", 45 | "vinyl-source-stream": "~0.1.1", 46 | "watchify": "^2.2.1" 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /public/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | The page you were looking for doesn't exist (404) 5 | 6 | 55 | 56 | 57 | 58 | 59 |
60 |
61 |

The page you were looking for doesn't exist.

62 |

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

63 |
64 |

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

65 |
66 | 67 | 68 | -------------------------------------------------------------------------------- /public/422.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | The change you wanted was rejected (422) 5 | 6 | 55 | 56 | 57 | 58 | 59 |
60 |
61 |

The change you wanted was rejected.

62 |

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

63 |
64 |

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

65 |
66 | 67 | 68 | -------------------------------------------------------------------------------- /public/500.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | We're sorry, but something went wrong (500) 5 | 6 | 55 | 56 | 57 | 58 | 59 |
60 |
61 |

We're sorry, but something went wrong.

62 |
63 |

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

64 |
65 | 66 | 67 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vigetlabs/gulp-rails-pipeline/708f1848030a5272f3e152b4fe3bb59536647b66/public/favicon.ico -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | # See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file 2 | # 3 | # To ban all spiders from the entire site uncomment the next two lines: 4 | # User-agent: * 5 | # Disallow: / 6 | -------------------------------------------------------------------------------- /test/controllers/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vigetlabs/gulp-rails-pipeline/708f1848030a5272f3e152b4fe3bb59536647b66/test/controllers/.keep -------------------------------------------------------------------------------- /test/controllers/welcome_controller_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class WelcomeControllerTest < ActionController::TestCase 4 | test "should get index" do 5 | get :index 6 | assert_response :success 7 | end 8 | 9 | end 10 | -------------------------------------------------------------------------------- /test/fixtures/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vigetlabs/gulp-rails-pipeline/708f1848030a5272f3e152b4fe3bb59536647b66/test/fixtures/.keep -------------------------------------------------------------------------------- /test/helpers/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vigetlabs/gulp-rails-pipeline/708f1848030a5272f3e152b4fe3bb59536647b66/test/helpers/.keep -------------------------------------------------------------------------------- /test/integration/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vigetlabs/gulp-rails-pipeline/708f1848030a5272f3e152b4fe3bb59536647b66/test/integration/.keep -------------------------------------------------------------------------------- /test/mailers/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vigetlabs/gulp-rails-pipeline/708f1848030a5272f3e152b4fe3bb59536647b66/test/mailers/.keep -------------------------------------------------------------------------------- /test/models/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vigetlabs/gulp-rails-pipeline/708f1848030a5272f3e152b4fe3bb59536647b66/test/models/.keep -------------------------------------------------------------------------------- /test/test_helper.rb: -------------------------------------------------------------------------------- 1 | ENV['RAILS_ENV'] ||= 'test' 2 | require File.expand_path('../../config/environment', __FILE__) 3 | require 'rails/test_help' 4 | 5 | class ActiveSupport::TestCase 6 | # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. 7 | fixtures :all 8 | 9 | # Add more helper methods to be used by all tests here... 10 | end 11 | -------------------------------------------------------------------------------- /vendor/assets/javascripts/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vigetlabs/gulp-rails-pipeline/708f1848030a5272f3e152b4fe3bb59536647b66/vendor/assets/javascripts/.keep -------------------------------------------------------------------------------- /vendor/assets/stylesheets/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vigetlabs/gulp-rails-pipeline/708f1848030a5272f3e152b4fe3bb59536647b66/vendor/assets/stylesheets/.keep --------------------------------------------------------------------------------