Permalink
Switch branches/tags
Commits on May 12, 2017
  1. Version 0.2.0

    geoffharcourt committed May 12, 2017
    - allow nested calls to `ClimateControl.modify` within the same thread
Commits on Mar 31, 2017
  1. Make ClimateControl.modify re-entrant

    krallin authored and geoffharcourt committed Jan 24, 2017
    With the lock added in 0.4, it's no longer safe to nest calls
    `ClimateControl.modify`, which is actually a useful feature when e.g.
    using `ClimateControl` in RSpec `around { ... }` blocks. Doing so
    results in a deadlock (stack trace from the spec included in this
    commit):
    
    ```
    1) Climate control is re-entrant
       Failure/Error: ClimateControl.modify(options, &block)
       ThreadError:
         deadlock; recursive locking
       # ./lib/climate_control/modifier.rb:10:in `process'
       # ./lib/climate_control.rb:10:in `modify'
       # ./spec/acceptance/climate_control_spec.rb:131:in `with_modified_env'
       # ./spec/acceptance/climate_control_spec.rb:116:in `block (3 levels) in <top (required)>'
       # ./lib/climate_control/modifier.rb:31:in `call'
       # ./lib/climate_control/modifier.rb:31:in `run_block'
       # ./lib/climate_control/modifier.rb:13:in `block in process'
       # ./lib/climate_control/modifier.rb:10:in `process'
       # ./lib/climate_control.rb:10:in `modify'
       # ./spec/acceptance/climate_control_spec.rb:131:in `with_modified_env'
       # ./spec/acceptance/climate_control_spec.rb:115:in `block (2 levels) in <top (required)>'
       # ./spec/acceptance/climate_control_spec.rb:149:in `block (2 levels) in <top (required)>'
    ```
    
    Since the lock is here to protect against different threads accessing
    ClimateControl at the same time, it's safe for a given thread to make
    any changes it wants to the environment as long as it holds the locks,
    which is what this patch does.
Commits on Jan 7, 2017
  1. Remove activesupport

    tmichel authored and joshuaclayton committed Apr 28, 2016
  2. Implement stringify_keys

    tmichel authored and joshuaclayton committed Apr 28, 2016
    Instead of using stringify_keys from ActiveSupport implement it as a
    separate method. This also avoids monkey patching core classes.
Commits on Jan 6, 2017
  1. Clean up a test warning

    geoffharcourt authored and joshuaclayton committed Jan 5, 2017
    The warning was cluttering test output:
    
    ```
    WARNING: Using the `raise_error` matcher without providing a specific
    error or message risks false positives, since `raise_error` will match
    when Ruby raises a `NoMethodError`, `NameError` or `ArgumentError`,
    potentially allowing the expectation to pass without even executing the
    method you are intending to call. Actual error raised was
    \#<RuntimeError: broken>. Instead consider providing a specific error
    class or message. This message can be supressed by setting:
    `RSpec::Expectations.configuration.warn_about_potential_false_positives
    = false`.
    ```
  2. Update travis configuration

    joshuaclayton committed Jan 6, 2017
    This:
    
    * Removes testing of pre-2.2 Rubies
    * Adds testing for the newest 2.x releases
    * Ensures Bundler has been updated before installing gems
Commits on Mar 19, 2015
  1. tests: make SimpleCov optional

    ktdreyer authored and joshuaclayton committed Jun 11, 2014
    Skip loading SimpleCov if it is not present. This allows the tests to
    run outside of Bundler if SimpleCov is not installed.
Commits on Nov 24, 2014
Commits on Nov 20, 2014
  1. Handle TypeErrors during ENV assignment

    joshuaclayton committed Nov 19, 2014
    This introduces a new error, ClimateControl::UnassignableValueError,
    which is raised when attempting to assign a key/value to ENV which can't
    be handled.
    
    Closes #5
Commits on Nov 19, 2014
  1. Update copyright years

    joshuaclayton committed Nov 19, 2014
  2. Ignore bin dir

    joshuaclayton committed Nov 19, 2014
  3. Update dependencies

    joshuaclayton committed Nov 19, 2014
  4. Update Travis config

    joshuaclayton committed Nov 19, 2014
  5. Update quotes

    joshuaclayton committed Nov 19, 2014
  6. Clean up specs

    joshuaclayton committed Nov 19, 2014
Commits on Jul 10, 2013
  1. Drop Ruby 1.8.7

    mike-burns committed Jul 10, 2013
    In light of http://www.ruby-lang.org/en/news/2013/06/30/we-retire-1-8-7/
    we are dropping support for Ruby 1.8.7.
Commits on Jan 6, 2013
  1. Update copyright year to 2013

    Adarsh Pandit
    Adarsh Pandit committed Jan 6, 2013
Commits on Nov 30, 2012
  1. Bump version to 0.0.3

    joshuaclayton committed Nov 30, 2012
  2. Bump version to 0.0.2

    joshuaclayton committed Nov 30, 2012
  3. Make ClimateControl::Modifier#process public

    joshuaclayton committed Nov 30, 2012
    This allows for the value of the block to be returned; when process is
    called in the constructor, the ClimateControl::Modifier instance is
    returned instead, which we don't want.