fast_github 0.0.2 → 0.0.3

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: 85672fd5b31dbfbbd77d01a9369297f3e04b57d2
4
- data.tar.gz: 90eb2c0ac6ec06146dcc85ad77232c812df9e032
3
+ metadata.gz: 1f174197a8dfb99d6e6d8e3684e07a414ac2d9d4
4
+ data.tar.gz: 0686458e0b9a586b32247482f2e7dd3f76d5db68
5
5
  SHA512:
6
- metadata.gz: 2023184addcb12fa4ab657fb7f382b913288af1fb496113a6ab8806aa10ae216d60006cdbd772898a154cf7bd3d8bcf36f777851cbcc86ede41503ad0eaaab28
7
- data.tar.gz: 23df62a45bb9f0b9b96a1d30b163c898feca11287aaabbcd76d47c5eda23210428cf54593f29d861b7cad4d9b7976ed5221e350515a454bfe1626b83c7deb08d
6
+ metadata.gz: fec99bbb8209cba289dd9009f5f80e94b1cce31e8d3797af75ba36d91928e994b45c0da6e423f5cb3a098a59980003b13f635fd2902256d8ac38c7c0eaec06f3
7
+ data.tar.gz: 1a2fd197526d866f8997c4842d547af9e63a2da939e5f381b3722974dba74f7386e1738bda3e252524867149a2dabab04f1f448947c616944fa641bc8264d692
data/.gitignore CHANGED
@@ -9,7 +9,6 @@ _yardoc
9
9
  coverage
10
10
  doc/
11
11
  lib/bundler/man
12
- lib/clientsecret
13
12
  pkg
14
13
  rdoc
15
14
  spec/reports
data/lib/fast_github.rb CHANGED
@@ -1,7 +1,9 @@
1
1
  require "fast_github/version"
2
+ require "io/console"
2
3
  require "net/http"
3
4
  require "uri"
4
5
  require "json"
6
+ require 'yaml'
5
7
 
6
8
  module FastGithub
7
9
  class Auth
@@ -45,12 +47,12 @@ module FastGithub
45
47
  print "Enter your Github username: "
46
48
  user = gets.chomp
47
49
  print "Enter your Github password: "
48
- pass = gets.chomp
50
+ pass = STDIN.noecho(&:gets).chomp
51
+ puts ""
49
52
  request.basic_auth(user.chomp, pass.chomp)
50
- secret = File.open('clientsecret', &:readline).chomp
51
- request.body = { "client_secret" => secret, "scopes" => [ "repo" ] }.to_json
53
+ request.body = { "client_secret" => "2e05ca092118ef4df3c5089717a0bf8cfe1192f1", "scopes" => [ "repo" ] }.to_json
52
54
  response = http.request(request)
53
- if response.code == 200 || response.code == 201
55
+ if response.code == "200" || response.code == "201"
54
56
  json_response = JSON.parse(response.body)
55
57
  save_oath(json_response['token'])
56
58
  @token = json_response['token']
@@ -1,3 +1,3 @@
1
1
  module FastGithub
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fast_github
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joel Smith