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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3a9e942950938b25e561c843c947dcd9cda7161873276ecb6253f90121b4f530
4
- data.tar.gz: bfd224660f998c2fd03e73e8de447e6e93312c10c9216f62742f3683b06c91f5
3
+ metadata.gz: 8c5ab17b6a15bfb15ac67a1dd854f12f9aa9e2d67ab47d6871b9c22db586b325
4
+ data.tar.gz: 458582249873b4e5aea5f34032c4c323ab77cbf48e1743a255adf058c8afcdd9
5
5
  SHA512:
6
- metadata.gz: 3defc05518c18951df4590cbdfc821ef151c2077527beddf2ac01a3f8538904da0e28c6fac897a96e243c2924cc8658b14ea64d91b3d0f10a65cd48a3b85f697
7
- data.tar.gz: 100480951b824b5b5aad56207f90785455436eb87376cca267c3c955f4a0602f2bf50288a6b7649818b262fbd6ce57546ee78f0ba0691a531d6b93cdbb32385c
6
+ metadata.gz: '09b232e6fcfb26abcc39bc493fa2e1b63e3a60918a6b27f9b2fe8752cbf9e166f3cd1da5344937170a0380e277ac64e7a34754f2a6d109ba5e0432a15919abe6'
7
+ data.tar.gz: 6b6acb818a36214d1b568cae360636ac0b6a5e1cd9c5396464ad496620441dbef3280c5ce881534563c63862a9329aaa79bf4aa2556cc80dfc2e768b69645eba
@@ -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.0.1
13
+ ruby-version: 3.4.1
14
14
  - name: Run the default task
15
15
  run: |
16
- gem install bundler -v 2.2.15
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 | status | run_time |
2
- --------------------------------------- | ------ | --------------- |
3
- ./spec/remoteok/client_spec.rb[1:1] | passed | 0.00902 seconds |
4
- ./spec/remoteok/client_spec.rb[1:2:1] | passed | 0.00061 seconds |
5
- ./spec/remoteok/client_spec.rb[1:2:2:1] | passed | 0.00042 seconds |
6
- ./spec/remoteok/client_spec.rb[1:3:1] | passed | 0.00042 seconds |
7
- ./spec/remoteok/client_spec.rb[1:4:1] | passed | 0.00128 seconds |
8
- ./spec/remoteok/client_spec.rb[1:4:2] | passed | 0.00042 seconds |
9
- ./spec/remoteok/client_spec.rb[1:5:1] | passed | 0.00096 seconds |
10
- ./spec/remoteok/client_spec.rb[1:5:2] | passed | 0.00124 seconds |
11
- ./spec/remoteok/client_spec.rb[1:5:3:1] | passed | 0.00045 seconds |
12
- ./spec/remoteok/client_spec.rb[1:5:4:1] | passed | 0.00058 seconds |
13
- ./spec/remoteok/job_spec.rb[1:1] | passed | 0.00041 seconds |
14
- ./spec/remoteok/job_spec.rb[1:2:1] | passed | 0.00019 seconds |
15
- ./spec/remoteok/job_spec.rb[1:3:1] | passed | 0.00019 seconds |
16
- ./spec/remoteok/job_spec.rb[1:4:1] | passed | 0.00019 seconds |
17
- ./spec/remoteok/job_spec.rb[1:5:1] | passed | 0.00019 seconds |
18
- ./spec/remoteok/job_spec.rb[1:6:1] | passed | 0.00066 seconds |
19
- ./spec/remoteok/job_spec.rb[1:7:1] | passed | 0.0002 seconds |
20
- ./spec/remoteok/job_spec.rb[1:8:1] | passed | 0.00031 seconds |
21
- ./spec/remoteok/job_spec.rb[1:9:1] | passed | 0.00027 seconds |
22
- ./spec/remoteok/job_spec.rb[1:10:1] | passed | 0.00023 seconds |
23
- ./spec/remoteok/job_spec.rb[1:11:1] | passed | 0.00028 seconds |
24
- ./spec/remoteok/job_spec.rb[1:12:1] | passed | 0.00024 seconds |
25
- ./spec/remoteok/job_spec.rb[1:13:1] | passed | 0.00035 seconds |
26
- ./spec/remoteok/job_spec.rb[1:14:1] | passed | 0.0003 seconds |
27
- ./spec/remoteok/job_spec.rb[1:15:1] | passed | 0.00032 seconds |
28
- ./spec/remoteok/job_spec.rb[1:16:1] | passed | 0.01251 seconds |
29
- ./spec/remoteok/job_spec.rb[1:17:1] | passed | 0.00037 seconds |
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
- AllCops:
2
- NewCops: enable
3
- TargetRubyVersion: 2.6
4
-
5
- Style/StringLiterals:
6
- Enabled: true
7
- EnforcedStyle: single_quotes
1
+ require:
2
+ - standard
3
+ - rubocop-rspec
4
+ - rubocop-performance
8
5
 
