Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Rack apps for 1.9.2 #63

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Update Rack apps for 1.9.2 #63

wants to merge 1 commit into from

Conversation

maxhawkins
Copy link

I ran into some trouble while trying to use sproutcore with pow.cx. I added this config.ru to my sproutcore project

require 'rubygems'  
require 'bundler/setup'

require 'sproutcore'  

root = Pathname(__FILE__).dirname.expand_path  
project = SC::Project.load_nearest_project(root, :parent => SC.builtin_project)  
service = SC::Rack::Service.new(project)  
run service

But ran into errors while trying to fetch "/sc/targets.json"

It turns out the rack app that serves that file was passing a raw string as content and strings don't respond to #each as of 1.9.2 so it choked. This change makes SC::Rack::Dev and all of the other Rack apps in abbot that return a string return an array instead.

Sorry there aren't any failing tests. I couldn't find a convenient place to add them. All of the tests still pass.

String#each was removed in Ruby 1.9.2. The content returned by a rack app must respond to #each.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant