Permalink
Commits on Nov 24, 2014
  1. Bump to version 0.1.0

    * Enumerable methods return Present, Blank
    * unwrap_or takes a block default
    * Obeys functor laws
    * Fix equality checks
    
    Not backwards-compatible.
    jferris committed Nov 24, 2014
  2. Enumerable methods return Present, Blank

    Returns Present or Blank where useful:
    
    * collect (same behavior as fmap)
    * each (same behavior as present)
    * find_all (convert to Blank if the block doesn't match)
    * grep (convert to Blank if the pattern doesn't match)
    * map (same behavior as fmap)
    * reject (convert to Blank if the block matches)
    * select (convert to Blank if the block doesn't match)
    
    Allows chaining Enumerable methods to get a wrapped value as well as
    combining Enumerable methods with wrapped methods like `fmap`.
    
    Producing an Array for these methods is not useful, because it's
    unlikely that you'll want zero or more items (Array) in situations where
    you started with either zero or one (Blank/Present).
    jferris committed Nov 24, 2014
Commits on Nov 13, 2014
  1. Change unwrap_or to take a block default

    * You can already modify the wrapped value using `fmap`
    * It's convenient to have blocks for lazy defaults
    * Useful for raising a specific exception for blanks
    * Breaks backwards compatibility
    jferris committed Nov 13, 2014
  2. Fix violation of functor laws

    Because `nil` exists as a singleton in Ruby, we need to preserve it when
    yielded from `fmap` in order to obey the functor laws.
    
    This ensures that:
    
        1.wrapped.fmap { nil }.unwrap_or(1)
    
    Returns `nil` and not `1`.
    jferris committed Nov 13, 2014
Commits on Oct 30, 2014
  1. Syntax highlighting in README

    tute committed with mike-burns Oct 29, 2014
  2. Update copyright with more precision

    Mike Burns originally made this in 2011. It sat around for three years,
    working perfectly fine, until Joe Ferris took it up. Now it is an
    experimental thoughtbot tool, perhaps to someday go on to be a legend in
    suspenders. Future work will happen at thoughtbot, by Mike and
    certainly by others.
    mike-burns committed Oct 30, 2014
  3. Add experimental warning to README

    Let users know that this is experimental software.
    jferris committed with mike-burns Oct 30, 2014
  4. Update RSpec

    * Use RSpec 3.1.x
    * Use expect syntax
    * Avoid operator matchers
    jferris committed with mike-burns Oct 29, 2014
  5. Fix equality checks with unwrapped objects

    Previous behavior: unwrapped comparison would raise an exception.
    
    New behavior: unwrapped comparison returns false (unequal).
    jferris committed with mike-burns Oct 29, 2014
Commits on Oct 29, 2014
  1. Bump 0.0.3

    While here, fix the README.
    mike-burns committed Oct 29, 2014
  2. Rename #try to #flat_map

    * #try already means something else in Ruby
    * #flat_map is a Rubyish name we can borrow from Scala
    jferris committed with mike-burns Oct 29, 2014
  3. Restrict gempsec to compatible RSpec versions

    After RSpec 3, `should` is not defined by default.
    jferris committed with mike-burns Oct 28, 2014
  4. Add binstubs for rspec, rake

    This allows us to avoid doing `bundle exec` for everything.
    jferris committed with mike-burns Oct 28, 2014
Commits on Oct 28, 2014
  1. Define wrapped on BasicObject

    Necessary for delegators and proxies. Without this change, you get a wrapped
    instead of the delegator/proxy target instead.
    jferris committed Oct 28, 2014
Commits on Dec 14, 2011
  1. Bump to 0.0.2: wrapped equality.

    Joe Ferris and Mike Burns committed with jferris Dec 14, 2011
  2. Equality.

    Joe Ferris and Mike Burns committed with jferris Dec 14, 2011
  3. Ignore any personalized .rspec configurations.

    Joe Ferris and Mike Burns committed with jferris Dec 14, 2011
Commits on Jul 29, 2011
  1. Some inline documentation.

    mike-burns committed Jul 29, 2011