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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0797a8b59f1ab5e24806523599d93976fe25ddf0
4
- data.tar.gz: b061dbc6d7daa10569ee93a60ff0b3f9fac10a3e
3
+ metadata.gz: 215fa3b18cf61b37c85f98b0590af936a745c85b
4
+ data.tar.gz: 5c442b933ee2a396209b0bef139162b30fb2f2a0
5
5
  SHA512:
6
- metadata.gz: 5bb3fa7b719d99f98d706b88ca958c2488225dfe08bea2c39c04347ebd2ac778ec9f1875bbd8f229808faebfc4899f4fee0c7021b484bfd14cc88aec2515ca83
7
- data.tar.gz: d162e9fcfea3618855f1b575f7f65db9106d57b672e5944a7b5a6ce14814c7f210bce45495776a0c069d4c0421117dad1c91651ce2a6854fc1b8b33037c2a8cc
6
+ metadata.gz: 296a7519db175e5d7ead97a23a427c22638f7e813978a6cace6c60d7821476acd42c7f0d121a46bcec1d45c14d8f472c7eac860097404ac72a438f9ef2c7c504
7
+ data.tar.gz: d71c1f5754b49663afb55293f7679bc0ad7d31bab3fda764d5de72a39f068d5ef2e72808a9dbbc0ed61dba00ef55d4161b4f264f55e5affa804f3c3f4ea92c7b
data/.gitignore CHANGED
@@ -1,5 +1,6 @@
1
1
  *.gem
2
2
  *.rbc
3
+ *.log
3
4
  .bundle
4
5
  .config
5
6
  .yardoc
@@ -22,4 +23,4 @@ tmp
22
23
  mkmf.log
23
24
  .idea
24
25
  *.iml
25
- *.yml
26
+ *.yml
data/Gemfile CHANGED
@@ -2,3 +2,4 @@ source 'https://rubygems.org'
2
2
 
3
3
  gem 'sinatra'
4
4
  gem 'octokit'
5
+ gem 'eldritch'
@@ -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
- @config.github_repos.map do |repo|
14
- puts "Fetching commits since #{since} for #{repo}"
15
- commits = @github_client.commits_since(repo, since).map { |commit| commit.commit.message }
16
- puts "Total commits: #{commits.size}"
17
- commits
18
- end.flatten
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]) * 3})
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)
@@ -1,3 +1,3 @@
1
1
  module PairingMatrix
2
- VERSION = '1.0.1'
2
+ VERSION = '1.1'
3
3
  end
@@ -21,4 +21,5 @@ Gem::Specification.new do |spec|
21
21
  spec.add_development_dependency 'bundler', '~> 1.6'
22
22
  spec.add_dependency 'sinatra', '~> 1.4.8'
23
23
  spec.add_dependency 'octokit', '~> 4.6.2'
24
+ spec.add_dependency 'eldritch', '~> 1.1.2'
24
25
  end
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.0.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