stand 1.0.5.pre2 → 1.0.5.pre3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 918e4803f3d7d64990882e29154023325df9f2fe
4
- data.tar.gz: f9707445e4e0f4b8ea7f03a2416b0506d8be4aee
3
+ metadata.gz: f7e8c977b90c82e8740f948ce785c416e4153f97
4
+ data.tar.gz: '0914a5fafa8c46baee40c5919d1729bfab27bc74'
5
5
  SHA512:
6
- metadata.gz: b6ab15680612878db88f41a02bf5fc3f516cc93a26bf726356ffeb4723be9139a42103536d428331f7abf6be87cdbe17af84efbc65aa0d4e8d9dbbfcca3e94c5
7
- data.tar.gz: a60e52c06f6ecf24ced9c4f05690e1fad6fa41bc30a61755b2cf64d1d1ce6a4212108f3da6ee8ad5e9c55bc11f23f4adc721f68858b2fcab22eb409588ee3624
6
+ metadata.gz: df69066b9de80d86afe50584ae42fc218f76d8ab1401807ae2d195fb83e38aa9416d588c4cf2c2c09107f878a7ca11e2c03d3138f9a22150e1d8e8d79196e493
7
+ data.tar.gz: 6b5ac6109b393c8904221738fb456236297def4210f013bac65ecd0ea23bea3ef3f6a93b844e6593e08cc02eb4a30e03d785bf0150aa7dc70207cfe129c676d4
data/lib/standup/app.rb CHANGED
@@ -22,13 +22,17 @@ module Standup
22
22
  config.add_command_line_section('Application Options') do |s|
23
23
  s.on :from, 'From specific day', argument: true
24
24
  s.on :to, 'To specific day', argument: true
25
+ s.on :"no-cache", "Don't use cache for API requests", argument: false
25
26
  end
26
27
  end
27
28
 
28
29
  def run
29
30
  settings = ConfigParser.new(config)
30
31
 
31
- Standup::Cache.use_cassette("gitlab", re_record_interval: (settings.to_date - settings.from_date) / 10) do
32
+ record_interval = (settings.to_date - settings.from_date) / 10
33
+ record_interval = 0 if config[:"no-cache"]
34
+
35
+ Standup::Cache.use_cassette('gitlab', re_record_interval: record_interval) do
32
36
  ReportGenerator.new(settings).gitlab_report!
33
37
  end
34
38
  end
data/lib/standup/cache.rb CHANGED
@@ -6,7 +6,6 @@ end
6
6
 
7
7
  Standup::Cache.configure do |c|
8
8
  c.cassette_library_dir = "#{File.expand_path('~')}/.#{Standup::BASE_NAME}/cache"
9
- c.hook_into :webmock
10
9
  c.default_cassette_options = {
11
10
  re_record_interval: 1.day,
12
11
  record: :new_episodes
@@ -54,26 +54,16 @@ module Standup
54
54
  end
55
55
 
56
56
  begin
57
- Gitlab.merge_requests(project.id, created_mrs_query).auto_paginate do |mr|
58
- merged_mrs << mr
59
- end
57
+ merged_mrs = Gitlab.merge_requests(project.id, created_mrs_query).auto_paginate
60
58
  Gitlab.merge_requests(project.id, assigned_mrs_query).auto_paginate do |mr|
61
59
  merged_mrs << mr
62
60
  end
63
- rescue Gitlab::Error::Forbidden => e
64
- # Don't seem to have acces to some MRs
65
- if config[:verbose]
66
- puts "Error while fetching merge requests from project #{project.name} (#{project.id}): #{e.inspect}"
67
- end
68
- end
69
61
 
70
- begin
71
- Gitlab.issues(project.id, assigned_issues_query).auto_paginate do |issue|
72
- closed_issues << issue
73
- end
62
+ closed_issues = Gitlab.issues(project.id, assigned_issues_query).auto_paginate
74
63
  rescue Gitlab::Error::Forbidden => e
75
64
  if @settings.config[:verbose]
76
- puts "Error while fetching issues from project #{project.name} (#{project.id}): #{e.inspect}"
65
+ puts "Error while fetching issues or merge requests from project #{project.name} (#{project.id}): #{e.inspect}"
66
+ puts "You probably don't have access to the project."
77
67
  end
78
68
  end
79
69
 
@@ -1,3 +1,3 @@
1
1
  module Standup
2
- VERSION = '1.0.5.pre2'
2
+ VERSION = '1.0.5.pre3'
3
3
  end
data/stand.gemspec CHANGED
@@ -39,5 +39,4 @@ Gem::Specification.new do |s|
39
39
  s.add_development_dependency 'simplecov'
40
40
  s.add_development_dependency 'simplecov-rcov'
41
41
  s.add_development_dependency 'timecop'
42
- s.add_development_dependency 'webmock'
43
42
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stand
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5.pre2
4
+ version: 1.0.5.pre3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Bonaud
@@ -278,20 +278,6 @@ dependencies:
278
278
  - - ">="
279
279
  - !ruby/object:Gem::Version
280
280
  version: '0'
281
- - !ruby/object:Gem::Dependency
282
- name: webmock
283
- requirement: !ruby/object:Gem::Requirement
284
- requirements:
285
- - - ">="
286
- - !ruby/object:Gem::Version
287
- version: '0'
288
- type: :development
289
- prerelease: false
290
- version_requirements: !ruby/object:Gem::Requirement
291
- requirements:
292
- - - ">="
293
- - !ruby/object:Gem::Version
294
- version: '0'
295
281
  description: Generate your standup reports instantly.
296
282
  email:
297
283
  - paul.bonaud@trainline.com