ocra 1.3.1 → 1.3.2
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.
- data/History.txt +5 -0
- data/README.rdoc +5 -6
- data/Rakefile +6 -5
- data/bin/ocra +24 -12
- data/lib/ocra.rb +1 -1
- data/share/ocra/edicon.exe +0 -0
- data/share/ocra/stub.exe +0 -0
- data/share/ocra/stubw.exe +0 -0
- data/test/test_ocra.rb +3 -2
- metadata +78 -69
data/History.txt
CHANGED
data/README.rdoc
CHANGED
@@ -16,7 +16,7 @@ any additionally needed ruby libraries or DLL.
|
|
16
16
|
== FEATURES
|
17
17
|
|
18
18
|
* LZMA Compression (optional, default on)
|
19
|
-
* Ruby 1.9 support
|
19
|
+
* Ruby 1.8.7, 1.9.3 and 2.0.0 support
|
20
20
|
* Both windowed/console mode supported
|
21
21
|
* Includes gems based on usage, or from a Bundler Gemfile
|
22
22
|
|
@@ -153,9 +153,8 @@ Executable options:
|
|
153
153
|
|
154
154
|
* Windows
|
155
155
|
|
156
|
-
* Working Ruby installation
|
157
|
-
|
158
|
-
* RubyInstaller (1.8.7p299, 1.9.1p249, 1.9.2p0)
|
156
|
+
* Working Ruby installation. Ocra is tested with RubyInstaller
|
157
|
+
1.8.7p374, 1.9.3p545, and 2.0.0p481 (32 and 64 bit).
|
159
158
|
|
160
159
|
* MinGW Installation (when working with the source code only)
|
161
160
|
|
@@ -432,8 +431,8 @@ windowed applications (without console window) from .rbw-files.
|
|
432
431
|
Ruby on Windows provides two executables: ruby.exe is a console mode
|
433
432
|
application and rubyw.exe is a windowed application which does not
|
434
433
|
bring up a console window when launched using the Windows Explorer.
|
435
|
-
By default, or if the "<tt>--console</tt>" option is used, OCRA will
|
436
|
-
the console runtime (
|
434
|
+
By default, or if the "<tt>--console</tt>" option is used, OCRA will
|
435
|
+
use the console runtime (ruby.exe). OCRA will automatically select the
|
437
436
|
windowed runtime when your script has the ".rbw" extension, or if you
|
438
437
|
specify the "<tt>--windows</tt>" command line option.
|
439
438
|
|
data/Rakefile
CHANGED
@@ -3,12 +3,13 @@
|
|
3
3
|
require 'rubygems'
|
4
4
|
require 'hoe'
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
6
|
+
Hoe.plugin :minitest
|
7
|
+
|
8
|
+
spec = Hoe.spec 'ocra' do
|
9
|
+
developer "Lars Christensen", "larsch@belunktum.dk"
|
10
|
+
license "MIT"
|
11
11
|
end
|
12
|
+
|
12
13
|
spec.urls.each { |url| url.chomp! }
|
13
14
|
|
14
15
|
task :build_stub do
|
data/bin/ocra
CHANGED
@@ -175,7 +175,7 @@ module Ocra
|
|
175
175
|
a.sort.inject([]) { |r, e| r.last == e ? r : r << e }
|
176
176
|
end
|
177
177
|
|
178
|
-
VERSION = "1.3.
|
178
|
+
VERSION = "1.3.2"
|
179
179
|
|
180
180
|
IGNORE_MODULES = /^enumerator.so$/
|
181
181
|
|
@@ -545,7 +545,7 @@ EOF
|
|
545
545
|
# file from a gem path.
|
546
546
|
def Ocra.find_gem_files(features)
|
547
547
|
features_from_gems = []
|
548
|
-
gems =
|
548
|
+
gems = {}
|
549
549
|
|
550
550
|
# If a Bundler Gemfile was provided, add all gems it specifies
|
551
551
|
if Ocra.gemfile
|
@@ -562,7 +562,7 @@ EOF
|
|
562
562
|
ENV['BUNDLE_GEMFILE'] = Ocra.gemfile
|
563
563
|
Bundler.load.specs.each do |spec|
|
564
564
|
Ocra.verbose_msg "From Gemfile, adding gem #{spec.full_name}"
|
565
|
-
gems
|
565
|
+
gems[spec.name] ||= spec
|
566
566
|
end
|
567
567
|
|
568
568
|
unless gems.any?{|dir, name| name =~ /^bundler-[.0-9]+/}
|
@@ -570,34 +570,46 @@ EOF
|
|
570
570
|
Ocra.verbose_msg "From Gemfile, forcing inclusion of bundler gem itself"
|
571
571
|
bundler_spec = Gem.loaded_specs["bundler"]
|
572
572
|
bundler_spec or Ocra.fatal_error "Unable to locate bundler gem"
|
573
|
-
gems
|
573
|
+
gems["bundler"] ||= spec
|
574
574
|
end
|
575
575
|
end
|
576
576
|
|
577
577
|
if defined?(Gem)
|
578
|
+
# Include Gems that are loaded
|
579
|
+
Gem.loaded_specs.each { |gemname, spec| gems[gemname] ||= spec }
|
580
|
+
# Fall back to gem detection (loaded_specs are not population on
|
581
|
+
# all Ruby versions)
|
578
582
|
features.each do |feature|
|
583
|
+
# Detect load path unless absolute
|
579
584
|
if not feature.absolute?
|
580
585
|
feature = find_load_path(Pathname($:), feature)
|
581
586
|
next if feature.nil? # Could be enumerator.so
|
582
587
|
end
|
588
|
+
# Skip if found in known Gem dir
|
589
|
+
if gems.find { |gem, spec| feature.subpath?(spec.gem_dir) }
|
590
|
+
features_from_gems << feature
|
591
|
+
next
|
592
|
+
end
|
583
593
|
gempaths = Pathname(Gem.path)
|
584
594
|
gempaths.each do |gempath|
|
585
595
|
geminstallpath = Pathname(gempath) / "gems"
|
586
596
|
if feature.subpath?(geminstallpath)
|
587
597
|
gemlocalpath = feature.relative_path_from(geminstallpath)
|
588
598
|
fullgemname = gemlocalpath.path.split('/').first
|
589
|
-
|
590
|
-
|
599
|
+
gemspecpath = gempath / 'specifications' / "#{fullgemname}.gemspec"
|
600
|
+
if spec = Gem::Specification.load(gemspecpath)
|
601
|
+
gems[spec.name] ||= spec
|
602
|
+
features_from_gems << feature
|
603
|
+
else
|
604
|
+
Ocra.warn "Failed to load gemspec for '#{fullgemname}'"
|
605
|
+
end
|
591
606
|
end
|
592
607
|
end
|
593
608
|
end
|
594
609
|
|
595
|
-
gems = sort_uniq(gems)
|
596
610
|
gem_files = []
|
597
|
-
gems.each do |
|
598
|
-
|
599
|
-
@gemspecs << gemspecpath
|
600
|
-
spec = Gem::Specification.load(gemspecpath)
|
611
|
+
gems.each do |gemname, spec|
|
612
|
+
@gemspecs << Pathname(spec.spec_file) if File.exist?(spec.spec_file)
|
601
613
|
|
602
614
|
# Determine which set of files to include for this particular gem
|
603
615
|
include = [ :loaded, :files ]
|
@@ -638,7 +650,7 @@ EOF
|
|
638
650
|
|
639
651
|
Ocra.msg "Detected gem #{spec.full_name} (#{include.join(', ')})"
|
640
652
|
|
641
|
-
gem_root =
|
653
|
+
gem_root = Pathname(spec.gem_dir)
|
642
654
|
gem_root_files = nil
|
643
655
|
files = []
|
644
656
|
|
data/lib/ocra.rb
CHANGED
data/share/ocra/edicon.exe
CHANGED
Binary file
|
data/share/ocra/stub.exe
CHANGED
Binary file
|
data/share/ocra/stubw.exe
CHANGED
Binary file
|
data/test/test_ocra.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
require "
|
1
|
+
require "minitest/autorun"
|
2
|
+
|
2
3
|
require "tmpdir"
|
3
4
|
require "fileutils"
|
4
5
|
require "rbconfig"
|
@@ -15,7 +16,7 @@ end
|
|
15
16
|
|
16
17
|
include FileUtils
|
17
18
|
|
18
|
-
class TestOcra < Test
|
19
|
+
class TestOcra < MiniTest::Test
|
19
20
|
|
20
21
|
# Default arguments for invoking OCRA when running tests.
|
21
22
|
DefaultArgs = [ '--no-lzma', '--verbose' ]
|
metadata
CHANGED
@@ -1,67 +1,82 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: ocra
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.3.2
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 1
|
8
|
-
- 3
|
9
|
-
- 1
|
10
|
-
version: 1.3.1
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Lars Christensen
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
12
|
+
date: 2014-07-06 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: minitest
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '5.3'
|
22
|
+
type: :development
|
22
23
|
prerelease: false
|
23
|
-
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
25
|
none: false
|
25
|
-
requirements:
|
26
|
+
requirements:
|
26
27
|
- - ~>
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '5.3'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: rdoc
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ~>
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '4.0'
|
33
38
|
type: :development
|
34
|
-
version_requirements: *id001
|
35
|
-
- !ruby/object:Gem::Dependency
|
36
|
-
name: hoe
|
37
39
|
prerelease: false
|
38
|
-
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
39
41
|
none: false
|
40
|
-
requirements:
|
42
|
+
requirements:
|
41
43
|
- - ~>
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '4.0'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: hoe
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ~>
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '3.12'
|
48
54
|
type: :development
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '3.12'
|
62
|
+
description: ! 'OCRA (One-Click Ruby Application) builds Windows executables from
|
63
|
+
Ruby
|
64
|
+
|
65
|
+
source code. The executable is a self-extracting, self-running
|
66
|
+
|
67
|
+
executable that contains the Ruby interpreter, your source code and
|
68
|
+
|
69
|
+
any additionally needed ruby libraries or DLL.'
|
70
|
+
email:
|
71
|
+
- larsch@belunktum.dk
|
72
|
+
executables:
|
57
73
|
- ocra
|
58
74
|
extensions: []
|
59
|
-
|
60
|
-
extra_rdoc_files:
|
75
|
+
extra_rdoc_files:
|
61
76
|
- History.txt
|
62
77
|
- Manifest.txt
|
63
78
|
- README.rdoc
|
64
|
-
files:
|
79
|
+
files:
|
65
80
|
- History.txt
|
66
81
|
- Manifest.txt
|
67
82
|
- README.rdoc
|
@@ -75,38 +90,32 @@ files:
|
|
75
90
|
- lib/ocra.rb
|
76
91
|
- .gemtest
|
77
92
|
homepage: http://ocra.rubyforge.org
|
78
|
-
licenses:
|
79
|
-
|
93
|
+
licenses:
|
94
|
+
- MIT
|
80
95
|
post_install_message:
|
81
|
-
rdoc_options:
|
96
|
+
rdoc_options:
|
82
97
|
- --main
|
83
98
|
- README.rdoc
|
84
|
-
require_paths:
|
99
|
+
require_paths:
|
85
100
|
- lib
|
86
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
101
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
87
102
|
none: false
|
88
|
-
requirements:
|
89
|
-
- -
|
90
|
-
- !ruby/object:Gem::Version
|
91
|
-
|
92
|
-
|
93
|
-
- 0
|
94
|
-
version: "0"
|
95
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
103
|
+
requirements:
|
104
|
+
- - ! '>='
|
105
|
+
- !ruby/object:Gem::Version
|
106
|
+
version: '0'
|
107
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
96
108
|
none: false
|
97
|
-
requirements:
|
98
|
-
- -
|
99
|
-
- !ruby/object:Gem::Version
|
100
|
-
|
101
|
-
segments:
|
102
|
-
- 0
|
103
|
-
version: "0"
|
109
|
+
requirements:
|
110
|
+
- - ! '>='
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
version: '0'
|
104
113
|
requirements: []
|
105
|
-
|
106
|
-
|
107
|
-
rubygems_version: 1.8.24
|
114
|
+
rubyforge_project:
|
115
|
+
rubygems_version: 1.8.28
|
108
116
|
signing_key:
|
109
117
|
specification_version: 3
|
110
|
-
summary: OCRA (One-Click Ruby Application) builds Windows executables from Ruby
|
111
118
|
source code
|
112
|
-
|
119
|
+
summary: OCRA (One-Click Ruby Application) builds Windows executables from Ruby source
|
120
|
+
code
|
121
|
+
test_files:
|
113
122
|
- test/test_ocra.rb
|