github_downloads 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
@@ -73,7 +73,7 @@ module GithubDownloads
|
|
73
73
|
:note => "GitHub Downloads Gem",
|
74
74
|
:note_url => "https://github.com/pangratz/github_downloads"
|
75
75
|
}
|
76
|
-
response = RestClient.post "https://#{@login}:#{pw}@api.github.com/authorizations", payload.to_json, :content_type => :json
|
76
|
+
response = RestClient.post "https://#{CGI.escape(@login)}:#{CGI.escape(pw)}@api.github.com/authorizations", payload.to_json, :content_type => :json
|
77
77
|
@token = JSON.parse(response.to_str)["token"]
|
78
78
|
end
|
79
79
|
|
@@ -82,6 +82,7 @@ module GithubDownloads
|
|
82
82
|
|
83
83
|
# add entry to .gitignore if not already exists
|
84
84
|
gitignore = File.expand_path(".gitignore", @root)
|
85
|
+
system "touch #{gitignore}"
|
85
86
|
includes = File.open(gitignore).lines.any? { |line| line.chomp == '.github-upload-token' }
|
86
87
|
if !includes
|
87
88
|
File.open(gitignore, "a") do |f|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: github_downloads
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-
|
13
|
+
date: 2012-08-04 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rest-client
|