gemfury 0.8.0 → 0.9.0.rc1
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 +4 -4
- data/lib/gemfury.rb +1 -1
- data/lib/gemfury/client.rb +9 -2
- data/lib/gemfury/command.rb +1 -2
- data/lib/gemfury/command/app.rb +11 -2
- data/lib/gemfury/command/authorization.rb +1 -1
- data/lib/gemfury/version.rb +1 -1
- metadata +26 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cdc4b782147af6e1fce4c9187beb707e3d7defff07cb661bd8b3eb5528982449
|
4
|
+
data.tar.gz: 99172adfd3817854106745baf9836c480f7150fe96df1d63051fc6a5dc4403b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a809a059acb361a9facf821eece765c2d518b4427439b71b66e48cc6107e6f297bfc5c8a46133ef5422779caad0cd42ab75799511fbcded5a3edd01f187914a4
|
7
|
+
data.tar.gz: 51fd7b56981eb97c119d3227113677fa5d1852196bd6fbabb7b561dfff6d2efc16429a0e4ac8c53d93eb47c3949710fcce7e621e53b8f8c8c0e751fb3daeae69
|
data/lib/gemfury.rb
CHANGED
data/lib/gemfury/client.rb
CHANGED
@@ -51,14 +51,21 @@ module Gemfury
|
|
51
51
|
|
52
52
|
# LEGACY: Authentication token via email/password
|
53
53
|
def get_access_token(*args)
|
54
|
-
login(*args)['
|
54
|
+
login(*args)['token']
|
55
55
|
end
|
56
56
|
|
57
57
|
# Get authentication info via email/password
|
58
58
|
def login(email, password, opts = {})
|
59
59
|
ensure_ready!
|
60
60
|
opts = opts.merge(:email => email, :password => password)
|
61
|
-
checked_response_body(connection.post('
|
61
|
+
checked_response_body(connection.post('login', opts))
|
62
|
+
end
|
63
|
+
|
64
|
+
# Invalidate session token
|
65
|
+
def logout
|
66
|
+
ensure_ready!(:authorization)
|
67
|
+
response = connection.post('logout')
|
68
|
+
checked_response_body(response)
|
62
69
|
end
|
63
70
|
|
64
71
|
# List collaborators for this account
|
data/lib/gemfury/command.rb
CHANGED
data/lib/gemfury/command/app.rb
CHANGED
@@ -13,6 +13,7 @@ class Gemfury::Command::App < Thor
|
|
13
13
|
end
|
14
14
|
|
15
15
|
### PACKAGE MANAGEMENT ###
|
16
|
+
option :public, :type => :boolean, :desc => "Create as public package"
|
16
17
|
desc "push FILE", "Upload a new version of a package"
|
17
18
|
def push(*gems)
|
18
19
|
with_checks_and_rescues do
|
@@ -60,6 +61,7 @@ class Gemfury::Command::App < Thor
|
|
60
61
|
if !has_credentials?
|
61
62
|
shell.say "You are logged out"
|
62
63
|
elsif shell.yes? "Are you sure you want to log out? [yN]"
|
64
|
+
with_checks_and_rescues { client.logout }
|
63
65
|
wipe_credentials!
|
64
66
|
shell.say "You have been logged out"
|
65
67
|
end
|
@@ -208,6 +210,8 @@ private
|
|
208
210
|
die!("Oops! You're not allowed to access this", e)
|
209
211
|
rescue Gemfury::NotFound => e
|
210
212
|
die!("Oops! Doesn't look like this exists", e)
|
213
|
+
rescue Gemfury::Error => e
|
214
|
+
die!("Oops! %s" % e.message, e)
|
211
215
|
rescue StandardError => e
|
212
216
|
die!("Oops! Something went wrong. Please contact support.", e)
|
213
217
|
end
|
@@ -221,11 +225,16 @@ private
|
|
221
225
|
die!("Problem: No valid packages found", nil, command)
|
222
226
|
end
|
223
227
|
|
228
|
+
push_options = { }
|
229
|
+
unless options[:public].nil?
|
230
|
+
push_options[:public] = options[:public]
|
231
|
+
end
|
232
|
+
|
224
233
|
# Let's get uploading
|
225
234
|
files.each do |file|
|
226
235
|
begin
|
227
236
|
shell.say "Uploading #{File.basename(file.path)} "
|
228
|
-
client.push_gem(file)
|
237
|
+
client.push_gem(file, push_options)
|
229
238
|
shell.say "- done"
|
230
239
|
rescue Gemfury::CorruptGemFile
|
231
240
|
shell.say "- problem processing this package", :red
|
@@ -247,4 +256,4 @@ private
|
|
247
256
|
shell.say %Q(#{err.class.name}: #{err}\n#{err.backtrace.join("\n")}) if err && ENV['DEBUG']
|
248
257
|
exit(1)
|
249
258
|
end
|
250
|
-
end
|
259
|
+
end
|
@@ -49,7 +49,7 @@ private
|
|
49
49
|
|
50
50
|
def load_credentials!
|
51
51
|
# Get credentials from ~/.netrc
|
52
|
-
|
52
|
+
_, @user_api_key = netrc_conf[netrc_api_host]
|
53
53
|
# Legacy loading from ~/.gem/gemfury
|
54
54
|
@user_api_key ||= read_config_file[:gemfury_api_key]
|
55
55
|
end
|
data/lib/gemfury/version.rb
CHANGED
metadata
CHANGED
@@ -1,29 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gemfury
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0.rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Rykov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-10-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: highline
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '1.6'
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - "~>"
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '1.6'
|
27
13
|
- !ruby/object:Gem::Dependency
|
28
14
|
name: multi_json
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|
@@ -87,7 +73,7 @@ dependencies:
|
|
87
73
|
version: 0.9.0
|
88
74
|
- - "<"
|
89
75
|
- !ruby/object:Gem::Version
|
90
|
-
version: 0.
|
76
|
+
version: 0.16.0.pre
|
91
77
|
type: :runtime
|
92
78
|
prerelease: false
|
93
79
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -97,7 +83,27 @@ dependencies:
|
|
97
83
|
version: 0.9.0
|
98
84
|
- - "<"
|
99
85
|
- !ruby/object:Gem::Version
|
100
|
-
version: 0.
|
86
|
+
version: 0.16.0.pre
|
87
|
+
- !ruby/object:Gem::Dependency
|
88
|
+
name: highline
|
89
|
+
requirement: !ruby/object:Gem::Requirement
|
90
|
+
requirements:
|
91
|
+
- - ">="
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: 1.6.0
|
94
|
+
- - "<"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 2.1.0.pre
|
97
|
+
type: :runtime
|
98
|
+
prerelease: false
|
99
|
+
version_requirements: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 1.6.0
|
104
|
+
- - "<"
|
105
|
+
- !ruby/object:Gem::Version
|
106
|
+
version: 2.1.0.pre
|
101
107
|
description: 'Hosted repo for your public and private packages at https://gemfury.com
|
102
108
|
|
103
109
|
'
|
@@ -159,9 +165,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
159
165
|
version: '0'
|
160
166
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
161
167
|
requirements:
|
162
|
-
- - "
|
168
|
+
- - ">"
|
163
169
|
- !ruby/object:Gem::Version
|
164
|
-
version:
|
170
|
+
version: 1.3.1
|
165
171
|
requirements: []
|
166
172
|
rubyforge_project:
|
167
173
|
rubygems_version: 2.7.7
|