csv_exporter 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/csv_exporter.rb +7 -12
- data/lib/csv_exporter/base.rb +1 -1
- data/lib/csv_exporter/version.rb +1 -1
- metadata +2 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e60930e70aab882351784baad242d6853a19c615
|
4
|
+
data.tar.gz: 179b1598b6892a722e7d50ad080b0a83ff22f654
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a302c31531a5ea7694ac122adde2f2a814fe95b00c4b79d2f73724ddd6dada5d6cb2d51f8ba66b684ecd73d3c3a371fc6d8f60829796e33a398c04422becb776
|
7
|
+
data.tar.gz: 2fd7003d43134eb780472561097f18ae9f3eab0f5bc5e53142221f4898ab22f7c949d04de8350cc124a77aa31ad7d2e7dcf582d9c03df30c1f293f08b2728e94
|
data/lib/csv_exporter.rb
CHANGED
@@ -16,22 +16,17 @@ module CsvExporter
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def configuration
|
19
|
-
if defined? @environment
|
20
|
-
raise RuntimeError.new("not configured CsvExporter for #{@environment} enviroment") unless @configuration
|
21
|
-
else
|
22
|
-
raise RuntimeError.new('not configured CsvExporter') unless @configuration
|
23
|
-
end
|
24
|
-
|
25
19
|
@configuration
|
26
20
|
end
|
27
21
|
|
28
|
-
def environment
|
29
|
-
@environment
|
30
|
-
end
|
31
|
-
|
32
22
|
def file(filename = nil)
|
33
|
-
|
34
|
-
|
23
|
+
file_hash = if configuration
|
24
|
+
{ path: configuration['filepath'], name: filename || configuration['filename'] }
|
25
|
+
else
|
26
|
+
{ path: 'tmp', name: filename || 'file.csv' }
|
27
|
+
end
|
28
|
+
|
29
|
+
File.join(root, file_hash[:path], file_hash[:name])
|
35
30
|
end
|
36
31
|
|
37
32
|
def root
|
data/lib/csv_exporter/base.rb
CHANGED
data/lib/csv_exporter/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: csv_exporter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- DrawGun
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-02-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -24,20 +24,6 @@ dependencies:
|
|
24
24
|
- - '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: sqlite3
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - '>='
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - '>='
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
41
27
|
- !ruby/object:Gem::Dependency
|
42
28
|
name: rspec-rails
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|