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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ec70c78472354e87baba2a4c0353448131e4c64fbde701e23be618747acfef2f
4
- data.tar.gz: 72613b1b6fedfcd05a7b47dd6a4eb7315790105115a84c55069687a967092f99
3
+ metadata.gz: eebbd3b1d3d7417cf7a517130e078b1935d33f67f53f985b355121d04352fb2e
4
+ data.tar.gz: 0e30e1126921621558943e61de620ba6bf1510de41d6a52c8bb095a3f0652980
5
5
  SHA512:
6
- metadata.gz: 633130db69212b6ea9de71bfeb59c5af833ed3708b0b7b8ce477d81aa2a4cb8dd79d9ced4b57dd61539493f483a56a09e93647394a8e27361029ec2a727d9e75
7
- data.tar.gz: 24b5cc6866ba712de63061db95856454e0e8c2e3c6b6f66ab5485b27cb7635bc422321498314831d6423f7cd2bcc05ef69a2d95efb3de22aa9bfedd8b2d7c0fa
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
 
@@ -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://pro.rubyonjets.com/rate-limits
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://pro.rubyonjets.com/privacy
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:
@@ -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 pro.rubyonjets.com
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(token: token) # specify keys to allow
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
- # Note: 422 is Unprocessable Entity. This means an invalid data payload was sent.
70
- # We want that to error and raise
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 =~ /^20/ || http_code =~ /^40/
73
+ http_code =~ /^2/ || http_code =~ /^4/
73
74
  end
74
75
 
75
76
  def http
@@ -1,5 +1,5 @@
1
1
  module Jets
2
2
  module Api
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.3"
4
4
  end
5
5
  end
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.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-03 00:00:00.000000000 Z
11
+ date: 2023-12-11 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: