kancmd 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/README.md +30 -3
 - data/bin/kan +40 -7
 - data/kancmd-0.1.1.gem +0 -0
 - data/lib/kancmd/version.rb +1 -1
 - metadata +4 -3
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: e89af012b121551166ea5320bd224fd13bb4fde5
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: a4fff11af8696578ef96f91c1c6e7ce4af5242b3
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: d5f5ae67fb55662e90c97bbeb1926ad510f5256f15f9ae5df81ffc2b199d5639ea4c4163c56f6766e19581f78eccd472a97583e678f71fc880d6aebb6b3b49ef
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: a647887c04d05b17d3f050ed037a7e9f0f90e27a0852be415cbf16847e5fef368599da5ee8bc9c335bc8f3e3ea5df990db759b4d004481ab12970814c1b602d5
         
     | 
    
        data/README.md
    CHANGED
    
    | 
         @@ -10,11 +10,38 @@ Install: 
     | 
|
| 
       10 
10 
     | 
    
         | 
| 
       11 
11 
     | 
    
         
             
            ## Usage
         
     | 
| 
       12 
12 
     | 
    
         | 
| 
       13 
     | 
    
         
            -
                kan
         
     | 
| 
      
 13 
     | 
    
         
            +
                $ kan
         
     | 
| 
       14 
14 
     | 
    
         | 
| 
       15 
     | 
    
         
            -
                 
     | 
| 
      
 15 
     | 
    
         
            +
                +------------------------------+-------+-----------------+---------------+-----------------------------------------------------------+---------+
         
     | 
| 
      
 16 
     | 
    
         
            +
                | Status                       | Type  | Who             | Company       | Title                                                     | Points  |
         
     | 
| 
      
 17 
     | 
    
         
            +
                +------------------------------+-------+-----------------+---------------+-----------------------------------------------------------+---------+
         
     | 
| 
      
 18 
     | 
    
         
            +
                | Backlog                      | Story | Radek           | DevOps        |  Configure build server on Mac Mini for Android           | 2       |
         
     | 
| 
      
 19 
     | 
    
         
            +
                | Ready for Test               | Story | Tobin Harris    | Mi|Home       |  Full QA sweep with updated spreadsheet                   | 1       |
         
     | 
| 
      
 20 
     | 
    
         
            +
                | Ready for Test               | Story | Jabba The Hutt  | White Label   |  Skyline Fare Estimate Integration Android                | 1       |
         
     | 
| 
      
 21 
     | 
    
         
            +
                | Backlog                      | Story | Radek           | White Label   |  Skyline Fare Estimate Integration iPhone                 | 1       |
         
     | 
| 
      
 22 
     | 
    
         
            +
                | Dev WIP                      | Story | Ramesh          | Fresenius     |  Update the Sales App so it will run on iPhone            | 21      |   
         
     | 
| 
      
 23 
     | 
    
         
            +
                | 4  items                     |       |                 |               |  26 points                                                |
         
     | 
| 
      
 24 
     | 
    
         
            +
                +------------------------------+-------+-----------------+---------------+-----------------------------------------------------------+---------+
         
     | 
| 
      
 25 
     | 
    
         
            +
                
         
     | 
| 
      
 26 
     | 
    
         
            +
                $ kan Backlog
         
     | 
| 
      
 27 
     | 
    
         
            +
                
         
     | 
| 
      
 28 
     | 
    
         
            +
                +------------------------------+-------+-----------------+---------------+-----------------------------------------------------------+---------+
         
     | 
| 
      
 29 
     | 
    
         
            +
                | Status                       | Type  | Who             | Company       | Title                                                     | Points  |
         
     | 
| 
      
 30 
     | 
    
         
            +
                +------------------------------+-------+-----------------+---------------+-----------------------------------------------------------+---------+
         
     | 
| 
      
 31 
     | 
    
         
            +
                | Backlog                      | Story | Radek           | DevOps        |  Configure build server on Mac Mini for Android           | 2       |    
         
     | 
| 
      
 32 
     | 
    
         
            +
                | Backlog                      | Story | Radek           | White Label   |  Skyline Fare Estimate Integration iPhone                 | 1       |    
         
     | 
| 
      
 33 
     | 
    
         
            +
                | 2  items                     |       |                 |               |  3 points                                                 |
         
     | 
| 
      
 34 
     | 
    
         
            +
                +------------------------------+-------+-----------------+---------------+-----------------------------------------------------------+---------+
         
     | 
| 
      
 35 
     | 
    
         
            +
                
         
     | 
| 
      
 36 
     | 
    
         
            +
                $ kan Backlog devops
         
     | 
