cnpq_ws 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b4e5489e5240a0c5c9efb70cec92f125cde8f327
4
- data.tar.gz: 1df9f3302662008d87622b2b82f4f954baa4d3a0
3
+ metadata.gz: 933469b3dfb0ce652872f2b1a31a6c20fb2189eb
4
+ data.tar.gz: 18003c5d5f618da44488738a242eae0bae608136
5
5
  SHA512:
6
- metadata.gz: a1c4aac3834e741e0277561aa2657d02ff9d85dd2af4685742429ece618a71a272ee82e8ae0832106cb6f9797b5c4c9b76b68a55e14fbd4e4387b317b5d098c6
7
- data.tar.gz: 8e21665ef7e6c9f4692c95708402dca66a9ba10909e19e4bd9567396d4c02b90127345626dfcbcd48bc3b1f6919b6250902f31d684fdb103592e102c117efecb
6
+ metadata.gz: 52f287245affa3f27de38fbec720bdafd462e18287f040266922de33b50e4484c94b467f07b847d01248f2c5de7ee01bbb573d16d90d509aec2e40924cadae79
7
+ data.tar.gz: 52134bb76b14cadfae8ff47a816d5678446ad6cda3ee31013c40407a2bd74dff5da34ea462948fbb5fa28e45d7943c6f36fe6d0ab47d98ca0934af3cf2e64be9
data/.gitignore ADDED
@@ -0,0 +1,14 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ *.bundle
11
+ *.so
12
+ *.o
13
+ *.a
14
+ mkmf.log
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in cnpq_ws.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2015 Renato Carvalho de Souza
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,62 @@
1
+ # CnpqWs
2
+
3
+ Gem de apoio a respostas do serviço web CPNq (Apenas Currículos). Para esta versão, sua model Usuário precisa ter os campos cpf, name e birth_date. Contribua com seu fork para futuras versões.
4
+
5
+ ## Como usar
6
+
7
+ ### 1. Adicione no Gemfile:
8
+
9
+ ```ruby
10
+ gem 'cnpq_ws', '~> 0.0.7'
11
+ ```
12
+
13
+ ### 2. execute:
14
+
15
+ $ bundle install
16
+
17
+ ### 3. Execute o seguinte comando para gerar o arquivo de configuração:
18
+
19
+ $ rails g cnpq_ws:install
20
+
21
+ ### 4. Adicione o seguinte metodo na sua model Usuário
22
+
23
+ ```ruby
24
+ tem_curriculo_lattes
25
+ ```
26
+
27
+ ### 5. Extraia os projetos do usuario, juntamente com a equipe e financiadores
28
+
29
+ ```ruby
30
+ user = User.find(1)
31
+ user.projetos_de_pesquisa
32
+ ```
33
+
34
+ Este método retorna uma array de objetos ProjetoPesquisa, associados aos objetos Membro e Financiador.
35
+
36
+ Atributos do objeto ProjetoPesquisa:
37
+
38
+ ```ruby
39
+ sequencia_projeto, ano_inicio, ano_fim, nome_do_projeto, situacao, natureza, numero_tecnico_nivel_medio,
40
+ numero_graduacao, numero_especializacao, numero_mestrado_academico, numero_mestrado_prof, numero_doutorado,
41
+ descricao_do_projeto, descricao_do_projeto_ingles, nome_do_projeto_ingles, flag_potencial_inovacao, equipe_do_projeto,
42
+ financiadores_do_projeto
43
+ ```
44
+
45
+ Métodos do objeto ProjetoPesquisa:
46
+
47
+ ```ruby
48
+ equipe e financiadores
49
+ ```
50
+
51
+ Atributos do objeto Membro
52
+ ```ruby
53
+ nome_completo, nome_para_citacao, ordem_de_integracao, flag_responsavel
54
+ ```
55
+
56
+ Atributos do objeto Financiador
57
+
58
+ ```ruby
59
+ sequencia_financiador, codigo_instituicao, nome_instituicao, natureza
60
+ ```
61
+
62
+ ## Contribua!
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+
data/cnpq_ws.gemspec ADDED
@@ -0,0 +1,26 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'cnpq_ws/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "cnpq_ws"
8
+ spec.version = CnpqWs::VERSION
9
+ spec.authors = ["Renato Carvalho de Souza"]
10
+ spec.email = ["renato.souza@ifb.edu.br"]
11
+ spec.summary = %q{Gem de suporte a respostas do serviço web do CNPq.}
12
+ spec.description = %q{Write a longer description. Optional.}
13
+ spec.homepage = ""
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0") + Dir.glob("{lib}/**/*")
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_development_dependency "bundler", "~> 1.7"
22
+ spec.add_development_dependency "rake", "~> 10.0"
23
+
24
+ spec.add_runtime_dependency 'rubyzip', '~> 1.1', '>= 1.1.7'
25
+ spec.add_runtime_dependency 'savon', '~> 2.10', '>= 2.10.1'
26
+ end
@@ -80,7 +80,7 @@ module CnpqWs
80
80
 
81
81
  def project_activities
82
82
  project_activities = []
83
- curriculo_lattes_hash["CURRICULO_VITAE"]["DADOS_GERAIS"]["ATUACOES_PROFISSIONAIS"]["ATUACAO_PROFISSIONAL"].each do |ap|
83
+ curriculo_lattes_hash["CURRICULO_VITAE"]["DADOS_GERAIS"].fetch("ATUACOES_PROFISSIONAIS", {}).fetch("ATUACAO_PROFISSIONAL", {}).each do |ap|
84
84
  unless ap["ATIVIDADES_DE_PARTICIPACAO_EM_PROJETO"].nil?
85
85
  project_activities << ap["ATIVIDADES_DE_PARTICIPACAO_EM_PROJETO"]
86
86
  end
@@ -1,3 +1,3 @@
1
1
  module CnpqWs
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cnpq_ws
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Renato Carvalho de Souza
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-19 00:00:00.000000000 Z
11
+ date: 2015-03-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -85,6 +85,12 @@ executables: []
85
85
  extensions: []
86
86
  extra_rdoc_files: []
87
87
  files:
88
+ - ".gitignore"
89
+ - Gemfile
90
+ - LICENSE.txt
91
+ - README.md
92
+ - Rakefile
93
+ - cnpq_ws.gemspec
88
94
  - lib/cnpq_ws.rb
89
95
  - lib/cnpq_ws/curriculo_lattes.rb
90
96
  - lib/cnpq_ws/financiador.rb