forked from OpenNeo/impress
ree compatibility
This commit is contained in:
parent
9aba28090d
commit
4e919aca04
4 changed files with 28 additions and 26 deletions
|
@ -701,16 +701,16 @@ class Item < ActiveRecord::Base
|
||||||
# the zone requirement. If that max was NULL, return the object.
|
# the zone requirement. If that max was NULL, return the object.
|
||||||
item_ids = select(arel_table[:id]).joins(
|
item_ids = select(arel_table[:id]).joins(
|
||||||
"LEFT JOIN #{ParentSwfAssetRelationship.table_name} #{psa.name} ON " +
|
"LEFT JOIN #{ParentSwfAssetRelationship.table_name} #{psa.name} ON " +
|
||||||
psa[:swf_asset_type].eq(SwfAssetType)
|
psa[:swf_asset_type].eq(SwfAssetType).
|
||||||
.and(psa[:parent_id].eq(arel_table[:id]))
|
and(psa[:parent_id].eq(arel_table[:id])).
|
||||||
.to_sql
|
to_sql
|
||||||
).
|
).
|
||||||
joins(
|
joins(
|
||||||
"LEFT JOIN #{SwfAsset.table_name} #{sa.name} ON " +
|
"LEFT JOIN #{SwfAsset.table_name} #{sa.name} ON " +
|
||||||
sa[:type].eq(SwfAssetType)
|
sa[:type].eq(SwfAssetType).
|
||||||
.and(sa[:id].eq(psa[:swf_asset_id]))
|
and(sa[:id].eq(psa[:swf_asset_id])).
|
||||||
.and(sa[:zone_id].in(zone_set.map(&:id)))
|
and(sa[:zone_id].in(zone_set.map(&:id))).
|
||||||
.to_sql
|
to_sql
|
||||||
).
|
).
|
||||||
group("#{table_name}.id").
|
group("#{table_name}.id").
|
||||||
having("MAX(#{sa.name}.id) IS NULL"). # SwfAsset.arel_table[:id].maximum has no #eq
|
having("MAX(#{sa.name}.id) IS NULL"). # SwfAsset.arel_table[:id].maximum has no #eq
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
require 'rocketamf/remote_gateway'
|
||||||
|
|
||||||
class Pet < ActiveRecord::Base
|
class Pet < ActiveRecord::Base
|
||||||
GATEWAY_URL = 'http://www.neopets.com/amfphp/gateway.php'
|
GATEWAY_URL = 'http://www.neopets.com/amfphp/gateway.php'
|
||||||
AMF_SERVICE_NAME = 'CustomPetService'
|
AMF_SERVICE_NAME = 'CustomPetService'
|
||||||
|
@ -86,7 +88,6 @@ class Pet < ActiveRecord::Base
|
||||||
|
|
||||||
def self.gateway
|
def self.gateway
|
||||||
unless @gateway
|
unless @gateway
|
||||||
require 'rocketamf/remote_gateway'
|
|
||||||
@gateway = RocketAMF::RemoteGateway.new(GATEWAY_URL)
|
@gateway = RocketAMF::RemoteGateway.new(GATEWAY_URL)
|
||||||
end
|
end
|
||||||
@gateway
|
@gateway
|
||||||
|
|
|
@ -1,18 +1,19 @@
|
||||||
require 'net/http'
|
require 'net/http'
|
||||||
require 'rocketamf'
|
require 'rocketamf'
|
||||||
require_relative 'remote_gateway/service'
|
require File.join(File.dirname(__FILE__), 'remote_gateway', 'service')
|
||||||
require_relative 'remote_gateway/request'
|
require File.join(File.dirname(__FILE__), 'remote_gateway', 'request')
|
||||||
|
|
||||||
module RocketAMF
|
module RocketAMF
|
||||||
class RemoteGateway
|
class RemoteGateway
|
||||||
attr_reader :uri
|
attr_reader :uri
|
||||||
|
|
||||||
def initialize(url)
|
def initialize(url)
|
||||||
@uri = URI.parse url
|
@uri = URI.parse url
|
||||||
end
|
end
|
||||||
|
|
||||||
def service(name)
|
def service(name)
|
||||||
Service.new(self, name)
|
Service.new(self, name)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -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 {
|
body {
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
|
font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
|
||||||
|
@ -7,12 +7,12 @@ body {
|
||||||
font-size: 10pt;
|
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 {
|
.container {
|
||||||
background: none;
|
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 {
|
hr {
|
||||||
background: #cccccc;
|
background: #cccccc;
|
||||||
color: #cccccc;
|
color: #cccccc;
|
||||||
|
@ -22,40 +22,40 @@ hr {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
border: none;
|
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 {
|
hr.space {
|
||||||
background: white;
|
background: white;
|
||||||
color: 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 {
|
h1, h2, h3, h4, h5, h6 {
|
||||||
font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
|
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 {
|
code {
|
||||||
font-size: 0.9em;
|
font-size: 0.9em;
|
||||||
font-family: "andale mono", "lucida console", monospace;
|
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 {
|
a img {
|
||||||
border: none;
|
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 {
|
a:link, a:visited {
|
||||||
background: transparent;
|
background: transparent;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
text-decoration: underline;
|
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 {
|
p img.top {
|
||||||
margin-top: 0;
|
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 {
|
blockquote {
|
||||||
margin: 1.5em;
|
margin: 1.5em;
|
||||||
padding: 1em;
|
padding: 1em;
|
||||||
|
@ -63,22 +63,22 @@ blockquote {
|
||||||
font-size: 0.9em;
|
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 {
|
.small {
|
||||||
font-size: 0.9em;
|
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 {
|
.large {
|
||||||
font-size: 1.1em;
|
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 {
|
.quiet {
|
||||||
color: #999999;
|
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 {
|
.hide {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue