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
System: | |
ruby-1.8.7-p334 | |
hobo (1.0.3) | |
rails (2.3.11) | |
Models: | |
Contact Model | |
has_many :contact_activities |
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 RestfulMetrics | |
class Client | |
extend LogTools | |
@@connection = nil | |
@@debug, @@async, @@disabled = false | |
@@fqdn = nil |
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
ruby script/server | |
=> Booting WEBrick | |
=> Rails 2.3.11 application starting on http://0.0.0.0:3000 | |
/home/karsten/.rvm/gems/ruby-1.8.7-p334@saleshype/gems/jammit-0.6.5/lib/jammit.rb:7: warning: already initialized constant VERSION | |
/home/karsten/.rvm/gems/ruby-1.8.7-p334@saleshype/gems/jammit-0.6.5/lib/jammit.rb:9: warning: already initialized constant ROOT | |
/home/karsten/.rvm/gems/ruby-1.8.7-p334@saleshype/gems/jammit-0.6.5/lib/jammit.rb:13: warning: already initialized constant DEFAULT_PUBLIC_ROOT | |
/home/karsten/.rvm/gems/ruby-1.8.7-p334@saleshype/gems/jammit-0.6.5/lib/jammit.rb:15: warning: already initialized constant DEFAULT_CONFIG_PATH | |
/home/karsten/.rvm/gems/ruby-1.8.7-p334@saleshype/gems/jammit-0.6.5/lib/jammit.rb:17: warning: already initialized constant DEFAULT_PACKAGE_PATH | |
/home/karsten/.rvm/gems/ruby-1.8.7-p334@saleshype/gems/jammit-0.6.5/lib/jammit.rb:19: warning: already initialized constant DEFAULT_JST_SCRIPT | |
/home/karsten/.rvm/gems/ruby-1.8.7-p334@saleshype/gems/jammit-0.6.5/lib/jammit.rb:21: warn |
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
def belongs_to_with_test_methods(name, options={}, &block) | |
belongs_to_without_test_methods(name, options, &block) | |
refl = reflections[name] | |
id_method = refl.options[:primary_key] || refl.klass.primary_key | |
if options[:polymorphic] | |
# TODO: the class lookup in _is? below is incomplete; a polymorphic association to an STI base class | |
# will fail to match an object of a derived type | |
# (ie X belongs_to Y (polymorphic), Z is a subclass of Y; @x.y_is?(some_z) will never pass) | |
class_eval %{ | |
--------> binding.pry |
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
// One way converter from E4X XML to JSON | |
// 1) turns <body><item>1</item><item>2</item></body> into | |
// body: {item: ["1", "2"]} so that lists are easier to work with | |
// 2) turns things like: <body a="a">whatever</body> into | |
// body: {_a: "a", _: "whatever"} | |
// however <body>whatever</body> becomes simply body: "whatever | |
// - attributes specified by ignored are ignored | |
function E4XtoJSON(xml, ignored) { | |
var r, children = xml.*, attributes = xml.@*, length = children.length(); | |
if(length == 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
<extractvariables async="false" continueonerror="false" enabled="true" name="getArticleNumberfromPath"> | |
<displayname>getItemNumberfromPath</displayname> | |
<faultrules> | |
<properties> | |
<uripath> | |
<pattern ignorecase="true">/*/{uri}</pattern> | |
</uripath> | |
<ignoreunresolvedvariables>true</ignoreunresolvedvariables> | |
<variableprefix>path</variableprefix> | |
</properties></faultrules> |
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
<Javascript async="false" continueOnError="false" enabled="true" name="javascript-step" timeLimit="200"> | |
<DisplayName>Javascript-Step</DisplayName> | |
<FaultRules/> | |
<Properties/> | |
<IncludeURL>jsc://sharedlib</IncludeURL> | |
<ResourceURL>jsc://normaljsscript</ResourceURL> | |
</Javascript> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<Request> | |
<Counter>100</Counter> | |
<DataFilter> | |
<Filter> | |
<Filtername>DateFilter</Filtername> | |
<FilterValues> | |
<DateFrom>01.01.2013 00:00:00</DateFrom> | |
<DateTo>31.12.2013 23:59:00</DateTo> | |
<FilterValue>CreateDate</FilterValue> |
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['exports'] = function echoHttp (hook) { | |
hook.debug("Debug messages are sent to the debug console"); | |
hook.debug(hook.params); | |
hook.debug(hook.req.path); | |
hook.debug(hook.req.method); | |