gitreport 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.8
1
+ 0.0.9
data/gitreport.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "gitreport"
8
- s.version = "0.0.8"
8
+ s.version = "0.0.9"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jan Roesner"]
12
- s.date = "2011-10-28"
12
+ s.date = "2011-11-01"
13
13
  s.description = "gitreport keeps track of your projects. It collects info about commited and pushed data, submits it to our servers and provides a gorgous frontend to examine, discover and extract the data that you need to generate the payment recipes for your customers. No longer searching or `what did I commit when and where`..."
14
14
  s.email = "jan@roesner.it"
15
15
  s.executables = ["gitreport"]
data/lib/commit.rb CHANGED
@@ -78,13 +78,14 @@ module GitReport
78
78
  data[:message] = self.message
79
79
  data[:stats] = self.stats
80
80
  if scope == :single
81
- data[:project_path] = @project.path
82
- data[:project_name] = @project.name
83
- data[:current_branch] = @project.branchname
84
- data[:remotes] = @project.remotes.map(&:name)
85
- data[:remote_urls] = @project.remotes.map(&:url)
86
- data[:remote_branches] = @project.remote_branches
87
- data[:project_identifier] = self.project_identifier
81
+ data[:project] = {}
82
+ data[:current_branch] = @project.branchname
83
+ data[:project][:path] = @project.path
84
+ data[:project][:name] = @project.name
85
+ data[:project][:remotes] = @project.remotes.map(&:name)
86
+ data[:project][:remote_urls] = @project.remotes.map(&:url)
87
+ data[:project][:remote_branches] = @project.remote_branches
88
+ data[:project][:identifier] = self.project_identifier
88
89
  end
89
90
  data
90
91
  end
data/lib/project.rb CHANGED
@@ -55,9 +55,8 @@ module GitReport
55
55
  # aggregates the projects core data
56
56
  def aggregate
57
57
  data = {}
58
- data[:project_path] = self.path
59
- data[:project_name] = self.name
60
- data[:current_branch] = self.branchname
58
+ data[:path] = self.path
59
+ data[:name] = self.name
61
60
  data[:remotes] = self.remotes.map(&:name)
62
61
  data[:remote_urls] = self.remotes.map(&:url)
63
62
  data[:remote_branches] = self.remote_branches
@@ -25,8 +25,8 @@ describe 'GitReport::BatchSender' do
25
25
  data["commits"].collect{ |c| c["sha"] }.each do |sha|
26
26
  GitReport.project.revlist.include?(sha).should be_true
27
27
  end
28
- data["project"].size.should == 7
29
- data["project"]["project_name"].should == GitReport.project.name
28
+ data["project"].size.should == 6
29
+ data["project"]["name"].should == GitReport.project.name
30
30
  end
31
31
 
32
32
  it 'should not raise an error in case of the word commit at the start of a commit message' do
@@ -1,4 +1,4 @@
1
- # require 'spec_helper'
1
+ require 'spec_helper'
2
2
  require 'gitreport'
3
3
 
4
4
  describe 'GitReport::Commit' do
@@ -61,10 +61,13 @@ describe 'GitReport::Commit' do
61
61
  describe '#data' do
62
62
  it 'should return the data to be transferred during a single commit including project data' do
63
63
  data = @commit.data
64
- data.size.should == 14
65
- [:project_path, :project_name, :current_branch, :remotes, :remote_urls, :remote_branches].each do |attr|
64
+ data.size.should == 9
65
+ [:sha, :short_sha, :author_name, :author_email, :time, :message, :stats, :project, :current_branch].each do |attr|
66
66
  data.keys.include?(attr).should be_true
67
67
  end
68
+ [:path, :name, :remotes, :remote_urls, :remote_branches, :identifier].each do |attr|
69
+ data[:project].keys.include?(attr).should be_true
70
+ end
68
71
  end
69
72
  end
70
73
 
@@ -84,8 +87,12 @@ describe 'GitReport::Commit' do
84
87
  data = JSON.parse(json_string)
85
88
 
86
89
  data.each_pair do |key, value|
90
+ next if key == "project"
87
91
  @commit.data[key.to_sym].should == value
88
92
  end
93
+ data["project"].each_pair do |key, value|
94
+ @commit.data[:project][key.to_sym].should == value
95
+ end
89
96
  end
90
97
  end
91
98
 
@@ -79,10 +79,9 @@ describe 'GitReport::Project' do
79
79
  it 'should return the projects core data as a hash' do
80
80
  data = GitReport.project.data
81
81
  data.should be_a(Hash)
82
- data.size.should == 7
83
- data[:project_path].should == GitReport.project.path
84
- data[:project_name].should == GitReport.project.name
85
- data[:current_branch].should == GitReport.project.branchname
82
+ data.size.should == 6
83
+ data[:path].should == GitReport.project.path
84
+ data[:name].should == GitReport.project.name
86
85
  data[:remotes].should == GitReport.project.remotes.map(&:name)
87
86
  data[:remote_urls].should == GitReport.project.remotes.map(&:url)
88
87
  data[:remote_branches].should == GitReport.project.remote_branches
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitreport
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-10-28 00:00:00.000000000Z
12
+ date: 2011-11-01 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json
16
- requirement: &70284346535700 !ruby/object:Gem::Requirement
16
+ requirement: &70131799697520 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70284346535700
24
+ version_requirements: *70131799697520
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: spork
27
- requirement: &70284346531340 !ruby/object:Gem::Requirement
27
+ requirement: &70131799693860 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>'
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 0.9.0.rc
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70284346531340
35
+ version_requirements: *70131799693860
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rspec
38
- requirement: &70284346525880 !ruby/object:Gem::Requirement
38
+ requirement: &70131799688280 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70284346525880
46
+ version_requirements: *70131799688280
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: webmock
49
- requirement: &70284346521540 !ruby/object:Gem::Requirement
49
+ requirement: &70131799684260 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70284346521540
57
+ version_requirements: *70131799684260
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: shoulda
60
- requirement: &70284346518300 !ruby/object:Gem::Requirement
60
+ requirement: &70131799680940 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *70284346518300
68
+ version_requirements: *70131799680940
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: bundler
71
- requirement: &70284346514400 !ruby/object:Gem::Requirement
71
+ requirement: &70131799676240 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ~>
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: 1.0.0
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *70284346514400
79
+ version_requirements: *70131799676240
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: jeweler
82
- requirement: &70284346510280 !ruby/object:Gem::Requirement
82
+ requirement: &70131799673080 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ~>
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: 1.6.4
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *70284346510280
90
+ version_requirements: *70131799673080
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: rcov
93
- requirement: &70284346504540 !ruby/object:Gem::Requirement
93
+ requirement: &70131799667820 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ! '>='
@@ -98,7 +98,7 @@ dependencies:
98
98
  version: '0'
99
99
  type: :development
100
100
  prerelease: false
101
- version_requirements: *70284346504540
101
+ version_requirements: *70131799667820
102
102
  description: gitreport keeps track of your projects. It collects info about commited
103
103
  and pushed data, submits it to our servers and provides a gorgous frontend to examine,
104
104
  discover and extract the data that you need to generate the payment recipes for
@@ -183,7 +183,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
183
183
  version: '0'
184
184
  segments:
185
185
  - 0
186
- hash: 3923250588470254802
186
+ hash: -1624065190523425410
187
187
  required_rubygems_version: !ruby/object:Gem::Requirement
188
188
  none: false
189
189
  requirements: