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 fruit | |
| class Apple extends Fruit | |
| plant: -> alert "I am an apple tree" |
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 @project.isOnHold(): %> | |
| On Hold | |
| <% else if @project.isArchived(): %> | |
| Archived | |
| <% 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
| jasmine.Fixtures.prototype.loadTemplate_ = function(template) { | |
| var templateUrl = "/backbone/templates/" + template; | |
| var self = this; | |
| $.ajax({ | |
| async: false, // must be synchronous to guarantee that no tests are run before fixture is loaded | |
| cache: false, | |
| dataType: 'html', | |
| url: templateUrl, | |
| success: function(data) { | |
| $('#' + self.containerId).append(data); |
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
| Parameters: {"created_at"=>"2011-11-01T23:49:03Z", "description"=>"sumptin else to eat, yummy", "id"=>"2", "title"=>"Other Foods at codmash", "updated_at"=>"2012-01-13T19:29:42Z", "recipe"=>{"id"=>"2", "title"=>"Other Foods at codmash", "description"=>"sumptin else to eat, yummy", "created_at"=>"2011-11-01T23:49:03Z", "updated_at"=>"2012-01-13T19:29:42Z"}} |
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 "jasminerice" | |
| gem "eco" | |
| gem "rails-backbone" | |
| gem "inherited_resources" | |
| run "bundle install" | |
| generate "backbone:install" | |
| create_file File.join("spec", "javascripts", "spec.js.coffee"), <<EOF |
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
| module Microsoft | |
| class Adcenter | |
| MAX_RETRIES = 10 | |
| REPORT_WSDL_URL = "https://adcenterapi.microsoft.com/Api/Advertiser/v8/Reporting/ReportingService.svc?wsdl" | |
| CUSTOMER_MANAGEMENT_WSDL_URL = "https://sharedservices.adcenterapi.microsoft.com/Api/CustomerManagement/v8/CustomerManagementService.svc?wsdl" | |
| def credentials | |
| @credentials ||= YAML::load(ERB.new(File.open(Rails.root.join("config", "adcenter.yml")).read).result)[Rails.env] |
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 Example.Views.TableRowView extends Backbone.View | |
| tagName: "tr" | |
| attributes: -> | |
| id: "row_#{@model.id}" | |
| constructor: (options) -> | |
| super | |
| @parentView = options.parentView |
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
| jQuery(".gist").each(function() { writeCapture.html(this, '<script src="'+jQuery(this).text()+'"></script>'); }); |
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
| describe "bowling", -> | |
| beforeEach -> | |
| @game = new Game | |
| describe "no spare or strike", -> | |
| beforeEach -> | |
| @game.roll(3) | |
| @game.roll(4) | |
| @game.roll(7) | |
| it "should calculate the score", -> | |
| expect(@game.score()).toEqual 14 |
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
| #!/bin/bash | |
| git clone git://github.com/gaslight/bfec_chicago.git cookbook | |
| cd cookbook | |
| bundle install --path vendor |