9
- Style/StringLiteralsInInterpolation:
10
- Enabled: true
11
- EnforcedStyle: double_quotes
6
+ inherit_gem:
7
+ standard: config/base.yml
12
8
 
13
- Layout/LineLength:
14
- Max: 120
15
-
16
- Metrics/BlockLength:
17
- Exclude:
18
- - 'Rakefile'
19
- - '**/*.rake'
20
- - 'spec/**/*.rb'
9
+ AllCops:
10
+ NewCops: enable
data/.standard.yml ADDED
@@ -0,0 +1,5 @@
1
+ fix: false # default: false
2
+ parallel: false # default: false
3
+ format: progress # default: Standard::Formatter
4
+ default_ignores: true # default: true
5
+ #ruby_version: 3.4.1 # default: RUBY_VERSION
data/Gemfile CHANGED
@@ -1,14 +1,20 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- source 'https://rubygems.org'
3
+ source "https://rubygems.org"
4
4
 
5
5
  # Specify your gem's dependencies in remoteok.gemspec
6
6
  gemspec
7
7
 
8
- gem 'rake', '~> 13.0'
9
-
10
- gem 'rspec', '~> 3.0'
11
-
12
- gem 'rubocop', '~> 1.7'
13
- gem 'rubocop-rake'
14
- gem 'rubocop-rspec'
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.1.0)
5
- httparty (~> 0.18.1)
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
- diff-lcs (1.4.4)
12
- docile (1.3.5)
13
- httparty (0.18.1)
14
- mime-types (~> 3.0)
15
- multi_xml (>= 0.5.2)
16
- json (2.5.1)
17
- mime-types (3.3.1)
18
- mime-types-data (~> 3.2015)
19
- mime-types-data (3.2021.0225)
20
- multi_xml (0.6.0)
21
- parallel (1.20.1)
22
- parser (3.0.1.1)
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
- rainbow (3.0.0)
25
- rake (13.0.3)
26
- regexp_parser (2.1.1)
27
- rexml (3.2.5)
28
- rspec (3.10.0)
29
- rspec-core (~> 3.10.0)
30
- rspec-expectations (~> 3.10.0)
31
- rspec-mocks (~> 3.10.0)
32
- rspec-core (3.10.1)
33
- rspec-support (~> 3.10.0)
34
- rspec-expectations (3.10.1)
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.10.0)
37
- rspec-mocks (3.10.2)
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.10.0)
40
- rspec-support (3.10.2)
41
- rubocop (1.13.0)
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.0.0.0)
85
+ parser (>= 3.3.0.2)
44
86
  rainbow (>= 2.2.2, < 4.0)
45
- regexp_parser (>= 1.8, < 3.0)
46
- rexml
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 (>= 1.4.0, < 3.0)
50
- rubocop-ast (1.5.0)
51
- parser (>= 3.0.1.1)
52
- rubocop-rake (0.5.1)
53
- rubocop
54
- rubocop-rspec (2.3.0)
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
- rubocop-ast (>= 1.1.0)
57
- ruby-progressbar (1.11.0)
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
- unicode-display_width (2.0.0)
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
- rake (~> 13.0)
128
+ binding_of_caller (~> 1.0)
129
+ pry (~> 0.15)
130
+ rake (~> 13.2)
70
131
  remoteok!
71
- rspec (~> 3.0)
72
- rubocop (~> 1.7)
132
+ rspec (~> 3.13)
133
+ rubocop (~> 1.69)
134
+ rubocop-performance
73
135
  rubocop-rake
74
136
  rubocop-rspec
75
- simplecov (< 0.18)
137
+ simplecov (< 0.21)
138
+ standard (~> 1.31)
76
139
 
77
140
  BUNDLED WITH
