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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: aeb6ff51137c2108c270dfb41d7425a87760060e
4
- data.tar.gz: c1b8c7222f8d733fcc08b5a0849ff0f69c2d04cc
3
+ metadata.gz: b65af268b9952fbd7bef3591b97144582a5f1e68
4
+ data.tar.gz: a4e59f323a6e5ce6696b00cc864463b000915f4f
5
5
  SHA512:
6
- metadata.gz: 55c179dd4b1301406adf4b313c4d9c1a2ac17b8066d688af1d24d6d8aa8a3bfc3b5f03328a300fc619d7a4dd4865570b25ba24054a75c9194bccb64ff519f916
7
- data.tar.gz: 87b0cffda105db072f9cafb14145e41f407d4a2c6d68197f52139ada6e62fa896934c837f34655f456dcf60f7f8d534de09f9c018ed5b14db9c95190d79ea205
6
+ metadata.gz: 3767dd7533e9ee3dda7b0db7e94df00e5d7b152632045d4535f477d49bdce159d12ac0208761424acdb9d2e07caf3c3d342cdc2cd120c7cb9f847985b20227d8
7
+ data.tar.gz: 70e2a465bdf36f23e6f3565742075c77c48b4051b9342d8cad7aaacbfa4f2f79795521d8d09197c90af14aaaf23eeda0c91afc647448128232b462ff1afdbf1e
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- comma (4.0.0)
4
+ comma (4.0.1)
5
5
  activesupport (>= 4.0.0, < 5.1)
6
6
 
7
7
  GEM
@@ -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
- * RBX2
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
  [![Build Status](https://travis-ci.org/comma-csv/comma.png?branch=master)](https://travis-ci.org/comma-csv/comma) [![Code Climate](https://codeclimate.com/github/comma-csv/comma.png)](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", "~> 3.2.1"
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 rake appraisal:install
352
- bundle exec rake appraisal spec
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
- ```
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../
3
3
  specs:
4
- comma (4.0.0)
4
+ comma (4.0.1)
5
5
  activesupport (>= 4.0.0, < 5.1)
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../
3
3
  specs:
4
- comma (4.0.0)
4
+ comma (4.0.1)
5
5
  activesupport (>= 4.0.0, < 5.1)
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../
3
3
  specs:
4
- comma (4.0.0)
4
+ comma (4.0.1)
5
5
  activesupport (>= 4.0.0, < 5.1)
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../
3
3
  specs:
4
- comma (4.0.0)
4
+ comma (4.0.1)
5
5
  activesupport (>= 4.0.0, < 5.1)
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../
3
3
  specs:
4
- comma (4.0.0)
4
+ comma (4.0.1)
5
5
  activesupport (>= 4.0.0, < 5.1)
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../
3
3
  specs:
4
- comma (4.0.0)
4
+ comma (4.0.1)
5
5
  activesupport (>= 4.0.0, < 5.1)
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../
3
3
  specs:
4
- comma (4.0.0)
4
+ comma (4.0.1)
5
5
  activesupport (>= 4.0.0, < 5.1)
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../
3
3
  specs:
4
- comma (4.0.0)
4
+ comma (4.0.1)
5
5
  activesupport (>= 4.0.0, < 5.1)
6
6
 
7
7
  GEM
@@ -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
- mime_type = options[:mime_type] || Mime::CSV
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
@@ -1,3 +1,3 @@
1
1
  module Comma
2
- VERSION = '4.0.0'
2
+ VERSION = '4.0.1'
3
3
  end
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.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-20 00:00:00.000000000 Z
12
+ date: 2016-10-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport