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
| // Instead of this: | |
| EccapCalc.mainPage = SC.Page.design({ | |
| mainPane: SC.MainPane.design({ | |
| childViews: 'description value'.w(), | |
| description: SC.ScrollView.design({ | |
| contentView: SC.ListView.design({ | |
| layout: { centerX: 0, centerY: 0, width: 250, height: 300 }, |
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
| # I xxx'd out the domain part of the URL's to protect the innocent. -ls | |
| Feature: Submit Webform | |
| As a visitor to xxx.com | |
| I want to submit a form with some personal information | |
| and be redirected to a thank-you page. | |
| Scenario Outline: Form Submission | |
| Given I visit "http://xxx/webform.html" | |
| And I type "<loan_purpose>" into field "loan_purpose", | |
| And I type "<loan_amount>" into field "loan_amount", |
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
| // ========================================================================== | |
| // Project: EccapCalc.LedgerView | |
| // Copyright: ©2009 Westside Consulting LLC | |
| // ========================================================================== | |
| /*globals EccapCalc */ | |
| /** @class | |
| This is a reusable view that is meant to be instantiated from the function | |
| EccapCalc.createLedgerView(x, y, w, h, title, arrayController). |
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
| sc_require('models/ledger_entry'); | |
| EccapCalc.LedgerEntry.FIXTURES = [{ | |
| guid: '1,', | |
| description: '401K', | |
| amount: '150000', | |
| ledger: 'assets', | |
| }, { | |
| guid: '2,', | |
| description: 'Home', |
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
| EccapCalc.ledgerController = function(view, ledger_id) { | |
| /** @class | |
| @extends SC.ArrayController | |
| */ | |
| return SC.ArrayController.create( | |
| SC.CollectionViewDelegate, | |
| /** @scope EccapCalc.ledgerController.prototype */ { | |
| verticalOffset: 0, |
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
| EccapCalc.mainPage = SC.Page.design({ | |
| // The main pane is made visible on screen as soon as your app is loaded. | |
| // Add childViews to this pane for views to display immediately on page | |
| // load. | |
| mainPane: SC.MainPane.design({ | |
| childViews: 'scrollView'.w(), | |
| scrollView: SC.ScrollView.design({ | |
| contentView: SC.View.design({ | |
| childViews: 'labelView assetsView incomeView expensesView'.w(), |
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
| add_item: function() { | |
| // create new LedgerEntry and add it to the list | |
| var that = this; | |
| var ledger_entry = EccapCalc.store.createRecord(EccapCalc.LedgerEntry, { | |
| ledger: that.ledger, | |
| }); | |
| // select new LedgerEntry in UI | |
| this.selectObject(ledger_entry); |
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 'rubygems' | |
| require 'dm-core' | |
| db_url = "sqlite3://#{File.dirname(__FILE__)}/example.db" | |
| DataMapper.setup(:default, db_url) | |
| class LedgerEntry | |
| include DataMapper::Resource | |
| property :id, Serial |
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
| diff -ur rack-rack-39ea53f/lib/rack/content_length.rb rack-1.1.0/lib/rack/content_length.rb | |
| --- rack-rack-39ea53f/lib/rack/content_length.rb 2010-01-03 14:21:42.000000000 -0500 | |
| +++ rack-1.1.0/lib/rack/content_length.rb 2010-03-13 20:25:44.000000000 -0500 | |
| @@ -13,7 +13,7 @@ | |
| status, headers, body = @app.call(env) | |
| headers = HeaderHash.new(headers) | |
| - if !STATUS_WITH_NO_ENTITY_BODY.include?(status) && | |
| + if !STATUS_WITH_NO_ENTITY_BODY.include?(status.to_i) && | |
| !headers['Content-Length'] && |
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
| diff --git a/lib/rack/chunked.rb b/lib/rack/chunked.rb | |
| index dddf969..0ee8fb9 100644 | |
| --- a/lib/rack/chunked.rb | |
| +++ b/lib/rack/chunked.rb | |
| @@ -35,7 +35,7 @@ module Rack | |
| def each | |
| term = "\r\n" | |
| @body.each do |chunk| | |
| - size = bytesize(chunk) | |
| + size = chunk.nil? ? 0 : bytesize(chunk) |
OlderNewer