scorm 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/scorm.rb +1 -1
- data/lib/scorm/commands/extract.rb +1 -1
- data/lib/scorm/package.rb +3 -5
- metadata +3 -3
data/lib/scorm.rb
CHANGED
@@ -4,7 +4,7 @@ module Scorm::Command
|
|
4
4
|
package = args.shift.strip rescue ''
|
5
5
|
raise(CommandFailed, "Invalid package.") if package == ''
|
6
6
|
|
7
|
-
Scorm::Package.open(package) do |pkg|
|
7
|
+
Scorm::Package.open(package, :cleanup => false) do |pkg|
|
8
8
|
display "Extracted package to #{pkg.path}"
|
9
9
|
end
|
10
10
|
end
|
data/lib/scorm/package.rb
CHANGED
@@ -140,12 +140,10 @@ module Scorm
|
|
140
140
|
end
|
141
141
|
|
142
142
|
# This will only return +true+ if what was opened was an actual zip file.
|
143
|
+
# It returns +false+ if what was opened was a filesystem directory.
|
143
144
|
def package?
|
144
|
-
|
145
|
-
|
146
|
-
# in the course repository and therefor not a package.
|
147
|
-
return false if File.extname(@package)
|
148
|
-
return true
|
145
|
+
return true if File.extname(@package) == '.zip'
|
146
|
+
return false
|
149
147
|
end
|
150
148
|
|
151
149
|
# Reads a file from the package. If the file is not extracted yet (all files
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scorm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 1
|
10
|
+
version: 1.0.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Niklas Holmgren
|