railslove / fontello_rails_converter

CLI gem for comfortably working with icon fonts (open, download, convert) from http://fontello.com for usage in Rails apps.
MIT License
73 stars 35 forks source link

Default name for fontello name #30

Closed ka8725 closed 9 years ago

ka8725 commented 9 years ago

Seems fontello allows to create fonts without name and in our project we have the case like this one. And the config is the following:

{
  "name": "",
  "css_prefix_text": "icon-",
  "css_use_suffix": false,
  "hinting": true,
  "units_per_em": 1000,
...
}

So we have this exception:

/usr/local/opt/rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/fontello_rails_converter-0.4.0/lib/fontello_rails_converter/cli.rb:77:in `read': no implicit conversion of nil into String (TypeError)

It worked before without name, and it was fontello before. So I added the fallback.

jhilden commented 9 years ago

Thanks a lot @ka8725

I added a spec for the new behavior in 1184af859ec4fead8587c890190ab35b0bc4706a

jhilden commented 9 years ago

I just released version 0.4.1 with this fix.