Requirement cleanup + Store everything as string #65

wants to merge 12 commits into

2 participants



I made multiple changes:

  • I cleaned up a bit the dependencies. Now missing deps don't lead to a failure. I also cleaned up the Rakefile and the tests slightly, reducing the number of hard deps.
  • I included the parser.rb in the repository. I prefer to include generated code in the repository to be independent of the racc version. I think most projects do it similarly. You also don't need racc to start developing then.
  • I made modifications to store everything only as string. This change is backward incompatible and a matter of taste and style. You could pull it when you release the gem with the name bibtex or as version 3.0, then the incompatibility wouldn't matter that much. I tend to use symbols only for few things where the set is limited. I think this style is also more common in most other libraries (e.g. XML/DOM libraries etc)

Looking forward to your response :)


minad added some commits Apr 8, 2013
@minad minad minor Rakefile cleanup
- don't require yard
- don't require bundler
@minad minad don't require minitest-colorize for tests
- also removed trailing whitespace
@minad minad lazy loading of multi json 2c33288
@minad minad add the generated parsers to the repository
- This needs discussion!
- I think it is usually done like this in other projects
- Since the gem also includes the generated file, it is better like this. And then one
  also sees if something really changes in the parser.
- If someone starts developing, he doesn't need racc at first
@minad minad remove latex-decode and multi_json as hard dependencies 70443f4
@minad minad don't fail if filter cannot be loaded 5334c8d
@minad minad don't store field keys as symbols 7a54df3
@minad minad use BibTeX::Symbol instead of Symbol in values 37fe6c6
@minad minad store type as string 674d853
@minad minad use alias_method instead of alias

I also find the use of the aliases inflationary. A lot of them could be removed imho.
@minad minad remove bibtex/ruby.rb file, assuming bibtex-ruby will be renamed 138ce92
@minad minad don't require open-uri, the user can do that if he wants it 98fddad

Awesome! I'll review the changes as soon as possible.

I'm fine with making the dependencies optional – we had a few users who urged against it, but you're right that for cases where you really don't need the LaTeX conversion it's not very co-operative to force the dependency.

Good call on including the generated parsers; that's something I have been meaning to do anyway to make it easier to run the tests on JRuby.

I'm a little bit concerned about the symbol/string changes, obviously; I hope we'll be able to keep the most frequently used API backwards compatible.

Right, thanks for your input – I'll probably add a couple more comments here as soon as I have the time to work on it. This is much appreciated.

@minad minad closed this Nov 19, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment