firstjob 1.0.1 → 1.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/Gemfile.lock +1 -1
- data/README.md +1 -72
- data/firstjob.gemspec +5 -0
- data/lib/firstjob/version.rb +1 -1
- metadata +6 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6f1a9fab969868ce29a8021cb0e5903dc4e8f714
|
4
|
+
data.tar.gz: 296df5062ac136d114337de8f7ba3fedda59ba38
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c775378e7c74272388ffbf77a2d795f458e75069cec424b6c2541aab2a9a80c2198229a81ce9e4a8b7668e633c7ae2c9f0dba7d4db1fbe33633ed4b1815706ef
|
7
|
+
data.tar.gz: fbec5f0dee803f548e6839ab8cd4e5d6ba3f5b1548c4fa923825aa0c552ce1816b02598de12e7c6ec3192a9e8b4ed0941985fc9d53f118b5ff131fb9a0481f72
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,72 +1 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
This gem was made to connect to the Firstjob api found in https://developers.firstjob.com
|
4
|
-
|
5
|
-
## Getting started
|
6
|
-
|
7
|
-
Firstjob works with Rails 3.2 onwards. You can add it to your Gemfile with:
|
8
|
-
|
9
|
-
```ruby
|
10
|
-
gem 'firstjob'
|
11
|
-
```
|
12
|
-
|
13
|
-
...or can fetch the latest developer version with:
|
14
|
-
|
15
|
-
```ruby
|
16
|
-
gem 'firstjob', :git => 'git@github.com:rfernand/firstjob.git', :branch => 'master'
|
17
|
-
```
|
18
|
-
### Configuration
|
19
|
-
|
20
|
-
After you finished the gem installation, you need to configure it with your Firstjob user information. You can do it filling a file like config/initializers/firstjob.rb with:
|
21
|
-
|
22
|
-
```ruby
|
23
|
-
Firstjob.setup do |config|
|
24
|
-
config.username = "" # Firstjob client username
|
25
|
-
config.password = "" # Firstjob client password
|
26
|
-
config.base_uri "" # You need to provide the URL for the endpoint of the Firstjob API
|
27
|
-
end
|
28
|
-
```
|
29
|
-
## How to use
|
30
|
-
|
31
|
-
|
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 publication
|
34
|
-
```ruby
|
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
|
-
publication.publish()
|
37
|
-
```
|
38
|
-
Returns Firstjob::Publication object with the publication.id and publication.slug issued by Firstjob.
|
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
|
-
```
|
62
|
-
|
63
|
-
### Development & Testing
|
64
|
-
You can start the gem in a standalone ruby console with:
|
65
|
-
```
|
66
|
-
$ rake console
|
67
|
-
```
|
68
|
-
|
69
|
-
And you can manually configure the gem in:
|
70
|
-
```
|
71
|
-
spec/firstjob_initializer_helper.rb
|
72
|
-
```
|
1
|
+
Moved to [firstjob_api](https://github.com/rfernand/firstjob_api).
|
data/firstjob.gemspec
CHANGED
@@ -29,4 +29,9 @@ Gem::Specification.new do |s|
|
|
29
29
|
s.add_development_dependency 'rake'
|
30
30
|
s.add_development_dependency "rspec"
|
31
31
|
s.add_development_dependency "pry-byebug"
|
32
|
+
s.post_install_message = <<-MESSAGE
|
33
|
+
! The 'firstjob' gem has been deprecated and has been replaced by 'firstjob_api'.
|
34
|
+
! See: https://rubygems.org/gems/firstjob_api
|
35
|
+
! And: https://github.com/rfernand/firstjob_api
|
36
|
+
MESSAGE
|
32
37
|
end
|
data/lib/firstjob/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: firstjob
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rodrigo Fernandez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-01-
|
11
|
+
date: 2017-01-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -119,7 +119,10 @@ homepage: https://github.com/rfernand/firstjob
|
|
119
119
|
licenses:
|
120
120
|
- MIT
|
121
121
|
metadata: {}
|
122
|
-
post_install_message:
|
122
|
+
post_install_message: |2
|
123
|
+
! The 'firstjob' gem has been deprecated and has been replaced by 'firstjob_api'.
|
124
|
+
! See: https://rubygems.org/gems/firstjob_api
|
125
|
+
! And: https://github.com/rfernand/firstjob_api
|
123
126
|
rdoc_options: []
|
124
127
|
require_paths:
|
125
128
|
- lib
|