formatafacil 0.2.1 → 0.2.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 997c01de8ab8d3795da92b79e7b4325bb353f1dd
4
- data.tar.gz: 025449718a9842bf2f739d565607a0dbf79454bf
3
+ metadata.gz: e61b69fbb38c967305f8f3d55075c082d094c97c
4
+ data.tar.gz: 35dd527393caeb8664fcefb8ae29b6bc60d88960
5
5
  SHA512:
6
- metadata.gz: c1695d8d5fc59571dbb5ab2a9fbf96ce791de6f4406186afefe1348cc0cc673122f27d0a40b86827becca12d0182c59daacda609852e28206a01f3366e9913aa
7
- data.tar.gz: 917928f215aa70c9eedee8a7901865a1aacf310db0c673ae5542ba1dc8b006433f7a814c6e360fd00fcb1898394dbf4636061e687dea8e319056620566f59ab6
6
+ metadata.gz: 746cb4e6e90100e35bdf6b0afcf653ae7a5fb3fc53fccbfc99727a3eb49bddb05fedcf0ce826d49f1e901b5085f09bdbad65a671638f96b9d8cea196d4e0eb73
7
+ data.tar.gz: bdf0fb7be6c8302f13408afe57921c2457141dd5f5fca1b70ab065ecf186334febea6579e50b5d2f990f8f08e1ad43169352d6885cadfae935dcbf04ffcbb4a4
data/CHANGELOG.md CHANGED
@@ -1,6 +1,10 @@
1
1
  # formatafacil Change Log
2
2
 
3
3
 
4
+ ## 0.2.2
5
+
6
+ - Tratamento de erros #3
7
+
4
8
  ## 0.2.1
5
9
 
6
10
  - tratamento de erros: falta de arquivos, problemas nos metadados #2
data/README.md CHANGED
@@ -61,11 +61,11 @@ Com esta aplicação você poderá gerar artigos para o SBC, monografia, dissert
61
61
 
62
62
  Lista templates:
63
63
 
64
- formatafacil modelos
64
+ formatafacil modelos
65
65
 
66
66
  Cria um diretório e estrutura de um artigo no formato do sbc:
67
67
 
68
- formatafacil cria --template=artigo-abnt
68
+ formatafacil cria --template=artigo-abnt
69
69
 
70
70
  ## make configuration easy for advanced users
71
71
 
@@ -167,7 +167,12 @@ module Formatafacil
167
167
  raise Formatafacil::ArquivoNaoEncontradoError, "Não possível encontrar o arquivo 'bibliografia.md'. Crie o arquivo com o nome apropriado e tente novamente."
168
168
  end
169
169
  begin
170
- File.open(@arquivo_metadados, 'r') {|f| @metadados = YAML.load(f.read)} if @metadados.empty?
170
+ if @metadados.empty? then
171
+ File.open(@arquivo_metadados, 'r') do |f|
172
+ metadados_lido = YAML.load(f.read)
173
+ @metadados = if metadados_lido.nil? or !metadados_lido then {} else metadados_lido end
174
+ end
175
+ end
171
176
  rescue Errno::ENOENT
172
177
  raise Formatafacil::ArquivoNaoEncontradoError, "Não possível encontrar o arquivo '#{@arquivo_metadados}'. Crie o arquivo com o nome apropriado e tente novamente."
173
178
  rescue Psych::SyntaxError
@@ -1,3 +1,3 @@
1
1
  module Formatafacil
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: formatafacil
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eduardo de Santana Medeiros Alexandre