pairing_matrix 1.0.1 → 1.1
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/.gitignore +2 -1
- data/Gemfile +1 -0
- data/lib/pairing_matrix/github_commit_reader.rb +17 -6
- data/lib/pairing_matrix/server/public/matrix.js +1 -1
- data/lib/pairing_matrix/server/server.rb +11 -0
- data/lib/pairing_matrix/version.rb +1 -1
- data/pairing_matrix.gemspec +1 -0
- metadata +15 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 215fa3b18cf61b37c85f98b0590af936a745c85b
|
4
|
+
data.tar.gz: 5c442b933ee2a396209b0bef139162b30fb2f2a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 296a7519db175e5d7ead97a23a427c22638f7e813978a6cace6c60d7821476acd42c7f0d121a46bcec1d45c14d8f472c7eac860097404ac72a438f9ef2c7c504
|
7
|
+
data.tar.gz: d71c1f5754b49663afb55293f7679bc0ad7d31bab3fda764d5de72a39f068d5ef2e72808a9dbbc0ed61dba00ef55d4161b4f264f55e5affa804f3c3f4ea92c7b
|
data/.gitignore
CHANGED
data/Gemfile
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'octokit'
|
2
|
+
require 'eldritch'
|
2
3
|
|
3
4
|
Octokit.auto_paginate = true
|
4
5
|
|
@@ -10,15 +11,25 @@ module PairingMatrix
|
|
10
11
|
end
|
11
12
|
|
12
13
|
def read(since)
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
14
|
+
commits = []
|
15
|
+
together do
|
16
|
+
@config.github_repos.map do |repo|
|
17
|
+
async do
|
18
|
+
commits << fetch_commits(repo, since)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
commits.flatten
|
19
23
|
end
|
20
24
|
|
21
25
|
private
|
26
|
+
def fetch_commits(repo, since)
|
27
|
+
puts "Fetching commits since #{since} for #{repo}"
|
28
|
+
commits = @github_client.commits_since(repo, since).map { |commit| commit.commit.message }
|
29
|
+
puts "Total commits: #{commits.size}"
|
30
|
+
commits
|
31
|
+
end
|
32
|
+
|
22
33
|
def github_client
|
23
34
|
if @config.has_github_access_token?
|
24
35
|
Octokit::Client.new(:access_token => @config.github_access_token)
|
@@ -137,7 +137,7 @@ function PlayGround(selector) {
|
|
137
137
|
var pairId = pair.join('_');
|
138
138
|
d3.selectAll($("#" + pairId))
|
139
139
|
.attr("class", "connectLarge")
|
140
|
-
.style("stroke-width", function(d) {return playground.connectionScale(d[2])
|
140
|
+
.style("stroke-width", function(d) {return playground.connectionScale(d[2])})
|
141
141
|
})
|
142
142
|
d3.selectAll($("#" + id))
|
143
143
|
.attr("class", "playerLarge")
|
@@ -9,6 +9,17 @@ module PairingMatrix
|
|
9
9
|
class Server < Sinatra::Base
|
10
10
|
set :bind, '0.0.0.0'
|
11
11
|
|
12
|
+
logging_file = File.new('app.log', 'a+')
|
13
|
+
logging_file.sync = true
|
14
|
+
before {
|
15
|
+
env["rack.errors"] = logging_file
|
16
|
+
}
|
17
|
+
configure do
|
18
|
+
enable :logging
|
19
|
+
logging_file.sync = true
|
20
|
+
use Rack::CommonLogger, logging_file
|
21
|
+
end
|
22
|
+
|
12
23
|
config_reader = PairingMatrix::ConfigReader.new('pairing_matrix.yml')
|
13
24
|
config = config_reader.config
|
14
25
|
commit_reader = PairingMatrix::CommitReader.new(config)
|
data/pairing_matrix.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pairing_matrix
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: '1.1'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ajit Singh
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 4.6.2
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: eldritch
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 1.1.2
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 1.1.2
|
55
69
|
description: Draw pairing matrix from given repos and configurations
|
56
70
|
email:
|
57
71
|
- jeetsingh.ajit@gmail.com
|