mguymon / lock_jar

LockJar manages Java Jars for Ruby
http://mguymon.github.io/lock_jar/
Apache License 2.0
46 stars 9 forks source link

Sorted YAML output #3

Closed chetan closed 12 years ago

chetan commented 12 years ago

Small patch to sort the YAML output in Jarfile.lock. Having all the keys & jar entries sorted makes it much easier to diff when making changes and to compare against older revisions.

mguymon commented 12 years ago

Nice, I will merge this in and update the tests.

mguymon commented 12 years ago

Malformed yaml is being produced, the ... causes JRuby to toss an error and MRI to ignore everything after it

---
repositories:
- http://repo1.maven.org/maven2/
... 
scopes:
   compile:
     dependencies:
     - com.fasterxml.jackson.core:jackson-core:2.0.6
     - com.fasterxml.jackson.core:jackson-databind:2.0.6
     resolved_dependencies:
     - com.fasterxml.jackson.core:jackson-annotations:jar:2.0.6
     - com.fasterxml.jackson.core:jackson-core:jar:2.0.6
     - com.fasterxml.jackson.core:jackson-databind:jar:2.0.6
chetan commented 12 years ago

Odd, where does the "..." come from? Can you post the Jarfile? I'll take a look.

mguymon commented 12 years ago

Yeah, it is strange. Looks like something i18n_yaml_sorter is adding?

It is from the Jarfile used for the tests - https://github.com/mguymon/lock_jar/blob/master/spec/Jarfile

chetan commented 12 years ago

Weird. I'm testing with MRI 1.8.7 and lockjar produces the correct output when I run it against that Jarfile. Haven't tried JRuby yet.

Looks like tests are failing for me but they fail w/o my changes as well, so I'm guessing these may be ENV related.