texstyles 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: f6322d33732ec29a9ab905aadd33e90859bd2dcd
4
- data.tar.gz: 558e6bd483bdae22ff50a99e83d346f38e2bbbb6
3
+ metadata.gz: 9025e4823886d88868c345453223241c4efdf271
4
+ data.tar.gz: 56cfe60c20c149d388370b36999165357e372a01
5
5
  SHA512:
6
- metadata.gz: 0b4f9126637527d5d7c06a51c9aa470a6813f444a0e1a9a6d5120f83443b8a09fbd5434d8022bd065550468f266fc423511718ea78960739549c8250c3dea5b1
7
- data.tar.gz: 987675f1a8420285b51e4a8a1b1d328ff266ccbb15e9e371026ac5495fb3c3e1dad0105b9dbd34aa8480894b8965d43c5f6dc9cbecdf745038f772578ada51c4
6
+ metadata.gz: 0f6fa85b6a4ed09dd8be11dce387085855f8fec712a4e18e9553c2ad155c18dcb17a35bb0c9deabaedb74fb0582104ed11905b913c5babd950d87ffd51819459
7
+ data.tar.gz: bac35af4bf71ca82fd4fdba12bfdf25ad686ca73ca43031d688968ecea255d459e4d4f5e6cd5b5afd3269857744c6c39e41f247ae753373a5a4685fcd5575670
@@ -36,8 +36,7 @@ module Texstyles
36
36
  @short_title = options["short_title"].to_s
37
37
 
38
38
  @authors = options["authors"] || []
39
- @affiliations = options["affiliations"] || []
40
-
39
+ @affiliations = options["affiliations"] || {}
41
40
  # TODO: Refactor these together with the templates into a more elegant workflow,
42
41
  # more aware of multiple affiliations
43
42
  @authors.each do |data|
@@ -46,9 +45,11 @@ module Texstyles
46
45
  end
47
46
  @first_author_data = @authors[0] || {}
48
47
  @first_author = @first_author_data["name"].to_s
49
- @first_affiliation = @first_author_data["affiliation"].to_s
48
+ @first_affiliation = @first_author_data["affiliation"] && @affiliations[@first_author_data["affiliation"]].to_s
50
49
  @coauthor_list = @authors[1..-1].to_a.map{|data| data["name"]}
51
- @coauthor_affiliations = @authors[1..-1].to_a.map{|data| data["affiliation"]}
50
+ @coauthor_affiliations = @authors[1..-1].to_a.map do |data|
51
+ data["affiliation"] && @affiliations[data["affiliation"]].to_s
52
+ end
52
53
 
53
54
  @abstract = options["abstract"].to_s
54
55
  if !@abstract.empty?
@@ -1,7 +1,7 @@
1
1
  # coding: utf-8
2
2
  Gem::Specification.new do |spec|
3
3
  spec.name = "texstyles"
4
- spec.version = "0.0.6"
4
+ spec.version = "0.0.7"
5
5
 
6
6
  spec.authors = ["Deyan Ginev"]
7
7
  spec.email = ["deyan@authorea.com"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: texstyles
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
  - Deyan Ginev