useful_renderers 0.0.3 → 0.0.4
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 +4 -4
- data/README.md +5 -6
- data/lib/useful_renderers/version.rb +1 -1
- data/lib/useful_renderers.rb +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d0e8f348db31e48deaaedb493172c2d3a75f432d
|
|
4
|
+
data.tar.gz: 9ac44f5b250708a8cc000929732cbd4edd6d42ff
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f0dcb733f9e50cedd21c98ec80938c641ba7e35a0c857b76d00aa53bc40b55ff90d6fd3bdcd607d43b65f806d066d9791215df965a95874da29bb06b6e418b03
|
|
7
|
+
data.tar.gz: c66102af35602691610d1b4e62798be61db9bca289f62da959f446595abd5b055c7cf4a81debe1cda09ea45d8f2308289959aec82f38a63adda5c8eae6da48c1
|
data/README.md
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
# UsefulRenderers
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
[](http://badge.fury.io/rb/useful_renderers)
|
|
4
|
+
[](https://codeclimate.com/github/blueberryapps/useful_renderers)
|
|
5
|
+
[](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/
|
|
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`)
|
data/lib/useful_renderers.rb
CHANGED
|
@@ -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 |
|
|
17
|
+
ActionController.add_renderer :zip do |zip, options|
|
|
18
18
|
filename = options[:filename] || options[:template]
|
|
19
|
-
|
|
20
|
-
data =
|
|
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.
|
|
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-
|
|
11
|
+
date: 2014-12-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|