Sha256: 354764ccdef81728416eb76a1e1a0bb334b13a018bbdab9830c66002f48069c9
Contents?: true
Size: 1.96 KB
Versions: 1
Compression:
Stored size: 1.96 KB
Contents
module Idonethis::Adapters module Views module Cli module List class << self def apply(dones=[]) dones.select{|it| it["is_goal"] == false}.each_with_index do |d,i| #{ # "id"=>22609300, "created"=>"2015-09-09T06:26:07.120", "updated"=>"2015-09-19T13:00:03.570", "markedup_text"=>"fix api smoke", "done_date"=>"2015-09-20", "owner"=>"ben.biddington", # "team_short_name"=>"benbiddington-personal", "tags"=>[], "likes"=>[], "comments"=>[], "meta_data"=>{}, "is_goal"=>true, "goal_completed"=>false, # "url"=>"https://idonethis.com/api/v0.1/dones/22609300/", "team"=>"https://idonethis.com/api/v0.1/teams/benbiddington-personal/", "raw_text"=>"[ ] fix api smoke", "permalink"=>"https://idonethis.com/done/22609300/"} # puts d.inspect printf("%-5s", i+1); print(%Q{#{d["created"]} #{d["team_short_name"]} }); printf("%-20s", d["owner"]); print(%Q{ -- #{d["raw_text"].slice(0,150)}}); print("\n") end end end end module Teams class << self def apply(teams=[]) teams.select.each_with_index do |d,i| #{ # "updated"=>"2015-05-20T23:53:58.831", "created"=>"2015-05-20T23:53:48.357", # "done_count"=>138, # "url"=>"https://idonethis.com/api/v0.1/teams/benbiddington-personal/", # "name"=>"ben.biddington personal", "short_name"=>"benbiddington-personal", # "dones"=>"https://idonethis.com/api/v0.1/dones/?team=benbiddington-personal", "is_personal"=>true, "permalink"=>"https://idonethis.com/cal/benbiddington-personal/"} printf("%-5s", i+1); print(%Q{#{d["updated"]}}); print(" "); printf("%-30s", d["name"]); printf("%-5s", %Q{(#{d["done_count"]})}); print(" "); print(%Q{#{d["permalink"]}}); print("\n") end end end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
idonethis-cli-0.12.0 | lib/adapters/views/cli.rb |