active_scaffold_export 0.9.4 → 0.9.5
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.
- data/active_scaffold_export.gemspec +2 -2
- data/lib/active_scaffold_export.rb +18 -5
- metadata +8 -7
- data/install.rb +0 -31
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = %q{active_scaffold_export}
|
3
|
-
s.version = "0.9.
|
3
|
+
s.version = "0.9.5"
|
4
4
|
|
5
5
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
6
6
|
s.authors = ["Mojo Tech, LLC", "see commits"]
|
@@ -32,6 +32,6 @@ Gem::Specification.new do |s|
|
|
32
32
|
else
|
33
33
|
s.add_dependency(%q<fastercsv>, [">= 0"])
|
34
34
|
end
|
35
|
-
s.add_dependency("active_scaffold")
|
35
|
+
s.add_dependency("active_scaffold", ">= 3.0.5")
|
36
36
|
end
|
37
37
|
|
@@ -1,21 +1,34 @@
|
|
1
|
+
require 'fastercsv'
|
1
2
|
require 'active_scaffold' rescue nil
|
2
3
|
# Make sure that ActiveScaffold has already been included
|
3
4
|
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
5
|
|
5
6
|
# Load our overrides
|
6
7
|
require "#{File.dirname(__FILE__)}/active_scaffold_export/config/core.rb"
|
7
|
-
require "#{File.dirname(__FILE__)}/active_scaffold/config/export.rb"
|
8
|
-
require "#{File.dirname(__FILE__)}/active_scaffold/actions/export.rb"
|
9
8
|
require "#{File.dirname(__FILE__)}/active_scaffold/helpers/view_helpers_override.rb"
|
10
|
-
|
9
|
+
|
10
|
+
module ActiveScaffold
|
11
|
+
module Actions
|
12
|
+
autoload :Export, "active_scaffold/actions/export"
|
13
|
+
end
|
14
|
+
|
15
|
+
module Config
|
16
|
+
autoload :Export, "active_scaffold/config/export"
|
17
|
+
end
|
18
|
+
|
19
|
+
module Helpers
|
20
|
+
autoload :ExportHelpers, "active_scaffold/helpers/export_helpers"
|
21
|
+
end
|
22
|
+
end
|
11
23
|
|
12
24
|
##
|
13
25
|
## Run the install script, too, just to make sure
|
14
26
|
## But at least rescue the action in production
|
15
27
|
##
|
16
|
-
Rails::Application.initializer("
|
28
|
+
Rails::Application.initializer("active_scaffold_export.install_assets",
|
29
|
+
:after => "active_scaffold.install_assets") do
|
17
30
|
begin
|
18
|
-
|
31
|
+
ActiveScaffold.install_assets_from(File.dirname(__FILE__) + "/..")
|
19
32
|
rescue
|
20
33
|
raise $! unless Rails.env == 'production'
|
21
34
|
end
|
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:
|
4
|
+
hash: 49
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 9
|
9
|
-
-
|
10
|
-
version: 0.9.
|
9
|
+
- 5
|
10
|
+
version: 0.9.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Mojo Tech, LLC
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2010-11-
|
19
|
+
date: 2010-11-22 00:00:00 -05:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
@@ -41,10 +41,12 @@ dependencies:
|
|
41
41
|
requirements:
|
42
42
|
- - ">="
|
43
43
|
- !ruby/object:Gem::Version
|
44
|
-
hash:
|
44
|
+
hash: 13
|
45
45
|
segments:
|
46
|
+
- 3
|
46
47
|
- 0
|
47
|
-
|
48
|
+
- 5
|
49
|
+
version: 3.0.5
|
48
50
|
type: :runtime
|
49
51
|
version_requirements: *id002
|
50
52
|
description: This Active Scaffold plugin provides a configurable CSV 'Export' action for Active Scaffold controllers
|
@@ -68,7 +70,6 @@ files:
|
|
68
70
|
- frontends/default/views/_show_export.html.erb
|
69
71
|
- frontends/default/views/show_export.html.erb
|
70
72
|
- init.rb
|
71
|
-
- install.rb
|
72
73
|
- lib/active_scaffold/actions/export.rb
|
73
74
|
- lib/active_scaffold/config/export.rb
|
74
75
|
- lib/active_scaffold/helpers/export_helpers.rb
|
data/install.rb
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
# Workaround a problem with script/plugin and http-based repos.
|
2
|
-
# See http://dev.rubyonrails.org/ticket/8189
|
3
|
-
Dir.chdir(Dir.getwd.sub(/vendor.*/, '')) do
|
4
|
-
|
5
|
-
##
|
6
|
-
## Copy over asset files (javascript/css/images) from the plugin directory to public/
|
7
|
-
##
|
8
|
-
|
9
|
-
def copy_files(source_path, destination_path, directory)
|
10
|
-
source, destination = File.join(directory, source_path), File.join(Rails.root, destination_path)
|
11
|
-
FileUtils.mkdir(destination) unless File.exist?(destination)
|
12
|
-
FileUtils.cp_r(Dir.glob(source+'/*.*'), destination)
|
13
|
-
end
|
14
|
-
|
15
|
-
directory = File.dirname(__FILE__)
|
16
|
-
|
17
|
-
copy_files("/public", "/public", directory)
|
18
|
-
|
19
|
-
available_frontends = Dir[File.join(directory, 'frontends', '*')].collect { |d| File.basename d }
|
20
|
-
[ :stylesheets, :javascripts, :images].each do |asset_type|
|
21
|
-
path = "/public/#{asset_type}/active_scaffold"
|
22
|
-
copy_files(path, path, directory)
|
23
|
-
|
24
|
-
available_frontends.each do |frontend|
|
25
|
-
source = "/frontends/#{frontend}/#{asset_type}/"
|
26
|
-
destination = "/public/#{asset_type}/active_scaffold/#{frontend}"
|
27
|
-
copy_files(source, destination, directory)
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
end
|