rubygems-compile 1.1.0 → 1.1.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.
- data/lib/rubygems-compile/analyzer.rb +0 -10
- data/lib/rubygems-compile/compiler.rb +7 -6
- metadata +3 -3
@@ -11,16 +11,6 @@ class Gem::Analyzer < Ripper::SexpBuilder
|
|
11
11
|
|
12
12
|
attr_reader :warnings
|
13
13
|
|
14
|
-
##
|
15
|
-
# Check the given string of code for potential issues when compiled.
|
16
|
-
# Returns the analyzer instance afterwards.
|
17
|
-
|
18
|
-
def self.check code
|
19
|
-
@parser ||= Gem::Analyzer.new(code)
|
20
|
-
@parser.parse
|
21
|
-
@parser
|
22
|
-
end
|
23
|
-
|
24
14
|
def parse
|
25
15
|
@warnings = []
|
26
16
|
super
|
@@ -29,10 +29,10 @@ class Gem::Compiler
|
|
29
29
|
gem_files.each do |file|
|
30
30
|
message = compile_file_message(file)
|
31
31
|
full_path = File.join(@spec.full_gem_path, file)
|
32
|
-
if
|
33
|
-
message << "\t\t\tSKIPPED: #{@parser.warnings.join(', ')}"
|
34
|
-
else
|
32
|
+
if safe? full_path
|
35
33
|
MacRuby::Compiler.compile_file full_path
|
34
|
+
else
|
35
|
+
message << "\t\t\tSKIPPED: #{@analyzer.warnings.uniq.join(', ')}"
|
36
36
|
end
|
37
37
|
say message if really_verbose
|
38
38
|
end
|
@@ -42,9 +42,10 @@ class Gem::Compiler
|
|
42
42
|
# Uses the GemAnalyzer class to determine if a given file might have
|
43
43
|
# any potential issues when compiled.
|
44
44
|
|
45
|
-
def
|
46
|
-
@
|
47
|
-
|
45
|
+
def safe? file
|
46
|
+
@analyzer = Gem::Analyzer.new File.read(file)
|
47
|
+
@analyzer.parse
|
48
|
+
@analyzer.warnings.empty?
|
48
49
|
end
|
49
50
|
|
50
51
|
def gem_compilation_message
|
metadata
CHANGED
@@ -2,14 +2,14 @@
|
|
2
2
|
name: rubygems-compile
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 1.1.
|
5
|
+
version: 1.1.1
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Mark Rada
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-02-
|
12
|
+
date: 2012-02-13 00:00:00 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: minitest
|
@@ -81,7 +81,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
81
81
|
version: "0"
|
82
82
|
requirements: []
|
83
83
|
rubyforge_project:
|
84
|
-
rubygems_version: 1.8.
|
84
|
+
rubygems_version: 1.8.16
|
85
85
|
signing_key:
|
86
86
|
specification_version: 3
|
87
87
|
summary: A trio of rubygems commands that interface with the MacRuby compiler
|