remoteok 0.1.0 → 0.2.0
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 +4 -4
- data/.github/workflows/main.yml +2 -2
- data/.rspec_status +29 -30
- data/.rubocop.yml +8 -18
- data/.standard.yml +5 -0
- data/Gemfile +14 -8
- data/Gemfile.lock +111 -48
- data/README.md +2 -8
- data/Rakefile +3 -3
- data/bin/console +3 -3
- data/lib/remoteok/client.rb +16 -15
- data/lib/remoteok/job.rb +23 -23
- data/lib/remoteok/version.rb +1 -1
- data/lib/remoteok.rb +2 -2
- data/remoteok.gemspec +17 -19
- metadata +8 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c5ab17b6a15bfb15ac67a1dd854f12f9aa9e2d67ab47d6871b9c22db586b325
|
4
|
+
data.tar.gz: 458582249873b4e5aea5f34032c4c323ab77cbf48e1743a255adf058c8afcdd9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '09b232e6fcfb26abcc39bc493fa2e1b63e3a60918a6b27f9b2fe8752cbf9e166f3cd1da5344937170a0380e277ac64e7a34754f2a6d109ba5e0432a15919abe6'
|
7
|
+
data.tar.gz: 6b6acb818a36214d1b568cae360636ac0b6a5e1cd9c5396464ad496620441dbef3280c5ce881534563c63862a9329aaa79bf4aa2556cc80dfc2e768b69645eba
|
data/.github/workflows/main.yml
CHANGED
@@ -10,9 +10,9 @@ jobs:
|
|
10
10
|
- name: Set up Ruby
|
11
11
|
uses: ruby/setup-ruby@v1
|
12
12
|
with:
|
13
|
-
ruby-version: 3.
|
13
|
+
ruby-version: 3.4.1
|
14
14
|
- name: Run the default task
|
15
15
|
run: |
|
16
|
-
gem install bundler -v 2.2
|
16
|
+
gem install bundler -v 2.6.2
|
17
17
|
bundle install
|
18
18
|
bundle exec rake
|
data/.rspec_status
CHANGED
@@ -1,30 +1,29 @@
|
|
1
|
-
example_id
|
2
|
-
|
3
|
-
./spec/
|
4
|
-
./spec/
|
5
|
-
./spec/
|
6
|
-
./spec/
|
7
|
-
./spec/
|
8
|
-
./spec/
|
9
|
-
./spec/
|
10
|
-
./spec/
|
11
|
-
./spec/
|
12
|
-
./spec/
|
13
|
-
./spec/
|
14
|
-
./spec/
|
15
|
-
./spec/
|
16
|
-
./spec/
|
17
|
-
./spec/
|
18
|
-
./spec/
|
19
|
-
./spec/
|
20
|
-
./spec/
|
21
|
-
./spec/
|
22
|
-
./spec/
|
23
|
-
./spec/
|
24
|
-
./spec/
|
25
|
-
./spec/
|
26
|
-
./spec/
|
27
|
-
./spec/
|
28
|
-
./spec/
|
29
|
-
./spec/
|
30
|
-
./spec/remoteok_spec.rb[1:1] | passed | 0.00017 seconds |
|
1
|
+
example_id | status | run_time |
|
2
|
+
---------------------------------------- | ------ | --------------- |
|
3
|
+
./spec/remote_ok/client_spec.rb[1:1] | passed | 0.00287 seconds |
|
4
|
+
./spec/remote_ok/client_spec.rb[1:2:1] | passed | 0.00067 seconds |
|
5
|
+
./spec/remote_ok/client_spec.rb[1:2:2:1] | passed | 0.0004 seconds |
|
6
|
+
./spec/remote_ok/client_spec.rb[1:3:1] | passed | 0.0007 seconds |
|
7
|
+
./spec/remote_ok/client_spec.rb[1:3:2] | passed | 0.00109 seconds |
|
8
|
+
./spec/remote_ok/client_spec.rb[1:3:3] | passed | 0.00026 seconds |
|
9
|
+
./spec/remote_ok/client_spec.rb[1:3:4] | passed | 0.0005 seconds |
|
10
|
+
./spec/remote_ok/client_spec.rb[1:4:1] | passed | 0.00027 seconds |
|
11
|
+
./spec/remote_ok/client_spec.rb[1:4:2] | passed | 0.00025 seconds |
|
12
|
+
./spec/remote_ok/job_spec.rb[1:1] | passed | 0.00006 seconds |
|
13
|
+
./spec/remote_ok/job_spec.rb[1:2:1] | passed | 0.00006 seconds |
|
14
|
+
./spec/remote_ok/job_spec.rb[1:3:1] | passed | 0.00006 seconds |
|
15
|
+
./spec/remote_ok/job_spec.rb[1:4:1] | passed | 0.00006 seconds |
|
16
|
+
./spec/remote_ok/job_spec.rb[1:5:1] | passed | 0.00005 seconds |
|
17
|
+
./spec/remote_ok/job_spec.rb[1:6:1] | passed | 0.00023 seconds |
|
18
|
+
./spec/remote_ok/job_spec.rb[1:7:1] | passed | 0.00006 seconds |
|
19
|
+
./spec/remote_ok/job_spec.rb[1:8:1] | passed | 0.00006 seconds |
|
20
|
+
./spec/remote_ok/job_spec.rb[1:9:1] | passed | 0.00006 seconds |
|
21
|
+
./spec/remote_ok/job_spec.rb[1:10:1] | passed | 0.00006 seconds |
|
22
|
+
./spec/remote_ok/job_spec.rb[1:11:1] | passed | 0.00005 seconds |
|
23
|
+
./spec/remote_ok/job_spec.rb[1:12:1] | passed | 0.00028 seconds |
|
24
|
+
./spec/remote_ok/job_spec.rb[1:13:1] | passed | 0.00013 seconds |
|
25
|
+
./spec/remote_ok/job_spec.rb[1:14:1] | passed | 0.00006 seconds |
|
26
|
+
./spec/remote_ok/job_spec.rb[1:15:1] | passed | 0.00022 seconds |
|
27
|
+
./spec/remote_ok/job_spec.rb[1:16:1] | passed | 0.00006 seconds |
|
28
|
+
./spec/remote_ok/job_spec.rb[1:17:1] | passed | 0.00005 seconds |
|
29
|
+
./spec/remote_ok_spec.rb[1:1] | passed | 0.00002 seconds |
|
data/.rubocop.yml
CHANGED
@@ -1,20 +1,10 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
Style/StringLiterals:
|
6
|
-
Enabled: true
|
7
|
-
EnforcedStyle: single_quotes
|
1
|
+
require:
|
2
|
+
- standard
|
3
|
+
- rubocop-rspec
|
4
|
+
- rubocop-performance
|
8
5
|
|
9
|
-
|
10
|
-
|
11
|
-
EnforcedStyle: double_quotes
|
6
|
+
inherit_gem:
|
7
|
+
standard: config/base.yml
|
12
8
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
Metrics/BlockLength:
|
17
|
-
Exclude:
|
18
|
-
- 'Rakefile'
|
19
|
-
- '**/*.rake'
|
20
|
-
- 'spec/**/*.rb'
|
9
|
+
AllCops:
|
10
|
+
NewCops: enable
|
data/.standard.yml
ADDED
data/Gemfile
CHANGED
@@ -1,14 +1,20 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
source
|
3
|
+
source "https://rubygems.org"
|
4
4
|
|
5
5
|
# Specify your gem's dependencies in remoteok.gemspec
|
6
6
|
gemspec
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
gem
|
11
|
-
|
12
|
-
gem
|
13
|
-
gem
|
14
|
-
gem
|
8
|
+
# Dev dependencies
|
9
|
+
group :development, :test do
|
10
|
+
gem "rake", "~> 13.2"
|
11
|
+
gem "rspec", "~> 3.13"
|
12
|
+
gem "rubocop", "~> 1.69"
|
13
|
+
gem "rubocop-rake"
|
14
|
+
gem "rubocop-rspec"
|
15
|
+
gem "rubocop-performance"
|
16
|
+
gem "simplecov", "< 0.21"
|
17
|
+
gem "standard", "~> 1.31"
|
18
|
+
gem "pry", "~> 0.15"
|
19
|
+
gem "binding_of_caller", "~> 1.0"
|
20
|
+
end
|
data/Gemfile.lock
CHANGED
@@ -1,78 +1,141 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
remoteok (0.
|
5
|
-
|
4
|
+
remoteok (0.2.0)
|
5
|
+
async-http (~> 0.65)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
10
|
ast (2.4.2)
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
11
|
+
async (2.21.1)
|
12
|
+
console (~> 1.29)
|
13
|
+
fiber-annotation
|
14
|
+
io-event (~> 1.6, >= 1.6.5)
|
15
|
+
async-http (0.86.0)
|
16
|
+
async (>= 2.10.2)
|
17
|
+
async-pool (~> 0.9)
|
18
|
+
io-endpoint (~> 0.14)
|
19
|
+
io-stream (~> 0.6)
|
20
|
+
metrics (~> 0.12)
|
21
|
+
protocol-http (~> 0.43)
|
22
|
+
protocol-http1 (>= 0.28.1)
|
23
|
+
protocol-http2 (~> 0.22)
|
24
|
+
traces (~> 0.10)
|
25
|
+
async-pool (0.10.2)
|
26
|
+
async (>= 1.25)
|
27
|
+
traces
|
28
|
+
binding_of_caller (1.0.1)
|
29
|
+
debug_inspector (>= 1.2.0)
|
30
|
+
coderay (1.1.3)
|
31
|
+
console (1.29.2)
|
32
|
+
fiber-annotation
|
33
|
+
fiber-local (~> 1.1)
|
34
|
+
json
|
35
|
+
debug_inspector (1.2.0)
|
36
|
+
diff-lcs (1.5.1)
|
37
|
+
docile (1.4.1)
|
38
|
+
fiber-annotation (0.2.0)
|
39
|
+
fiber-local (1.1.0)
|
40
|
+
fiber-storage
|
41
|
+
fiber-storage (1.0.0)
|
42
|
+
io-endpoint (0.14.0)
|
43
|
+
io-event (1.7.5)
|
44
|
+
io-stream (0.6.1)
|
45
|
+
json (2.9.1)
|
46
|
+
language_server-protocol (3.17.0.3)
|
47
|
+
lint_roller (1.1.0)
|
48
|
+
method_source (1.1.0)
|
49
|
+
metrics (0.12.1)
|
50
|
+
parallel (1.26.3)
|
51
|
+
parser (3.3.6.0)
|
23
52
|
ast (~> 2.4.1)
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
53
|
+
racc
|
54
|
+
protocol-hpack (1.5.1)
|
55
|
+
protocol-http (0.47.1)
|
56
|
+
protocol-http1 (0.28.1)
|
57
|
+
protocol-http (~> 0.22)
|
58
|
+
protocol-http2 (0.22.0)
|
59
|
+
protocol-hpack (~> 1.4)
|
60
|
+
protocol-http (~> 0.18)
|
61
|
+
pry (0.15.2)
|
62
|
+
coderay (~> 1.1)
|
63
|
+
method_source (~> 1.0)
|
64
|
+
racc (1.8.1)
|
65
|
+
rainbow (3.1.1)
|
66
|
+
rake (13.2.1)
|
67
|
+
regexp_parser (2.10.0)
|
68
|
+
rspec (3.13.0)
|
69
|
+
rspec-core (~> 3.13.0)
|
70
|
+
rspec-expectations (~> 3.13.0)
|
71
|
+
rspec-mocks (~> 3.13.0)
|
72
|
+
rspec-core (3.13.2)
|
73
|
+
rspec-support (~> 3.13.0)
|
74
|
+
rspec-expectations (3.13.3)
|
35
75
|
diff-lcs (>= 1.2.0, < 2.0)
|
36
|
-
rspec-support (~> 3.
|
37
|
-
rspec-mocks (3.
|
76
|
+
rspec-support (~> 3.13.0)
|
77
|
+
rspec-mocks (3.13.2)
|
38
78
|
diff-lcs (>= 1.2.0, < 2.0)
|
39
|
-
rspec-support (~> 3.
|
40
|
-
rspec-support (3.
|
41
|
-
rubocop (1.
|
79
|
+
rspec-support (~> 3.13.0)
|
80
|
+
rspec-support (3.13.2)
|
81
|
+
rubocop (1.69.2)
|
82
|
+
json (~> 2.3)
|
83
|
+
language_server-protocol (>= 3.17.0)
|
42
84
|
parallel (~> 1.10)
|
43
|
-
parser (>= 3.
|
85
|
+
parser (>= 3.3.0.2)
|
44
86
|
rainbow (>= 2.2.2, < 4.0)
|
45
|
-
regexp_parser (>=
|
46
|
-
|
47
|
-
rubocop-ast (>= 1.2.0, < 2.0)
|
87
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
88
|
+
rubocop-ast (>= 1.36.2, < 2.0)
|
48
89
|
ruby-progressbar (~> 1.7)
|
49
|
-
unicode-display_width (>=
|
50
|
-
rubocop-ast (1.
|
51
|
-
parser (>= 3.
|
52
|
-
rubocop-
|
53
|
-
rubocop
|
54
|
-
|
90
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
91
|
+
rubocop-ast (1.37.0)
|
92
|
+
parser (>= 3.3.1.0)
|
93
|
+
rubocop-performance (1.23.1)
|
94
|
+
rubocop (>= 1.48.1, < 2.0)
|
95
|
+
rubocop-ast (>= 1.31.1, < 2.0)
|
96
|
+
rubocop-rake (0.6.0)
|
55
97
|
rubocop (~> 1.0)
|
56
|
-
|
57
|
-
|
98
|
+
rubocop-rspec (3.3.0)
|
99
|
+
rubocop (~> 1.61)
|
100
|
+
ruby-progressbar (1.13.0)
|
58
101
|
simplecov (0.17.1)
|
59
102
|
docile (~> 1.1)
|
60
103
|
json (>= 1.8, < 3)
|
61
104
|
simplecov-html (~> 0.10.0)
|
62
105
|
simplecov-html (0.10.2)
|
63
|
-
|
106
|
+
standard (1.43.0)
|
107
|
+
language_server-protocol (~> 3.17.0.2)
|
108
|
+
lint_roller (~> 1.0)
|
109
|
+
rubocop (~> 1.69.1)
|
110
|
+
standard-custom (~> 1.0.0)
|
111
|
+
standard-performance (~> 1.6)
|
112
|
+
standard-custom (1.0.2)
|
113
|
+
lint_roller (~> 1.0)
|
114
|
+
rubocop (~> 1.50)
|
115
|
+
standard-performance (1.6.0)
|
116
|
+
lint_roller (~> 1.1)
|
117
|
+
rubocop-performance (~> 1.23.0)
|
118
|
+
traces (0.14.1)
|
119
|
+
unicode-display_width (3.1.3)
|
120
|
+
unicode-emoji (~> 4.0, >= 4.0.4)
|
121
|
+
unicode-emoji (4.0.4)
|
64
122
|
|
65
123
|
PLATFORMS
|
124
|
+
arm64-darwin-24
|
66
125
|
x86_64-darwin-19
|
67
126
|
|
68
127
|
DEPENDENCIES
|
69
|
-
|
128
|
+
binding_of_caller (~> 1.0)
|
129
|
+
pry (~> 0.15)
|
130
|
+
rake (~> 13.2)
|
70
131
|
remoteok!
|
71
|
-
rspec (~> 3.
|
72
|
-
rubocop (~> 1.
|
132
|
+
rspec (~> 3.13)
|
133
|
+
rubocop (~> 1.69)
|
134
|
+
rubocop-performance
|
73
135
|
rubocop-rake
|
74
136
|
rubocop-rspec
|
75
|
-
simplecov (< 0.
|
137
|
+
simplecov (< 0.21)
|
138
|
+
standard (~> 1.31)
|
76
139
|
|
77
140
|
BUNDLED WITH
|
78
|
-
2.2
|
141
|
+
2.6.2
|
data/README.md
CHANGED
@@ -6,6 +6,8 @@ A ruby client to interact with the <a href="https://remoteok.io" target="_blank"
|
|
6
6
|
|
7
7
|
<a href="https://codeclimate.com/github/RemoteCTO/remote-ok-ruby/test_coverage"><img src="https://api.codeclimate.com/v1/badges/b60f02bbaa5fd337e0cf/test_coverage" /></a>
|
8
8
|
|
9
|
+
[](https://badge.fury.io/rb/remoteok)
|
10
|
+
|
9
11
|
## Installation
|
10
12
|
|
11
13
|
#### Requirements
|
@@ -72,14 +74,6 @@ The gem will send it's own default user agent but you can override it for your o
|
|
72
74
|
client = RemoteOK::Client.new(user_agent: 'hello-there')
|
73
75
|
```
|
74
76
|
|
75
|
-
#### `debug`
|
76
|
-
|
77
|
-
Turning on the debug flag will pass a request to HTTParty to print verbose debug output to the console, so that you can inspect whats happening on the network under the hood.
|
78
|
-
|
79
|
-
```ruby
|
80
|
-
client = RemoteOK::Client.new(debug: true)
|
81
|
-
```
|
82
|
-
|
83
77
|
### Client Methods
|
84
78
|
|
85
79
|
#### `.jobs`
|
data/Rakefile
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require
|
4
|
-
require
|
3
|
+
require "bundler/gem_tasks"
|
4
|
+
require "rspec/core/rake_task"
|
5
5
|
|
6
6
|
RSpec::Core::RakeTask.new(:spec)
|
7
7
|
|
8
|
-
require
|
8
|
+
require "rubocop/rake_task"
|
9
9
|
|
10
10
|
RuboCop::RakeTask.new
|
11
11
|
|
data/bin/console
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
|
-
require
|
5
|
-
require
|
4
|
+
require "bundler/setup"
|
5
|
+
require "remoteok"
|
6
6
|
|
7
7
|
# You can add fixtures and/or initialization code here to make experimenting
|
8
8
|
# with your gem easier. You can also use a different console, if you like.
|
@@ -11,5 +11,5 @@ require 'remoteok'
|
|
11
11
|
# require "pry"
|
12
12
|
# Pry.start
|
13
13
|
|
14
|
-
require
|
14
|
+
require "irb"
|
15
15
|
IRB.start(__FILE__)
|
data/lib/remoteok/client.rb
CHANGED
@@ -3,36 +3,37 @@
|
|
3
3
|
module RemoteOK
|
4
4
|
# Client class to interact with the API itself
|
5
5
|
class Client
|
6
|
-
require
|
7
|
-
require
|
8
|
-
require_relative
|
9
|
-
|
10
|
-
include HTTParty
|
6
|
+
require "json"
|
7
|
+
require "async/http/internet/instance"
|
8
|
+
require_relative "job"
|
11
9
|
|
12
10
|
def initialize(**config)
|
13
|
-
@base_url = config[:base_url] ||
|
14
|
-
@debug = config[:debug] || false
|
11
|
+
@base_url = config[:base_url] || "https://remoteok.com/api"
|
15
12
|
@user_agent = config[:user_agent] || default_user_agent
|
16
13
|
end
|
17
14
|
|
18
15
|
def with_fetch(params = {})
|
19
|
-
|
20
|
-
|
21
|
-
|
16
|
+
uri = URI(@base_url)
|
17
|
+
uri.query = URI.encode_www_form(params) if params&.any?
|
18
|
+
|
19
|
+
headers = {"User-Agent" => @user_agent}
|
22
20
|
|
23
|
-
|
21
|
+
@data = Sync do
|
22
|
+
internet = Async::HTTP::Internet.new
|
23
|
+
response = internet.get(uri, headers)
|
24
|
+
JSON.parse(response.read)
|
25
|
+
end
|
24
26
|
|
25
|
-
@data = JSON.parse(response.body)
|
26
27
|
self
|
27
28
|
end
|
28
29
|
|
29
30
|
def legal
|
30
31
|
with_fetch unless @data
|
31
|
-
@data.first[
|
32
|
+
@data.first["legal"]
|
32
33
|
end
|
33
34
|
|
34
35
|
def jobs(*tags)
|
35
|
-
options = {
|
36
|
+
options = {tags: stringify(tags)} if tags&.any?
|
36
37
|
|
37
38
|
with_fetch options unless @data
|
38
39
|
|
@@ -46,7 +47,7 @@ module RemoteOK
|
|
46
47
|
def stringify(tags = [])
|
47
48
|
return unless tags.any?
|
48
49
|
|
49
|
-
tags.map { |tag| tag.to_s.
|
50
|
+
tags.map { |tag| tag.to_s.tr("_", " ") }.join ","
|
50
51
|
end
|
51
52
|
|
52
53
|
def default_user_agent
|
data/lib/remoteok/job.rb
CHANGED
@@ -3,86 +3,86 @@
|
|
3
3
|
module RemoteOK
|
4
4
|
# Class representing a single job from RemoteOK with data accessors.
|
5
5
|
class Job
|
6
|
-
require
|
6
|
+
require "date"
|
7
7
|
|
8
8
|
attr_reader :raw
|
9
9
|
|
10
|
-
HTML_CHARS_REGEX = /<("[^"]*"|'[^']*'|[^'">])
|
10
|
+
HTML_CHARS_REGEX = /<("[^"]*"|'[^']*'|[^'">])*>/
|
11
11
|
|
12
12
|
def initialize(job_data)
|
13
13
|
@raw = job_data
|
14
14
|
end
|
15
15
|
|
16
16
|
def slug
|
17
|
-
raw[
|
17
|
+
raw["slug"]
|
18
18
|
end
|
19
19
|
|
20
20
|
def id
|
21
|
-
return unless raw[
|
21
|
+
return unless raw["id"]
|
22
22
|
|
23
|
-
Integer raw[
|
23
|
+
Integer raw["id"]
|
24
24
|
end
|
25
25
|
|
26
26
|
def epoch
|
27
|
-
return unless raw[
|
27
|
+
return unless raw["epoch"]
|
28
28
|
|
29
|
-
Integer raw[
|
29
|
+
Integer raw["epoch"]
|
30
30
|
end
|
31
31
|
|
32
32
|
def date
|
33
|
-
return unless raw[
|
33
|
+
return unless raw["date"]
|
34
34
|
|
35
|
-
DateTime.parse raw[
|
35
|
+
DateTime.parse raw["date"]
|
36
36
|
end
|
37
37
|
|
38
38
|
def company
|
39
|
-
raw[
|
39
|
+
raw["company"]
|
40
40
|
end
|
41
41
|
|
42
42
|
def company_logo
|
43
|
-
raw[
|
43
|
+
raw["company_logo"]
|
44
44
|
end
|
45
45
|
|
46
46
|
def position
|
47
|
-
raw[
|
47
|
+
raw["position"]
|
48
48
|
end
|
49
49
|
|
50
50
|
def tags
|
51
|
-
return unless raw[
|
51
|
+
return unless raw["tags"]
|
52
52
|
|
53
|
-
raw[
|
54
|
-
tag.
|
53
|
+
raw["tags"].map do |tag|
|
54
|
+
tag.tr(" ", "_").to_sym
|
55
55
|
end
|
56
56
|
end
|
57
57
|
|
58
58
|
def logo
|
59
|
-
raw[
|
59
|
+
raw["logo"]
|
60
60
|
end
|
61
61
|
|
62
62
|
def description
|
63
|
-
raw[
|
63
|
+
raw["description"]
|
64
64
|
end
|
65
65
|
|
66
66
|
def description_text
|
67
|
-
return unless raw[
|
67
|
+
return unless raw["description"]
|
68
68
|
|
69
|
-
raw[
|
69
|
+
raw["description"].gsub(HTML_CHARS_REGEX, " ").strip.gsub(/\s+/, " ")
|
70
70
|
end
|
71
71
|
|
72
72
|
def location
|
73
|
-
raw[
|
73
|
+
raw["location"]
|
74
74
|
end
|
75
75
|
|
76
76
|
def original
|
77
|
-
raw[
|
77
|
+
raw["original"]
|
78
78
|
end
|
79
79
|
|
80
80
|
def url
|
81
|
-
raw[
|
81
|
+
raw["url"]
|
82
82
|
end
|
83
83
|
|
84
84
|
def apply_url
|
85
|
-
raw[
|
85
|
+
raw["apply_url"]
|
86
86
|
end
|
87
87
|
end
|
88
88
|
end
|
data/lib/remoteok/version.rb
CHANGED
data/lib/remoteok.rb
CHANGED
data/remoteok.gemspec
CHANGED
@@ -1,23 +1,23 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_relative
|
3
|
+
require_relative "lib/remoteok/version"
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
|
-
spec.name
|
7
|
-
spec.version
|
8
|
-
spec.authors
|
9
|
-
spec.email
|
6
|
+
spec.name = "remoteok"
|
7
|
+
spec.version = RemoteOK::VERSION
|
8
|
+
spec.authors = ["Edward Woodcock"]
|
9
|
+
spec.email = ["768254+RemoteCTO@users.noreply.github.com"]
|
10
10
|
|
11
|
-
spec.summary
|
12
|
-
spec.description
|
13
|
-
spec.homepage
|
14
|
-
spec.license
|
15
|
-
spec.required_ruby_version = Gem::Requirement.new(
|
11
|
+
spec.summary = "Ruby client for RemoteOK Jobs API"
|
12
|
+
spec.description = "Fetch data from the API at remoteok.io"
|
13
|
+
spec.homepage = "https://github.com/RemoteCTO/remote-ok-ruby"
|
14
|
+
spec.license = "MIT"
|
15
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 2.6.0")
|
16
16
|
|
17
17
|
# spec.metadata['allowed_push_host'] = 'TODO: Set to 'http://mygemserver.com''
|
18
18
|
|
19
|
-
spec.metadata[
|
20
|
-
spec.metadata[
|
19
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
20
|
+
spec.metadata["source_code_uri"] = "https://github.com/RemoteCTO/remote-ok-ruby"
|
21
21
|
# spec.metadata['changelog_uri'] = 'TODO: Put your gem's CHANGELOG.md URL here.'
|
22
22
|
|
23
23
|
# Specify which files should be added to the gem when it is released.
|
@@ -25,16 +25,14 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
26
26
|
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features)/}) }
|
27
27
|
end
|
28
|
-
spec.bindir
|
29
|
-
spec.executables
|
30
|
-
spec.require_paths = [
|
28
|
+
spec.bindir = "exe"
|
29
|
+
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
30
|
+
spec.require_paths = ["lib"]
|
31
31
|
|
32
32
|
# Prod dependencies
|
33
|
-
spec.add_dependency
|
34
|
-
|
35
|
-
# Dev dependencies
|
36
|
-
spec.add_development_dependency 'simplecov', '< 0.18'
|
33
|
+
spec.add_dependency "async-http", "~> 0.65"
|
37
34
|
|
38
35
|
# For more information and examples about making a new gem, checkout our
|
39
36
|
# guide at: https://bundler.io/guides/creating_gem.html
|
37
|
+
spec.metadata["rubygems_mfa_required"] = "true"
|
40
38
|
end
|
metadata
CHANGED
@@ -1,43 +1,28 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: remoteok
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Edward Woodcock
|
8
|
-
autorequire:
|
9
8
|
bindir: exe
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-01-08 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
13
|
+
name: async-http
|
15
14
|
requirement: !ruby/object:Gem::Requirement
|
16
15
|
requirements:
|
17
16
|
- - "~>"
|
18
17
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
18
|
+
version: '0.65'
|
20
19
|
type: :runtime
|
21
20
|
prerelease: false
|
22
21
|
version_requirements: !ruby/object:Gem::Requirement
|
23
22
|
requirements:
|
24
23
|
- - "~>"
|
25
24
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: simplecov
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - "<"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '0.18'
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - "<"
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '0.18'
|
25
|
+
version: '0.65'
|
41
26
|
description: Fetch data from the API at remoteok.io
|
42
27
|
email:
|
43
28
|
- 768254+RemoteCTO@users.noreply.github.com
|
@@ -50,6 +35,7 @@ files:
|
|
50
35
|
- ".rspec"
|
51
36
|
- ".rspec_status"
|
52
37
|
- ".rubocop.yml"
|
38
|
+
- ".standard.yml"
|
53
39
|
- CHANGELOG.md
|
54
40
|
- CODE_OF_CONDUCT.md
|
55
41
|
- Gemfile
|
@@ -71,7 +57,7 @@ licenses:
|
|
71
57
|
metadata:
|
72
58
|
homepage_uri: https://github.com/RemoteCTO/remote-ok-ruby
|
73
59
|
source_code_uri: https://github.com/RemoteCTO/remote-ok-ruby
|
74
|
-
|
60
|
+
rubygems_mfa_required: 'true'
|
75
61
|
rdoc_options: []
|
76
62
|
require_paths:
|
77
63
|
- lib
|
@@ -86,8 +72,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
86
72
|
- !ruby/object:Gem::Version
|
87
73
|
version: '0'
|
88
74
|
requirements: []
|
89
|
-
rubygems_version: 3.2
|
90
|
-
signing_key:
|
75
|
+
rubygems_version: 3.6.2
|
91
76
|
specification_version: 4
|
92
77
|
summary: Ruby client for RemoteOK Jobs API
|
93
78
|
test_files: []
|