comma 4.0.0 → 4.0.1
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/Gemfile.lock +1 -1
- data/README.markdown +4 -11
- data/gemfiles/active4.0.13.gemfile.lock +1 -1
- data/gemfiles/active4.1.16.gemfile.lock +1 -1
- data/gemfiles/active4.2.7.1.gemfile.lock +1 -1
- data/gemfiles/active5.0.0.1.gemfile.lock +1 -1
- data/gemfiles/rails4.0.13.gemfile.lock +1 -1
- data/gemfiles/rails4.1.16.gemfile.lock +1 -1
- data/gemfiles/rails4.2.7.1.gemfile.lock +1 -1
- data/gemfiles/rails5.0.0.1.gemfile.lock +1 -1
- data/lib/comma.rb +7 -1
- data/lib/comma/version.rb +1 -1
- 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: b65af268b9952fbd7bef3591b97144582a5f1e68
|
|
4
|
+
data.tar.gz: a4e59f323a6e5ce6696b00cc864463b000915f4f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3767dd7533e9ee3dda7b0db7e94df00e5d7b152632045d4535f477d49bdce159d12ac0208761424acdb9d2e07caf3c3d342cdc2cd120c7cb9f847985b20227d8
|
|
7
|
+
data.tar.gz: 70e2a465bdf36f23e6f3565742075c77c48b4051b9342d8cad7aaacbfa4f2f79795521d8d09197c90af14aaaf23eeda0c91afc647448128232b462ff1afdbf1e
|
data/Gemfile.lock
CHANGED
data/README.markdown
CHANGED
|
@@ -8,8 +8,7 @@ http://github.com/comma-csv/comma
|
|
|
8
8
|
The mainline of this project builds gems to the 3.x version series, and is compatible and tested with :
|
|
9
9
|
|
|
10
10
|
* Ruby 2.x
|
|
11
|
-
*
|
|
12
|
-
* Rails (all versions, with ActiveRecord, DataMapper and Mongoid support)
|
|
11
|
+
* Rails 4.x, 5.0 (with ActiveRecord, DataMapper and Mongoid support)
|
|
13
12
|
|
|
14
13
|
[](https://travis-ci.org/comma-csv/comma) [](https://codeclimate.com/github/comma-csv/comma)
|
|
15
14
|
|
|
@@ -18,7 +17,7 @@ Comma is distributed as a gem, best installed via Bundler.
|
|
|
18
17
|
Include the gem in your Gemfile:
|
|
19
18
|
|
|
20
19
|
```Ruby
|
|
21
|
-
gem "comma", "~>
|
|
20
|
+
gem "comma", "~> 4.0.0"
|
|
22
21
|
```
|
|
23
22
|
|
|
24
23
|
Or, if you want to live life on the edge, you can get master from the main comma repository:
|
|
@@ -348,13 +347,7 @@ To run the test suite across multiple gem file sets, we're using [Appraisal](htt
|
|
|
348
347
|
```Bash
|
|
349
348
|
|
|
350
349
|
bundle install
|
|
351
|
-
bundle exec
|
|
352
|
-
bundle exec rake
|
|
350
|
+
bundle exec appraisal install
|
|
351
|
+
bundle exec appraisal rake spec
|
|
353
352
|
|
|
354
353
|
```
|
|
355
|
-
|
|
356
|
-
When rebuilding for a new rails version, to test across controller and the stack itself, a fake rails app must be generated :
|
|
357
|
-
|
|
358
|
-
```
|
|
359
|
-
rails plugin new rails_app --full --dummy-path=spec/dummy --skip-bundle --skip-gemspec --skip-test-unit --skip-sprockets --skip-javascript --skip-gemfile --skip-git
|
|
360
|
-
```
|
data/lib/comma.rb
CHANGED
|
@@ -45,7 +45,13 @@ ActiveSupport.on_load(:action_controller) do
|
|
|
45
45
|
ActionController::Renderers.add :csv do |obj, options|
|
|
46
46
|
filename = options[:filename] || 'data'
|
|
47
47
|
extension = options[:extension] || 'csv'
|
|
48
|
-
|
|
48
|
+
|
|
49
|
+
if Rails.version >= "5.0.0"
|
|
50
|
+
mime_type = options[:mime_type] || Mime[:csv]
|
|
51
|
+
else
|
|
52
|
+
mime_type = options[:mime_type] || Mime::CSV
|
|
53
|
+
end
|
|
54
|
+
|
|
49
55
|
#Capture any CSV optional settings passed to comma or comma specific options
|
|
50
56
|
csv_options = options.slice(*CSV_HANDLER::DEFAULT_OPTIONS.merge(Comma::DEFAULT_OPTIONS).keys).each_with_object({}) do |(k, v), h|
|
|
51
57
|
# XXX: Convert string to boolean
|
data/lib/comma/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: comma
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.0.
|
|
4
|
+
version: 4.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Marcus Crafter
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2016-08
|
|
12
|
+
date: 2016-10-08 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: activesupport
|