workinstartups-api 0.0.2 → 0.0.3

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/workinstartups-api.rb +26 -0
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 59f8739034ed633718f6a38001b03f6de20cd2b0
4
- data.tar.gz: 087bf955faebfcd6e259a70323601b92852b9e8b
3
+ metadata.gz: 939e9c0faa74aaa5149fab6822845942902e4618
4
+ data.tar.gz: 91098377ab745a456d22fd9bd7437b8dc68d1072
5
5
  SHA512:
6
- metadata.gz: 4bb7811a796020a1a69efe5b0ed2bb634a521ba01b70f665552148b8fa5616694c5ce96d2ef15ad1526acb315322cdca921d6bf2766b5ad6aa5d2a3e2f53ca2b
7
- data.tar.gz: 86b31f27aaca1e1d6a487a123c13662a07d19f18a51877383ca8530656f507075e12331ad25ca36390cd9cc7b1c6c549dd626d3eb7ef458d991693ba72c9013c
6
+ metadata.gz: 24103b426401838488e168337a59daaf91bfa481232ff35910b28b5e70eaf428a04680a0c3db48141ba1201b338672c519e1b81ea4dc409c18b3e6ba85ca5464
7
+ data.tar.gz: 6d1d2ace1934990db6474e4136d99ed2ec71ac0b30c409a1ed4990e7086aab3e0b95db3864f0ae0f18412abc3cfa7648f8023a2adfde16b6ee9aeb7cfdd998df
@@ -43,6 +43,32 @@ class WorkInStartupsAPI
43
43
  # Ordering:
44
44
  # 0: by post date
45
45
  # 1: randomly
46
+ def category_from_string string
47
+ stripped = string.downcase.gsub(/\W+/, '')
48
+ case stripped
49
+ when stripped.include?'all'
50
+ 0
51
+ when stripped.include?'cofounder'
52
+ 16
53
+ when stripped.include?'programmer'
54
+ 1
55
+ when stripped.include?'designer'
56
+ 2
57
+ when stripped.include?'intern'
58
+ 3
59
+ when stripped.include?'tester'
60
+ 5
61
+ when stripped.include?'marketer'
62
+ 7
63
+ when stripped.include?'manager'
64
+ 8
65
+ when stripped.include?'consultant'
66
+ 9
67
+ when stripped.include?'sale'
68
+ 15
69
+ end
70
+ end
71
+ end
46
72
 
47
73
  def create_query
48
74
  base_uri = URI.parse("http://workinstartups.com/job-board/api/api.php")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: workinstartups-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hugo Di Francesco