janky-flow 0.0.0

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.
@@ -0,0 +1,11 @@
1
+ module Janky
2
+ class App < Sinatra::Base
3
+
4
+ get %r{\/\*\/([-_\+\.a-zA-z0-9\/]+)} do |branch_name|
5
+ authorize_index
6
+ @builds = Build.queued.where(:branch_id => Branch.where(:name => branch_name)).first(50)
7
+ mustache :index
8
+ end
9
+
10
+ end
11
+ end
@@ -0,0 +1,24 @@
1
+ module Janky
2
+ class Hubot < Sinatra::Base
3
+
4
+ get %r{\/\*\/([-_\+\.a-zA-z0-9\/]+)} do |branch_name|
5
+ branch_summary branch_name
6
+ end
7
+
8
+ def branch_summary(branch_name)
9
+ content_type "text/plain"
10
+ repos = Repository.all(:include => [:branches, :commits, :builds]).map do |repo|
11
+ branch = repo.branch_for(branch_name)
12
+
13
+ "%-17s %-13s %-10s %40s" % [
14
+ repo.name,
15
+ branch.status,
16
+ repo.campfire_room,
17
+ repo.uri
18
+ ]
19
+ end
20
+ repos.join("\n")
21
+ end
22
+
23
+ end
24
+ end
@@ -0,0 +1,5 @@
1
+ module Janky
2
+ module Flow
3
+ VERSION = "0.0.0"
4
+ end
5
+ end
data/lib/janky/flow.rb ADDED
@@ -0,0 +1,3 @@
1
+ require 'janky/flow/app'
2
+ require 'janky/flow/hubot'
3
+ require 'janky/flow/version'
metadata ADDED
@@ -0,0 +1,66 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: janky-flow
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Mal Graty
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-11-07 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: janky
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: '0.10'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: '0.10'
30
+ description: Extends Janky's API to expose git-flow friendy endpoints
31
+ email:
32
+ - mal.graty@googlemail.com
33
+ executables: []
34
+ extensions: []
35
+ extra_rdoc_files: []
36
+ files:
37
+ - lib/janky/flow.rb
38
+ - lib/janky/flow/app.rb
39
+ - lib/janky/flow/hubot.rb
40
+ - lib/janky/flow/version.rb
41
+ homepage: http://rubygems.org/gems/janky-flow
42
+ licenses:
43
+ - MIT
44
+ post_install_message:
45
+ rdoc_options: []
46
+ require_paths:
47
+ - lib
48
+ required_ruby_version: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ required_rubygems_version: !ruby/object:Gem::Requirement
55
+ none: false
56
+ requirements:
57
+ - - ! '>='
58
+ - !ruby/object:Gem::Version
59
+ version: '0'
60
+ requirements: []
61
+ rubyforge_project:
62
+ rubygems_version: 1.8.23
63
+ signing_key:
64
+ specification_version: 3
65
+ summary: Git Flow extension for Janky
66
+ test_files: []