Permalink
Commits on Mar 18, 2017
Commits on Jan 31, 2017
  1. Bump version to 0.2.5.

    Thanks for the patch @jcmfernandes!
    committed Jan 31, 2017
  2. Merge pull request #15 from jcmfernandes/preprocessor-context

    Pass context object to preprocessors
    committed on GitHub Jan 31, 2017
Commits on Jan 30, 2017
  1. Update README file

    Add instructions on how to use context objects inside
    preprocessor blocks.
    Joao Fernandes committed Jan 30, 2017
Commits on Jan 26, 2017
  1. Pass context object to preprocessors

    ATM, if one wants to access a variable with limited scope inside a
    preprocessor, the only way to do that is by creating anonymous schemas
    on-the-fly and take advantage from the fact that ruby blocks act as
    closures. Example:
    
    ```ruby
    def create_schema(offset)
      Conformist.new do
        column :numeric_value do |value|
          offset + value.to_i
        end
      end
    end
    ```
    
    This change allows developers to pass a context object (typically an hash, but
    I'm not enforcing it) to the preprocessors, without the need to continuously
    create anonymous schemas. Example:
    
    ```ruby
    SCHEMA =
      Conformist.new do
        column :numeric_value do |value, context|
          context[:offset].to_i + value.to_i
        end
      end
    
    SCHEMA.conform(something, context: {offset: 5})
    ```
    Joao Fernandes committed Dec 21, 2016
Commits on Oct 14, 2016
  1. Bump version.

    committed Oct 14, 2016
  2. Merge pull request #14 from neopoly/hash_struct-merge

    Speed up building HashStruct
    committed on GitHub Oct 14, 2016
Commits on Oct 13, 2016
  1. Ensure that we use Bundler >= 1.8.9

    Previous versions break due to this error:
    
        $ bundle
        Fetching gem metadata from http://rubygems.org/..........
        Fetching version metadata from http://rubygems.org/..
        Resolving dependencies...
        Using rake 11.3.0
        Using coderay 1.1.1
    
        NoMethodError: undefined method `spec' for nil:NilClass
        Did you mean?  inspect
        An error occurred while installing conformist (0.2.3), and Bundler
        cannot continue.
        Make sure that `gem install conformist -v '0.2.3'` succeeds before
        bundling.
    Peter Suschlik committed Oct 13, 2016
  2. Speed up building HashStruct

    Processing large amount of columns is very expensive when building HashStruct
    object over and over again.
    
    This commit removes the need of HashStruct#merge and constructs a HashStruct
    only once.
    
    This also improves performance.
    Peter Suschlik committed Oct 13, 2016
  3. Merge pull request #13 from neopoly/ruby-2.3.1

    WIP: Test Ruby 2.3.1 on Travis
    committed on GitHub Oct 13, 2016
  4. Do not test against a mock

    It seems that Ruby's behaviour has changed concerning `Array(...)`
    and calling `#to_a`.
    
    Let's remove it.
    Peter Suschlik committed Oct 13, 2016
  5. Test Ruby 2.3.1 on Travis

    Peter Suschlik committed Oct 13, 2016
Commits on May 20, 2015
  1. Merge pull request #11 from culturecode/master

    More forgiving column header matching.
    committed May 20, 2015
Commits on Mar 31, 2015
Commits on Mar 4, 2015
  1. Bump version.

    committed Mar 4, 2015
  2. Merge pull request #10 from culturecode/master

    Always return nil when named column isn't found.
    committed Mar 4, 2015
Commits on Feb 12, 2015
  1. Version bump.

    committed Feb 12, 2015
  2. Merge pull request #9 from rywall/patch-1

    Don't squeeze before matching headers.
    committed Feb 12, 2015
  3. Don't squeeze before matching headers.

    Squeeze without any arguments actually throws away ANY repeated letters, not just spaces. This is clearly not what we want. I've come to the conclusion it would be better to remove both the squeeze and the strip to avoid as much magic as possible. You can always squeeze and strip the headers externally if needed.
    rywall committed Feb 12, 2015
Commits on Jan 31, 2015
  1. Merge pull request #8 from culturecode/master

    Allow string column indexes.
    committed Jan 31, 2015
  2. Allow string column indexes.

    rywall committed Jan 31, 2015
Commits on Sep 29, 2014
  1. Merge pull request #7 from deefour/patch-1

    Bugfix for README.md example
    committed Sep 29, 2014
  2. Bugfix for README.md example

    deefour committed Sep 29, 2014
Commits on Jul 25, 2014
  1. Build against Ruby 2.1.0.

    committed Jul 25, 2014
Commits on Jun 8, 2013
  1. Add code climate badge.

    committed Jun 8, 2013
Commits on Mar 3, 2013
  1. Fix duplicate line in README.

    committed Mar 3, 2013
  2. Compatible with Ruby 2.0.0.

    committed Mar 3, 2013
  3. Test against Ruby 2.0.0.

    committed Mar 3, 2013
Commits on Dec 27, 2012