jruby-lint 0.4.1 → 0.9.0
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 +7 -0
- data/Gemfile +2 -1
- data/README.md +2 -8
- data/jruby-lint.gemspec +2 -3
- data/lib/jruby/lint/ast.rb +1 -1
- data/lib/jruby/lint/checkers.rb +18 -1
- data/lib/jruby/lint/checkers/fork_exec.rb +22 -39
- data/lib/jruby/lint/checkers/gem.rb +44 -30
- data/lib/jruby/lint/checkers/gemspec.rb +4 -4
- data/lib/jruby/lint/checkers/nonatomic.rb +38 -8
- data/lib/jruby/lint/checkers/object_space.rb +8 -6
- data/lib/jruby/lint/checkers/system.rb +4 -4
- data/lib/jruby/lint/checkers/thread_critical.rb +4 -4
- data/lib/jruby/lint/cli.rb +8 -1
- data/lib/jruby/lint/collectors.rb +18 -7
- data/lib/jruby/lint/finding.rb +1 -1
- data/lib/jruby/lint/libraries.rb +21 -30
- data/lib/jruby/lint/project.rb +3 -3
- data/lib/jruby/lint/reporters/html.rb +4 -3
- data/lib/jruby/lint/reporters/jruby-lint.html.erb +10 -1
- data/lib/jruby/lint/reporters/text.rb +5 -4
- data/lib/jruby/lint/version.rb +1 -1
- data/spec/fixtures/C-Extension-Alternatives.md +81 -0
- data/spec/jruby/lint/ast_spec.rb +6 -6
- data/spec/jruby/lint/checkers_spec.rb +91 -62
- data/spec/jruby/lint/collectors_spec.rb +3 -9
- data/spec/jruby/lint/finding_spec.rb +10 -10
- data/spec/jruby/lint/libraries_spec.rb +13 -13
- data/spec/jruby/lint/project_spec.rb +34 -40
- data/spec/jruby/lint/reporters_spec.rb +22 -13
- data/spec/jruby/lint/version_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +30 -96
- data/lib/jruby/lint/checkers/timeout.rb +0 -21
- data/lib/jruby/lint/github.crt +0 -23
- data/spec/fixtures/C-Extension-Alternatives.html +0 -339
- data/spec/jruby/lint/cli_spec.rb +0 -73
@@ -1,21 +0,0 @@
|
|
1
|
-
module JRuby::Lint
|
2
|
-
module Checkers
|
3
|
-
class Timeout
|
4
|
-
include Checker
|
5
|
-
|
6
|
-
def visitCallNode(node)
|
7
|
-
if node.name == "timeout"
|
8
|
-
begin
|
9
|
-
add_finding(collector, node)
|
10
|
-
rescue
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
|
-
def add_finding(collector, node)
|
16
|
-
collector.findings << Finding.new("Timeout in JRuby does not work in many cases",
|
17
|
-
[:timeout, :warning], node.position)
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
data/lib/jruby/lint/github.crt
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
-----BEGIN CERTIFICATE-----
|
2
|
-
MIIDxTCCAq2gAwIBAgIQAqxcJmoLQJuPC3nyrkYldzANBgkqhkiG9w0BAQUFADBs
|
3
|
-
MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3
|
4
|
-
d3cuZGlnaWNlcnQuY29tMSswKQYDVQQDEyJEaWdpQ2VydCBIaWdoIEFzc3VyYW5j
|
5
|
-
ZSBFViBSb290IENBMB4XDTA2MTExMDAwMDAwMFoXDTMxMTExMDAwMDAwMFowbDEL
|
6
|
-
MAkGA1UEBhMCVVMxFTATBgNVBAoTDERpZ2lDZXJ0IEluYzEZMBcGA1UECxMQd3d3
|
7
|
-
LmRpZ2ljZXJ0LmNvbTErMCkGA1UEAxMiRGlnaUNlcnQgSGlnaCBBc3N1cmFuY2Ug
|
8
|
-
RVYgUm9vdCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMbM5XPm
|
9
|
-
+9S75S0tMqbf5YE/yc0lSbZxKsPVlDRnogocsF9ppkCxxLeyj9CYpKlBWTrT3JTW
|
10
|
-
PNt0OKRKzE0lgvdKpVMSOO7zSW1xkX5jtqumX8OkhPhPYlG++MXs2ziS4wblCJEM
|
11
|
-
xChBVfvLWokVfnHoNb9Ncgk9vjo4UFt3MRuNs8ckRZqnrG0AFFoEt7oT61EKmEFB
|
12
|
-
Ik5lYYeBQVCmeVyJ3hlKV9Uu5l0cUyx+mM0aBhakaHPQNAQTXKFx01p8VdteZOE3
|
13
|
-
hzBWBOURtCmAEvF5OYiiAhF8J2a3iLd48soKqDirCmTCv2ZdlYTBoSUeh10aUAsg
|
14
|
-
EsxBu24LUTi4S8sCAwEAAaNjMGEwDgYDVR0PAQH/BAQDAgGGMA8GA1UdEwEB/wQF
|
15
|
-
MAMBAf8wHQYDVR0OBBYEFLE+w2kD+L9HAdSYJhoIAu9jZCvDMB8GA1UdIwQYMBaA
|
16
|
-
FLE+w2kD+L9HAdSYJhoIAu9jZCvDMA0GCSqGSIb3DQEBBQUAA4IBAQAcGgaX3Nec
|
17
|
-
nzyIZgYIVyHbIUf4KmeqvxgydkAQV8GK83rZEWWONfqe/EW1ntlMMUu4kehDLI6z
|
18
|
-
eM7b41N5cdblIZQB2lWHmiRk9opmzN6cN82oNLFpmyPInngiK3BD41VHMWEZ71jF
|
19
|
-
hS9OMPagMRYjyOfiZRYzy78aG6A9+MpeizGLYAiJLQwGXFK3xPkKmNEVX58Svnw2
|
20
|
-
Yzi9RKR/5CYrCsSXaQ3pjOLAEFe4yHYSkVXySGnYvCoCWw9E1CAx2/S6cCZdkGCe
|
21
|
-
vEsXCS+0yx5DaMkHJ8HSXPfqIbloEpw8nL+e/IBcm2PN7EeqJSdnoDfzAIJ9VNep
|
22
|
-
+OkuE6N36B9K
|
23
|
-
-----END CERTIFICATE-----
|
@@ -1,339 +0,0 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
<!DOCTYPE html>
|
5
|
-
<html>
|
6
|
-
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# githubog: http://ogp.me/ns/fb/githubog#">
|
7
|
-
<meta charset='utf-8'>
|
8
|
-
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
9
|
-
<title>C Extension Alternatives · jruby/jruby Wiki · GitHub</title>
|
10
|
-
<link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="GitHub" />
|
11
|
-
<link rel="fluid-icon" href="https://github.com/fluidicon.png" title="GitHub" />
|
12
|
-
<link rel="apple-touch-icon" sizes="57x57" href="/apple-touch-icon-114.png" />
|
13
|
-
<link rel="apple-touch-icon" sizes="114x114" href="/apple-touch-icon-114.png" />
|
14
|
-
<link rel="apple-touch-icon" sizes="72x72" href="/apple-touch-icon-144.png" />
|
15
|
-
<link rel="apple-touch-icon" sizes="144x144" href="/apple-touch-icon-144.png" />
|
16
|
-
<link rel="logo" type="image/svg" href="http://github-media-downloads.s3.amazonaws.com/github-logo.svg" />
|
17
|
-
<meta name="msapplication-TileImage" content="/windows-tile.png">
|
18
|
-
<meta name="msapplication-TileColor" content="#ffffff">
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
|
23
|
-
|
24
|
-
<meta content="authenticity_token" name="csrf-param" />
|
25
|
-
<meta content="wGM78MzZjf2nWL4+igQC+rfoXXPgouU6BMay3lyDqj8=" name="csrf-token" />
|
26
|
-
|
27
|
-
<link href="https://a248.e.akamai.net/assets.github.com/assets/github-d0506285c2d299ff2ea4f1be2c134472cdc318aa.css" media="screen" rel="stylesheet" type="text/css" />
|
28
|
-
<link href="https://a248.e.akamai.net/assets.github.com/assets/github2-41b4a8d5dfdbb37bbeaffda10e7e9ebe84b944dc.css" media="screen" rel="stylesheet" type="text/css" />
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
<script src="https://a248.e.akamai.net/assets.github.com/assets/frameworks-5d526182eb5719ec57fe668ec5ca700f54fce693.js" type="text/javascript"></script>
|
33
|
-
<script src="https://a248.e.akamai.net/assets.github.com/assets/github-5c9cb759a38e8fa524a7f5cb418b8d44b8172f00.js" type="text/javascript"></script>
|
34
|
-
|
35
|
-
|
36
|
-
<script src="https://a248.e.akamai.net/assets.github.com/assets/wiki-ae952a28c0cbce081de354bdd0c0a996dce84c3e.js" type="text/javascript"></script>
|
37
|
-
<meta property="og:title" content="jruby"/>
|
38
|
-
<meta property="og:type" content="githubog:gitrepository"/>
|
39
|
-
<meta property="og:url" content="https://github.com/jruby/jruby"/>
|
40
|
-
<meta property="og:image" content="https://secure.gravatar.com/avatar/1041835545ba2997fad5ca683a91d58d?s=420&d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png"/>
|
41
|
-
<meta property="og:site_name" content="GitHub"/>
|
42
|
-
<meta property="og:description" content="JRuby, an implementation of Ruby on the JVM. Contribute to jruby development by creating an account on GitHub."/>
|
43
|
-
<meta property="twitter:card" content="summary"/>
|
44
|
-
<meta property="twitter:site" content="@GitHub">
|
45
|
-
<meta property="twitter:title" content="jruby/jruby"/>
|
46
|
-
|
47
|
-
<meta name="description" content="JRuby, an implementation of Ruby on the JVM. Contribute to jruby development by creating an account on GitHub." />
|
48
|
-
|
49
|
-
<link href="https://github.com/jruby/jruby/commits/master.atom" rel="alternate" title="Recent Commits to jruby:master" type="application/atom+xml" />
|
50
|
-
|
51
|
-
</head>
|
52
|
-
|
53
|
-
|
54
|
-
<body class="logged_out vis-public env-production ">
|
55
|
-
<div id="wrapper">
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
<div class="header header-logged-out">
|
67
|
-
<div class="container clearfix">
|
68
|
-
|
69
|
-
<a class="header-logo-wordmark" href="https://github.com/">
|
70
|
-
<img alt="GitHub" class="github-logo-4x" height="30" src="https://a248.e.akamai.net/assets.github.com/images/modules/header/logov7@4x.png?1340659561" />
|
71
|
-
<img alt="GitHub" class="github-logo-4x-hover" height="30" src="https://a248.e.akamai.net/assets.github.com/images/modules/header/logov7@4x-hover.png?1340659561" />
|
72
|
-
</a>
|
73
|
-
|
74
|
-
|
75
|
-
<ul class="top-nav">
|
76
|
-
<li class="explore"><a href="https://github.com/explore">Explore GitHub</a></li>
|
77
|
-
<li class="search"><a href="https://github.com/search">Search</a></li>
|
78
|
-
<li class="features"><a href="https://github.com/features">Features</a></li>
|
79
|
-
<li class="blog"><a href="https://github.com/blog">Blog</a></li>
|
80
|
-
</ul>
|
81
|
-
|
82
|
-
|
83
|
-
<div class="header-actions">
|
84
|
-
<a class="button primary" href="https://github.com/signup">Sign up for free</a>
|
85
|
-
<a class="button" href="https://github.com/login?return_to=%2Fjruby%2Fjruby%2Fwiki%2FC-Extension-Alternatives">Sign in</a>
|
86
|
-
</div>
|
87
|
-
|
88
|
-
</div>
|
89
|
-
</div>
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
<div class="site hfeed" itemscope itemtype="http://schema.org/WebPage">
|
98
|
-
<div class="hentry">
|
99
|
-
|
100
|
-
<div class="pagehead repohead instapaper_ignore readability-menu ">
|
101
|
-
<div class="container">
|
102
|
-
<div class="title-actions-bar">
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
<ul class="pagehead-actions">
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
<li>
|
111
|
-
<a href="/login?return_to=%2Fjruby%2Fjruby"
|
112
|
-
class="minibutton js-toggler-target star-button entice tooltipped upwards"
|
113
|
-
title="You must be signed in to use this feature" rel="nofollow">
|
114
|
-
<span class="mini-icon mini-icon-star"></span>Star
|
115
|
-
</a>
|
116
|
-
<a class="social-count js-social-count" href="/jruby/jruby/stargazers">
|
117
|
-
1,284
|
118
|
-
</a>
|
119
|
-
</li>
|
120
|
-
<li>
|
121
|
-
<a href="/login?return_to=%2Fjruby%2Fjruby"
|
122
|
-
class="minibutton js-toggler-target fork-button entice tooltipped upwards"
|
123
|
-
title="You must be signed in to fork a repository" rel="nofollow">
|
124
|
-
<span class="mini-icon mini-icon-fork"></span>Fork
|
125
|
-
</a>
|
126
|
-
<a href="/jruby/jruby/network" class="social-count">
|
127
|
-
314
|
128
|
-
</a>
|
129
|
-
</li>
|
130
|
-
</ul>
|
131
|
-
|
132
|
-
<h1 itemscope itemtype="http://data-vocabulary.org/Breadcrumb" class="entry-title public">
|
133
|
-
<span class="repo-label"><span>public</span></span>
|
134
|
-
<span class="mega-icon mega-icon-public-repo"></span>
|
135
|
-
<span class="author vcard">
|
136
|
-
<a href="/jruby" class="url fn" itemprop="url" rel="author">
|
137
|
-
<span itemprop="title">jruby</span>
|
138
|
-
</a></span> /
|
139
|
-
<strong><a href="/jruby/jruby" class="js-current-repository">jruby</a></strong>
|
140
|
-
</h1>
|
141
|
-
</div>
|
142
|
-
|
143
|
-
|
144
|
-
<ul class="tabs">
|
145
|
-
<li><a href="/jruby/jruby" highlight="[:repo_source, :repo_downloads, :repo_commits, :repo_tags, :repo_branches]">Code</a></li>
|
146
|
-
<li><a href="/jruby/jruby/network" highlight="[:repo_network]">Network</a></li>
|
147
|
-
<li><a href="/jruby/jruby/pulls" highlight="[:repo_pulls]">Pull Requests <span class='counter'>14</span></a></li>
|
148
|
-
|
149
|
-
<li><a href="/jruby/jruby/issues" highlight="[:repo_issues]">Issues <span class='counter'>126</span></a></li>
|
150
|
-
|
151
|
-
<li><a href="/jruby/jruby/wiki" class="selected" highlight="[:repo_wiki]">Wiki</a></li>
|
152
|
-
|
153
|
-
|
154
|
-
<li><a href="/jruby/jruby/graphs" highlight="[:repo_graphs, :repo_contributors]">Graphs</a></li>
|
155
|
-
|
156
|
-
|
157
|
-
</ul>
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
<div class="tabnav">
|
162
|
-
<ul class="tabnav-tabs">
|
163
|
-
<li><a href="/jruby/jruby/wiki" class="tabnav-tab">Home</a></li>
|
164
|
-
<li><a href="/jruby/jruby/wiki/_pages" class="tabnav-tab">Pages</a></li>
|
165
|
-
<li><a href="/jruby/jruby/wiki/_history" class="tabnav-tab">Wiki History</a></li>
|
166
|
-
<li><a href="/jruby/jruby/wiki/_access" class="tabnav-tab">Git Access</a></li>
|
167
|
-
</ul>
|
168
|
-
</div>
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
</div>
|
174
|
-
</div><!-- /.repohead -->
|
175
|
-
|
176
|
-
<div id="js-repo-pjax-container" class="container context-loader-container" data-pjax-container>
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
<div id="wiki-wrapper" class="page">
|
181
|
-
<div id="head">
|
182
|
-
<ul class="wiki-actions readability-extra">
|
183
|
-
<li class="gollum-minibutton"><a href="/jruby/jruby/wiki/C-Extension-Alternatives/_history"
|
184
|
-
class="minibutton bigger action-page-history">
|
185
|
-
Page History
|
186
|
-
</a></li>
|
187
|
-
</ul>
|
188
|
-
<h1 class="instapaper_title">C Extension Alternatives</h1>
|
189
|
-
</div>
|
190
|
-
<div id="wiki-content">
|
191
|
-
<div class="wrap">
|
192
|
-
<div id="wiki-body" class="gollum-markdown-content instapaper_body">
|
193
|
-
<div class="markdown-body">
|
194
|
-
<p>JRuby versions prior to 1.6 did not support Ruby C extensions, and even in 1.6 the support is still "in development" and considered experimental. As of 1.7, it has been disabled and will likely <a href="https://twitter.com/headius/statuses/281091403919003649">be removed</a>.</p>
|
195
|
-
|
196
|
-
<p>This page lists common C extensions and non-C alternatives you can use to replace them.</p>
|
197
|
-
|
198
|
-
<ul>
|
199
|
-
<li><p><strong><a href="https://github.com/rtomayko/rdiscount">RDiscount</a></strong> - Use <a href="http://kramdown.rubyforge.org">kramdown</a>, <a href="https://github.com/bhollis/maruku">Maruku</a> (pure Ruby) or <a href="https://github.com/nate/markdown_j">markdown_j</a> (wrapper around a Java library)</p></li>
|
200
|
-
<li><p><strong><a href="https://github.com/rmagick/rmagick">RMagick</a></strong> - Try <a href="https://github.com/Serabe/RMagick4J">RMagick4J</a> (implements ImageMagick functionality in Java) or preferably use alternatives <a href="https://github.com/probablycorey/mini_magick">mini_magick</a> & <a href="https://github.com/aseldawy/quick_magick">quick_magick</a>. For simple resizing, cropping, greyscaling, etc look at <a href="https://github.com/jruby/image_voodoo">image_voodoo</a>.</p></li>
|
201
|
-
<li><p><strong><a href="http://unicorn.bogomips.org/">Unicorn</a></strong> - Try any one of the following <a class="internal present" href="/jruby/jruby/wiki/Servers">JRuby-based servers</a>: <a href="https://github.com/trinidad/trinidad">Trinidad</a>, <a href="https://github.com/matadon/mizuno">Mizuno</a>, <a href="https://github.com/strobecorp/kirk">Kirk</a>, <a href="http://mobile.www.monde.org/?L=0">mobile</a> or <a href="http://puma.io/">Puma</a>.</p></li>
|
202
|
-
<li><p><strong><a href="http://code.macournoyer.com/thin/">Thin</a></strong> - Thin might compile and run but is not recommended. Try any one of the following <a class="internal present" href="/jruby/jruby/wiki/Servers">JRuby-based servers</a>: <a href="https://github.com/trinidad/trinidad">Trinidad</a>, <a href="https://github.com/matadon/mizuno">Mizuno</a>, <a href="https://github.com/strobecorp/kirk">Kirk</a>, <a href="http://torquebox.org/">TorqueBox</a> or <a href="http://puma.io/">Puma</a>.</p></li>
|
203
|
-
<li><p><strong><a href="https://github.com/dbalatero/typhoeus">Typhoeus</a></strong> - The C extension <a href="https://github.com/dbalatero/typhoeus/issues/65">doesn't currently compile</a>. There's no equivalent library for JRuby, but you might try any of the pure-Ruby HTTP clients (<code>net/http</code>, httpclient, etc.). There are also several Java HTTP client libraries that will work (<a href="http://hc.apache.org/httpcomponents-client-ga/">Apache HttpClient</a>, <a href="http://download.oracle.com/javase/1,5.0/docs/api/java/net/HttpURLConnection.html">HttpURLConnection</a>, etc).</p></li>
|
204
|
-
<li><p><strong>mysql</strong> - Use <a href="https://github.com/jruby/activerecord-jdbc-adapter">activerecord-jdbc-adapter</a> instead along with <code>jdbc-mysql</code>.</p></li>
|
205
|
-
<li><p><strong>mysql2</strong> - Use <a href="https://github.com/jruby/activerecord-jdbc-adapter">activerecord-jdbc-adapter</a> instead along with <code>jdbc-mysql</code>.</p></li>
|
206
|
-
<li><p><strong>sqlite3</strong> - Use <a href="https://github.com/jruby/activerecord-jdbc-adapter">activerecord-jdbc-adapter</a> instead along with <code>jdbc-sqlite3</code>.</p></li>
|
207
|
-
<li><p><strong><a href="http://nokogiri.org/">Nokogiri</a></strong> - For best results, use the pure-Java version of Nokogiri (default after v1.5).</p></li>
|
208
|
-
<li><p><strong><a href="https://github.com/brianmario/yajl-ruby">yajl-ruby</a></strong> - Try <code>json</code>, <code>json_pure</code>, or <code>oj</code> instead. Unfortunately there is no known equivalent JSON stream parser.</p></li>
|
209
|
-
<li><p><strong><a href="https://github.com/mongodb/mongo-ruby-driver">bson_ext</a></strong> - <code>bson_ext</code> isn't used with JRuby. Instead, some native Java extensions are bundled with the <code>bson</code> gem.</p></li>
|
210
|
-
<li><p><strong><a href="http://www.ruby-doc.org/stdlib/libdoc/win32ole/rdoc/index.html">win32ole</a></strong> - Use the <code>jruby-win32ole</code> gem (preinstalled in JRuby's Windows installer).</p></li>
|
211
|
-
<li><p><strong><a href="http://curb.rubyforge.org/">curb</a></strong> - <a href="https://github.com/rcyrus/Rurl">Rurl</a> is an example how to implement <em>some</em> of curb's functionality using <a href="http://hc.apache.org/httpcomponents-client-ga/">Apache HttpClient</a></p></li>
|
212
|
-
<li><p><strong><a href="https://github.com/cowboyd/therubyracer">therubyracer</a></strong> - Try using <a href="https://github.com/cowboyd/therubyrhino">therubyrhino</a> instead.</p></li>
|
213
|
-
<li><p><strong><a href="http://fallabs.com/kyotocabinet/">kyotocabinet</a></strong> - Try using <a href="https://github.com/csw/kyotocabinet-java">kyotocabinet-java</a> instead. This isn't 100% complete yet, but it covers most of the API.</p></li>
|
214
|
-
<li><p><strong><a href="https://github.com/evan/memcached">memcached</a></strong> - Try using <a href="https://github.com/aurorafeint/jruby-memcached">jruby-memcached</a> instead.</p></li>
|
215
|
-
</ul><p>Please add to this list with your findings.</p>
|
216
|
-
|
217
|
-
<p><em>Note that the <a href="https://github.com/jruby/jruby-lint">JRuby-Lint</a> gem parses the contents of the list above to use for its Ruby gem checker. In order for JRuby-Lint to use the information, please adhere to the <code>gem_name - instructions</code> format.</em></p>
|
218
|
-
</div>
|
219
|
-
</div>
|
220
|
-
</div>
|
221
|
-
|
222
|
-
</div>
|
223
|
-
<div id="gollum-footer">
|
224
|
-
<p id="last-edit">
|
225
|
-
Last edited by chetan, <time class="js-relative-date" datetime="2012-12-18T11:37:06-08:00" title="2012-12-18 11:37:06">December 18, 2012</time>
|
226
|
-
</p>
|
227
|
-
</div>
|
228
|
-
</div>
|
229
|
-
|
230
|
-
|
231
|
-
</div>
|
232
|
-
</div>
|
233
|
-
<div class="context-overlay"></div>
|
234
|
-
</div>
|
235
|
-
|
236
|
-
<div id="footer-push"></div><!-- hack for sticky footer -->
|
237
|
-
</div><!-- end of wrapper - hack for sticky footer -->
|
238
|
-
|
239
|
-
<!-- footer -->
|
240
|
-
<div id="footer">
|
241
|
-
<div class="container clearfix">
|
242
|
-
|
243
|
-
<dl class="footer_nav">
|
244
|
-
<dt>GitHub</dt>
|
245
|
-
<dd><a href="https://github.com/about">About us</a></dd>
|
246
|
-
<dd><a href="https://github.com/blog">Blog</a></dd>
|
247
|
-
<dd><a href="https://github.com/contact">Contact & support</a></dd>
|
248
|
-
<dd><a href="http://enterprise.github.com/">GitHub Enterprise</a></dd>
|
249
|
-
<dd><a href="http://status.github.com/">Site status</a></dd>
|
250
|
-
</dl>
|
251
|
-
|
252
|
-
<dl class="footer_nav">
|
253
|
-
<dt>Applications</dt>
|
254
|
-
<dd><a href="http://mac.github.com/">GitHub for Mac</a></dd>
|
255
|
-
<dd><a href="http://windows.github.com/">GitHub for Windows</a></dd>
|
256
|
-
<dd><a href="http://eclipse.github.com/">GitHub for Eclipse</a></dd>
|
257
|
-
<dd><a href="http://mobile.github.com/">GitHub mobile apps</a></dd>
|
258
|
-
</dl>
|
259
|
-
|
260
|
-
<dl class="footer_nav">
|
261
|
-
<dt>Services</dt>
|
262
|
-
<dd><a href="http://get.gaug.es/">Gauges: Web analytics</a></dd>
|
263
|
-
<dd><a href="http://speakerdeck.com">Speaker Deck: Presentations</a></dd>
|
264
|
-
<dd><a href="https://gist.github.com">Gist: Code snippets</a></dd>
|
265
|
-
<dd><a href="http://jobs.github.com/">Job board</a></dd>
|
266
|
-
</dl>
|
267
|
-
|
268
|
-
<dl class="footer_nav">
|
269
|
-
<dt>Documentation</dt>
|
270
|
-
<dd><a href="http://help.github.com/">GitHub Help</a></dd>
|
271
|
-
<dd><a href="http://developer.github.com/">Developer API</a></dd>
|
272
|
-
<dd><a href="http://github.github.com/github-flavored-markdown/">GitHub Flavored Markdown</a></dd>
|
273
|
-
<dd><a href="http://pages.github.com/">GitHub Pages</a></dd>
|
274
|
-
</dl>
|
275
|
-
|
276
|
-
<dl class="footer_nav">
|
277
|
-
<dt>More</dt>
|
278
|
-
<dd><a href="http://training.github.com/">Training</a></dd>
|
279
|
-
<dd><a href="https://github.com/edu">Students & teachers</a></dd>
|
280
|
-
<dd><a href="http://shop.github.com">The Shop</a></dd>
|
281
|
-
<dd><a href="/plans">Plans & pricing</a></dd>
|
282
|
-
<dd><a href="http://octodex.github.com/">The Octodex</a></dd>
|
283
|
-
</dl>
|
284
|
-
|
285
|
-
<hr class="footer-divider">
|
286
|
-
|
287
|
-
|
288
|
-
<p class="right">© 2013 <span title="0.08273s from fe18.rs.github.com">GitHub</span>, Inc. All rights reserved.</p>
|
289
|
-
<a class="left" href="https://github.com/">
|
290
|
-
<span class="mega-icon mega-icon-invertocat"></span>
|
291
|
-
</a>
|
292
|
-
<ul id="legal">
|
293
|
-
<li><a href="https://github.com/site/terms">Terms of Service</a></li>
|
294
|
-
<li><a href="https://github.com/site/privacy">Privacy</a></li>
|
295
|
-
<li><a href="https://github.com/security">Security</a></li>
|
296
|
-
</ul>
|
297
|
-
|
298
|
-
</div><!-- /.container -->
|
299
|
-
|
300
|
-
</div><!-- /.#footer -->
|
301
|
-
|
302
|
-
|
303
|
-
<div class="fullscreen-overlay js-fullscreen-overlay" id="fullscreen_overlay">
|
304
|
-
<div class="fullscreen-container js-fullscreen-container">
|
305
|
-
<div class="textarea-wrap">
|
306
|
-
<textarea name="fullscreen-contents" id="fullscreen-contents" class="js-fullscreen-contents" placeholder="" data-suggester="fullscreen_suggester"></textarea>
|
307
|
-
<div class="suggester-container">
|
308
|
-
<div class="suggester fullscreen-suggester js-navigation-container" id="fullscreen_suggester"
|
309
|
-
data-url="/jruby/jruby/suggestions/commit">
|
310
|
-
</div>
|
311
|
-
</div>
|
312
|
-
</div>
|
313
|
-
</div>
|
314
|
-
<div class="fullscreen-sidebar">
|
315
|
-
<a href="#" class="exit-fullscreen js-exit-fullscreen tooltipped leftwards" title="Exit Zen Mode">
|
316
|
-
<span class="mega-icon mega-icon-normalscreen"></span>
|
317
|
-
</a>
|
318
|
-
<a href="#" class="theme-switcher js-theme-switcher tooltipped leftwards"
|
319
|
-
title="Switch themes">
|
320
|
-
<span class="mini-icon mini-icon-brightness"></span>
|
321
|
-
</a>
|
322
|
-
</div>
|
323
|
-
</div>
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
<div id="ajax-error-message" class="flash flash-error">
|
328
|
-
<span class="mini-icon mini-icon-exclamation"></span>
|
329
|
-
Something went wrong with that request. Please try again.
|
330
|
-
<a href="#" class="mini-icon mini-icon-remove-close ajax-error-dismiss"></a>
|
331
|
-
</div>
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
<span id='server_response_time' data-time='0.08426' data-host='fe18'></span>
|
336
|
-
|
337
|
-
</body>
|
338
|
-
</html>
|
339
|
-
|
data/spec/jruby/lint/cli_spec.rb
DELETED
@@ -1,73 +0,0 @@
|
|
1
|
-
require File.expand_path('../../../spec_helper', __FILE__)
|
2
|
-
require 'jruby/lint/cli'
|
3
|
-
|
4
|
-
describe JRuby::Lint::CLI do
|
5
|
-
context "with the tag option" do
|
6
|
-
Given(:cli) { JRuby::Lint::CLI.new(args) }
|
7
|
-
Given(:args) { ["--tag", "debug"]}
|
8
|
-
When { cli }
|
9
|
-
Then { cli.options.tags.should include("debug") }
|
10
|
-
end
|
11
|
-
|
12
|
-
context "when launched" do
|
13
|
-
Given(:command) { "ruby -I#{project_dir}/lib -S #{project_dir}/bin/jrlint #{args}" }
|
14
|
-
|
15
|
-
context "with the help option" do
|
16
|
-
Given(:args) { "--help" }
|
17
|
-
When { run_simple(command) }
|
18
|
-
Then do
|
19
|
-
output_from(command).should =~ /help.*This message/
|
20
|
-
@last_exit_status.should == 0
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
context "with the version option" do
|
25
|
-
Given(:args) { "--version" }
|
26
|
-
When { run_simple(command) }
|
27
|
-
Then do
|
28
|
-
output_from(command).should =~ /version #{JRuby::Lint::VERSION}/
|
29
|
-
@last_exit_status.should == 0
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
context "with a dash-e option" do
|
34
|
-
Given(:args) { "-e true"}
|
35
|
-
When { run_simple(command) }
|
36
|
-
Then do
|
37
|
-
output_from(command).should =~ /Processed 1 expression/
|
38
|
-
@last_exit_status.should == 0
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
|
-
context "with a file argument" do
|
43
|
-
Given(:args) { "sample.rb" }
|
44
|
-
Given { write_file("sample.rb", "puts 'hello'"); write_file("example.rb", "puts 'hello'") }
|
45
|
-
When { run_simple(command) }
|
46
|
-
Then do
|
47
|
-
output_from(command).should =~ /Processed 1 file/
|
48
|
-
@last_exit_status.should == 0
|
49
|
-
end
|
50
|
-
end
|
51
|
-
|
52
|
-
context "with no arguments" do
|
53
|
-
Given(:args) { "" }
|
54
|
-
|
55
|
-
context "and some files to process" do
|
56
|
-
Given { write_file("Rakefile", "") }
|
57
|
-
When { run_simple(command) }
|
58
|
-
Then do
|
59
|
-
output = output_from(command)
|
60
|
-
output.should =~ /JRuby-Lint version #{JRuby::Lint::VERSION}/
|
61
|
-
output.should =~ /Processed 1 file/
|
62
|
-
output.should =~ /OK/
|
63
|
-
@last_exit_status.should == 0
|
64
|
-
end
|
65
|
-
end
|
66
|
-
|
67
|
-
context "and no files to process" do
|
68
|
-
When { run_simple(command) }
|
69
|
-
Then { output_from(command).should =~ /Processed 0 files/ }
|
70
|
-
end
|
71
|
-
end
|
72
|
-
end
|
73
|
-
end
|