collection2csv 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- YmFkYjY0MTNmY2U5ZWJlOGRjNmNjYmJlYTVkOWEwMzdiNDlhOTRjMw==
5
- data.tar.gz: !binary |-
6
- MGYxZmM5ZDc2ODUzM2I1NzFkNThjNmIwMmFhNDAxNDcyZWZiMjY5NA==
2
+ SHA1:
3
+ metadata.gz: 1434f97f5450add093a1e2411991a8f679a00172
4
+ data.tar.gz: 8c4ed5cb81a6e2e1b390902ed67be697be2e3142
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- NjBjNzc3NGQ2YjA0NzNkNDQ1NWFmNGFiMTU0OWE0YmYyMWIzMThiYjBlZjZi
10
- NGExNGE0MGYyZDI1YzFjMTg1MjM4ODlkOTMzYzM2NjA3OTk0NzA1MjYwN2Ez
11
- MzBlMWZmZTY0YzliYmIwZTEwOTgyM2U5OGZiODhkMzZjNjYzYTA=
12
- data.tar.gz: !binary |-
13
- ZmZkNTUzMzhmNzRkZTJmYzNmMmNkOTY3M2M3MDBhY2QxMmVmNzA1YjY0OWE3
14
- ZjFlZmY3ODEwNDhhMGFkMDA2ZTYxNTVlYjBiNzBiZTU0YjFlNjNmZWUyZTdi
15
- MDlkYmRjMzY4ZjY0MzgzYjYzYTU1ODllMWFjYjU4NTI0ZTM5NzE=
6
+ metadata.gz: 02e5415857977ed3c900c3e07daf3dcf25ca3610d53f6f6c6a7bdcbcd1785f8cef78e1dfc5c8f907daff3a6b370b051a4fe720fe07551fc1161def8d5f256369
7
+ data.tar.gz: 6b40e544925592af75a36b5012ee3df065b8786c577f945a8b19bb5d63901b1b7b5a3997e39271ee25f70a6c4be8d645e1902441132de98e58ce1b072a2e9f85
data/.travis.yml CHANGED
@@ -1,4 +1,8 @@
1
1
  language: ruby
2
2
  rvm:
3
3
  - 1.9.3
4
+ - 2.0.0
5
+ - 2.1.4
6
+ - 2.1.5
7
+ - 2.2.1
4
8
  before_install: gem install bundler -v 1.10.6
data/README.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Collection2csv
2
2
 
3
+ [![Build Status](https://travis-ci.org/ethirajsrinivasan/collection2csv.svg?branch=master)](https://travis-ci.org/ethirajsrinivasan/collection2csv)
4
+ [![Code Climate](https://codeclimate.com/github/ethirajsrinivasan/collection2csv/badges/gpa.svg)](https://codeclimate.com/github/ethirajsrinivasan/collection2csv)
5
+ [![security](https://hakiri.io/github/ethirajsrinivasan/collection2csv/master.svg)](https://hakiri.io/github/ethirajsrinivasan/collection2csv/master)
6
+
3
7
  Collection2csv gem allows you to export a ActiveRecord collection of model objects to csv
4
8
 
5
9
  ## Installation
data/Rakefile CHANGED
@@ -1 +1,4 @@
1
1
  require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+ RSpec::Core::RakeTask.new
4
+ task :default => :spec
@@ -1,7 +1,6 @@
1
1
  module CollectionToCsvHelper
2
2
  def collection_download(collection,column_names={})
3
- p column_names
4
- collection_ids = collection.map(&:id)
3
+ collection_ids = collection.map(&:id)
5
4
  klass = collection.first.class
6
5
  link_to "Download" , collection2csv_path(ids: collection_ids,klass: klass,format: "csv",column_names: column_names)
7
6
  end
@@ -26,6 +26,9 @@ Gem::Specification.new do |spec|
26
26
  spec.bindir = "exe"
27
27
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
28
28
  spec.require_paths = ["lib"]
29
+ spec.required_ruby_version = '>= 1.9.3'
29
30
  spec.add_development_dependency "bundler", "~> 1.10"
30
31
  spec.add_development_dependency "rake", "~> 10.0"
32
+ spec.add_development_dependency "rspec"
33
+
31
34
  end
@@ -1,3 +1,3 @@
1
1
  module Collection2csv
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,43 +1,57 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: collection2csv
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - ethiraj
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-12-17 00:00:00.000000000 Z
11
+ date: 2015-12-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.10'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.10'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '10.0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
41
55
  description: Download ActiveRecord collection as csv
42
56
  email:
43
57
  - ethirajsrinivasan@gmail.com
@@ -45,8 +59,8 @@ executables: []
45
59
  extensions: []
46
60
  extra_rdoc_files: []
47
61
  files:
48
- - .gitignore
49
- - .travis.yml
62
+ - ".gitignore"
63
+ - ".travis.yml"
50
64
  - CODE_OF_CONDUCT.md
51
65
  - Gemfile
52
66
  - LICENSE.txt
@@ -71,12 +85,12 @@ require_paths:
71
85
  - lib
72
86
  required_ruby_version: !ruby/object:Gem::Requirement
73
87
  requirements:
74
- - - ! '>='
88
+ - - ">="
75
89
  - !ruby/object:Gem::Version
76
- version: '0'
90
+ version: 1.9.3
77
91
  required_rubygems_version: !ruby/object:Gem::Requirement
78
92
  requirements:
79
- - - ! '>='
93
+ - - ">="
80
94
  - !ruby/object:Gem::Version
81
95
  version: '0'
82
96
  requirements: []