remoteok-ruby 0.0.1

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 0e7e934ffed560a311aec943f291f49f82b6ca6e
4
+ data.tar.gz: 6b39c1be62f60a7837bfcdd7682a5fa4d43d23dd
5
+ SHA512:
6
+ metadata.gz: b87c295d91dc7a789f6c6242f3584ef4d3a8c2ed43ae41b314d573a1221ce7b90f58cbff5e86a954223b4afa55350210747791f77199532e2e509a2f6ec57026
7
+ data.tar.gz: ea6c4db871c6d71b009ef83b38d1dd318c628d3066c2aed912453e91fe5d1f4d8d71bf7adb1ed44007603a781be6ee32acd41b895c8d47361e30dfcc32fbe279
@@ -0,0 +1,2 @@
1
+ require_relative 'remoteok/client'
2
+ require_relative 'remoteok/result'
@@ -0,0 +1,16 @@
1
+ require 'httparty'
2
+ require_relative 'result'
3
+
4
+ module RemoteOk
5
+ class Client
6
+ include HTTParty
7
+
8
+ base_uri 'https://remoteok.io/index.json'
9
+
10
+ def search
11
+ results = []
12
+ self.class.get('').map { |data| results << Result.new(data: data) }
13
+ results
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,13 @@
1
+ class Result
2
+ attr_accessor :id, :date, :company, :tags, :description, :url, :logo
3
+
4
+ def initialize(attrs = {})
5
+ @id = attrs[:data]['id']
6
+ @date = attrs[:data]['date']
7
+ @company = attrs[:data]['company']
8
+ @tags = attrs[:data]['tags']
9
+ @description = attrs[:data]['description']
10
+ @url = attrs[:data]['url']
11
+ @logo = attrs[:data]['logo']
12
+ end
13
+ end
metadata ADDED
@@ -0,0 +1,46 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: remoteok-ruby
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Michael Fellows
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-05-21 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: An easy way to parse jobs on remoteok.io
14
+ email: michael@broadwaylab.com
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - lib/remoteok-ruby.rb
20
+ - lib/remoteok/client.rb
21
+ - lib/remoteok/result.rb
22
+ homepage: http://github.com/broadwaylab/remoteok-ruby
23
+ licenses:
24
+ - MIT
25
+ metadata: {}
26
+ post_install_message:
27
+ rdoc_options: []
28
+ require_paths:
29
+ - lib
30
+ required_ruby_version: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - ">="
33
+ - !ruby/object:Gem::Version
34
+ version: '0'
35
+ required_rubygems_version: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: '0'
40
+ requirements: []
41
+ rubyforge_project:
42
+ rubygems_version: 2.4.6
43
+ signing_key:
44
+ specification_version: 4
45
+ summary: A gem for parsing jobs on remoteok.io
46
+ test_files: []