scorm 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  module Scorm
2
- VERSION = '1.0.0'
2
+ VERSION = '1.0.1'
3
3
  end
4
4
 
5
5
  require 'scorm/package'
@@ -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
@@ -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
- # If the path to the course in the repository is the same as the path to
145
- # the package, we can assume that what was really opened was a directory
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: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 0
10
- version: 1.0.0
9
+ - 1
10
+ version: 1.0.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Niklas Holmgren