graff 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/graff.rb +9 -0
  2. metadata +3 -3
data/lib/graff.rb CHANGED
@@ -1,8 +1,17 @@
1
1
  require 'plist'
2
+ require 'zlib'
2
3
 
3
4
  class Stencil
4
5
 
5
6
  def initialize(file)
7
+ if File.directory?(file)
8
+ file = file + "/data.plist"
9
+ end
10
+
11
+ if File.read(file, 2).unpack('CC') == [0x1f, 0x8b]
12
+ file = Zlib::GzipReader.open(file).read
13
+ end
14
+
6
15
  @stencil = Plist::parse_xml(file)
7
16
  end
8
17
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graff
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-06-12 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: plist
16
- requirement: &70167979108340 !ruby/object:Gem::Requirement
16
+ requirement: &70360774936400 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70167979108340
24
+ version_requirements: *70360774936400
25
25
  description: Parse OmniGraffle documents
26
26
  email: patrick@mokolabs.com
27
27
  executables: []