This file contains 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
staging: | |
database: app604162 | |
username: <%= ENV['MONGO_USERNAME'] %> | |
password: <%= ENV['MONGO_PASSWORD'] %> | |
hosts: | |
- - staff.mongohq.com | |
- 10020 | |
max_retries_on_conncection_failure: 30 |
This file contains 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
2012-06-15T16:59:46+00:00 app[web.1]: /app/.bundle/gems/ruby/1.9.1/gems/mongo-1.5.2/lib/mongo/util/pool_manager.rb:282:in `get_valid_seed_node': Cannot connect to a replica set using seeds staff.mongohq.com:10020 (Mongo::ConnectionFailure) | |
2012-06-15T16:59:46+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/mongo-1.5.2/lib/mongo/util/pool_manager.rb:158:in `connect_to_members' | |
2012-06-15T16:59:46+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/mongo-1.5.2/lib/mongo/repl_set_connection.rb:160:in `connect' | |
2012-06-15T16:59:46+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/mongo-1.5.2/lib/mongo/util/pool_manager.rb:30:in `connect' | |
2012-06-15T16:59:46+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/mongo-1.5.2/lib/mongo/repl_set_connection.rb:500:in `setup' | |
2012-06-15T16:59:46+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems/mongo-1.5.2/lib/mongo/repl_set_connection.rb:144:in `initialize' | |
2012-06-15T16:59:46+00:00 app[web.1]: from /app/.bundle/gems/ruby/1.9.1/gems |
This file contains 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
<script type="text/html"> | |
<div>{{mustacheVar}}</div> | |
... | |
</script> |
This file contains 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
<script type="text/html"> | |
<div>{{mustacheVar}}</div> | |
... | |
</script> |
This file contains 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
<script type="text/html"> | |
<div>{{mustacheVar}}</div> | |
... | |
</script> |
This file contains 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
<script type="text/html"> | |
<div>{{mustacheVar}}</div> | |
... | |
</script> |
This file contains 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
var data = [ | |
{brand: 'Kraft', sites: [ | |
{name: 'Strive Morris', integrated: false, jobs_per_day: 50}, | |
{name: 'Strive Aurora', integrated: true, jobs_per_day: 100}, | |
{name: 'Strive Westway', integrated: true, jobs_per_day: 25}, | |
]}, | |
{brand: 'Frito Lay', sites: [ | |
{name: 'BCP', integrated: false, jobs_per_day: 2}, | |
{name: 'Industrial', integrated: false, jobs_per_day: 5}, | |
{name: 'ATCO', integrated: false, jobs_per_day: 10}, |
This file contains 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
// generate a string that only has the time portion | |
var strWithoutTimezone = moment(localEquivalent).format("YYYY-MM-DDTHH:mm:ss") | |
// extract out the site's timezone identifier (DateWithTimezone.getTimezone() stores the site's timezone) | |
var timezone = moment.tz(DateWithTimezone.getTimezone()).format("Z") | |
// create a moment in the site's timezone and use it to initialize a `DateWithTimezone` | |
return new DateWithTimezone(moment(strWithoutTimezone + timezone)) |
This file contains 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
define("DateWithTimezone", function(module) { | |
var DateWithTimezone = function(moment){ | |
this.moment = moment | |
moment.tz(DateWithTimezone.getTimezone()) | |
} | |
_.extend(DateWithTimezone.prototype, { | |
toISO: function(){ | |
return this.format() | |
}, |
This file contains 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 has_skus? | |
from_adjustment_has_sku? or to_adjustment_has_sku? | |
end | |
def from_adjustment_has_sku? | |
from_adjustment.try(:sku).present? | |
def to_adjustment_has_sku? | |
to_adjustment.try(:sku).present? | |
end |
OlderNewer