This file contains 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 File.dirname(__FILE__) + '/../spec_helper' | |
require 'find' | |
describe 'View template spec coverage' do | |
# Because the application is using Haml for all | |
# view and partial templates, a typo or indentation | |
# mistake in these templates will likely raise | |
# an exception. So in addition to integrated controller | |
# specs and existing view specs, it's important that |
This file contains 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
# get the user record for which you'd like to import | |
tom = User.first | |
everyone_view = [{'user_group_id' => tom.account.user_groups.everyone.id}].map {|group| [group['user_group_id'], 'default']} | |
# create the import, pointing to the csv | |
UserActionLogger.log_actions_with(tom) { $i = Import.create(:views => everyone_view, :user => tom, :source => File.open("/Users/danferranti/Desktop/Tuckerbrook-test.csv"), :state => 'preparing') } | |
# check that the headers map properly | |
$i.map_header |
This file contains 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
1) | |
ActionView::TemplateError in 'UserMailer notifications for specific events should send an email when creating an event' | |
You have a nil object when you didn't expect it! | |
The error occurred while evaluating nil.full_name | |
On line #13 of app/views/user_mailer/notification-event-sent.text.plain.erb | |
10: <% end %> | |
11: <% unless @document.attendees.empty? %> | |
12: Invitees: <% @document.attendees.each do |attendee| %> | |
13: <%= attendee.full_name %> |
This file contains 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
function queryObject() { | |
var pairs, pair; | |
var query = new Array; | |
pairs = document.location.search.slice(1).split('&'); | |
for(var i = 0; i < pairs.length; i++) { | |
pair = pairs[i].split('='); | |
query[pair[0]] = pair[1]; | |
} | |
return query; | |
} |
This file contains 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
// Code from processing-js that's failing in webkit only, FF runs it fine | |
function buildProcessing( curElement ){ | |
// ... | |
var p = {}; | |
p.import = function import(lib) { | |
//... | |
} |
This file contains 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
# AR model callback that uses paperclip and tempfile | |
def generate_previews | |
dimension_multiplier = case units | |
when 'inches'; 30 | |
else; 30 | |
end | |
This file contains 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
#!/usr/bin/ruby | |
# | |
# Simple deploy recipe to wrap up the moving parts | |
# of couchapp pushing based on .couchapprc settings, | |
# sprockets concatenation, jsmin compression and | |
# cssmin compression | |
# | |
require 'rubygems' |
This file contains 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
DEBUG: Using local file for template:/tmp/chef-solo_test/cookbooks/testbook/templates/default/somservice.conf.erb | |
ERROR: template[/root/someservice.conf] (/usr/lib/ruby/gems/1.8/gems/chef-0.7.0/lib/chef/recipe.rb line 189) had an error: | |
different prefix: "/" and "." | |
/usr/lib/ruby/1.8/pathname.rb:709:in `relative_path_from'/usr/lib/ruby/gems/1.8/gems/chef-0.7.0/lib/chef/provider/template.rb:56:in `action_create'/usr/lib/ruby/gems/1.8/gems/chef-0.7.0/lib/chef/runner.rb:87:in `send'/usr/lib/ruby/gems/1.8/gems/chef-0.7.0/lib/chef/runner.rb:87:in `converge'/usr/lib/ruby/gems/1.8/gems/chef-0.7.0/lib/chef/runner.rb:85:in `each'/usr/lib/ruby/gems/1.8/gems/chef-0.7.0/lib/chef/runner.rb:85:in `converge'/usr/lib/ruby/gems/1.8/gems/chef-0.7.0/lib/chef/resource_collection.rb:58:in `each'/usr/lib/ruby/gems/1.8/gems/chef-0.7.0/lib/chef/resource_collection.rb:57:in `each'/usr/lib/ruby/gems/1.8/gems/chef-0.7.0/lib/chef/runner.rb:63:in `converge'/usr/lib/ruby/gems/1.8/gems/chef-0.7.0/lib/chef/client.rb:373:in `converge'/usr/li |
This file contains 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
common: &default_settings | |
license_key: 'xxx' | |
app_name: crm-core | |
enabled: false | |
log_level: info | |
ssl: false | |
apdex_t: 0.5 | |
capture_params: false |
This file contains 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
// PROBLEM: | |
// A Sammy app | |
// Current code with nested view queries: | |
get('#/renderings', function() { | |
var ctx = this; | |
couchapp.design.view("renderings", { | |
include_docs: true, | |
success: function(jsona) { |
OlderNewer