deploy_log 0.1.9a → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/deploy_log/calendar.rb +3 -28
- data/lib/deploy_log/github/deploys.rb +3 -4
- data/lib/deploy_log/version.rb +1 -1
- data/lib/deploy_log.rb +0 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 433af166c02a7dbe45cc06c6e3eb65f9dfa317ed7186fc2126e6c3aaea3bab86
|
4
|
+
data.tar.gz: 1d905ad1660a270d6b3710a741b21e0f2ab0ab1a7be92847f31dde3342d2a300
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e493fc1fd5cbf25f717198590c311f2e4aa0404a41259fcab07669bd1e538cd44c93117fbeba2ae8234b0b1e70cc9bcc560ac194aa73778418758936f669dfb
|
7
|
+
data.tar.gz: 97c33592502adf8b0e16decd63cd0a469cc45a2a832e8853e76511c8023d46d0e25af3df00dfb9ec571cf46f1f54768d91af998b3e880c1fbf6f1d3dca876cc9
|
data/lib/deploy_log/calendar.rb
CHANGED
@@ -2,33 +2,8 @@
|
|
2
2
|
|
3
3
|
module DeployLog
|
4
4
|
class Calendar
|
5
|
-
def start_of_week(week_num)
|
6
|
-
|
7
|
-
cal = year_calendar(2019).to_a#[Date.today.cweek]
|
8
|
-
puts cal.inspect
|
9
|
-
cal[:first]
|
10
|
-
end
|
11
|
-
|
12
|
-
private
|
13
|
-
|
14
|
-
def range_for(year)
|
15
|
-
start = Date.parse("#{year}-01-01")
|
16
|
-
finish = Date.parse("#{year}-12-31")
|
17
|
-
|
18
|
-
(start..finish)
|
19
|
-
end
|
20
|
-
|
21
|
-
def year_calendar(year)
|
22
|
-
date_range = range_for(year)
|
23
|
-
output = {}
|
24
|
-
|
25
|
-
date_range.each do |day|
|
26
|
-
output[day.cweek] = {}
|
27
|
-
output[day.cweek][:first] = day
|
28
|
-
# output[day.cweek][:last] = day
|
29
|
-
end
|
30
|
-
# puts output.inspect
|
31
|
-
output
|
5
|
+
def self.start_of_week(week_num)
|
6
|
+
puts week_num
|
32
7
|
end
|
33
8
|
end
|
34
|
-
end
|
9
|
+
end
|
@@ -5,7 +5,6 @@ module DeployLog
|
|
5
5
|
class Deploys
|
6
6
|
def initialize
|
7
7
|
@github = Helper.new(ARGV.first)
|
8
|
-
@calendar = DeployLog::Calendar.new
|
9
8
|
end
|
10
9
|
|
11
10
|
def merged_between(start, finish = nil)
|
@@ -34,10 +33,10 @@ module DeployLog
|
|
34
33
|
def merged_during_week(week_num)
|
35
34
|
return Notify.error 'Week number (--week|-w) is a required argument' if week_num.nil?
|
36
35
|
|
37
|
-
start =
|
38
|
-
|
36
|
+
start = DeployLog::Calendar.start_of_week(24)
|
37
|
+
finish = start + 24 * 60 * 60 - 1
|
39
38
|
|
40
|
-
|
39
|
+
@github.pulls_in_timeframe(start, finish)
|
41
40
|
end
|
42
41
|
|
43
42
|
def pr_title(title)
|
data/lib/deploy_log/version.rb
CHANGED
data/lib/deploy_log.rb
CHANGED
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.1.
|
4
|
+
version: 0.1.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Priebe
|
@@ -119,9 +119,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
119
119
|
version: '0'
|
120
120
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- - "
|
122
|
+
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version:
|
124
|
+
version: '0'
|
125
125
|
requirements: []
|
126
126
|
rubygems_version: 3.0.1
|
127
127
|
signing_key:
|