| 
      
 37 
     | 
    
         
            +
                
         
     | 
| 
      
 38 
     | 
    
         
            +
                +------------------------------+-------+-----------------+---------------+-----------------------------------------------------------+---------+
         
     | 
| 
      
 39 
     | 
    
         
            +
                | Status                       | Type  | Who             | Company       | Title                                                     | Points  |
         
     | 
| 
      
 40 
     | 
    
         
            +
                +------------------------------+-------+-----------------+---------------+-----------------------------------------------------------+---------+
         
     | 
| 
      
 41 
     | 
    
         
            +
                | Backlog                      | Story | Radek           | DevOps        |  Configure build server on Mac Mini for Android           | 2       |    
         
     | 
| 
      
 42 
     | 
    
         
            +
                | 1  items                     |       |                 |               |  2 points                                                 |
         
     | 
| 
      
 43 
     | 
    
         
            +
                +------------------------------+-------+-----------------+---------------+-----------------------------------------------------------+---------+
         
     | 
| 
       16 
44 
     | 
    
         | 
| 
       17 
     | 
    
         
            -
                kan | grep Bug
         
     | 
| 
       18 
45 
     | 
    
         | 
| 
       19 
46 
     | 
    
         
             
            ## Development
         
     | 
| 
       20 
47 
     | 
    
         | 
    
        data/bin/kan
    CHANGED
    
    | 
         @@ -47,7 +47,7 @@ module BaneryStats 
     | 
|
| 
       47 
47 
     | 
    
         
             
              end
         
     | 
| 
       48 
48 
     | 
    
         | 
| 
       49 
49 
     | 
    
         
             
              class OutputSummary
         
     | 
| 
       50 
     | 
    
         
            -
                attr_accessor :tasks, :task_types, :users, :estimates
         
     | 
| 
      
 50 
     | 
    
         
            +
                attr_accessor :tasks, :task_types, :users, :estimates, :columns
         
     | 
| 
       51 
51 
     | 
    
         | 
| 
       52 
52 
     | 
    
         
             
                def self.run
         
     | 
| 
       53 
53 
     | 
    
         
             
                  new.run
         
     | 
| 
         @@ -64,12 +64,13 @@ module BaneryStats 
     | 
|
| 
       64 
64 
     | 
    
         
             
            #       end
         
     | 
| 
       65 
65 
     | 
    
         
             
                  self.estimates = project_estimates('pocketworks', 58789)
         
     | 
| 
       66 
66 
     | 
    
         
             
                  self.users = project_users('pocketworks', 58789)
         
     | 
| 
      
 67 
     | 
    
         
            +
                  self.columns = project_columns('pocketworks', 58789)
         
     | 
| 
       67 
68 
     | 
    
         
             
                  self.task_types = project_task_types('pocketworks', 58789)
         
     | 
| 
       68 
69 
     | 
    
         
             
                  self.tasks = project_tasks('pocketworks', 58789)
         
     | 
| 
       69 
70 
     | 
    
         | 
| 
       70 
71 
     | 
    
         | 
| 
       71 
     | 
    
         
            -
                  #puts self. 
     | 
| 
       72 
     | 
    
         
            -
                   
     | 
| 
      
 72 
     | 
    
         
            +
                  #puts self.columns
         
     | 
| 
      
 73 
     | 
    
         
            +
                  puts self.tasks.last
         
     | 
| 
       73 
74 
     | 
    
         
             
                  #log("#{self.tasks.count}")
         
     | 
| 
       74 
75 
     | 
    
         
             
                  #puts self.stale
         
     | 
| 
       75 
76 
     | 
    
         
             
                end
         
     | 
| 
         @@ -94,6 +95,14 @@ module BaneryStats 
     | 
|
| 
       94 
95 
     | 
    
         
             
                  card["column_id"] != 393331
         
     | 
| 
       95 
96 
     | 
    
         
             
                end
         
     | 
| 
       96 
97 
     | 
    
         | 
| 
      
 98 
     | 
    
         
            +
                def is_backlog(card)
         
     | 
| 
      
 99 
     | 
    
         
            +
                  card["column_id"] != 414113
         
     | 
| 
      
 100 
     | 
    
         
            +
                end
         
     | 
| 
      
 101 
     | 
    
         
            +
                
         
     | 
| 
      
 102 
     | 
    
         
            +
                def in_column(card)
         
     | 
| 
      
 103 
     | 
    
         
            +
                  self.columns.select{|c|c["id"] == card["column_id"]}.first
         
     | 
| 
      
 104 
     | 
    
         
            +
                end
         
     | 
| 
      
 105 
     | 
    
         
            +
                
         
     | 
