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
| vagrant@vagrantup:~$ sudo shef --help | |
| /usr/lib/ruby/gems/1.8/gems/chef-0.9.4/lib/chef/shef/ext.rb:293: undefined method `resources' for class `Chef::Recipe' (NameError) | |
| from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' | |
| from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' | |
| from /usr/lib/ruby/gems/1.8/gems/chef-0.9.4/lib/chef/shef.rb:27 | |
| from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' | |
| from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' | |
| from /usr/lib/ruby/gems/1.8/gems/chef-0.9.4/bin/shef:32 | |
| from /usr/bin/shef:19:in `load' | |
| from /usr/bin/shef:19 |
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
| $ clone ...; bundle install | |
| $ bundle exec rake environment | |
| (in /srv/ssbe/apps/core) | |
| rake aborted! | |
| no such file to load -- tokyotyrant | |
| (See full trace by running task with --trace) | |
| $ bundle show tokyotyrant |
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
| if(typeof SSBE === 'undefined') | |
| SSBE = {}; | |
| if(typeof SSBE.EscalationDefinitions === 'undefined') | |
| SSBE.EscalationDefinitions = {}; | |
| SSBE.EscalationDefinitions.NewForm = (function() { | |
| function initializeNewForm() { | |
| var $form = $('#new_escalation_definition'); |
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
| # Put Google's javascript closure_compesser.jar in ./lib | |
| namespace :bundle do | |
| desc "Bundle javascript" | |
| task :js do | |
| compression_method = "closure" | |
| require 'lib/js_minimizer' if compression_method != "closure" | |
| closure_path = File.join(Rails.root,'lib/closure_compresser.jar') | |
| paths = get_top_level_directories('/public/javascripts') |
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
| require 'find' | |
| module BundleHelper | |
| # Use this to indicate the local name of a js lib, and a publicly hosted one. The local (unminimized) will be included in development mode, and the public one used for production | |
| # | |
| # Examples: | |
| # | |
| # != javascript_dev ['jquery-1.4.1', 'http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js'] | |
| # != javascript_dev ['jquery-ui', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js'] | |
| # |
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
| gem "machinist", '>=2.0.0.beta1' | |
| gem "machinist_mongo" | |
| # => | |
| Using machinist (1.0.6) | |
| Using machinist_mongo (1.1.1) | |
| ===================================== |
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
| class MyResource | |
| include Spinal::Resource | |
| attribute :foo, String, :required => true | |
| attribute :bar, Integer | |
| render(:html).with(:template => 'my_resource') | |
| render(:json).with(JsonRenderer) | |
| def self.load(id) |
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
| class MyResource | |
| include Spinal::Resource | |
| attribute :foo, String | |
| attribute :bar, Integer | |
| validates_presence_of :foo | |
| def self.get(foo) | |
| MyModel.find(foo) |
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
| app_path = node[:core][:app_path] | |
| branch = node[:core][:deploy_branch] | |
| directory app_path do | |
| owner "ssbe" | |
| group "ssbe" | |
| mode "0755" | |
| end |
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
| require 'yajl' | |
| module Jrb | |
| class TemplateHandler < ActionView::Template::Handler | |
| include ActionView::Template::Handlers::Compilable | |
| ActionView::Template.register_template_handler(:jrb, self) | |
| self.default_format = Mime::JSON |