as_csv 2.0.1 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4d42e156f1d67a08429e702174565e9b9790dd26
4
- data.tar.gz: 34f15ff95d6a14f7498f86af25ef0e245aa20ea2
3
+ metadata.gz: 5286ae39a5fc09dac9e92a8cd97e3c3ff88b9115
4
+ data.tar.gz: 97362f687b28ee4734d89aaf0a6e36f0dd31f6c0
5
5
  SHA512:
6
- metadata.gz: 370cafb8ca291e3eaae5b5e83343e388602c23d00ab1ca90e24e20026f3d4df21a604ee8e339223468b7d382c305ba2fc093ece5dd3ecb285246a021da552b2e
7
- data.tar.gz: 06e15f34dd43979e0aa577b5de352cbe26fb7445aa28edf301fbffaa6d3e1aa88d8bf244121ef9c3751e4800f3db72415eebb56de9767b2734cd9849b8c55e09
6
+ metadata.gz: fcde99eea906d30932c5a1ca484b2f0832f628e41d4f98735723657973c9688a4b7e558d04cf803b8f37f71e12b411345d0396d6c95f6c71a40a32cefc02fb5c
7
+ data.tar.gz: 8bbb23771b9173494b54e3aa001dcab49d83f87bb4b922b49c3667dbb57bae53b31ccc50c905297cfdd44a8060b702f30136af27ef2967b448df3169f24cd073
@@ -3,21 +3,25 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  This project adheres to [Semantic Versioning](http://semver.org/).
5
5
 
6
- ## [Unreleased][unreleased]
6
+ ## [2.0.2] - 2015-03-21
7
7
 
8
- - Nothing currently
8
+ ### Changed
9
+
10
+ - CSV responses will now be sent with 'Content-Disposition: attachment'
9
11
 
10
12
  ## [2.0.1] - 2015-03-21
11
13
 
12
14
  ### Added
13
15
 
14
- - Allow options to be passed-through to CSV. e.g. `puts (Foo.all + Bar.all).to_csv csv_options: {col_sep:'|'}`
15
- - This changelog (sorry if you care about what happened before then)
16
+ - Allow options to be passed-through to CSV. e.g. `puts (Foo.all + Bar.all).to_csv csv_options: {col_sep:'|'}` ([#4])
17
+ - This changelog
16
18
 
17
19
  ## [2.0.0] - Sometime
18
20
 
19
21
  - Pretty sure this is actually backwards compat. Sorry.
20
22
 
21
- [unreleased]: https://github.com/danielfone/as_csv/compare/v2.0.1...HEAD
23
+ [2.0.2]: https://github.com/danielfone/as_csv/compare/v2.0.1...v2.0.2
22
24
  [2.0.1]: https://github.com/danielfone/as_csv/compare/v2.0.0...v2.0.1
23
25
  [2.0.0]: https://github.com/danielfone/as_csv/compare/v1.0.2...v2.0.0
26
+
27
+ [#4]: https://github.com/danielfone/as_csv/pull/4
data/README.md CHANGED
@@ -1,12 +1,13 @@
1
1
  # AsCSV
2
2
 
3
- [![Build Status](https://travis-ci.org/danielfone/as_csv.png)](https://travis-ci.org/danielfone/as_csv)
4
- [![Dependency Status](https://gemnasium.com/danielfone/as_csv.png)](https://gemnasium.com/danielfone/as_csv)
5
- [![Code Climate](https://codeclimate.com/github/danielfone/as_csv.png)](https://codeclimate.com/github/danielfone/as_csv)
3
+ [![Gem Version](https://badge.fury.io/rb/as_csv.svg)](http://badge.fury.io/rb/as_csv)
4
+ [![Build Status](https://travis-ci.org/danielfone/as_csv.svg)](https://travis-ci.org/danielfone/as_csv)
5
+ [![Dependency Status](https://gemnasium.com/danielfone/as_csv.svg)](https://gemnasium.com/danielfone/as_csv)
6
+ [![Code Climate](https://codeclimate.com/github/danielfone/as_csv/badges/gpa.svg)](https://codeclimate.com/github/danielfone/as_csv)
6
7
 
7
8
  This gem allows you to expose CSV in your apps as you'd expose JSON or XML.
8
9
 
9
- Rails is not strictly required, but currently the magic only works with rails 3.x.
10
+ Rails is not strictly required, but currently the magic only works with Rails > 3.x.x.
10
11
 
11
12
  Ruby 1.8 will work, but by default the order of the columns will not be guaranteed.
12
13
 
@@ -15,7 +16,7 @@ Ruby 1.8 will work, but by default the order of the columns will not be guarante
15
16
  Add this line to your application's Gemfile:
16
17
 
17
18
  ```ruby
18
- gem 'as_csv'
19
+ gem 'as_csv', '~> 2.0'
19
20
  ```
20
21
 
21
22
  ## Basic Usage
@@ -159,7 +160,7 @@ bar1,bar1-description,,acb12345
159
160
  bar2,bar2-description,,xyz98765
160
161
  ```
161
162
 
162
- ### stdlib CSV options
163
+ ### Stdlib CSV options
163
164
  If you need to pass any [options](http://docs.ruby-lang.org/en/2.0.0/CSV.html#method-c-new)
164
165
  to the underlying CSV library:
165
166
 
@@ -11,5 +11,6 @@ module ActiveModel::Serialization
11
11
  end
12
12
 
13
13
  ActionController::Renderers.add :csv do |obj, options|
14
+ response.headers['Content-Disposition'] = 'attachment'
14
15
  obj.respond_to?(:to_csv) ? obj.to_csv(options) : obj
15
16
  end
@@ -1,3 +1,3 @@
1
1
  module AsCSV
2
- VERSION = "2.0.1"
2
+ VERSION = "2.0.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: as_csv
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Fone
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-20 00:00:00.000000000 Z
11
+ date: 2015-10-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -194,7 +194,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
194
194
  version: '0'
195
195
  requirements: []
196
196
  rubyforge_project:
197
- rubygems_version: 2.4.6
197
+ rubygems_version: 2.4.8
198
198
  signing_key:
199
199
  specification_version: 4
200
200
  summary: Instant CSV support for Rails