Created
May 29, 2013 20:43
-
-
Save zealot128/5673683 to your computer and use it in GitHub Desktop.
some rails.vim projections for the new projections feature
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let g:rails_projections = { | |
\ "config/projections.json": { | |
\ "command": "projections" | |
\ }, | |
\ "app/services/*.rb": { | |
\ "command": "service", | |
\ "affinity": "model", | |
\ "test": "spec/services/%s_spec.rb", | |
\ "related": "app/models/%s.rb", | |
\ "template": "class %S\n\n def run\n end\nend" | |
\ }, | |
\ "app/admin/*.rb": { | |
\ "command": "admin", | |
\ "affinity": "model", | |
\ "related": "app/models/%s.rb", | |
\ "template": | |
\ "ActiveAdmin.register %S do\n\n # form do\n # end\n\n #menu parent: '', label: ''\n\n # index do\n # end\n\nend\n" | |
\ }, | |
\ "config/*.rb": { "command": "config" }, | |
\ "spec/support/*.rb": {"command": "support"}, | |
\ "spec/features/*_spec.rb": { | |
\ "command": "feature", | |
\ "template": "require 'spec_helper'\n\nfeature '%h' do\n\nend", | |
\ }} | |
let g:rails_gem_projections = { | |
\ "cells": { | |
\ "app/cells/*_cell.rb": { | |
\ "command": "cell", | |
\ "related": "app/cells/%s/%d*", | |
\ "template": | |
\ "ActiveAdmin.register %S do\n\n # form do\n # end\n\n #menu parent: '', label: ''\n\n # index do\n # end\n\nend\n" | |
\ } | |
\ }, | |
\ "carrierwave": { | |
\ "app/uploaders/*_uploader.rb": { | |
\ "command": "uploader", | |
\ "template": | |
\ "class %SUploader < CarrierWave::Uploader::Base\nend" | |
\ } | |
\ }, | |
\ "resque": { | |
\ "app/workers/*_job.rb": { | |
\ "command": "worker", | |
\ "template": "class %SJob\n\n \n@queue = :main\ndef self.perform\n end\nend" | |
\ } | |
\ }, | |
\ "draper": { | |
\ "app/decorators/*_decorator.rb": { | |
\ "command": "decorator", | |
\ "affinity": "model", | |
\ "test": "spec/decorators/%s_spec.rb", | |
\ "related": "app/models/%s.rb", | |
\ "template": "class %SDecorator < Draper::Decorator\nend" | |
\ } | |
\ } | |
\ } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment