1
0
Fork 0
forked from OpenNeo/impress

ree compatibility

This commit is contained in:
Emi Matchu 2011-05-31 10:36:32 -04:00
parent 9aba28090d
commit 4e919aca04
4 changed files with 28 additions and 26 deletions

View file

@ -701,16 +701,16 @@ class Item < ActiveRecord::Base
# the zone requirement. If that max was NULL, return the object.
item_ids = select(arel_table[:id]).joins(
"LEFT JOIN #{ParentSwfAssetRelationship.table_name} #{psa.name} ON " +
psa[:swf_asset_type].eq(SwfAssetType)
.and(psa[:parent_id].eq(arel_table[:id]))
.to_sql
psa[:swf_asset_type].eq(SwfAssetType).
and(psa[:parent_id].eq(arel_table[:id])).
to_sql
).
joins(
"LEFT JOIN #{SwfAsset.table_name} #{sa.name} ON " +
sa[:type].eq(SwfAssetType)
.and(sa[:id].eq(psa[:swf_asset_id]))
.and(sa[:zone_id].in(zone_set.map(&:id)))
.to_sql
sa[:type].eq(SwfAssetType).
and(sa[:id].eq(psa[:swf_asset_id])).
and(sa[:zone_id].in(zone_set.map(&:id))).
to_sql
).
group("#{table_name}.id").
having("MAX(#{sa.name}.id) IS NULL"). # SwfAsset.arel_table[:id].maximum has no #eq

View file

@ -1,3 +1,5 @@
require 'rocketamf/remote_gateway'
class Pet < ActiveRecord::Base
GATEWAY_URL = 'http://www.neopets.com/amfphp/gateway.php'
AMF_SERVICE_NAME = 'CustomPetService'
@ -86,7 +88,6 @@ class Pet < ActiveRecord::Base
def self.gateway
unless @gateway
require 'rocketamf/remote_gateway'
@gateway = RocketAMF::RemoteGateway.new(GATEWAY_URL)
end
@gateway

View file

@ -1,18 +1,19 @@
require 'net/http'
require 'rocketamf'
require_relative 'remote_gateway/service'
require_relative 'remote_gateway/request'
require File.join(File.dirname(__FILE__), 'remote_gateway', 'service')
require File.join(File.dirname(__FILE__), 'remote_gateway', 'request')
module RocketAMF
class RemoteGateway
attr_reader :uri
def initialize(url)
@uri = URI.parse url
end
def service(name)
Service.new(self, name)
end
end
end

View file

@ -1,4 +1,4 @@
/* line 29, ../../../../../.rvm/gems/ruby-1.9.2-preview3@rails3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_print.scss */
/* line 29, ../../../../../.rvm/gems/ree-1.8.7-2010.02/gems/compass-0.10.6/frameworks/blueprint/stylesheets/blueprint/_print.scss */
body {
line-height: 1.5;
font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
@ -7,12 +7,12 @@ body {
font-size: 10pt;
}
/* line 52, ../../../../../.rvm/gems/ruby-1.9.2-preview3@rails3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_print.scss */
/* line 52, ../../../../../.rvm/gems/ree-1.8.7-2010.02/gems/compass-0.10.6/frameworks/blueprint/stylesheets/blueprint/_print.scss */
.container {
background: none;
}
/* line 54, ../../../../../.rvm/gems/ruby-1.9.2-preview3@rails3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_print.scss */
/* line 54, ../../../../../.rvm/gems/ree-1.8.7-2010.02/gems/compass-0.10.6/frameworks/blueprint/stylesheets/blueprint/_print.scss */
hr {
background: #cccccc;
color: #cccccc;
@ -22,40 +22,40 @@ hr {
padding: 0;
border: none;
}
/* line 62, ../../../../../.rvm/gems/ruby-1.9.2-preview3@rails3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_print.scss */
/* line 62, ../../../../../.rvm/gems/ree-1.8.7-2010.02/gems/compass-0.10.6/frameworks/blueprint/stylesheets/blueprint/_print.scss */
hr.space {
background: white;
color: white;
}
/* line 65, ../../../../../.rvm/gems/ruby-1.9.2-preview3@rails3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_print.scss */
/* line 65, ../../../../../.rvm/gems/ree-1.8.7-2010.02/gems/compass-0.10.6/frameworks/blueprint/stylesheets/blueprint/_print.scss */
h1, h2, h3, h4, h5, h6 {
font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
}
/* line 67, ../../../../../.rvm/gems/ruby-1.9.2-preview3@rails3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_print.scss */
/* line 67, ../../../../../.rvm/gems/ree-1.8.7-2010.02/gems/compass-0.10.6/frameworks/blueprint/stylesheets/blueprint/_print.scss */
code {
font-size: 0.9em;
font-family: "andale mono", "lucida console", monospace;
}
/* line 72, ../../../../../.rvm/gems/ruby-1.9.2-preview3@rails3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_print.scss */
/* line 72, ../../../../../.rvm/gems/ree-1.8.7-2010.02/gems/compass-0.10.6/frameworks/blueprint/stylesheets/blueprint/_print.scss */
a img {
border: none;
}
/* line 75, ../../../../../.rvm/gems/ruby-1.9.2-preview3@rails3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_print.scss */
/* line 75, ../../../../../.rvm/gems/ree-1.8.7-2010.02/gems/compass-0.10.6/frameworks/blueprint/stylesheets/blueprint/_print.scss */
a:link, a:visited {
background: transparent;
font-weight: 700;
text-decoration: underline;
}
/* line 79, ../../../../../.rvm/gems/ruby-1.9.2-preview3@rails3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_print.scss */
/* line 79, ../../../../../.rvm/gems/ree-1.8.7-2010.02/gems/compass-0.10.6/frameworks/blueprint/stylesheets/blueprint/_print.scss */
p img.top {
margin-top: 0;
}
/* line 81, ../../../../../.rvm/gems/ruby-1.9.2-preview3@rails3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_print.scss */
/* line 81, ../../../../../.rvm/gems/ree-1.8.7-2010.02/gems/compass-0.10.6/frameworks/blueprint/stylesheets/blueprint/_print.scss */
blockquote {
margin: 1.5em;
padding: 1em;
@ -63,22 +63,22 @@ blockquote {
font-size: 0.9em;
}
/* line 86, ../../../../../.rvm/gems/ruby-1.9.2-preview3@rails3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_print.scss */
/* line 86, ../../../../../.rvm/gems/ree-1.8.7-2010.02/gems/compass-0.10.6/frameworks/blueprint/stylesheets/blueprint/_print.scss */
.small {
font-size: 0.9em;
}
/* line 88, ../../../../../.rvm/gems/ruby-1.9.2-preview3@rails3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_print.scss */
/* line 88, ../../../../../.rvm/gems/ree-1.8.7-2010.02/gems/compass-0.10.6/frameworks/blueprint/stylesheets/blueprint/_print.scss */
.large {
font-size: 1.1em;
}
/* line 90, ../../../../../.rvm/gems/ruby-1.9.2-preview3@rails3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_print.scss */
/* line 90, ../../../../../.rvm/gems/ree-1.8.7-2010.02/gems/compass-0.10.6/frameworks/blueprint/stylesheets/blueprint/_print.scss */
.quiet {
color: #999999;
}
/* line 92, ../../../../../.rvm/gems/ruby-1.9.2-preview3@rails3/gems/compass-0.10.5/frameworks/blueprint/stylesheets/blueprint/_print.scss */
/* line 92, ../../../../../.rvm/gems/ree-1.8.7-2010.02/gems/compass-0.10.6/frameworks/blueprint/stylesheets/blueprint/_print.scss */
.hide {
display: none;
}