gemfury 0.4.19 → 0.4.20.beta1
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 +5 -13
- data/lib/gemfury/client.rb +22 -3
- data/lib/gemfury/configuration.rb +3 -0
- data/lib/gemfury/version.rb +1 -1
- metadata +30 -20
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
MDUyZWZlOWVhZGI0NGFmODEyZGFkOWFjZGFmM2NlMDEyMTE1OWZhMg==
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: c25f6204ebc9cf18d749dc1c7f3a7a6c4084c253
|
4
|
+
data.tar.gz: bbdc27675b63a4062532aacefa37b41109e9213a
|
7
5
|
SHA512:
|
8
|
-
metadata.gz:
|
9
|
-
|
10
|
-
MTMyZWQxMzg5MWRmODkwZmMzM2ZhNjdlMWQzMDRkNTI1YTU2NGZmZTY0YjYy
|
11
|
-
MmQ1NjhiYTA2ODU2YjkwZDNmODczYWIyNTlkY2FlYzBkMzg1M2Y=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
Y2E0ZTVhNTgxN2FhNWMzYzY0OTkwYjM3MjNiZjFmYjJhZDQzNzg2N2IxYTAw
|
14
|
-
MWVhOTM3ODQ1YzEwYzhhMzRhZTdiYTM3MGMwOGI4NzVlNWJjMGQ4MzkwMmQ1
|
15
|
-
MTgyNjkwNDhkYzgyODUyMTc4ZDEyM2JlZGFmMmJlNjYwNDk3ZGY=
|
6
|
+
metadata.gz: 157603a55283834f4a4da30415f7248521eee341dda9564cb47651faa6c314eaa0fc63a87bce17fb97d79abcf9a63cbe662c5e9b8735b058f4f1b21267e1a609
|
7
|
+
data.tar.gz: 0fa6b01f5fa95390c3a9ec9013d17d8a762eb7a40a6dee011d90f8602d245a3c77d387cec7d079e277f039527786dde98ca9da8215cb80cb15d8bda1e5a76513
|
data/lib/gemfury/client.rb
CHANGED
@@ -22,10 +22,20 @@ module Gemfury
|
|
22
22
|
# Uploading a gem file
|
23
23
|
def push_gem(gem_file, options = {})
|
24
24
|
ensure_ready!(:authorization)
|
25
|
-
response = connection.post('gems', options.merge(
|
26
|
-
:gem_file => gem_file
|
27
|
-
))
|
28
25
|
|
26
|
+
# Generate upload link
|
27
|
+
api2 = connection(:url => self.endpoint2)
|
28
|
+
response = api2.post('uploads')
|
29
|
+
ensure_successful_response!(response)
|
30
|
+
|
31
|
+
# Upload to S3
|
32
|
+
upload = response.body['upload']
|
33
|
+
id, s3url = upload['id'], upload['blob']['put']
|
34
|
+
response = s3_put_file(s3url, gem_file)
|
35
|
+
ensure_successful_response!(response)
|
36
|
+
|
37
|
+
# Notify Gemfury that the upload is ready
|
38
|
+
response = api2.put("uploads/#{id}")
|
29
39
|
ensure_successful_response!(response)
|
30
40
|
end
|
31
41
|
|
@@ -146,5 +156,14 @@ module Gemfury
|
|
146
156
|
raise(error_class, error['message'])
|
147
157
|
end
|
148
158
|
end
|
159
|
+
|
160
|
+
def s3_put_file(uri, file)
|
161
|
+
Faraday::Connection.new(uri) do |f|
|
162
|
+
f.adapter :net_http
|
163
|
+
end.put(uri, file, {
|
164
|
+
:content_length => file.stat.size.to_s,
|
165
|
+
:content_type => ''
|
166
|
+
})
|
167
|
+
end
|
149
168
|
end
|
150
169
|
end
|
@@ -6,6 +6,7 @@ module Gemfury
|
|
6
6
|
:user_api_key,
|
7
7
|
:adapter,
|
8
8
|
:endpoint,
|
9
|
+
:endpoint2,
|
9
10
|
:user_agent,
|
10
11
|
:account].freeze
|
11
12
|
|
@@ -14,6 +15,7 @@ module Gemfury
|
|
14
15
|
|
15
16
|
# The endpoint that will be used to connect if none is set
|
16
17
|
DEFAULT_ENDPOINT = 'https://www.gemfury.com/1/'.freeze
|
18
|
+
DEFAULT_ENDPOINT2 = 'https://www.gemfury.com/2/'.freeze
|
17
19
|
|
18
20
|
# The value sent in the 'User-Agent' header if none is set
|
19
21
|
DEFAULT_USER_AGENT = "Gemfury RubyGem #{Gemfury::VERSION}".freeze
|
@@ -49,6 +51,7 @@ module Gemfury
|
|
49
51
|
self.user_api_key = DEFAULT_API_KEY
|
50
52
|
self.adapter = DEFAULT_ADAPTER
|
51
53
|
self.endpoint = DEFAULT_ENDPOINT
|
54
|
+
self.endpoint2 = DEFAULT_ENDPOINT2
|
52
55
|
self.user_agent = DEFAULT_USER_AGENT
|
53
56
|
self.account = DEFAULT_ACCOUNT
|
54
57
|
self
|
data/lib/gemfury/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gemfury
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.20.beta1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Rykov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-12-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: highline
|
@@ -28,7 +28,7 @@ dependencies:
|
|
28
28
|
name: thor
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - '>='
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 0.14.0
|
34
34
|
- - <
|
@@ -38,7 +38,7 @@ dependencies:
|
|
38
38
|
prerelease: false
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
40
40
|
requirements:
|
41
|
-
- -
|
41
|
+
- - '>='
|
42
42
|
- !ruby/object:Gem::Version
|
43
43
|
version: 0.14.0
|
44
44
|
- - <
|
@@ -62,7 +62,7 @@ dependencies:
|
|
62
62
|
name: faraday
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
64
64
|
requirements:
|
65
|
-
- -
|
65
|
+
- - '>='
|
66
66
|
- !ruby/object:Gem::Version
|
67
67
|
version: 0.7.4
|
68
68
|
- - <
|
@@ -72,7 +72,7 @@ dependencies:
|
|
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.7.4
|
78
78
|
- - <
|
@@ -82,7 +82,7 @@ dependencies:
|
|
82
82
|
name: faraday_middleware
|
83
83
|
requirement: !ruby/object:Gem::Requirement
|
84
84
|
requirements:
|
85
|
-
- -
|
85
|
+
- - '>='
|
86
86
|
- !ruby/object:Gem::Version
|
87
87
|
version: '0.7'
|
88
88
|
- - <
|
@@ -92,15 +92,14 @@ dependencies:
|
|
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.7'
|
98
98
|
- - <
|
99
99
|
- !ruby/object:Gem::Version
|
100
100
|
version: '0.10'
|
101
|
-
description:
|
102
|
-
|
103
|
-
'
|
101
|
+
description: |
|
102
|
+
Cloud Gem Server for your private RubyGems at http://gemfury.com
|
104
103
|
email: mrykov@gmail.com
|
105
104
|
executables:
|
106
105
|
- gemfury
|
@@ -131,27 +130,38 @@ files:
|
|
131
130
|
homepage: http://www.gemfury.com
|
132
131
|
licenses: []
|
133
132
|
metadata: {}
|
134
|
-
post_install_message:
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
133
|
+
post_install_message: |
|
134
|
+
************************************************************************
|
135
|
+
|
136
|
+
Upload your first package to start using Gemfury:
|
137
|
+
fury push my-package-1.0.0.gem
|
138
|
+
|
139
|
+
If you have a directory with packages, you can use:
|
140
|
+
fury migrate ./path/to/codez
|
141
|
+
|
142
|
+
Find out what else you can do:
|
143
|
+
fury help
|
144
|
+
|
145
|
+
Follow @gemfury on Twitter for announcements, updates, and news.
|
146
|
+
https://twitter.com/gemfury
|
147
|
+
|
148
|
+
************************************************************************
|
139
149
|
rdoc_options: []
|
140
150
|
require_paths:
|
141
151
|
- lib
|
142
152
|
required_ruby_version: !ruby/object:Gem::Requirement
|
143
153
|
requirements:
|
144
|
-
- -
|
154
|
+
- - '>='
|
145
155
|
- !ruby/object:Gem::Version
|
146
156
|
version: '0'
|
147
157
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
148
158
|
requirements:
|
149
|
-
- -
|
159
|
+
- - '>'
|
150
160
|
- !ruby/object:Gem::Version
|
151
|
-
version:
|
161
|
+
version: 1.3.1
|
152
162
|
requirements: []
|
153
163
|
rubyforge_project:
|
154
|
-
rubygems_version: 2.
|
164
|
+
rubygems_version: 2.0.14
|
155
165
|
signing_key:
|
156
166
|
specification_version: 4
|
157
167
|
summary: Cloud Gem Server for your private RubyGems
|