refx-engine-p3lib 0.0.5 → 0.0.6

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8a8d3632aa334109feb65b60bca34ad505512354
4
- data.tar.gz: 8b7e8567e0903e373c38117bcc0e477b442477a2
3
+ metadata.gz: 9df90ad778f7d8f3af846244a37cdba85e6c73ae
4
+ data.tar.gz: bebf064c02bdd8085ddcbfa9bf0b8aa383d0f943
5
5
  SHA512:
6
- metadata.gz: 5c72ff8069b947c9858c5bb47756453fb22451a555fb00619259f3a1d8d55a05663c01e69ae272047386c15db136dc0c44ef4be5fc83239c57cbc3ca06fae122
7
- data.tar.gz: 1febf5316ab8f5c2e11e2e7bb70f934a1b2015ec4b6d1663bd0f6156b8fa2ec5b97cd8b4e34592cfbac7061250a008a557430143265113ae0689fa5b7afeb4ea
6
+ metadata.gz: b937cc46485b2df4e3820680e8ef6e9ad55db8bf00e57c4a1b6dfdabbc4f91d476f9a132f6371ab9b22482e8a5adac5e7e5e6c5cfbfbe3ae21975401f48b1a9e
7
+ data.tar.gz: b441057420596d3946a46d4eb47d6fd46f8e12df115a0b1d878d81b45e759c342350cb56a37529d4973bad0eb37ea274c79d0bbea003fd5017072fa2830acf24
@@ -5,6 +5,21 @@
5
5
  class P3libIndesign
6
6
 
7
7
  public
8
+
9
+ def self.open_doc_with_locked_fallback(indd_app, doc)
10
+ begin
11
+ return indd_app.open(MacTypes::FileURL.path(doc).hfs_path)
12
+ rescue StandardError => e
13
+ if File.exists?(doc)
14
+
15
+ P3libLogger::log('File may be locked, try to open a copy',e.to_s,'info')
16
+ new_doc = '/tmp/'+P3libUtil::helper_newtempname(6)+'.indd'
17
+ FileUtils.copy(doc, new_doc )
18
+ return indd_app.open(MacTypes::FileURL.path(new_doc).hfs_path)
19
+ end
20
+ end
21
+ end
22
+
8
23
  def self.p3imgutils_path
9
24
  p3imgutils_path = File.expand_path('../../p3imgutils', __FILE__)
10
25
  return p3imgutils_path
@@ -1,7 +1,7 @@
1
1
  module Refx
2
2
  module Engine
3
3
  module P3lib
4
- VERSION = "0.0.5"
4
+ VERSION = "0.0.6"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: refx-engine-p3lib
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pim Snel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-14 00:00:00.000000000 Z
11
+ date: 2015-09-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler