gemfury 0.7.0 → 0.8.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- ZjI4NmY4MjhjZDUyZDE1Mzk3NWMxYTkxYzQ5ZTU0N2UyNTg0ZDI5Mw==
5
- data.tar.gz: !binary |-
6
- ZDBmMWYzYzllNTFkMjFjMzhhYzg4MDZhNDE5YTEzMzQwNTZlNjZmNA==
2
+ SHA256:
3
+ metadata.gz: 2dea62dce02d2cc9ca9634f85ff570d7ae35320522959f484d6dce03d8487af9
4
+ data.tar.gz: f50f502dfc61e4eca0d996888156b6cf3dab32ee9f18c4df55ea35b02ec158d6
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- NDVhY2IyOTY0MDI4NzQ2ZjhiNzcxMzY1Mzk4ODFmYWIwZDRiM2ZjYTc4NWU4
10
- OGQ1M2VhNjYxODdmMGQ5ZDgwMjI1MzMxNjFlZGI1OTE4NzMyZmFhMDA2NTBk
11
- ZDE0OWFhYTZkMTlmMDU3NDRhMzEyZjFkYjBiZDhlMDc2NGE5NTg=
12
- data.tar.gz: !binary |-
13
- YTg4YmU5NWZhNmI0ZDYwZmQ3MjhjNDQ3M2EwNjhjM2JmMTI2ZGY4ODZkY2M4
14
- MzNlN2JiZjk3MTRlOGIxN2MxODc5NGI4YmI0OTAwNzNhMGNiNmU1YjRlZjIz
15
- M2EwNjUzNDZhZWNjYzMwNTA3Y2UwOGM5MDIxYTI4ZDEyZWMxMDc=
6
+ metadata.gz: 28bea1fb8fb9c9a15a668ef75207150b0734a698945ef00403fa6bc853b9ada97e9dce47f9bd64e4733459d689bf1d6297c712896a192e2a2bc6bdafa596bd80
7
+ data.tar.gz: 872c60f16233fe8c061749b453b30d66599f508c3c9c36c316576e46a276f08077996609133606c69bdf2e39825e220a21eb010120ac8aa2af081dc8cfdb6546
@@ -1,5 +1,5 @@
1
1
  gem "multi_json", "~> 1.10"
2
- gem "faraday", ">= 0.9.0", "< 0.12.0.pre"
2
+ gem "faraday", ">= 0.9.0", "< 0.15.0.pre"
3
3
  gem "netrc", ">= 0.10.0", "< 0.12.0.pre"
4
4
 
5
5
  require 'cgi'
@@ -19,23 +19,10 @@ module Gemfury
19
19
  end
20
20
 
21
21
  # Uploading a gem file
22
- def push_gem(gem_file, options = {})
22
+ def push_gem(file, options = {})
23
23
  ensure_ready!(:authorization)
24
-
25
- # Generate upload link
26
- api2 = connection(:api_version => 2)
27
- response = api2.post('uploads')
28
- checked_response_body(response)
29
-
30
- # Upload to S3
31
- upload = response.body['upload']
32
- id, s3url = upload['id'], upload['blob']['put']
33
- response = s3_put_file(s3url, gem_file)
34
- checked_response_body(response)
35
-
36
- # Notify Gemfury that the upload is ready
37
- options[:name] ||= File.basename(gem_file.path)
38
- response = api2.put("uploads/#{id}", options)
24
+ push_api = connection(:url => self.pushpoint)
25
+ response = push_api.post('uploads', options.merge(:file => file))
39
26
  checked_response_body(response)
40
27
  end
41
28
 
@@ -178,22 +165,20 @@ module Gemfury
178
165
  return response.body
179
166
  else
180
167
  error = (response.body || {})['error'] || {}
