Skip to content
This repository has been archived by the owner on Nov 23, 2018. It is now read-only.

LANG Variable Setter (needed for MiniMagick) #3

Merged
3 commits merged into from Mar 4, 2011

Commits on Feb 28, 2011

  1. We don't always *literally* want to run a test if

    we load up the same environment. So, splitting these
    up. This is needed for making Benchmark its own thing
    and not part of the test suite.
    HamptonMakes committed Feb 28, 2011
    Configuration menu
    Copy the full SHA
    af0854e View commit details
    Browse the repository at this point in the history
  2. Benchmark is now its own thing and can be run directly or with rake.

    This is good because the test output was all messed up and was
    much slower because of the benchmarks. With this... rake test
    is NOT a way to run benchmark. It just runs the literal tests
    with pretty output.
    HamptonMakes committed Feb 28, 2011
    Configuration menu
    Copy the full SHA
    522cee4 View commit details
    Browse the repository at this point in the history
  3. We can now specifiy what LANG environment variable

    we want passed in to the Process command. It now defaults
    to "C" if nothing is passed in. 
    
    The issue with this is, if you are writing a tool that
    integrates with a UNIX utility (that's why you are using
    subexec afterall!) and your user's system has a LANG
    variable set that isn't what you built the system for,
    then parsing output can be an issue. 
    
    So, a user in france runs "identify" and the output is
    in french instead of English. Your library needs a standard
    output to parse. Hence, "C" is used as this standard output
    in most UNIX utils. Usually its the same as "en_US", but it
    can vary. 
    
    Or, you can pass in a :lang variable when you call run.
    
    Subexec.run "echo $LANG", :lang => "en_GB"
    
    It will set the language for that ONE command. Your 
    overall environment won't be effected.
    
    Wrote tests for all of this.
    HamptonMakes committed Feb 28, 2011
    Configuration menu
    Copy the full SHA
    2d7dbdc View commit details
    Browse the repository at this point in the history