jets-api 0.1.1 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/jets/api/agree.rb +2 -2
- data/lib/jets/api/config.rb +2 -3
- data/lib/jets/api/core.rb +4 -3
- data/lib/jets/api/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eebbd3b1d3d7417cf7a517130e078b1935d33f67f53f985b355121d04352fb2e
|
4
|
+
data.tar.gz: 0e30e1126921621558943e61de620ba6bf1510de41d6a52c8bb095a3f0652980
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e570c4333fa1c2d32b4d6b8c8f7855cd9c721d782e3d48822053436d8d4a0872d13a9c4090fea6cf696bfb1cc75d1dc663c937f19f576e9a81bb7f2d277e2989
|
7
|
+
data.tar.gz: f3a65e8ca78d3bffe0f32190bb561d3a81dd632ad0230cde6985c5a3c1b8995d6f25db96538febf4e275d42fa197170dab1d82b886b75f961fdc28b08fba0252
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,12 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
This project *tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
|
5
5
|
|
6
|
+
## [0.1.3] - 2023-12-11
|
7
|
+
- [#1](https://github.com/rubyonjets/jets-api/pull/1) 2xx and 4xx responses are processable
|
8
|
+
|
9
|
+
## [0.1.2] - 2023-12-04
|
10
|
+
- use key field for token
|
11
|
+
|
6
12
|
## [0.1.1] - 2023-12-03
|
7
13
|
- use Jets.project_name
|
8
14
|
|
data/lib/jets/api/agree.rb
CHANGED
@@ -16,13 +16,13 @@ module Jets::Api
|
|
16
16
|
for unlimited gem download requests. Open Source projects may also qualify
|
17
17
|
for a free unlimited plan. More info:
|
18
18
|
|
19
|
-
https://
|
19
|
+
https://www.rubyonjets.com/rate-limits
|
20
20
|
|
21
21
|
Reporting gems to Jets Api also allows it to build new gems typically
|
22
22
|
within a few minutes. So if you run into missing gems, you can try deploying
|
23
23
|
again after a few minutes. Non-reported gems may take several days or longer.
|
24
24
|
Jets Api only collects the info it needs to run the service.
|
25
|
-
More info: https://
|
25
|
+
More info: https://www.rubyonjets.com/privacy
|
26
26
|
This message will only appear once on this machine.
|
27
27
|
|
28
28
|
You can also automatically skip this message by setting:
|
data/lib/jets/api/config.rb
CHANGED
@@ -34,7 +34,7 @@ module Jets::Api
|
|
34
34
|
def prompt
|
35
35
|
puts <<~EOL
|
36
36
|
You are about to configure your #{pretty_path(@config_path)}
|
37
|
-
You can get a token from
|
37
|
+
You can get a token from www.rubyonjets.com
|
38
38
|
EOL
|
39
39
|
print "Please provide your token: "
|
40
40
|
$stdin.gets.strip
|
@@ -43,13 +43,12 @@ module Jets::Api
|
|
43
43
|
# interface method: do not remove
|
44
44
|
def update_token(token=nil)
|
45
45
|
token ||= prompt
|
46
|
-
write(
|
46
|
+
write(key: token) # specify keys to allow
|
47
47
|
end
|
48
48
|
|
49
49
|
def write(values={})
|
50
50
|
data = load
|
51
51
|
data.merge!(values.deep_stringify_keys)
|
52
|
-
data.delete('key') if data.key?('key') # remove legacy key that used to store token
|
53
52
|
FileUtils.mkdir_p(File.dirname(@config_path))
|
54
53
|
IO.write(@config_path, YAML.dump(data))
|
55
54
|
puts "Updated #{pretty_path(@config_path)}"
|
data/lib/jets/api/core.rb
CHANGED
@@ -66,10 +66,11 @@ module Jets::Api
|
|
66
66
|
end
|
67
67
|
end
|
68
68
|
|
69
|
-
#
|
70
|
-
#
|
69
|
+
# 422 Unprocessable Entity: Server understands the content type of the request entity, and
|
70
|
+
# the syntax of the request entity is correct, but it was unable to process the contained
|
71
|
+
# instructions.
|
71
72
|
def processable?(http_code)
|
72
|
-
http_code =~ /^
|
73
|
+
http_code =~ /^2/ || http_code =~ /^4/
|
73
74
|
end
|
74
75
|
|
75
76
|
def http
|
data/lib/jets/api/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jets-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tung Nguyen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-12-
|
11
|
+
date: 2023-12-11 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|