Permalink
Commits on Sep 7, 2017
  1. docs: updated RELEASING.md

    bethesque committed Sep 7, 2017
  2. docs: add RELEASING.md

    bethesque committed Sep 7, 2017
  3. chore: correct spelling of 'rescuable'

    bethesque committed Sep 7, 2017
    As pointed out by @r-obert in #247 (comment)
  4. test: fixed failing exception handling test

    bethesque committed Sep 7, 2017
    As described in #247 (comment)
Commits on Aug 26, 2017
  1. Merge pull request #245 from bethesque/lock-gems

    bethesque committed Aug 26, 2017
    Lock gems
Commits on Aug 24, 2017
  1. Merge pull request #247 from webmachine/extend-exception-handling-sup…

    bethesque committed Aug 24, 2017
    …port
    
    Extend exception handling support.
Commits on Aug 22, 2017
  1. Extend exception handling support.

    r-obert committed Aug 22, 2017
    After this commit, the following scenarios are covered in addition to the
    existing rescueable exceptions:
    
    class Resource < Webmachine::Resource
      def resource_exists?
        require 'foo'
      end
    
      def handle_exception(e)
        Airbrake.notify(e)
      end
    end
    
    class Resource < Webmachine::Resource
      ThirdPartyLibException = Class.new(Exception)
    
      def resource_exists?
        raise ThirdPartyLibException, "error by some third party lib we dont control"
      end
    
      def handle_exception(e)
        Airbrake.notify(e)
      end
    end
    
    The following exceptions are not rescueable, by default:
    Webmachine::MalformedRequest, SystemExit, SignalException, & NoMemoryError.
    
    However, this is now configurable:
    
    class Resource < Webmachine::Resource
      Webmachine::RescueableException.add(Webmachine::MalformedRequest)
    
      def handle_exception(e)
        # Now we can add custom handlers for Webmachine::MalformedRequest.
        # Formely not possible to customize how this exception is handled.
      end
    end
Commits on Aug 18, 2017
  1. Merge pull request #218 from bethesque/tests-for-exception-handling

    bethesque committed Aug 18, 2017
    Added tests for Exception handling.
Commits on Aug 14, 2017
  1. Merge pull request #246 from bethesque/chore/convert-fixnum-to-integer

    bethesque committed Aug 14, 2017
    fix: use Integer instead of Fixnum
  2. Merge branch 'master' of github.com:webmachine/webmachine-ruby into t…

    bethesque committed Aug 14, 2017
    …ests-for-exception-handling
  3. fix: use Integer instead of Fixnum

    bethesque committed Aug 14, 2017
    This removes 'Warning: constant ::Fixnum is deprecated' in ruby >= 2.4.0
  4. chore: update supported rubies

    bethesque committed Aug 14, 2017
    Drop 1.9.3, 2.0.0, 2.1.2, 2.2.0
    Add 2.2.2 and 2.4.1
    Ruby 2.1 is no longer supported, and < 2.2.2 doesn't work with latest rack gem
  5. chore: lock all other darwin gems

    bethesque committed Aug 14, 2017
    Without locks to stop major version changes being picked up, the build
    will break when backwards incompatible changes are released by any of the gems
  6. chore: lock rspec and rake gems

    bethesque committed Aug 14, 2017
    rake spec task needs certain versions of rspec/rake to work correctly.
    Otherwise it may fail with the error: undefined method last_comment for Rake::Application
Commits on Apr 7, 2017
Commits on Jan 30, 2017
  1. Merge pull request #240 from rfestag/master

    seancribbs committed Jan 30, 2017
    Fixing multiple cookie handling
  2. Updated to simplify set cookie, creating fewer edge cases. Removing p…

    rfestag committed Jan 30, 2017
    …uts statements in tests
  3. Fixing multiple cookie setting code, updating test to verify all thre…

    rfestag committed Jan 30, 2017
    …e cases in set_cookie
Commits on May 4, 2016
  1. Merge pull request #238 from rfestag/add_named_captures_support

    seancribbs committed May 4, 2016
    Added support for named captures
Commits on May 1, 2016
Commits on Apr 25, 2016
  1. Merge pull request #235 from rfestag/allow_regex_path_elements

    Asmod4n committed Apr 25, 2016
    Added support for regex in path spec.
Commits on Apr 24, 2016
  1. Merge pull request #233 from webmachine/build-tidiness

    Asmod4n committed Apr 24, 2016
    Build tidiness
Commits on Apr 23, 2016
  1. Allow Rubinius to fail

    rgarner committed Apr 23, 2016
    For reasons we can't currently fathom, Rubinius has a tendency to fail
    the build. Rather than let this continue to be the case, until such
    time as someone has time to figure out precisely why, unblock other PRs
    by letting builds pass with MRI Rubies for now.
  2. Added support for regex in path spec. Supports adding :captures path_…

    rfestag committed Apr 23, 2016
    …info element for any capture groups
Commits on Apr 9, 2016
  1. Add ruby 2.2.0 to .travis.yml

    rgarner committed Apr 9, 2016
Commits on Apr 7, 2016
  1. Revert back to before(:all) for adapter_lint

    rgarner committed Apr 7, 2016
    Using let-style RSpec and lazily creating our servers before every
    test is good from a test purity point of view but increases greatly the
    risk of port collisions when we attempt to find a free port to run
    our adapter in adapter_lint (bearing in mind that Socket#close only
    releases the Ruby resources, and the socket persists in a TIME_WAIT
    state for an indeterminate period of time at OS level).
    
    Revert to before(:all) and create only one server that will be used
    for the duration of all tests in adapter_lint. We still need to sleep
     to ensure our 'free' ports are available, but we reduce the risk of
     servers being unavailable. This also has the happy side effect of
     making the tests somewhat faster.
Commits on Apr 6, 2016
  1. Fix port collisions in adapter_lint

    rgarner committed Apr 6, 2016
    In order to 'reserve' a free TCP Server port, we create a TCPServer,
    take a note of its port number, and then immediately close it.
    We'd then ask our adapter to use the port we just finished with via
    that adapter's configuration.
    
    While this isn't a particularly safe way of 'reserving' a port,
    it's the best we can do with heterogeneous adapters that have a one-way
    config method.
    
    However, this would cause intermittent test failures when our 'canary'
    socket did not get out of the way in time for an adapter to bind its
    server. Socket#close does not actually block until the socket is
    closed at OS level, it just frees the Ruby handle to it.
    
    Actually waiting for the socket to become free or garbage-collecting
    it to force the issue is counterproductive – we'd need to poll the port
    or run a full GC, which would take more time than a
    simple sleep. Additionally, the sleep needs to be tuned so that tests
     are not unduly slowed by it – too quick and we'll see failures, too
     slow and our builds will reflect it.
  2. Update bundler before install

    rgarner committed Apr 6, 2016
    * Avoids NoMethodError: undefined method `spec' for nil:NilClass
    * Similar approach used in thoughtbot/factory_bot@3c0547f
Commits on Apr 5, 2016
  1. Add ruby 2.3.0 to travis.yml

    rgarner committed Apr 5, 2016
  2. Don't run celluloid in backported mode

    rgarner committed Apr 5, 2016
    * http://git.io/vJf3J
    * This appears consistently to fix the red Reel tests