active_scaffold_export 3.0.5 → 3.0.6
Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile
CHANGED
@@ -23,8 +23,9 @@ Jeweler::Tasks.new do |gem|
|
|
23
23
|
gem.email = "activescaffold@googlegroups.com"
|
24
24
|
gem.authors = ["Volker Hochstein", "Mojo Tech, LLC", "see commits"]
|
25
25
|
gem.add_runtime_dependency 'active_scaffold', '>= 3.0.12'
|
26
|
-
|
27
|
-
|
26
|
+
if RUBY_VERSION < "1.9"
|
27
|
+
gem.add_runtime_dependency "fastercsv"
|
28
|
+
end
|
28
29
|
# Include your dependencies below. Runtime dependencies are required when using your gem,
|
29
30
|
# and development dependencies are only needed for development (ie running rake tasks, tests, etc)
|
30
31
|
# gem.add_runtime_dependency 'jabber4r', '> 0.1'
|
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{active_scaffold_export}
|
8
|
-
s.version = "3.0.
|
8
|
+
s.version = "3.0.6"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Volker Hochstein", "Mojo Tech, LLC", "see commits"]
|
12
|
-
s.date = %q{2011-
|
12
|
+
s.date = %q{2011-03-26}
|
13
13
|
s.description = %q{This Active Scaffold plugin provides a configurable CSV 'Export' action for Active Scaffold controllers}
|
14
14
|
s.email = %q{activescaffold@googlegroups.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -40,11 +40,10 @@ Gem::Specification.new do |s|
|
|
40
40
|
s.homepage = %q{http://github.com/mojotech/active_scaffold_export}
|
41
41
|
s.licenses = ["MIT"]
|
42
42
|
s.require_paths = ["lib"]
|
43
|
-
s.rubygems_version = %q{1.
|
43
|
+
s.rubygems_version = %q{1.6.2}
|
44
44
|
s.summary = %q{Exporting Records with ActiveScaffold}
|
45
45
|
|
46
46
|
if s.respond_to? :specification_version then
|
47
|
-
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
48
47
|
s.specification_version = 3
|
49
48
|
|
50
49
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
@@ -6,7 +6,7 @@
|
|
6
6
|
:headers => @export_columns.collect { |column| format_export_column_header_name(column) }
|
7
7
|
}
|
8
8
|
|
9
|
-
data =
|
9
|
+
data = CSV.generate(fcsv_options) do |csv|
|
10
10
|
csv << fcsv_options[:headers] unless params[:skip_header] == 'true'
|
11
11
|
@records.each do |record|
|
12
12
|
csv << @export_columns.collect { |column|
|
@@ -14,4 +14,4 @@
|
|
14
14
|
}
|
15
15
|
end
|
16
16
|
end
|
17
|
-
-%><%= data.html_safe -%>
|
17
|
+
-%><%= data.html_safe -%>
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
1
3
|
module ActiveScaffold
|
2
4
|
module Helpers
|
3
5
|
# Helpers that assist with the rendering of a Export Column
|
@@ -11,7 +13,6 @@ module ActiveScaffold
|
|
11
13
|
def active_scaffold_stylesheets_with_export(frontend = :default)
|
12
14
|
active_scaffold_stylesheets_without_export.to_a << ActiveScaffold::Config::Core.asset_path("export-stylesheet.css", frontend)
|
13
15
|
end
|
14
|
-
|
15
16
|
|
16
17
|
# Provides stylesheets for IE to include with +stylesheet_link_tag+
|
17
18
|
def active_scaffold_ie_stylesheets_with_export(frontend = :default)
|
@@ -1,4 +1,17 @@
|
|
1
|
-
require
|
1
|
+
require "csv"
|
2
|
+
if CSV.const_defined? :Reader
|
3
|
+
# Ruby 1.8 compatible
|
4
|
+
begin
|
5
|
+
require 'fastercsv'
|
6
|
+
Object.send(:remove_const, :CSV)
|
7
|
+
CSV = FasterCSV
|
8
|
+
rescue Gem::LoadError
|
9
|
+
raise "For ruby 1.8, the 'fastercsv' gem is required"
|
10
|
+
end
|
11
|
+
else
|
12
|
+
# CSV is now FasterCSV in ruby 1.9
|
13
|
+
end
|
14
|
+
|
2
15
|
# Make sure that ActiveScaffold has already been included
|
3
16
|
ActiveScaffold rescue throw "should have included ActiveScaffold plug in first. Please make sure that this plug-in comes alphabetically after the ActiveScaffold plug-in"
|
4
17
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_scaffold_export
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 11
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 3
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 3.0.
|
9
|
+
- 6
|
10
|
+
version: 3.0.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Volker Hochstein
|
@@ -17,13 +17,12 @@ autorequire:
|
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
19
|
|
20
|
-
date: 2011-
|
20
|
+
date: 2011-03-26 00:00:00 -04:00
|
21
21
|
default_executable:
|
22
22
|
dependencies:
|
23
23
|
- !ruby/object:Gem::Dependency
|
24
|
-
|
25
|
-
|
26
|
-
version_requirements: &id001 !ruby/object:Gem::Requirement
|
24
|
+
type: :development
|
25
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
27
26
|
none: false
|
28
27
|
requirements:
|
29
28
|
- - ">="
|
@@ -32,12 +31,12 @@ dependencies:
|
|
32
31
|
segments:
|
33
32
|
- 0
|
34
33
|
version: "0"
|
35
|
-
|
36
|
-
|
37
|
-
- !ruby/object:Gem::Dependency
|
34
|
+
name: shoulda
|
35
|
+
version_requirements: *id001
|
38
36
|
prerelease: false
|
39
|
-
|
40
|
-
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
type: :development
|
39
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
41
40
|
none: false
|
42
41
|
requirements:
|
43
42
|
- - ~>
|
@@ -48,12 +47,12 @@ dependencies:
|
|
48
47
|
- 0
|
49
48
|
- 0
|
50
49
|
version: 1.0.0
|
51
|
-
|
52
|
-
|
53
|
-
- !ruby/object:Gem::Dependency
|
50
|
+
name: bundler
|
51
|
+
version_requirements: *id002
|
54
52
|
prerelease: false
|
55
|
-
|
56
|
-
|
53
|
+
- !ruby/object:Gem::Dependency
|
54
|
+
type: :development
|
55
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
57
56
|
none: false
|
58
57
|
requirements:
|
59
58
|
- - ~>
|
@@ -64,12 +63,12 @@ dependencies:
|
|
64
63
|
- 5
|
65
64
|
- 2
|
66
65
|
version: 1.5.2
|
67
|
-
|
68
|
-
|
69
|
-
- !ruby/object:Gem::Dependency
|
66
|
+
name: jeweler
|
67
|
+
version_requirements: *id003
|
70
68
|
prerelease: false
|
71
|
-
|
72
|
-
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
type: :development
|
71
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
73
72
|
none: false
|
74
73
|
requirements:
|
75
74
|
- - ">="
|
@@ -78,12 +77,12 @@ dependencies:
|
|
78
77
|
segments:
|
79
78
|
- 0
|
80
79
|
version: "0"
|
81
|
-
|
82
|
-
|
83
|
-
- !ruby/object:Gem::Dependency
|
80
|
+
name: rcov
|
81
|
+
version_requirements: *id004
|
84
82
|
prerelease: false
|
85
|
-
|
86
|
-
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
type: :runtime
|
85
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
87
86
|
none: false
|
88
87
|
requirements:
|
89
88
|
- - ">="
|
@@ -94,12 +93,12 @@ dependencies:
|
|
94
93
|
- 0
|
95
94
|
- 12
|
96
95
|
version: 3.0.12
|
97
|
-
|
98
|
-
|
99
|
-
- !ruby/object:Gem::Dependency
|
96
|
+
name: active_scaffold
|
97
|
+
version_requirements: *id005
|
100
98
|
prerelease: false
|
101
|
-
|
102
|
-
|
99
|
+
- !ruby/object:Gem::Dependency
|
100
|
+
type: :runtime
|
101
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
103
102
|
none: false
|
104
103
|
requirements:
|
105
104
|
- - ">="
|
@@ -108,8 +107,9 @@ dependencies:
|
|
108
107
|
segments:
|
109
108
|
- 0
|
110
109
|
version: "0"
|
111
|
-
|
112
|
-
|
110
|
+
name: fastercsv
|
111
|
+
version_requirements: *id006
|
112
|
+
prerelease: false
|
113
113
|
description: This Active Scaffold plugin provides a configurable CSV 'Export' action for Active Scaffold controllers
|
114
114
|
email: activescaffold@googlegroups.com
|
115
115
|
executables: []
|
@@ -169,7 +169,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
169
169
|
requirements: []
|
170
170
|
|
171
171
|
rubyforge_project:
|
172
|
-
rubygems_version: 1.
|
172
|
+
rubygems_version: 1.6.2
|
173
173
|
signing_key:
|
174
174
|
specification_version: 3
|
175
175
|
summary: Exporting Records with ActiveScaffold
|