active_list 6.2.4 → 6.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/active_list.rb +22 -0
- data/lib/active_list/exporters/open_document_spreadsheet_exporter.rb +1 -1
- data/lib/active_list/version.rb +1 -1
- metadata +2 -4
- data/test/dummy/Gemfile.lock +0 -130
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1b6136c1c8ed0257199d260b952bb1144c90ed30
|
4
|
+
data.tar.gz: a0342006b4e06592f9efe63a8da22d43576c6008
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d0acc55d33cffd6906c6eab21e88e9f012f4ee8ee68f2a64ca9f41adc626389fb454fa9cce3dc0eeb575a6de490fedf837af157e81312dcce96eabbf00881631
|
7
|
+
data.tar.gz: e3b1a2e94be340a8665fdbfa9ac64fb5eb53d37a4290ba0e6dcf546e606e395df84e16455c0085db02b3e25c2d0ec2b3cafa8fa4499df208df0cb08b23fc9dd0
|
data/lib/active_list.rb
CHANGED
@@ -21,6 +21,26 @@ module ActiveList
|
|
21
21
|
autoload :Exporters, 'active_list/exporters'
|
22
22
|
autoload :Generator, 'active_list/generator'
|
23
23
|
|
24
|
+
# Set the temporary directory
|
25
|
+
# Pathname or callable are acceptable
|
26
|
+
def self.temporary_directory=(dir)
|
27
|
+
if dir.respond_to?(:call) or dir.is_a?(Pathname)
|
28
|
+
@@temporary_directory = dir
|
29
|
+
else
|
30
|
+
@@temporary_directory = Pathname(dir)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
# Returns the temporary directory
|
35
|
+
def self.temporary_directory
|
36
|
+
if @@temporary_directory.respond_to? :call
|
37
|
+
@@temporary_directory.call
|
38
|
+
else
|
39
|
+
@@temporary_directory
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
|
24
44
|
mattr_reader :renderers
|
25
45
|
@@renderers = {}
|
26
46
|
|
@@ -39,6 +59,8 @@ module ActiveList
|
|
39
59
|
|
40
60
|
end
|
41
61
|
|
62
|
+
ActiveList.temporary_directory = Pathname(Dir.tmpdir)
|
63
|
+
|
42
64
|
ActiveList.register_renderer(:simple_renderer, ActiveList::Renderers::SimpleRenderer)
|
43
65
|
|
44
66
|
ActiveList.register_exporter(:ods, ActiveList::Exporters::OpenDocumentSpreadsheetExporter)
|
@@ -30,7 +30,7 @@ module ActiveList
|
|
30
30
|
record = "r"
|
31
31
|
code = generator.select_data_code(paginate: false)
|
32
32
|
code << "name = #{table.model.name}.model_name.human.gsub(/[^a-z0-9]/i, '_')\n"
|
33
|
-
code << "file =
|
33
|
+
code << "file = ActiveList.temporary_directory.join(name + rand(999_999_999).to_s(36) + '.#{self.file_extension}')\n"
|
34
34
|
code << "FileUtils.mkdir_p(file.dirname)\n"
|
35
35
|
code << "Zip::OutputStream.open(file) do |zile|\n"
|
36
36
|
# MimeType in first place
|
data/lib/active_list/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_list
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.
|
4
|
+
version: 6.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brice Texier
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-10-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -138,7 +138,6 @@ files:
|
|
138
138
|
- test/code_generation_test.rb
|
139
139
|
- test/dummy/.gitignore
|
140
140
|
- test/dummy/Gemfile
|
141
|
-
- test/dummy/Gemfile.lock
|
142
141
|
- test/dummy/Rakefile
|
143
142
|
- test/dummy/app/assets/images/rails.png
|
144
143
|
- test/dummy/app/assets/javascripts/application.js
|
@@ -224,7 +223,6 @@ test_files:
|
|
224
223
|
- test/code_generation_test.rb
|
225
224
|
- test/dummy/.gitignore
|
226
225
|
- test/dummy/Gemfile
|
227
|
-
- test/dummy/Gemfile.lock
|
228
226
|
- test/dummy/Rakefile
|
229
227
|
- test/dummy/app/assets/images/rails.png
|
230
228
|
- test/dummy/app/assets/javascripts/application.js
|
data/test/dummy/Gemfile.lock
DELETED
@@ -1,130 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: ../..
|
3
|
-
specs:
|
4
|
-
active_list (6.2.4)
|
5
|
-
code_string (>= 0.0.0)
|
6
|
-
i18n-complements
|
7
|
-
rails (>= 3.2, < 5)
|
8
|
-
rubyzip (>= 1.0)
|
9
|
-
|
10
|
-
GEM
|
11
|
-
remote: https://rubygems.org/
|
12
|
-
specs:
|
13
|
-
actionmailer (3.2.17)
|
14
|
-
actionpack (= 3.2.17)
|
15
|
-
mail (~> 2.5.4)
|
16
|
-
actionpack (3.2.17)
|
17
|
-
activemodel (= 3.2.17)
|
18
|
-
activesupport (= 3.2.17)
|
19
|
-
builder (~> 3.0.0)
|
20
|
-
erubis (~> 2.7.0)
|
21
|
-
journey (~> 1.0.4)
|
22
|
-
rack (~> 1.4.5)
|
23
|
-
rack-cache (~> 1.2)
|
24
|
-
rack-test (~> 0.6.1)
|
25
|
-
sprockets (~> 2.2.1)
|
26
|
-
activemodel (3.2.17)
|
27
|
-
activesupport (= 3.2.17)
|
28
|
-
builder (~> 3.0.0)
|
29
|
-
activerecord (3.2.17)
|
30
|
-
activemodel (= 3.2.17)
|
31
|
-
activesupport (= 3.2.17)
|
32
|
-
arel (~> 3.0.2)
|
33
|
-
tzinfo (~> 0.3.29)
|
34
|
-
activeresource (3.2.17)
|
35
|
-
activemodel (= 3.2.17)
|
36
|
-
activesupport (= 3.2.17)
|
37
|
-
activesupport (3.2.17)
|
38
|
-
i18n (~> 0.6, >= 0.6.4)
|
39
|
-
multi_json (~> 1.0)
|
40
|
-
arel (3.0.3)
|
41
|
-
builder (3.0.4)
|
42
|
-
code_string (0.0.0)
|
43
|
-
coffee-rails (3.2.2)
|
44
|
-
coffee-script (>= 2.2.0)
|
45
|
-
railties (~> 3.2.0)
|
46
|
-
coffee-script (2.2.0)
|
47
|
-
coffee-script-source
|
48
|
-
execjs
|
49
|
-
coffee-script-source (1.7.0)
|
50
|
-
erubis (2.7.0)
|
51
|
-
execjs (2.2.1)
|
52
|
-
hike (1.2.3)
|
53
|
-
i18n (0.6.9)
|
54
|
-
i18n-complements (0.0.10)
|
55
|
-
i18n (>= 0.6)
|
56
|
-
journey (1.0.4)
|
57
|
-
jquery-rails (3.1.1)
|
58
|
-
railties (>= 3.0, < 5.0)
|
59
|
-
thor (>= 0.14, < 2.0)
|
60
|
-
json (1.8.1)
|
61
|
-
libv8 (3.16.14.3)
|
62
|
-
mail (2.5.4)
|
63
|
-
mime-types (~> 1.16)
|
64
|
-
treetop (~> 1.4.8)
|
65
|
-
mime-types (1.25.1)
|
66
|
-
multi_json (1.10.1)
|
67
|
-
polyglot (0.3.5)
|
68
|
-
rack (1.4.5)
|
69
|
-
rack-cache (1.2)
|
70
|
-
rack (>= 0.4)
|
71
|
-
rack-ssl (1.3.4)
|
72
|
-
rack
|
73
|
-
rack-test (0.6.2)
|
74
|
-
rack (>= 1.0)
|
75
|
-
rails (3.2.17)
|
76
|
-
actionmailer (= 3.2.17)
|
77
|
-
actionpack (= 3.2.17)
|
78
|
-
activerecord (= 3.2.17)
|
79
|
-
activeresource (= 3.2.17)
|
80
|
-
activesupport (= 3.2.17)
|
81
|
-
bundler (~> 1.0)
|
82
|
-
railties (= 3.2.17)
|
83
|
-
railties (3.2.17)
|
84
|
-
actionpack (= 3.2.17)
|
85
|
-
activesupport (= 3.2.17)
|
86
|
-
rack-ssl (~> 1.3.2)
|
87
|
-
rake (>= 0.8.7)
|
88
|
-
rdoc (~> 3.4)
|
89
|
-
thor (>= 0.14.6, < 2.0)
|
90
|
-
rake (10.3.2)
|
91
|
-
rdoc (3.12.2)
|
92
|
-
json (~> 1.4)
|
93
|
-
ref (1.0.5)
|
94
|
-
rubyzip (1.1.6)
|
95
|
-
sass (3.3.9)
|
96
|
-
sass-rails (3.2.6)
|
97
|
-
railties (~> 3.2.0)
|
98
|
-
sass (>= 3.1.10)
|
99
|
-
tilt (~> 1.3)
|
100
|
-
sprockets (2.2.2)
|
101
|
-
hike (~> 1.2)
|
102
|
-
multi_json (~> 1.0)
|
103
|
-
rack (~> 1.0)
|
104
|
-
tilt (~> 1.1, != 1.3.0)
|
105
|
-
sqlite3 (1.3.9)
|
106
|
-
therubyracer (0.12.1)
|
107
|
-
libv8 (~> 3.16.14.0)
|
108
|
-
ref
|
109
|
-
thor (0.19.1)
|
110
|
-
tilt (1.4.1)
|
111
|
-
treetop (1.4.15)
|
112
|
-
polyglot
|
113
|
-
polyglot (>= 0.3.1)
|
114
|
-
tzinfo (0.3.39)
|
115
|
-
uglifier (2.5.1)
|
116
|
-
execjs (>= 0.3.0)
|
117
|
-
json (>= 1.8.0)
|
118
|
-
|
119
|
-
PLATFORMS
|
120
|
-
ruby
|
121
|
-
|
122
|
-
DEPENDENCIES
|
123
|
-
active_list!
|
124
|
-
coffee-rails (~> 3.2.1)
|
125
|
-
jquery-rails
|
126
|
-
rails (= 3.2.17)
|
127
|
-
sass-rails (~> 3.2.3)
|
128
|
-
sqlite3
|
129
|
-
therubyracer
|
130
|
-
uglifier (>= 1.0.3)
|