78
- 2.2.15
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
+ [![Gem Version](https://badge.fury.io/rb/remoteok.svg)](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 'bundler/gem_tasks'
4
- require 'rspec/core/rake_task'
3
+ require "bundler/gem_tasks"
4
+ require "rspec/core/rake_task"
5
5
 
6
6
  RSpec::Core::RakeTask.new(:spec)
7
7
 
8
- require 'rubocop/rake_task'
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 'bundler/setup'
5
- require 'remoteok'
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 'irb'
14
+ require "irb"
15
15
  IRB.start(__FILE__)
@@ -3,36 +3,37 @@
3
3
  module RemoteOK
4
4
  # Client class to interact with the API itself
5
5
  class Client
6
- require 'json'
7
- require 'httparty'
8
- require_relative 'job'
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] || 'https://remoteok.io/api'
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
- options = { headers: { 'User-Agent' => @user_agent } }
20
- options[:query] = params if params&.any?
21
- options[:debug_output] = $stdout if @debug
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
- response = self.class.get @base_url, options
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['legal']
32
+ @data.first["legal"]
32
33
  end
33
34
 
34
35
  def jobs(*tags)
35
- options = { tags: stringify(tags) } if tags&.any?
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.gsub('_', ' ') }.join ','
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 'date'
6
+ require "date"
7
7
 
8
8
  attr_reader :raw
9
9
 
10
- HTML_CHARS_REGEX = /<("[^"]*"|'[^']*'|[^'">])*>/.freeze
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['slug']
17
+ raw["slug"]
18
18
  end
19
19
 
20
20
  def id
21
- return unless raw['id']
21
+ return unless raw["id"]
22
22
 
23
- Integer raw['id']
23
+ Integer raw["id"]
24
24
  end
25
25
 
26
26
  def epoch
27
- return unless raw['epoch']
27
+ return unless raw["epoch"]
28
28
 
29
- Integer raw['epoch']
29
+ Integer raw["epoch"]
30
30
  end
31
31
 
32
32
  def date
33
- return unless raw['date']
33
+ return unless raw["date"]
34
34
 
35
- DateTime.parse raw['date']
35
+ DateTime.parse raw["date"]
36
36
  end
37
37
 
38
38
  def company
39
- raw['company']
39
+ raw["company"]
40
40
  end
41
41
 
42
42
  def company_logo
43
- raw['company_logo']
43
+ raw["company_logo"]
44
44
  end
45
45
 
46
46
  def position
47
- raw['position']
47
+ raw["position"]
48
48
  end
49
49
 
50
50
  def tags
51
- return unless raw['tags']
51
+ return unless raw["tags"]
52
52
 
53
- raw['tags'].map do |tag|
54
- tag.gsub(' ', '_').to_sym
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['logo']
59
+ raw["logo"]
60
60
  end
61
61
 
62
62
  def description
63
- raw['description']
63
+ raw["description"]
64
64
  end
65
65
 
66
66
  def description_text
67
- return unless raw['description']
67
+ return unless raw["description"]
68
68
 
69
- raw['description'].gsub(HTML_CHARS_REGEX, ' ').strip.gsub(/\s+/, ' ')
69
+ raw["description"].gsub(HTML_CHARS_REGEX, " ").strip.gsub(/\s+/, " ")
70
70
  end
71
71
 
72
72
  def location
73
- raw['location']
73
+ raw["location"]
74
74
  end
75
75
 
76
76
  def original
77
- raw['original']
77
+ raw["original"]
78
78
  end
79
79
 
80
80
  def url
81
- raw['url']
81
+ raw["url"]
82
82
  end
83
83
 
84
84
  def apply_url
85
- raw['apply_url']
85
+ raw["apply_url"]
86
86
  end
87
87
  end
88
88
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RemoteOK
4
- VERSION = '0.1.0'
4
+ VERSION = "0.2.0"
5
5
  end
data/lib/remoteok.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative 'remoteok/version'
4
- require_relative 'remoteok/client'
3
+ require_relative "remoteok/version"
4
+ require_relative "remoteok/client"
5
5
 
6
6
  # Module to interact with the RemoteOK API
7
7
  module RemoteOK
data/remoteok.gemspec CHANGED
@@ -1,23 +1,23 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative 'lib/remoteok/version'
3
+ require_relative "lib/remoteok/version"
4
4
 
5
5
  Gem::Specification.new do |spec|
6
- spec.name = 'remoteok'
7
- spec.version = RemoteOK::VERSION
8
- spec.authors = ['Edward Woodcock']
9
- spec.email = ['768254+RemoteCTO@users.noreply.github.com']
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 = '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')
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['homepage_uri'] = spec.homepage
20
- spec.metadata['source_code_uri'] = 'https://github.com/RemoteCTO/remote-ok-ruby'
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 = 'exe'
29
- spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
30
- spec.require_paths = ['lib']
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 'httparty', '~> 0.18.1'
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.1.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: 2021-05-04 00:00:00.000000000 Z
10
+ date: 2025-01-08 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
- name: httparty
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.1
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.18.1
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
- post_install_message:
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.15
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: []