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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c5624b0822f69258c1bd1aa3c5db3747baab5ecf
4
- data.tar.gz: 7aaf464256f26baf7a420c96fcbd63d25280352f
3
+ metadata.gz: d99a15f5a606747ed692a98146e296284f603d4e
4
+ data.tar.gz: 656ae4d45d994d19d28741455354c0e4d4b829d2
5
5
  SHA512:
6
- metadata.gz: 07e94ea6cc5c536cd0d3cf37b6384c1a06604d78af489349d1d88abf81a097041dc9489b787b26350f30f4bb1d4467d9eb3d8eac4a51208d7bdc9b106dced3a7
7
- data.tar.gz: e77cefe5c23d5d7c6749b314daa2c6744fab64b56a682e1a2b98763cfb1399839e99dfa33349e825b862249474c2020a4a52a55e41ca0d73a4380559e63bc0c5
6
+ metadata.gz: 7350cd7a4dccdb5024e23615d733c18e3265cc5453fffb4d12148f3a3b13f19afb4876ef897400558f11e6301af74e045acc8848bd13415d49953528de43b7f1
7
+ data.tar.gz: be9374f97a467aa6b745a43c0f9b99e67a3aace39ec3caca5ea5ec3ebac5212950f8bfa72220bc2c9332a2854e085a8ddbecee6273bef90f59bd990d2ac55184
@@ -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 = [MANIFEST, ZIP, 'scorm_generator.rb', 'fire_app_log.txt', 'crossdomain.xml', 'config.rb', 'robots.txt']
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
@@ -1,3 +1,3 @@
1
1
  module Scormgen
2
- VERSION = "1.0.5"
2
+ VERSION = "1.0.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scormgen
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arnaud Levy