deploy_log 0.2.1 → 0.2.2

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
  SHA256:
3
- metadata.gz: 5635cefe108ba33b4e0e925c9299cf6af43c3fe159a48edd47b6c63d7a1fa037
4
- data.tar.gz: 866ce869805800757edf6a2be1c38f56ef7006ef53671904f27b68019bc3345d
3
+ metadata.gz: d56a82021cb28886bb6fd2458af06b6c3a69c30fa6bf82e66e045af91e87d497
4
+ data.tar.gz: 641837857dd86db9593c7f9e6f444e1ee3be9a73d01911431e1af12f95bcb642
5
5
  SHA512:
6
- metadata.gz: '078296a5282d8921cc2883f666f6ade50067259fb1380323bce8ca0bc122b9e01a5f6c21cc80e423ab262eba09cc58c0fb330dbef6baa146fd9c2f006d632dcd'
7
- data.tar.gz: f48574b96f70be563b183c0f4de78ee3d0e44806a5a344b76ba276fc5de60b6bc3c153a04482fb05517adce406bd99bbc09f6eda9d43dc70d4fb12cf30033f01
6
+ metadata.gz: 5b4eb4b7683e64614d90e9b53c857756f31d2b0679671a810ef7ff76ddf1a42e16ae54b004fea42b87eb29428a38e81304f1e3dc5a1afcd8501d213f7383561f
7
+ data.tar.gz: 7ac6c0c5485c29d0ae33b659a0e72b55fc10971bf3618cebe55fe2f85b9abfd1f94a6af9e9297700807261a0a0b4d1b47cde94d95f8896a4340846c1d076f35a
data/bin/deploy_log CHANGED
@@ -30,8 +30,8 @@ OptionParser.new do |opt|
30
30
  week = w
31
31
  end
32
32
 
33
- opt.on('-f', '--force', 'Pull data from api, ignore cache') do |f|
34
- force = f
33
+ opt.on('-c', '--clean', 'Pull data from api, ignore cache') do
34
+ system('rm -f /tmp/github-deploys-*.log')
35
35
  end
36
36
 
37
37
  opt.on('-v', '--version', 'Prints version information') do
@@ -41,7 +41,6 @@ OptionParser.new do |opt|
41
41
  end.parse!
42
42
 
43
43
  model = DeployLog::Github::Deploys.new
44
- model.force = force
45
44
 
46
45
  return model.merged_during_week(week) if week
47
46
  return model.merged_between(start, finish) if start
@@ -3,8 +3,6 @@
3
3
  module DeployLog
4
4
  module Github
5
5
  class Deploys
6
- attr_accessor :force
7
-
8
6
  def initialize
9
7
  @github = Helper.new(ARGV.first, force)
10
8
  @calendar = DeployLog::Calendar.new
@@ -10,11 +10,9 @@ module DeployLog
10
10
 
11
11
  LINE_FORMAT = "%s (%s)\n - Created by %s\n - Branch: %s\n - Merged by %s on %s\n - Changes: %s\n -- %s\n\n"
12
12
 
13
- def initialize(user_repo, force)
13
+ def initialize(user_repo)
14
14
  @client = ::Octokit::Client.new(login: ENV['GITHUB_USER'], password: ENV['GITHUB_TOKEN'])
15
15
  @repo_location = user_repo
16
- @force = force
17
- puts force.inspect
18
16
  end
19
17
 
20
18
  def pulls_in_timeframe(date_start = nil, date_end = nil)
@@ -123,8 +121,6 @@ module DeployLog
123
121
  end
124
122
 
125
123
  def should_show_cache(cache)
126
- return false if @force
127
-
128
124
  File.exist?(cache[:path]) && !File.size(cache[:path]).zero?
129
125
  end
130
126
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DeployLog
4
- VERSION = '0.2.1'
4
+ VERSION = '0.2.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deploy_log
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Priebe