useful_renderers 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 052525cae9cdad31791505f22efa0f7691bdb478
4
- data.tar.gz: f09e2434dfd4479b8fa5a4ac5235444d3bfe32e3
3
+ metadata.gz: d0e8f348db31e48deaaedb493172c2d3a75f432d
4
+ data.tar.gz: 9ac44f5b250708a8cc000929732cbd4edd6d42ff
5
5
  SHA512:
6
- metadata.gz: 063914d17ef64632809b6dbb112b815dd9c778414e2e6c47e3ca31f6b2444599b9ddc10c0d11470a2d36e388bfb01ccffbe87655f66b84b7fa84afc3fd7adfec
7
- data.tar.gz: 7769766bc1df9221900ed860b30dfbfda07981b8c57e7b162fc515a1d0dea87ec8c6bc5663a29a7586f964ecc187ffb9daa8c587c645806eede178fb90439ee7
6
+ metadata.gz: f0dcb733f9e50cedd21c98ec80938c641ba7e35a0c857b76d00aa53bc40b55ff90d6fd3bdcd607d43b65f806d066d9791215df965a95874da29bb06b6e418b03
7
+ data.tar.gz: c66102af35602691610d1b4e62798be61db9bca289f62da959f446595abd5b055c7cf4a81debe1cda09ea45d8f2308289959aec82f38a63adda5c8eae6da48c1
data/README.md CHANGED
@@ -1,10 +1,9 @@
1
1
  # UsefulRenderers
2
2
 
3
- <!-- [![Build Status](https://travis-ci.org/beerlington/render_csv.png?branch=master)](https://travis-ci.org/beerlington/render_csv)
4
- [![Gem Version](https://badge.fury.io/rb/render_csv.png)](http://badge.fury.io/rb/render_csv)
5
- [![Code Climate](https://codeclimate.com/github/beerlington/render_csv.png)](https://codeclimate.com/github/beerlington/render_csv)
6
- [![Dependency Status](https://gemnasium.com/beerlington/render_csv.png)](https://gemnasium.com/beerlington/render_csv)
7
- -->
3
+ [![Gem Version](https://badge.fury.io/rb/useful_renderers.svg)](http://badge.fury.io/rb/useful_renderers)
4
+ [![Code Climate](https://codeclimate.com/github/blueberryapps/useful_renderers/badges/gpa.svg)](https://codeclimate.com/github/blueberryapps/useful_renderers)
5
+ [![Dependency Status](https://gemnasium.com/blueberryapps/useful_renderers.svg)](https://gemnasium.com/blueberryapps/useful_renderers)
6
+
8
7
  Rails renderers
9
8
 
10
9
  - CSV renderer for ActiveRecord collections
@@ -107,7 +106,7 @@ end
107
106
 
108
107
  ## Contributing
109
108
 
110
- 1. Fork it ( https://github.com/[my-github-username]/useful_renderers/fork )
109
+ 1. Fork it ( https://github.com/blueberryapps/useful_renderers/fork )
111
110
  2. Create your feature branch (`git checkout -b my-new-feature`)
112
111
  3. Commit your changes (`git commit -am 'Add some feature'`)
113
112
  4. Push to the branch (`git push origin my-new-feature`)
@@ -1,3 +1,3 @@
1
1
  module UsefulRenderers
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -14,10 +14,10 @@ module UsefulRenderers
14
14
  send_data data, type: Mime::CSV, disposition: "attachment; filename=#{filename}.csv"
15
15
  end
16
16
 
17
- ActionController.add_renderer :zip do |csv, options|
17
+ ActionController.add_renderer :zip do |zip, options|
18
18
  filename = options[:filename] || options[:template]
19
- csv.extend UsefulRenderers::ZipRenderable
20
- data = csv.respond_to?(:to_zip) ? csv.to_csv(options) : csv
19
+ zip.extend UsefulRenderers::ZipRenderable
20
+ data = zip.respond_to?(:to_zip) ? zip.to_zip(options) : zip
21
21
  send_data data, type: Mime::Zip, disposition: "attachment; filename=#{filename}.zip"
22
22
  end
23
23
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: useful_renderers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ondrej Bartas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-04 00:00:00.000000000 Z
11
+ date: 2014-12-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails