we use the ro gem
https://github.com/ahoward/ro
a-2:~/git/dojo4/www $ ls public/ro/
chiclets pages people posts| #! /usr/bin/env ruby | |
| # this program (on osx and probably others) will give you a 'named screen' | |
| # (ns) command that will create named screens that will also name Terminal.app | |
| # tabs, even on re-attach. save it in ~/bin/ns and use as in | |
| # | |
| # to create a named screen | |
| # | |
| # ns ~/src/foobar | |
| # |
| DEBUG [ea842735] Running /usr/bin/env pwd as [email protected] | |
| DEBUG [ea842735] Command: cd /ebs/apps/fbomb-daemon/current && ( export PATH="./bin:/usr/local/rbenv/shims:/usr/local/rbenv/bin:/usr/local/mongo/bin:/usr/local/bin:/usr/bin:/bin:/sbin:/usr/sbin:$PATH" ; /usr/bin/env pwd ) | |
| DEBUG [ea842735] /ebs/apps/fbomb-daemon/releases/20151202210221 | |
| DEBUG [ea842735] Finished in 0.093 seconds with exit status 0 (successful). | |
| /ebs/apps/fbomb-daemon/releases/20151202210221 | |
| DEBUG [422d9321] Running /usr/bin/env ls -l /ebs/apps/fbomb-daemon/current/dotdir as [email protected] | |
| DEBUG [422d9321] Command: ls -l /ebs/apps/fbomb-daemon/current/dotdir | |
| DEBUG [422d9321] total 16 | |
| -rw-rw-r-- 1 dojo4 dojo4 10683 Dec 2 20:51 commands.rb | |
| -rw-rw-r-- 1 dojo4 dojo4 754 Dec 2 20:51 commands.yml |
| model = | |
| SomeActiveRecordModel | |
| conditions = | |
| [ | |
| # ... | |
| ] | |
| cache_key = |
we use the ro gem
https://github.com/ahoward/ro
a-2:~/git/dojo4/www $ ls public/ro/
chiclets pages people posts| Return-Path: <[email protected]> | |
| X-Original-To: [email protected] | |
| Delivered-To: [email protected] | |
| Received: from harp.ngdc.noaa.gov (harp.ngdc.noaa.gov [140.172.178.33]) | |
| by planchet.hinegardner.org (Postfix) with ESMTP id A5B4E1599A58 | |
| for <[email protected]>; Thu, 9 Jun 2005 19:06:06 -0600 (MDT) | |
| Received: from harp.ngdc.noaa.gov (harp.ngdc.noaa.gov [127.0.0.1]) | |
| by harp.ngdc.noaa.gov (8.12.11/8.12.11) with ESMTP id j5A00sqp018449; | |
| Thu, 9 Jun 2005 18:00:54 -0600 | |
| Received: from localhost (ahoward@XXXXXXXXXX |
| @debug = | |
| case | |
| when ENV['IANDA_DEBUG'] | |
| !!ENV['IANDA_DEBUG'] | |
| when !Rails.env.production? | |
| Rails.logger | |
| end |
| segment = Segment::TwitterFollowers.create( | |
| name: "Demo Twitter Followers Segment #{ timestamp }", | |
| account: account, | |
| client: client, | |
| definition_data: "@nike\n" | |
| ) | |
| VS |
| Webhook.subclasses.each do |subclass| | |
| type = subclass.type | |
| match( | |
| "webhooks/:id/#{ type }(/:context_id)(.:format)", | |
| :controller => "webhooks", | |
| :action => "call", | |
| :type => type | |
| ) | |
| end |
| # you should rely ONLY in the class leve interface in your views, aka | |
| # | |
| # Asset.thumbnail(path, :dimensions => '42x42').url | |
| # Asset.bw(path).url | |
| # | |
| # and no lib internals for now - this is under development | |
| # | |
| # this lib handles a few things in a simple interface. highlights: | |
| # | |
| # - file ids are md5s of the file contents |
| [a, b].each do |bucket_name| | |
| bucket = AWS::S3.new.buckets[bucket_name] | |
| location_constraint = bucket.location_constraint | |
| s3_endpoint = location_constraint.blank? ? "s3.amazonaws.com" : "s3-#{ location_constraint }.amazonaws.com" | |
| bucket = AWS::S3.new(:s3_endpoint => s3_endpoint).buckets[bucket_name] |