githubcsv 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/lib/githubcsv/githubcsv.rb +9 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
OGY4ZWZkZDkzNGM4MWQzZDk1ZTBmNDUxOTM0NTM3MTM5NDBkYWIxNw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NzIwNWRjMmRhMGY4N2FkZDNhZTY3ZDQyMzA5OTRkZGI1MmYxZWJlNg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NDIxNDM1MDlmNGJjYjU3YmE2ZjNjNGQ0MWNjZGMzNTA0MTY1MzVlODdiMTgy
|
10
|
+
NTJlZDI2NDRhNWUzMjdjM2YyMTU2NmE2MWQyMzIyZGJmMWU0MzFhM2M3YmEz
|
11
|
+
ZTYwNjkzYzA3YWJhODZlYjk4NTU3MTBmYmYyZjk5NmVjN2RmOTA=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MDlmODA0OWVmNWZhMzE2ZWFhZTVmNjIyOGZmMDQ1ZmMyODVlZDk2Zjg2MWI0
|
14
|
+
YzlmZDhlNWViNzFlNzE4MjRjZmI2NWNkMGI5ZjdmNTNmZjU5MTdiNmRiY2Rh
|
15
|
+
NWQwYTU5ODE5MGFmNTY1M2E3NGEyYjUzMDc1ZGFkNTcxNmI0NjQ=
|
data/lib/githubcsv/githubcsv.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'octokit'
|
2
2
|
require 'csv'
|
3
3
|
require 'date'
|
4
|
+
require 'time'
|
4
5
|
|
5
6
|
module GitHubCSV
|
6
7
|
|
@@ -21,14 +22,18 @@ module GitHubCSV
|
|
21
22
|
@TIMEZONE_OFFSET = timezone
|
22
23
|
end
|
23
24
|
|
24
|
-
def self.run(is_verbose)
|
25
|
+
def self.run(directory, is_verbose)
|
25
26
|
Octokit.configure do |c|
|
26
27
|
c.connection_options = { ssl: { verify: false } }
|
27
28
|
end
|
28
29
|
@VERBOSE = is_verbose
|
29
30
|
|
30
31
|
client = Octokit::Client.new(:login => @USERID, :password => @PASSWORD)
|
31
|
-
|
32
|
+
if directory.end_with? "/"
|
33
|
+
csv = CSV.new(File.open(directory + "issues.csv", 'w'))
|
34
|
+
else
|
35
|
+
csv = CSV.new(File.open(directory + "/issues.csv", 'w'))
|
36
|
+
end
|
32
37
|
|
33
38
|
if @VERBOSE == 1
|
34
39
|
puts "Initializing CSV file..."
|
@@ -110,10 +115,8 @@ module GitHubCSV
|
|
110
115
|
row = [
|
111
116
|
issue['title'],
|
112
117
|
issue['body'],
|
113
|
-
|
114
|
-
|
115
|
-
"this feature is broken as of gem v0.1.0",
|
116
|
-
"this feature is broken as of gem v0.1.0",
|
118
|
+
DateTime.parse(issue['created_at'].to_s).new_offset(@TIMEZONE_OFFSET).strftime("%d/%b/%y %l:%M %p"),
|
119
|
+
DateTime.parse(issue['updated_at'].to_s).new_offset(@TIMEZONE_OFFSET).strftime("%d/%b/%y %l:%M %p"),
|
117
120
|
type,
|
118
121
|
milestone,
|
119
122
|
priority,
|