scormgen 1.0.5 → 1.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/scormgen/generator.rb +6 -3
- data/lib/scormgen/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d99a15f5a606747ed692a98146e296284f603d4e
|
4
|
+
data.tar.gz: 656ae4d45d994d19d28741455354c0e4d4b829d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7350cd7a4dccdb5024e23615d733c18e3265cc5453fffb4d12148f3a3b13f19afb4876ef897400558f11e6301af74e045acc8848bd13415d49953528de43b7f1
|
7
|
+
data.tar.gz: be9374f97a467aa6b745a43c0f9b99e67a3aace39ec3caca5ea5ec3ebac5212950f8bfa72220bc2c9332a2854e085a8ddbecee6273bef90f59bd990d2ac55184
|
data/lib/scormgen/generator.rb
CHANGED
@@ -1,19 +1,22 @@
|
|
1
1
|
require 'zip'
|
2
|
+
require 'scormgen/version'
|
3
|
+
|
2
4
|
module Scormgen
|
3
5
|
class Generator
|
4
6
|
MANIFEST = 'imsmanifest.xml'
|
5
7
|
ZIP = 'module.zip'
|
6
|
-
IGNORED_FILES = [
|
8
|
+
IGNORED_FILES = ['scorm_generator.rb', 'fire_app_log.txt', 'crossdomain.xml', 'config.rb', 'robots.txt', '.DS_Store']
|
7
9
|
|
8
10
|
def run(identifier=nil, name=nil)
|
11
|
+
puts "scormgen #{Scormgen::VERSION}"
|
9
12
|
@identifier = identifier.nil? ? default_identifier : identifier
|
10
13
|
@name = name.nil? ? @identifier : name
|
11
14
|
puts "Generating SCORM manifest for #{@name} (#{@identifier})"
|
12
|
-
|
13
15
|
delete_previous_files
|
14
16
|
list_files
|
15
17
|
create_manifest
|
16
18
|
zip_files
|
19
|
+
puts "Done"
|
17
20
|
end
|
18
21
|
|
19
22
|
protected
|
@@ -87,13 +90,13 @@ module Scormgen
|
|
87
90
|
end
|
88
91
|
|
89
92
|
def zip_files
|
90
|
-
# FIXME there must be no root folder!
|
91
93
|
puts "Zipping"
|
92
94
|
Zip::File.open(ZIP, Zip::File::CREATE) do |zipfile|
|
93
95
|
@files.each do |file|
|
94
96
|
puts "Adding #{file} to zip"
|
95
97
|
zipfile.add file, file
|
96
98
|
end
|
99
|
+
zipfile.add MANIFEST, MANIFEST
|
97
100
|
end
|
98
101
|
puts "#{ZIP} generated"
|
99
102
|
end
|
data/lib/scormgen/version.rb
CHANGED