workinstartups-api 0.0.3 → 0.0.4
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/lib/workinstartups-api.rb +11 -22
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9f14933e249cfbe4ec1be5635720d0c5cfb7947d
|
4
|
+
data.tar.gz: 5a90e99301f170b78302db8b59bbd55ac99b97e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1fc391401d78c239a1152569aed55c9da32b4b69739e093f3b4b3a7d920be93d933b630f09ca8ace8f5899c88f600b018f712efbb17ac5af7134bd2310ed8c9b
|
7
|
+
data.tar.gz: 0db472f0ab8a2733663abf535cfb9eda43ac6c89a59a555c2d84efdc65755516a4dacc1f69add01eb4f5ac214631261302997d3b40f19d1b14fe8a25fd953fef
|
data/lib/workinstartups-api.rb
CHANGED
@@ -45,30 +45,19 @@ class WorkInStartupsAPI
|
|
45
45
|
# 1: randomly
|
46
46
|
def category_from_string string
|
47
47
|
stripped = string.downcase.gsub(/\W+/, '')
|
48
|
-
case stripped
|
49
|
-
when
|
50
|
-
|
51
|
-
when
|
52
|
-
|
53
|
-
when
|
54
|
-
|
55
|
-
when
|
56
|
-
|
57
|
-
when
|
58
|
-
|
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
|
48
|
+
category = case stripped
|
49
|
+
when 'all' then 0
|
50
|
+
when 'cofounder' then 16
|
51
|
+
when 'programmer' then 1
|
52
|
+
when 'designer' then 2
|
53
|
+
when 'intern' then 3
|
54
|
+
when 'tester' then 5
|
55
|
+
when 'marketer' then 7
|
56
|
+
when 'manager' then 8
|
57
|
+
when 'consultant' then 9
|
58
|
+
when 'sale' then 15
|
69
59
|
end
|
70
60
|
end
|
71
|
-
end
|
72
61
|
|
73
62
|
def create_query
|
74
63
|
base_uri = URI.parse("http://workinstartups.com/job-board/api/api.php")
|