simple-datatable 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/datatable/generator.rb +5 -0
- data/simple-datatable.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6546720f990be32ef557c2db9e4d4b311a85c31a3afe7c3053d5673ad180ee36
|
4
|
+
data.tar.gz: a8d92d1c1da51150d823313c8ac93f2f78e84f96ac5c822d7c90cec52094ebb1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fca861d0c1fc1e2dec43980bdf5baae3b708ce7104b81d3477e4870a6eb05226aa533fe048d96842d8ff55e5192db82d62fcc0cc7d03fabe8bb969cfcbc10818
|
7
|
+
data.tar.gz: df26f00ff3eb2730d94e054167dd111f627c849599023e04b39574767288ce47a7d86bf28e57705ad58ccf168ac220f35a8355cbb128220ba39c109fde9afa1a
|
data/lib/datatable/generator.rb
CHANGED
@@ -26,6 +26,7 @@ module Datatable
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def create_principal
|
29
|
+
return if File.exist?("#{@dirname}/application_datatable.rb")
|
29
30
|
result = generate_template('application_datatable.erb')
|
30
31
|
puts result
|
31
32
|
File.open("#{@dirname}/application_datatable.rb", 'w') { |file| file.write(result) }
|
@@ -33,6 +34,10 @@ module Datatable
|
|
33
34
|
end
|
34
35
|
|
35
36
|
def create_file
|
37
|
+
if File.exist?("#{@dirname}/#{@name.downcase}_datatable.rb")
|
38
|
+
puts "Ya existe el archivo: #{@dirname}/#{@name.downcase}_datatable.rb, intenta con otro nombre"
|
39
|
+
return
|
40
|
+
end
|
36
41
|
result = generate_template('template_datatable.erb')
|
37
42
|
puts result
|
38
43
|
File.open("#{@dirname}/#{@name.downcase}_datatable.rb", 'w') { |file| file.write(result) }
|
data/simple-datatable.gemspec
CHANGED