git-visualiser 0.0.2 → 0.0.3

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,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZTI3ODQ5MGYyNDQ5NTMzNzY1ZTNiZjYzNjdjYTk3NWM3MDE3ZGRmZg==
4
+ M2MzY2JlMjk3MjBhYzQ5ODU0ZWYzZmVhMjZmNGM1YmIzN2VjMGVlZQ==
5
5
  data.tar.gz: !binary |-
6
- MGI1ZjczNzY1MzE0YjkxZDhiNzIzNjEyODQxMzUwYzYyMjJlNDNiMg==
6
+ YzYyOGI0ZWM5YmZiOWJlYThjNWVmNDdmYjEzZWMzYjMzYjQ1OGUzOQ==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- ZjNjNDE4MDY3YjhkOGM1YTJjYmEzOTFkMTUyYmI0MTgyMTE3Y2Q1OTMzZjFh
10
- ZTBmODY5YTNmNTY0NjcwY2M4YTE4ZWJkNTQwNzRkYzQ2NDE4ZjhiNDJiZmU3
11
- ZDY2YzQxYTQ3YmMyNzQzZDhiYzcxMDdhMDAxMDQ1MTNiMTE5YmU=
9
+ N2VmZWIxNjI2ZjczZTJlYzRlMWY0YzIwMGRiNTk0NDE4NjY2NjUwMzc1OGFm
10
+ YzExYzE1N2NhNWM2YjNkOWZkMTIxZjZlMTI5ZThhNTAwYTFhZWY4ZDE0ZjU0
11
+ OGJlOWJkM2VhMzUwNDg5YjgyMDQ5M2RmOGQyYzEwNWRiYjNiZDA=
12
12
  data.tar.gz: !binary |-
13
- N2Q1MjJlZTM2MTQyZjkyZmI2ODRmNjQzMjY4MjUwYzI0ZjM0Zjk3Y2FmZDhj
14
- OWZmZDBlMTc4NjZjZDg0YzcyOGI3YThlNTJhMzNlMWQxYjVjNjI0MWVmMDVl
15
- YzM4MDU3YTBlOTk3MzY4Mzc0M2M3ODhmN2U0ZjYzNjI3ZDVlMGU=
13
+ ZGY1OTk0NDdlZTY4MmI2NjNjZWI5ZTE0NDU0OWU5NGEwNDhiOTVlNGY0N2Ew
14
+ ZGMzNmVlMTJkMDA0ODdhOTgyNjRkMmFmNTVhZTk1ZDgyZTRiNTc2MzZiYTM3
15
+ NzM2ZmQyZGYwZmRmZjkzN2IxYzNjZjM1NjQxYWFjZDliODVkODM=
File without changes
@@ -1,5 +1,6 @@
1
1
  module Visualisation
2
2
  require 'csv'
3
+ require 'date'
3
4
 
4
5
  def self.branches
5
6
  branches_arr = []
@@ -21,6 +22,7 @@ module Visualisation
21
22
 
22
23
  def self.branches_with_remotes
23
24
  `git branch -a`.split("\n").each { |b| b.gsub!(/[*]?\s/, '') and b.gsub!(/remotes\//, '') }
25
+ .delete_if { |b| b.include?('->') }
24
26
  end
25
27
 
26
28
  def self.remotes
@@ -108,15 +110,16 @@ module Visualisation
108
110
  commit_lines.each_with_index do |commit, id|
109
111
  sha1 = commit[0]
110
112
  author = commit[1].strip!
111
- commit_date = commit[2].strip!
113
+ commit_date = Date.parse(commit[2].strip!)
112
114
  message = commit.slice(3..commit.length-1).join(",").strip!
113
- if !last_date.nil? && commit_date.to_date == last_date.to_date
115
+ if !last_date.nil? &&
116
+ (commit_date.year == last_date.year && commit_date.yday == last_date.yday)
114
117
  i += 1
115
118
  else
116
119
  i = 1
117
120
  end
118
- last_date = commit_date
119
- commit_stats = {:id => id, :date => commit_date, :num => i, :sha => sha1,
121
+ last_date = commit_date.to_date
122
+ commit_stats = {:id => id, :date => last_date, :num => i, :sha => sha1,
120
123
  :author => author, :message => message}
121
124
  commits << commit_stats
122
125
  puts commits
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git-visualiser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - James McCann
@@ -90,6 +90,7 @@ files:
90
90
  - bin/git_vis
91
91
  - lib/application/application.rb
92
92
  - lib/application/coffee_engine.rb
93
+ - lib/application/config.ru
93
94
  - lib/application/images/ajax-loader.gif
94
95
  - lib/application/javascripts/branch_graph.coffee
95
96
  - lib/application/javascripts/commit_graph.coffee