firstjob 1.0.0
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 +7 -0
- data/.gitignore +10 -0
- data/.rspec +2 -0
- data/Gemfile +14 -0
- data/Gemfile.lock +142 -0
- data/LICENSE +22 -0
- data/README.md +52 -0
- data/Rakefile +41 -0
- data/firstjob.gemspec +32 -0
- data/lib/data/career_statuses.yaml +4 -0
- data/lib/data/careers.yaml +471 -0
- data/lib/data/english_levels.yaml +5 -0
- data/lib/data/excel_levels.yaml +5 -0
- data/lib/data/looking_fors.yaml +4 -0
- data/lib/data/universities.yaml +121 -0
- data/lib/firstjob/career.rb +15 -0
- data/lib/firstjob/career_status.rb +15 -0
- data/lib/firstjob/english_level.rb +15 -0
- data/lib/firstjob/excel_level.rb +15 -0
- data/lib/firstjob/http_parser.rb +49 -0
- data/lib/firstjob/looking_for.rb +15 -0
- data/lib/firstjob/publication.rb +97 -0
- data/lib/firstjob/university.rb +15 -0
- data/lib/firstjob/version.rb +3 -0
- data/lib/firstjob.rb +142 -0
- data/spec/firstjob_initializer_helper.rb +5 -0
- data/spec/fixtures/firstjob_fixture.rb +69 -0
- data/spec/lib/bumeran_spec.rb +174 -0
- data/spec/spec_helper.rb +29 -0
- metadata +146 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: e8ee6ac850448f739ce39bfa359084b6e3659310
|
4
|
+
data.tar.gz: 017fdb8ff9deeb4f2c7f31295933b8284bd8e5f4
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 09c25667ac35874884a7500c26278790bd8aa31a563226108f13f14f986ac146119a7590d78f77f77967a7c6d23df4b2365bd0c6827d998be3b4b56abdb5d117
|
7
|
+
data.tar.gz: 12a5e11543fba6d91c5765b5446e1594de4a4b15fdb4e1c7bdd196ebcba82a59e84fdac7765a0ac4248a0ed95b08297dea5811c1ec98bee5719360fea2c047f9
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/Gemfile
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
# Declare your gem's dependencies in bumeran.gemspec.
|
4
|
+
# Bundler will treat runtime dependencies like base dependencies, and
|
5
|
+
# development dependencies will be added by default to the :development group.
|
6
|
+
gemspec
|
7
|
+
|
8
|
+
# Declare any dependencies that are still in development here instead of in
|
9
|
+
# your gemspec. These might include edge Rails or gems from your path or
|
10
|
+
# Git. Remember to move these dependencies to your gemspec before releasing
|
11
|
+
# your gem to rubygems.org.
|
12
|
+
|
13
|
+
# To use a debugger
|
14
|
+
# gem 'byebug', group: [:development, :test]
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,142 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
firstjob (1.0.0)
|
5
|
+
httparty (>= 0.13.3)
|
6
|
+
rails (>= 3.2)
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://rubygems.org/
|
10
|
+
specs:
|
11
|
+
actionmailer (4.2.4)
|
12
|
+
actionpack (= 4.2.4)
|
13
|
+
actionview (= 4.2.4)
|
14
|
+
activejob (= 4.2.4)
|
15
|
+
mail (~> 2.5, >= 2.5.4)
|
16
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
17
|
+
actionpack (4.2.4)
|
18
|
+
actionview (= 4.2.4)
|
19
|
+
activesupport (= 4.2.4)
|
20
|
+
rack (~> 1.6)
|
21
|
+
rack-test (~> 0.6.2)
|
22
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
23
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
24
|
+
actionview (4.2.4)
|
25
|
+
activesupport (= 4.2.4)
|
26
|
+
builder (~> 3.1)
|
27
|
+
erubis (~> 2.7.0)
|
28
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
29
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
30
|
+
activejob (4.2.4)
|
31
|
+
activesupport (= 4.2.4)
|
32
|
+
globalid (>= 0.3.0)
|
33
|
+
activemodel (4.2.4)
|
34
|
+
activesupport (= 4.2.4)
|
35
|
+
builder (~> 3.1)
|
36
|
+
activerecord (4.2.4)
|
37
|
+
activemodel (= 4.2.4)
|
38
|
+
activesupport (= 4.2.4)
|
39
|
+
arel (~> 6.0)
|
40
|
+
activesupport (4.2.4)
|
41
|
+
i18n (~> 0.7)
|
42
|
+
json (~> 1.7, >= 1.7.7)
|
43
|
+
minitest (~> 5.1)
|
44
|
+
thread_safe (~> 0.3, >= 0.3.4)
|
45
|
+
tzinfo (~> 1.1)
|
46
|
+
arel (6.0.3)
|
47
|
+
builder (3.2.2)
|
48
|
+
byebug (5.0.0)
|
49
|
+
columnize (= 0.9.0)
|
50
|
+
coderay (1.1.0)
|
51
|
+
columnize (0.9.0)
|
52
|
+
diff-lcs (1.2.5)
|
53
|
+
erubis (2.7.0)
|
54
|
+
globalid (0.3.6)
|
55
|
+
activesupport (>= 4.1.0)
|
56
|
+
httparty (0.13.5)
|
57
|
+
json (~> 1.8)
|
58
|
+
multi_xml (>= 0.5.2)
|
59
|
+
i18n (0.7.0)
|
60
|
+
json (1.8.3)
|
61
|
+
loofah (2.0.3)
|
62
|
+
nokogiri (>= 1.5.9)
|
63
|
+
mail (2.6.3)
|
64
|
+
mime-types (>= 1.16, < 3)
|
65
|
+
method_source (0.8.2)
|
66
|
+
mime-types (2.6.1)
|
67
|
+
mini_portile (0.6.2)
|
68
|
+
minitest (5.8.0)
|
69
|
+
multi_xml (0.5.5)
|
70
|
+
nokogiri (1.6.6.2)
|
71
|
+
mini_portile (~> 0.6.0)
|
72
|
+
pry (0.10.1)
|
73
|
+
coderay (~> 1.1.0)
|
74
|
+
method_source (~> 0.8.1)
|
75
|
+
slop (~> 3.4)
|
76
|
+
pry-byebug (3.2.0)
|
77
|
+
byebug (~> 5.0)
|
78
|
+
pry (~> 0.10)
|
79
|
+
rack (1.6.4)
|
80
|
+
rack-test (0.6.3)
|
81
|
+
rack (>= 1.0)
|
82
|
+
rails (4.2.4)
|
83
|
+
actionmailer (= 4.2.4)
|
84
|
+
actionpack (= 4.2.4)
|
85
|
+
actionview (= 4.2.4)
|
86
|
+
activejob (= 4.2.4)
|
87
|
+
activemodel (= 4.2.4)
|
88
|
+
activerecord (= 4.2.4)
|
89
|
+
activesupport (= 4.2.4)
|
90
|
+
bundler (>= 1.3.0, < 2.0)
|
91
|
+
railties (= 4.2.4)
|
92
|
+
sprockets-rails
|
93
|
+
rails-deprecated_sanitizer (1.0.3)
|
94
|
+
activesupport (>= 4.2.0.alpha)
|
95
|
+
rails-dom-testing (1.0.7)
|
96
|
+
activesupport (>= 4.2.0.beta, < 5.0)
|
97
|
+
nokogiri (~> 1.6.0)
|
98
|
+
rails-deprecated_sanitizer (>= 1.0.1)
|
99
|
+
rails-html-sanitizer (1.0.2)
|
100
|
+
loofah (~> 2.0)
|
101
|
+
railties (4.2.4)
|
102
|
+
actionpack (= 4.2.4)
|
103
|
+
activesupport (= 4.2.4)
|
104
|
+
rake (>= 0.8.7)
|
105
|
+
thor (>= 0.18.1, < 2.0)
|
106
|
+
rake (10.4.2)
|
107
|
+
rspec (3.3.0)
|
108
|
+
rspec-core (~> 3.3.0)
|
109
|
+
rspec-expectations (~> 3.3.0)
|
110
|
+
rspec-mocks (~> 3.3.0)
|
111
|
+
rspec-core (3.3.2)
|
112
|
+
rspec-support (~> 3.3.0)
|
113
|
+
rspec-expectations (3.3.1)
|
114
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
115
|
+
rspec-support (~> 3.3.0)
|
116
|
+
rspec-mocks (3.3.2)
|
117
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
118
|
+
rspec-support (~> 3.3.0)
|
119
|
+
rspec-support (3.3.0)
|
120
|
+
slop (3.6.0)
|
121
|
+
sprockets (3.3.3)
|
122
|
+
rack (~> 1.0)
|
123
|
+
sprockets-rails (2.3.2)
|
124
|
+
actionpack (>= 3.0)
|
125
|
+
activesupport (>= 3.0)
|
126
|
+
sprockets (>= 2.8, < 4.0)
|
127
|
+
thor (0.19.1)
|
128
|
+
thread_safe (0.3.5)
|
129
|
+
tzinfo (1.2.2)
|
130
|
+
thread_safe (~> 0.1)
|
131
|
+
|
132
|
+
PLATFORMS
|
133
|
+
ruby
|
134
|
+
|
135
|
+
DEPENDENCIES
|
136
|
+
firstjob!
|
137
|
+
pry-byebug
|
138
|
+
rake
|
139
|
+
rspec
|
140
|
+
|
141
|
+
BUNDLED WITH
|
142
|
+
1.10.5
|
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 Rodrigo Fernandez
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
22
|
+
|
data/README.md
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
# Firstjob
|
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 new 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
|
+
|
39
|
+
### Get postulants of a publication
|
40
|
+
|
41
|
+
Work in progress...
|
42
|
+
|
43
|
+
### Development
|
44
|
+
You can start the gem in a standalone ruby console with:
|
45
|
+
```
|
46
|
+
$ rake console
|
47
|
+
```
|
48
|
+
|
49
|
+
And you can manually configure the gem in:
|
50
|
+
```
|
51
|
+
spec/firstjob_initializer_helper.rb
|
52
|
+
```
|
data/Rakefile
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
begin
|
2
|
+
require 'bundler/setup'
|
3
|
+
rescue LoadError
|
4
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
5
|
+
end
|
6
|
+
|
7
|
+
require 'rdoc/task'
|
8
|
+
|
9
|
+
RDoc::Task.new(:rdoc) do |rdoc|
|
10
|
+
rdoc.rdoc_dir = 'rdoc'
|
11
|
+
rdoc.title = 'Firstjob'
|
12
|
+
rdoc.options << '--line-numbers'
|
13
|
+
rdoc.rdoc_files.include('README.rdoc')
|
14
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
15
|
+
end
|
16
|
+
|
17
|
+
Bundler::GemHelper.install_tasks
|
18
|
+
|
19
|
+
require "bundler/gem_tasks"
|
20
|
+
require "rspec/core/rake_task"
|
21
|
+
|
22
|
+
RSpec::Core::RakeTask.new
|
23
|
+
|
24
|
+
task :default => :spec
|
25
|
+
task :test => :spec
|
26
|
+
task :console do
|
27
|
+
require 'irb'
|
28
|
+
require 'irb/completion'
|
29
|
+
require './lib/firstjob'
|
30
|
+
|
31
|
+
def reload!
|
32
|
+
files = $LOADED_FEATURES.select { |feat| feat =~ %r{/firstjob/} }
|
33
|
+
files.each { |file| load file }
|
34
|
+
end
|
35
|
+
|
36
|
+
load './spec/firstjob_initializer_helper.rb'
|
37
|
+
|
38
|
+
ARGV.clear
|
39
|
+
IRB.start
|
40
|
+
end
|
41
|
+
|
data/firstjob.gemspec
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
$:.push File.expand_path("../lib", __FILE__)
|
2
|
+
|
3
|
+
# Maintain your gem's version:
|
4
|
+
require "firstjob/version"
|
5
|
+
|
6
|
+
# Describe your gem and declare its dependencies:
|
7
|
+
Gem::Specification.new do |s|
|
8
|
+
s.name = "firstjob"
|
9
|
+
s.version = Firstjob::VERSION
|
10
|
+
s.authors = ["Rodrigo Fernandez"]
|
11
|
+
s.email = ["chaotiklv@gmail.com"]
|
12
|
+
s.homepage = "https://github.com/rfernand/firstjob"
|
13
|
+
s.summary = "A gem to access the Firstjob api"
|
14
|
+
s.description = "A gem to access the Firstjob api"
|
15
|
+
s.license = "MIT"
|
16
|
+
|
17
|
+
#s.files = Dir["{app,config,db,lib}/**/*", "MIT-LICENSE", "Rakefile", "README.rdoc"]
|
18
|
+
#s.test_files = Dir["test/**/*"]
|
19
|
+
|
20
|
+
s.files = `git ls-files`.split("\n")
|
21
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
22
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
23
|
+
s.require_paths = ["lib"]
|
24
|
+
|
25
|
+
s.add_dependency "rails", ">= 3.2"
|
26
|
+
s.add_dependency "httparty", ">= 0.13.3"
|
27
|
+
#s.add_dependency "activesupport", "3.2.19"
|
28
|
+
|
29
|
+
s.add_development_dependency 'rake'
|
30
|
+
s.add_development_dependency "rspec"
|
31
|
+
s.add_development_dependency "pry-byebug"
|
32
|
+
end
|