| 
       97 
106 
     | 
    
         
             
                def self.is_with_jabba(card)
         
     | 
| 
       98 
107 
     | 
    
         
             
                  card["username"] =~ /Jabba.+/
         
     | 
| 
       99 
108 
     | 
    
         
             
                end
         
     | 
| 
         @@ -153,6 +162,8 @@ module BaneryStats 
     | 
|
| 
       153 
162 
     | 
    
         
             
                   else
         
     | 
| 
       154 
163 
     | 
    
         
             
                     t["username"] = nil
         
     | 
| 
       155 
164 
     | 
    
         
             
                   end
         
     | 
| 
      
 165 
     | 
    
         
            +
                   
         
     | 
| 
      
 166 
     | 
    
         
            +
                   t["column_name"] = in_column(t)["name"]
         
     | 
| 
       156 
167 
     | 
    
         | 
| 
       157 
168 
     | 
    
         
             
                   t["is_open"] = is_open(t)
         
     | 
| 
       158 
169 
     | 
    
         
             
                  end
         
     | 
| 
         @@ -177,6 +188,12 @@ module BaneryStats 
     | 
|
| 
       177 
188 
     | 
    
         
             
                  data
         
     | 
| 
       178 
189 
     | 
    
         
             
                end 
         
     | 
| 
       179 
190 
     | 
    
         | 
| 
      
 191 
     | 
    
         
            +
                def project_columns(workspace_name, project_id)
         
     | 
| 
      
 192 
     | 
    
         
            +
                  data = JsonGet.perform(project_columns_url(workspace_name, project_id))
         
     | 
| 
      
 193 
     | 
    
         
            +
                  #data.keep_if { |d| d.has_key?("owner_id") && d["owner_id"] == own_user_id }
         
     | 
| 
      
 194 
     | 
    
         
            +
                  data
         
     | 
| 
      
 195 
     | 
    
         
            +
                end
         
     | 
| 
      
 196 
     | 
    
         
            +
                
         
     | 
| 
       180 
197 
     | 
    
         
             
                def user_by_id(id)
         
     | 
| 
       181 
198 
     | 
    
         
             
                  self.users.select{|u|u["id"]==id}.first
         
     | 
| 
       182 
199 
     | 
    
         
             
                end
         
     | 
| 
         @@ -216,6 +233,10 @@ module BaneryStats 
     | 
|
| 
       216 
233 
     | 
    
         
             
                def project_estimates_url(workspace_name, project_id)
         
     | 
| 
       217 
234 
     | 
    
         
             
                  "https://#{workspace_name}.kanbanery.com/api/v1/projects/#{project_id}/estimates.json"
         
     | 
| 
       218 
235 
     | 
    
         
             
                end
         
     | 
| 
      
 236 
     | 
    
         
            +
                
         
     | 
| 
      
 237 
     | 
    
         
            +
                def project_columns_url(workspace_name, project_id)
         
     | 
| 
      
 238 
     | 
    
         
            +
                  "https://#{workspace_name}.kanbanery.com/api/v1/projects/#{project_id}/columns.json"
         
     | 
| 
      
 239 
     | 
    
         
            +
                end
         
     | 
| 
       219 
240 
     | 
    
         
             
              end
         
     | 
| 
       220 
241 
     | 
    
         
             
            end
         
     | 
| 
       221 
242 
     | 
    
         | 
