ocra 1.3.6 → 1.3.7

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: 07d773c99a0073066c6164194f9244b2a7072d19
4
- data.tar.gz: 9879245b7b665fac3cb8ec658a4153934e7dd2ac
3
+ metadata.gz: 7b774a847e84fd8e197ad630a012bdd3386a4280
4
+ data.tar.gz: 72df064fe3a99802db7d8c4fd2c1cc14b139db30
5
5
  SHA512:
6
- metadata.gz: eb0c6eb2fdbf2043301340a2ac6a415b7b4a0f1d6d1d2679eabe3d08e957a4be9bcab949b989145cfc9862ecbedd255d3af1b61dae33c8cdd3a2fc2b31d7727e
7
- data.tar.gz: 0c198644eab7b9f23d4d3abdf9627d41859193843a56aad5e2583489c1e1829bccea26a4bc1e6f734ff4a17d29e0ead6bac7c37e138ebb65a0bec300afd13160
6
+ metadata.gz: a6f7624ec640b24294264231ca05851ea29c0688d96fc835819e90c2ab0fdcd4831eecf4a0be93b65b48198de6192cc12e1d0c96013c45ad4704cee95100baa0
7
+ data.tar.gz: 5bdf2bc7cfd82acfe37621ac6882a85173ac3f12da805ecacad1cd101ed5891d2d3fb92c1591bf8ba30e1e2467d1ee6b63b4cc36a7d3b82f0b5535f6188a602c
@@ -1,3 +1,8 @@
1
+ === 1.3.7
2
+
3
+ * Workaround for handling of file names and directory name with
4
+ non-ASCII characters (e.g. "invalid byte sequence in UTF-8")
5
+
1
6
  === 1.3.6
2
7
 
3
8
  * More robust cleanup of temporary files. Deletes using manual
data/bin/ocra CHANGED
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
  # -*- ruby -*-
3
+ # encoding: UTF-8
3
4
 
4
5
  module Ocra
5
6
  # Path handling class. Ruby's Pathname class is not used because it
@@ -7,7 +8,7 @@ module Ocra
7
8
  # separators.
8
9
  class Pathname
9
10
  def Pathname.pwd
10
- Pathname.new(Dir.pwd)
11
+ Pathname.new(Dir.pwd.encode('UTF-8'))
11
12
  end
12
13
 
13
14
  def Pathname.pathequal(a, b)
@@ -22,7 +23,7 @@ module Ocra
22
23
  ABSOLUTE_PAT = /\A([A-Z]:)?#{SEPARATOR_PAT}/i
23
24
 
24
25
  def initialize(path)
25
- @path = path
26
+ @path = path && path.encode('UTF-8')
26
27
  end
27
28
 
28
29
  def to_native
@@ -86,7 +87,7 @@ module Ocra
86
87
  end
87
88
 
88
89
  def entries
89
- Dir.entries(@path).map { |e| self / e }
90
+ Dir.entries(@path).map { |e| self / e.encode('UTF-8') }
90
91
  end
91
92
 
92
93
  # Recursively find all files which match a specified regular
@@ -178,7 +179,7 @@ module Ocra
178
179
  a.sort.inject([]) { |r, e| r.last == e ? r : r << e }
179
180
  end
180
181
 
181
- VERSION = "1.3.6"
182
+ VERSION = "1.3.7"
182
183
 
183
184
  IGNORE_MODULES = /\/(enumerator.so|rational.so|complex.so|thread.rb)$/
184
185
 
@@ -438,7 +439,7 @@ EOF
438
439
  end
439
440
 
440
441
  @options[:files].map! { |path|
441
- path = path.tr('\\','/')
442
+ path = path.encode('UTF-8').tr('\\','/')
442
443
  if File.directory?(path)
443
444
  # If a directory is passed, we want all files under that directory
444
445
  path = "#{path}/**/*"
@@ -655,6 +656,12 @@ EOF
655
656
  Ocra.msg "Detected gem #{spec.full_name} (#{include.join(', ')})"
656
657
 
657
658
  gem_root = Pathname(spec.gem_dir)
659
+ gem_extension = (gem_root / '..' / '..' / 'extensions').expand
660
+ if gem_extension.exist?
661
+ build_complete = gem_extension.find_all_files(/gem.build_complete/).select{|p| p.dirname.basename.to_s == spec.full_name}
662
+ else
663
+ build_complete = nil
664
+ end
658
665
  gem_root_files = nil
659
666
  files = []
660
667
 
@@ -673,7 +680,8 @@ EOF
673
680
  when :files
674
681
  gem_root_files ||= gem_root.find_all_files(//)
675
682
  files << gem_root_files.select { |path| path.relative_path_from(gem_root) !~ GEM_NON_FILE_RE }
676
- when :extra
683
+ files << build_complete if build_complete
684
+ when :extras
677
685
  gem_root_files ||= gem_root.find_all_files(//)
678
686
  files << gem_root_files.select { |path| path.relative_path_from(gem_root) =~ GEM_EXTRA_RE }
679
687
  when :scripts
@@ -1069,7 +1077,7 @@ EOF
1069
1077
  @files.each do |tgt, src|
1070
1078
  src_escaped = src.to_s.gsub('"', '""')
1071
1079
  target_dir_escaped = Pathname.new(tgt).dirname.to_s.gsub('"', '""')
1072
- iss << "Source: \"#{src_escaped}\"; DestDir: \"{app}/#{target_dir_escaped}\"\n"
1080
+ iss << "Source: \"#{src_escaped}\"; DestDir: \"{app}/#{target_dir_escaped}\"\n" unless src_escaped =~ IGNORE_MODULES
1073
1081
  end
1074
1082
  iss << "\n"
1075
1083
 
@@ -1,3 +1,3 @@
1
1
  class Ocra
2
- VERSION = '1.3.6'
2
+ VERSION = '1.3.7'
3
3
  end
Binary file
Binary file
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ocra
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.6
4
+ version: 1.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lars Christensen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-28 00:00:00.000000000 Z
11
+ date: 2017-03-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '3.13'
47
+ version: '3.16'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '3.13'
54
+ version: '3.16'
55
55
  description: |-
56
56
  OCRA (One-Click Ruby Application) builds Windows executables from Ruby
57
57
  source code. The executable is a self-extracting, self-running
@@ -67,7 +67,6 @@ extra_rdoc_files:
67
67
  - Manifest.txt
68
68
  - README.rdoc
69
69
  files:
70
- - ".gemtest"
71
70
  - History.txt
72
71
  - Manifest.txt
73
72
  - README.rdoc
@@ -101,10 +100,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
101
100
  version: '0'
102
101
  requirements: []
103
102
  rubyforge_project:
104
- rubygems_version: 2.4.8
103
+ rubygems_version: 2.4.5.2
105
104
  signing_key:
106
105
  specification_version: 4
107
106
  summary: OCRA (One-Click Ruby Application) builds Windows executables from Ruby source
108
107
  code
109
- test_files:
110
- - test/test_ocra.rb
108
+ test_files: []
data/.gemtest DELETED
File without changes