Sha256: 396327b152706ea39ccdec9a18a085e383224a85aa796dd6e059b47349d8067a

Contents?: true

Size: 1.54 KB

Versions: 1

Compression:

Stored size: 1.54 KB

Contents

# Change Log

All notable changes to this project will be documented in this file.

## Unreleased

## [0.2.0] - 2015-07-24

### Added

* `after_save` callback.

```ruby
progress_bar = ProgressBar.new

UserImport.new(file: my_file) do
  after_save do |user|
    progress_bar.increment
  end
end
```

* You can define a composite identifier made of multiple columns.

```ruby
  # Update records with matching company_id AND employee_id
  identifier :company_id, :employee_id
```

* You can set a custom `quote_char` at runtime. ([#26][] by [@shvetsovdm][])

```ruby
UserImport.new(file: csv_file, quote_char: "'")
```

## [0.1.3] - 2015-06-19

### Added

* You can now change the configuration at runtime. Example:

```ruby
UserImport.new(file: csv_file) do
  after_build do
    user.import_by_user = current_user
  end
end
```

* Add `after_build` hooks to perform arbitrary operations on a model
before saving it.

* `identifier` does not have to be a required attribute anymore. That
  enables you to use `id` as an identifier and import new entries
without having to provide an `id`

## [0.1.2] - 2015-06-15

### Fixed

* `run!` was not *returning* a report object when the header was invalid.

## [0.1.1] - 2015-06-12

### Changed

* When calling `run!` on an import with invalid header we update the
report object instead of raising an exception.

## [0.1.0] - 2015-06-11

* Initial Release

<!--- The following link definition list is generated by PimpMyChangelog --->
[#26]: https://github.com/BrewhouseTeam/csv-importer/issues/26
[@shvetsovdm]: https://github.com/shvetsovdm

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
csv-importer-0.2.0 CHANGELOG.md