firstjob 1.0.0 → 1.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.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +24 -4
- data/lib/firstjob/career.rb +1 -1
- data/lib/firstjob/career_status.rb +1 -1
- data/lib/firstjob/english_level.rb +1 -1
- data/lib/firstjob/excel_level.rb +1 -1
- data/lib/firstjob/looking_for.rb +1 -1
- data/lib/firstjob/university.rb +1 -1
- data/lib/firstjob/version.rb +1 -1
- 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: 5c3d4f275961fb7ffd3cda46804a1a3a285eed9f
|
4
|
+
data.tar.gz: bff0ef7963d29d6b531db692235776735922e677
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 71581fd9a34eaebe8e607f6a11081eb62b737832cd0e4e62dbe5d27aa805563e9bced081c5af6767acae491ff4d83437b3b40a6176369d79f77dcea0198850f4
|
7
|
+
data.tar.gz: 7e766a25b188ea937ecc4145c468838a08d28b343ae59b571a413398eec995acf0306b42d8aec5ab990696d4b9c376d92625e2d68e81a0ad53bfde9b68d51bf7
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -30,17 +30,37 @@ end
|
|
30
30
|
|
31
31
|
|
32
32
|
And more that don't need an ID. All return a json object, and raise an error (401, 404, 500) if there was one:
|
33
|
-
### Create and publish a
|
33
|
+
### Create and publish a publication
|
34
34
|
```ruby
|
35
35
|
publication = Firstjob::Publication.new(title: "Publicacion de prueba", description: "Test", looking_for_id: 1, career_status_id: 1, excel_level_id: 2, english_level_id: 2, universities_ids: [1,2], careers_ids: [1, 6])
|
36
36
|
publication.publish()
|
37
37
|
```
|
38
|
+
Returns Firstjob::Publication object with the publication.id and publication.slug issued by Firstjob.
|
38
39
|
|
39
40
|
### Get postulants of a publication
|
41
|
+
```ruby
|
42
|
+
publication = Firstjob::Publication.new
|
43
|
+
publication.id = 800 # ID of an existing publication
|
44
|
+
publication.postulants
|
45
|
+
```
|
46
|
+
Returns hash with postulants data. Example:
|
47
|
+
```ruby
|
48
|
+
=> [{"id"=>nil, "email"=>"postulant@gmail.com", "university_id"=>8,
|
49
|
+
"principal_career_id"=>1057, "career_status"=>3, "english_level"=>2,
|
50
|
+
"years_experience"=>1}, ...}]
|
51
|
+
```
|
52
|
+
### Unpublish a publication
|
53
|
+
```ruby
|
54
|
+
publication = Firstjob::Publication.new
|
55
|
+
publication.id = 800 # ID of an existing publication
|
56
|
+
publication.destroy
|
57
|
+
```
|
58
|
+
If succeded, returns the body of Firstjob response:
|
59
|
+
```ruby
|
60
|
+
=> "{\"mensaje\":\"Trabajo dado de baja\"}"
|
61
|
+
```
|
40
62
|
|
41
|
-
|
42
|
-
|
43
|
-
### Development
|
63
|
+
### Development & Testing
|
44
64
|
You can start the gem in a standalone ruby console with:
|
45
65
|
```
|
46
66
|
$ rake console
|
data/lib/firstjob/career.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
module Firstjob
|
2
2
|
class CareerStatus
|
3
|
-
CAREER_STATUSES = YAML.load_file("
|
3
|
+
CAREER_STATUSES = YAML.load_file(File.join(File.dirname(__FILE__),"../data/career_statuses.yaml"))["career_statuses"].symbolize_keys!
|
4
4
|
|
5
5
|
# Poor's man all
|
6
6
|
def self.all
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module Firstjob
|
2
2
|
class EnglishLevel
|
3
|
-
ENGLISH_LEVELS = YAML.load_file("
|
3
|
+
ENGLISH_LEVELS = YAML.load_file(File.join(File.dirname(__FILE__),"../data/english_levels.yaml"))["english_levels"].symbolize_keys!
|
4
4
|
|
5
5
|
# Poor's man all
|
6
6
|
def self.all
|
data/lib/firstjob/excel_level.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
module Firstjob
|
2
2
|
class ExcelLevel
|
3
|
-
EXCEL_LEVELS = YAML.load_file("
|
3
|
+
EXCEL_LEVELS = YAML.load_file(File.join(File.dirname(__FILE__),"../data/excel_levels.yaml"))["excel_levels"].symbolize_keys!
|
4
4
|
|
5
5
|
# Poor's man all
|
6
6
|
def self.all
|
data/lib/firstjob/looking_for.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
module Firstjob
|
2
2
|
class LookingFor
|
3
|
-
LOOKING_FORS = YAML.load_file("
|
3
|
+
LOOKING_FORS = YAML.load_file(File.join(File.dirname(__FILE__),"../data/looking_fors.yaml"))["looking_fors"].symbolize_keys!
|
4
4
|
|
5
5
|
# Poor's man all
|
6
6
|
def self.all
|
data/lib/firstjob/university.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
module Firstjob
|
2
2
|
class University
|
3
|
-
UNIVERSITIES = YAML.load_file("
|
3
|
+
UNIVERSITIES = YAML.load_file(File.join(File.dirname(__FILE__),"../data/universities.yaml"))["universities"].symbolize_keys!
|
4
4
|
|
5
5
|
# Poor's man all
|
6
6
|
def self.all
|
data/lib/firstjob/version.rb
CHANGED