181
- error_class = case response.status
182
- when 401 then Gemfury::Unauthorized
183
- when 403 then Gemfury::Forbidden
184
- when 404 then Gemfury::NotFound
185
- when 409 then Gemfury::Conflict
186
- when 503 then Gemfury::TimeoutError
187
- when 400
188
- case error['type']
189
- when 'Forbidden' then Gemfury::Forbidden
190
- when 'GemVersionError' then Gemfury::InvalidGemVersion
191
- when 'InvalidGemFile' then Gemfury::CorruptGemFile
192
- when 'DupeVersion' then Gemfury::DupeVersion
193
- else Gemfury::Error
194
- end
168
+ error_class = case error['type']
169
+ when 'Forbidden' then Gemfury::Forbidden
170
+ when 'GemVersionError' then Gemfury::InvalidGemVersion
171
+ when 'InvalidGemFile' then Gemfury::CorruptGemFile
172
+ when 'DupeVersion' then Gemfury::DupeVersion
195
173
  else
196
- Gemfury::Error
174
+ case response.status
175
+ when 401 then Gemfury::Unauthorized
176
+ when 403 then Gemfury::Forbidden
177
+ when 404 then Gemfury::NotFound
178
+ when 409 then Gemfury::Conflict
179
+ when 503 then Gemfury::TimeoutError
180
+ else Gemfury::Error
181
+ end
197
182
  end
198
183
 
199
184
  raise(error_class, error['message'])
@@ -209,4 +194,4 @@ module Gemfury
209
194
  })
210
195
  end
211
196
  end
212
- end
197
+ end
@@ -7,6 +7,7 @@ module Gemfury
7
7
  :adapter,
8
8
  :endpoint,
9
9
  :gitpoint,
10
+ :pushpoint,
10
11
  :user_agent,
11
12
  :api_version,
12
13
  :account].freeze
@@ -20,6 +21,9 @@ module Gemfury
20
21
  # The HTTP endpoint for git repo (used for .netrc credentials)
21
22
  DEFAULT_GITPOINT = 'https://git.fury.io/'.freeze
22
23
 
24
+ # The endpoint for the Push API if not set
25
+ DEFAULT_PUSHPOINT = 'https://push.fury.io/'.freeze
26
+
23
27
  # The value sent in the 'User-Agent' header if none is set
24
28
  DEFAULT_USER_AGENT = "Gemfury RubyGem #{Gemfury::VERSION}".freeze
25
29
 
@@ -58,6 +62,7 @@ module Gemfury
58
62
  self.adapter = DEFAULT_ADAPTER
59
63
  self.endpoint = DEFAULT_ENDPOINT
60
64
  self.gitpoint = DEFAULT_GITPOINT
65
+ self.pushpoint = DEFAULT_PUSHPOINT
61
66
  self.user_agent = DEFAULT_USER_AGENT
62
67
  self.api_version = DEFAULT_API_VERSION
63
68
  self.account = DEFAULT_ACCOUNT
@@ -65,4 +70,3 @@ module Gemfury
65
70
  end
66
71
  end
67
72
  end
68
-
@@ -1,3 +1,3 @@
1
1
  module Gemfury
2
- VERSION = '0.7.0'
2
+ VERSION = '0.8.0.rc1'
3
3
  end
metadata CHANGED
@@ -1,104 +1,104 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gemfury
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.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: 2017-05-17 00:00:00.000000000 Z
11
+ date: 2018-04-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: highline
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.6'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.6'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: multi_json
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '1.10'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.10'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: thor
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ! '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: 0.14.0
48
- - - <
48
+ - - "<"
49
49
  - !ruby/object:Gem::Version
50
50
  version: 1.0.0.pre
51
51
  type: :runtime
52
52
  prerelease: false
53
53
  version_requirements: !ruby/object:Gem::Requirement
54
54
  requirements:
55
- - - ! '>='
55
+ - - ">="
56
56
  - !ruby/object:Gem::Version
57
57
  version: 0.14.0
58
- - - <
58
+ - - "<"
59
59
  - !ruby/object:Gem::Version
