gitreport 0.0.9 → 0.0.10

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.9
1
+ 0.0.10
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.9"
8
+ s.version = "0.0.10"
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-11-01"
12
+ s.date = "2011-11-07"
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/batch_sender.rb CHANGED
@@ -36,7 +36,7 @@ module GitReport
36
36
 
37
37
  # sends the commit batch data to the server
38
38
  def self.send_data! batch, options = nil
39
- grlog(1, 'send_data started')
39
+ grlog(1, 'send_data! started')
40
40
  begin
41
41
  response = Net::HTTP.Proxy(configuration.proxy_host, configuration.proxy_port).start(configuration.host, configuration.port) do |http|
42
42
  request = Net::HTTP::Post.new(request_path options)
@@ -46,8 +46,8 @@ module GitReport
46
46
  http.read_timeout = configuration.timeout
47
47
  http.request request unless GitReport.global_opts[:dry_run]
48
48
  end
49
- grlog(1, response ? "send_data responded with #{response.code}" : "send_data had no response")
50
- raise GitReport::ServerError unless (response.code == "200" or response.code == "401") unless GitReport.global_opts[:dry_run]
49
+ grlog(1, response ? "send_data! Server responded with #{response.code}" : "send_data! Server had no response")
50
+ raise GitReport::ServerError unless (response.code == "200") unless GitReport.global_opts[:dry_run]
51
51
  rescue Exception => e
52
52
  communicate e, response
53
53
  exit
@@ -6,7 +6,9 @@ class GenericSender
6
6
  both, cmd, log = [], [], []
7
7
  if exception.is_a?(GitReport::ServerError)
8
8
  @error_type = "server error"
9
- @details = JSON.parse(response.body)["message"] rescue response.body
9
+ message = JSON.parse(response.body)["message"] rescue response.body
10
+ error = JSON.parse(response.body)["error"] rescue nil
11
+ @details = message ? "#{message} - #{error}" : error
10
12
  else
11
13
  @error_type = "client error"
12
14
  @details = exception.backtrace
data/lib/sender.rb CHANGED
@@ -23,7 +23,7 @@ module GitReport
23
23
 
24
24
  # sends the commit data to the server
25
25
  def self.send_data! commit, options = nil
26
- grlog(1, 'send_data started')
26
+ grlog(1, 'send_data! started')
27
27
  begin
28
28
  response = Net::HTTP.Proxy(configuration.proxy_host, configuration.proxy_port).start(configuration.host, configuration.port) do |http|
29
29
  request = Net::HTTP::Post.new(request_path options)
@@ -33,8 +33,8 @@ module GitReport
33
33
  http.read_timeout = configuration.timeout
34
34
  http.request request unless GitReport.global_opts[:dry_run]
35
35
  end
36
- grlog(1, response ? "send_data responded with #{response.code}" : "send_data had no response")
37
- raise GitReport::ServerError unless (response.code == "201" or response.code == "401") unless GitReport.global_opts[:dry_run]
36
+ grlog(1, response ? "send_data! Server responded with #{response.code}" : "send_data! Server had no response")
37
+ raise GitReport::ServerError unless (response.code == "201") unless GitReport.global_opts[:dry_run]
38
38
  rescue Exception => e
39
39
  communicate e, response
40
40
  return false
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.9
4
+ version: 0.0.10
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-11-01 00:00:00.000000000Z
12
+ date: 2011-11-07 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json
16
- requirement: &70131799697520 !ruby/object:Gem::Requirement
16
+ requirement: &70101752506060 !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: *70131799697520
24
+ version_requirements: *70101752506060
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: spork
27
- requirement: &70131799693860 !ruby/object:Gem::Requirement
27
+ requirement: &70101752502720 !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: *70131799693860
35
+ version_requirements: *70101752502720
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rspec
38
- requirement: &70131799688280 !ruby/object:Gem::Requirement
38
+ requirement: &70101752498940 !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: *70131799688280
46
+ version_requirements: *70101752498940
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: webmock
49
- requirement: &70131799684260 !ruby/object:Gem::Requirement
49
+ requirement: &70101752495420 !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: *70131799684260
57
+ version_requirements: *70101752495420
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: shoulda
60
- requirement: &70131799680940 !ruby/object:Gem::Requirement
60
+ requirement: &70101752492500 !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: *70131799680940
68
+ version_requirements: *70101752492500
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: bundler
71
- requirement: &70131799676240 !ruby/object:Gem::Requirement
71
+ requirement: &70101752490200 !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: *70131799676240
79
+ version_requirements: *70101752490200
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: jeweler
82
- requirement: &70131799673080 !ruby/object:Gem::Requirement
82
+ requirement: &70101752488580 !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: *70131799673080
90
+ version_requirements: *70101752488580
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: rcov
93
- requirement: &70131799667820 !ruby/object:Gem::Requirement
93
+ requirement: &70101752486240 !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: *70131799667820
101
+ version_requirements: *70101752486240
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: -1624065190523425410
186
+ hash: 2055649253981737868
187
187
  required_rubygems_version: !ruby/object:Gem::Requirement
188
188
  none: false
189
189
  requirements: