github-key-upload 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/github-key-upload.rb +2 -2
- data/lib/github-key-upload/version.rb +1 -1
- metadata +2 -2
data/lib/github-key-upload.rb
CHANGED
@@ -5,14 +5,14 @@ module Github
|
|
5
5
|
module Key
|
6
6
|
module Upload
|
7
7
|
def self.create_auth(options)
|
8
|
-
github = Github.new basic_auth
|
8
|
+
github = Github.new :basic_auth => "#{options[:user]}:#{options[:password]}"
|
9
9
|
github.oauth.create 'scopes' => ['user']
|
10
10
|
github
|
11
11
|
end
|
12
12
|
|
13
13
|
def self.upload(options)
|
14
14
|
github = create_auth(options)
|
15
|
-
github.users.keys.create({title
|
15
|
+
github.users.keys.create({:title => options[:title], :key => File.read(options[:key])})
|
16
16
|
end
|
17
17
|
|
18
18
|
def self.check_for_both(options)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: github-key-upload
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-11-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: github_api
|