gemfury 0.8.0 → 0.9.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8775caa9b49a2b24277e02fe32e8aeadac42c5aa32cb730a3fbab4e9d84ee384
4
- data.tar.gz: fcde8206fac9de3ba71e0b0b968c775227abc45b694f3a9d57c807da64468aa1
3
+ metadata.gz: cdc4b782147af6e1fce4c9187beb707e3d7defff07cb661bd8b3eb5528982449
4
+ data.tar.gz: 99172adfd3817854106745baf9836c480f7150fe96df1d63051fc6a5dc4403b4
5
5
  SHA512:
6
- metadata.gz: 1f5c19bc32a5135711c96a33b6d8b9a321184e142f48a32fd3f8996cc23bd232ac0b4d700ba423c6c50255feb1a542893ccec0942928cadb8a8bbbd4fc6eb6d9
7
- data.tar.gz: 62ed01acb5aa64770c0096afa04af69affc3f3f4829302934fe09be37958cbdb16124ed86d3d048f66fc6eb63da428745921304313e81fb26a7cd726d2c34702
6
+ metadata.gz: a809a059acb361a9facf821eece765c2d518b4427439b71b66e48cc6107e6f297bfc5c8a46133ef5422779caad0cd42ab75799511fbcded5a3edd01f187914a4
7
+ data.tar.gz: 51fd7b56981eb97c119d3227113677fa5d1852196bd6fbabb7b561dfff6d2efc16429a0e4ac8c53d93eb47c3949710fcce7e621e53b8f8c8c0e751fb3daeae69
@@ -1,5 +1,5 @@
1
1
  gem "multi_json", "~> 1.10"
2
- gem "faraday", ">= 0.9.0", "< 0.15.0.pre"
2
+ gem "faraday", ">= 0.9.0", "< 0.16.0.pre"
3
3
  gem "netrc", ">= 0.10.0", "< 0.12.0.pre"
4
4
 
5
5
  require 'cgi'
@@ -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)['access_token']
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('access_token', opts))
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
@@ -1,4 +1,4 @@
1
- gem "highline", "~> 1.6"
1
+ gem "highline", ">= 1.6.0", "< 2.1.0.pre"
2
2
  gem "thor", ">= 0.14.0", "< 1.0.0.pre"
3
3
 
4
4
  require 'thor'
@@ -10,4 +10,3 @@ module Gemfury::Command; end
10
10
 
11
11
  require 'gemfury/command/authorization'
12
12
  require 'gemfury/command/app'
13
-
@@ -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
- email, @user_api_key = netrc_conf[netrc_api_host]
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
@@ -1,3 +1,3 @@
1
1
  module Gemfury
2
- VERSION = '0.8.0'
2
+ VERSION = '0.9.0.rc1'
3
3
  end
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.8.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-09-22 00:00:00.000000000 Z
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.15.0.pre
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.15.0.pre
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: '0'
170
+ version: 1.3.1
165
171
  requirements: []
166
172
  rubyforge_project:
167
173
  rubygems_version: 2.7.7