60
60
  version: 1.0.0.pre
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: netrc
63
63
  requirement: !ruby/object:Gem::Requirement
64
64
  requirements:
65
- - - ! '>='
65
+ - - ">="
66
66
  - !ruby/object:Gem::Version
67
67
  version: 0.10.0
68
- - - <
68
+ - - "<"
69
69
  - !ruby/object:Gem::Version
70
70
  version: 0.12.0.pre
71
71
  type: :runtime
72
72
  prerelease: false
73
73
  version_requirements: !ruby/object:Gem::Requirement
74
74
  requirements:
75
- - - ! '>='
75
+ - - ">="
76
76
  - !ruby/object:Gem::Version
77
77
  version: 0.10.0
78
- - - <
78
+ - - "<"
79
79
  - !ruby/object:Gem::Version
80
80
  version: 0.12.0.pre
81
81
  - !ruby/object:Gem::Dependency
82
82
  name: faraday
83
83
  requirement: !ruby/object:Gem::Requirement
84
84
  requirements:
85
- - - ! '>='
85
+ - - ">="
86
86
  - !ruby/object:Gem::Version
87
87
  version: 0.9.0
88
- - - <
88
+ - - "<"
89
89
  - !ruby/object:Gem::Version
90
- version: 0.12.0.pre
90
+ version: 0.15.0.pre
91
91
  type: :runtime
92
92
  prerelease: false
93
93
  version_requirements: !ruby/object:Gem::Requirement
94
94
  requirements:
95
- - - ! '>='
95
+ - - ">="
96
96
  - !ruby/object:Gem::Version
97
97
  version: 0.9.0
98
- - - <
98
+ - - "<"
99
99
  - !ruby/object:Gem::Version
100
- version: 0.12.0.pre
101
- description: ! 'Hosted repo for your public and private packages at https://gemfury.com
100
+ version: 0.15.0.pre
101
+ description: 'Hosted repo for your public and private packages at https://gemfury.com
102
102
 
103
103
  '
104
104
  email: hello@gemfury.com
@@ -133,27 +133,38 @@ homepage: https://gemfury.com
133
133
  licenses:
134
134
  - MIT
135
135
  metadata: {}
136
- post_install_message: ! "************************************************************************\n\n
137
- \ Upload your first package to start using Gemfury:\n fury push my-package-1.0.0.gem\n\n
138
- \ If you have a directory with packages, you can use:\n fury migrate ./path/to/codez\n\n
139
- \ Find out what else you can do:\n fury help\n\n Follow @gemfury on Twitter for
140
- announcements, updates, and news.\n https://twitter.com/gemfury\n\n************************************************************************\n"
136
+ post_install_message: |
137
+ ************************************************************************
138
+
139
+ Upload your first package to start using Gemfury:
140
+ fury push my-package-1.0.0.gem
141
+
142
+ If you have a directory with packages, you can use:
143
+ fury migrate ./path/to/codez
144
+
145
+ Find out what else you can do:
146
+ fury help
147
+
148
+ Follow @gemfury on Twitter for announcements, updates, and news.
149
+ https://twitter.com/gemfury
150
+
151
+ ************************************************************************
141
152
  rdoc_options: []
142
153
  require_paths:
143
154
  - lib
144
155
  required_ruby_version: !ruby/object:Gem::Requirement
145
156
  requirements:
146
- - - ! '>='
157
+ - - ">="
147
158
  - !ruby/object:Gem::Version
148
159
  version: '0'
149
160
  required_rubygems_version: !ruby/object:Gem::Requirement
150
161
  requirements:
151
- - - ! '>='
162
+ - - ">"
152
163
  - !ruby/object:Gem::Version
153
- version: '0'
164
+ version: 1.3.1
154
165
  requirements: []
155
166
  rubyforge_project:
156
- rubygems_version: 2.6.11
167
+ rubygems_version: 2.7.6
157
168
  signing_key:
158
169
  specification_version: 4
159
170
  summary: Hosted repo for your public and private packages