| 
         @@ -249,21 +270,33 @@ tasks = report.tasks.select{|t| t["is_open"] && t['task_type_name'] != 'Delivera 
     | 
|
| 
       249 
270 
     | 
    
         
             
            deliverables = report.tasks.select{|t| t["is_open"] && t['task_type_name'] == 'Deliverable'}
         
     | 
| 
       250 
271 
     | 
    
         | 
| 
       251 
272 
     | 
    
         
             
            rows = []
         
     | 
| 
      
 273 
     | 
    
         
            +
            allowed_tasks =[]
         
     | 
| 
       252 
274 
     | 
    
         
             
            total = 0
         
     | 
| 
      
 275 
     | 
    
         
            +
            filters = ARGV
         
     | 
| 
       253 
276 
     | 
    
         
             
            #cmd = CmdParser.new(ARGV)
         
     | 
| 
       254 
277 
     | 
    
         
             
            tasks.each do |task| 
         
     | 
| 
      
 278 
     | 
    
         
            +
              #filter
         
     | 
| 
      
 279 
     | 
    
         
            +
              allow = true
         
     | 
| 
      
 280 
     | 
    
         
            +
              filters.each do |f|
         
     | 
| 
      
 281 
     | 
    
         
            +
                t = task.select{|k,v| v =~ /#{f}/i}.first
         
     | 
| 
      
 282 
     | 
    
         
            +
                allow = false unless t
         
     | 
| 
      
 283 
     | 
    
         
            +
              end
         
     | 
| 
      
 284 
     | 
    
         
            +
              next unless allow
         
     | 
| 
      
 285 
     | 
    
         
            +
              
         
     | 
| 
      
 286 
     | 
    
         
            +
              # display
         
     | 
| 
      
 287 
     | 
    
         
            +
              allowed_tasks << task
         
     | 
| 
       255 
288 
     | 
    
         
             
              fmt_estimate = task["estimate"] ? task["estimate"].to_i : (task['task_type_name'] == "Bug" ? "-" : Paint["MISSING",:red])
         
     | 
| 
       256 
289 
     | 
    
         
             
              fmt_estimate = Paint[fmt_estimate,:bright,:red] if task["estimate"] && task["estimate"] > 8
         
     | 
| 
       257 
290 
     | 
    
         
             
              parts = task['title'].split(':')
         
     | 
| 
       258 
291 
     | 
    
         
             
              title = parts.length == 2 ? parts[1] : parts[0] 
         
     | 
| 
       259 
     | 
    
         
            -
              company = parts.length == 2 ? parts[0] : ""
         
     | 
| 
       260 
     | 
    
         
            -
              rows << [task['task_type_name'], task['username'], company, title, fmt_estimate]
         
     | 
| 
      
 292 
     | 
    
         
            +
              company = parts.length == 2 ? parts[0] : ""  
         
     | 
| 
      
 293 
     | 
    
         
            +
              rows << [task["column_name"],task['task_type_name'], task['username'], company, title, fmt_estimate]
         
     | 
| 
       261 
294 
     | 
    
         
             
              total += task["estimate"] ? task["estimate"].to_i : 0
         
     | 
| 
       262 
295 
     | 
    
         
             
              #puts "#{task['task_type_name']}:#{task['username']}:#{task['title']} "
         
     | 
| 
       263 
296 
     | 
    
         
             
            end
         
     | 
| 
       264 
     | 
    
         
            -
            rows << [Paint["#{ 
     | 
| 
      
 297 
     | 
    
         
            +
            rows << [Paint["#{allowed_tasks.count} items",:yellow], "","", "", Paint["#{total} points",:yellow]]
         
     | 
| 
       265 
298 
     | 
    
         | 
| 
       266 
     | 
    
         
            -
            table = Terminal::Table.new :headings => ['Type', 'Who', 'Company', 'Title', 'Points'], :rows => rows
         
     | 
| 
      
 299 
     | 
    
         
            +
            table = Terminal::Table.new :headings => ['Status', 'Type', 'Who', 'Company', 'Title', 'Points'], :rows => rows
         
     | 
| 
       267 
300 
     | 
    
         
             
            puts table
         
     | 
| 
       268 
301 
     | 
    
         | 
| 
       269 
302 
     | 
    
         | 
    
        data/kancmd-0.1.1.gem
    ADDED
    
    | 
         Binary file 
     | 
    
        data/lib/kancmd/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: kancmd
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.1. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.1.2
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Tobin Harris
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2015-09- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2015-09-24 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: bundler
         
     | 
| 
         @@ -57,6 +57,7 @@ files: 
     | 
|
| 
       57 
57 
     | 
    
         
             
            - bin/kan
         
     | 
| 
       58 
58 
     | 
    
         
             
            - bin/setup
         
     | 
| 
       59 
59 
     | 
    
         
             
            - kancmd-0.1.0.gem
         
     | 
| 
      
 60 
     | 
    
         
            +
            - kancmd-0.1.1.gem
         
     | 
| 
       60 
61 
     | 
    
         
             
            - kancmd.gemspec
         
     | 
| 
       61 
62 
     | 
    
         
             
            - lib/kancmd.rb
         
     | 
| 
       62 
63 
     | 
    
         
             
            - lib/kancmd/version.rb
         
     | 
| 
         @@ -80,7 +81,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       80 
81 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       81 
82 
     | 
    
         
             
            requirements: []
         
     | 
| 
       82 
83 
     | 
    
         
             
            rubyforge_project: 
         
     | 
| 
       83 
     | 
    
         
            -
            rubygems_version: 2.4. 
     | 
| 
      
 84 
     | 
    
         
            +
            rubygems_version: 2.4.5
         
     | 
| 
       84 
85 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       85 
86 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       86 
87 
     | 
    
         
             
            summary: Kanbanery reporting tool (very basic right now)
         
     |