github_issues_cli 0.2.7 → 0.2.8

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7b51eb8d1fabce7b140c6e5b08eea7af3daba411
4
- data.tar.gz: ece7df9967574a070b6f701191e4497d78cfb6d4
3
+ metadata.gz: 66b359a6a8734c1077f8eb2f7498168cbd05a359
4
+ data.tar.gz: 8cffb718a8d83ab8529d193ce4fb0f79464958d1
5
5
  SHA512:
6
- metadata.gz: dea342169c875b949cc84acea33ec003c68a2d5b7fdcafc3e7dd1bbff99daa41731cfbf136b8b677840e9d0dda2409cbd4b782f6fe900c8f8326dfd1aba6d693
7
- data.tar.gz: fe70cb98ffde09912bfca9d80a06eaa08a68422f14c9ae75fc575b2da2d470dd6b0de8cbd53dc475245b416de3716bf413988734e18887c313a54e9171986b07
6
+ metadata.gz: d02956d6cda51bc256530265e59413900010916ffab102108657d7532cdf6d0cc55c4fba1ae414c818a2ea125a626776ff06ab7b9eca023a3814aa5c6107dd23
7
+ data.tar.gz: 88edc6bebb99ff48123bb1949036fe3b82366a58ca048aff65f2fadcfb36cc49bf2ed677878a5c3fceeb41fddb9608215bff566c6c77c0f4b6cefb82ac7ba0c2
@@ -14,16 +14,20 @@ module GithubIssuesCli
14
14
  config_dirname = ENV['HOME'] + '/.github-issues/'
15
15
  Dir.mkdir config_dirname unless Dir.exists? config_dirname
16
16
 
17
- config_path = config_dirname + 'token'
17
+ config_path = config_dirname + 'config'
18
18
  if File.exists? config_path
19
- config = JSON.parse File.new(config_path, 'r').gets
19
+ file = File.new(config_path, 'r')
20
+ config = JSON.parse file.gets
21
+ file.close
20
22
  @username, token = config.values_at 'username', 'token'
21
23
  else
22
24
  print 'Please provide GitHub token: '
23
25
  token = $stdin.gets.chomp
24
26
  @username = Github::Users.new.get(:oauth_token => token).login
25
27
  config = {:username => @username, :token => token}
26
- File.new(config_path, 'w').puts config.to_json
28
+ file = File.new(config_path, 'w')
29
+ file.puts config.to_json
30
+ file.close
27
31
  end
28
32
 
29
33
  Github.configure do |c|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: github_issues_cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.7
4
+ version: 0.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomasz Durka