screw_server 0.1.9 → 0.1.10

Sign up to get free protection for your applications and to get access to all the features.
data/bundler_version.rb CHANGED
@@ -1 +1 @@
1
- SCREW_SERVER_BUNDLER_VERSION = "~> 1.2.0"
1
+ SCREW_SERVER_BUNDLER_VERSION = "~> 1.2"
@@ -1,7 +1,7 @@
1
1
  require 'sinatra/base'
2
2
  require "json"
3
3
 
4
- require 'screw_server/jslint_suite'
4
+ require 'screw_server/jshint_suite'
5
5
  require "screw_server/spec_file"
6
6
 
7
7
  module ScrewServer
@@ -13,6 +13,13 @@ module ScrewServer
13
13
 
14
14
  set :views, VIEW_PATH
15
15
 
16
+ before do
17
+ jslint_file = File.join(Base.spec_base_dir, "jslint.rb")
18
+ if File.exists?(jslint_file)
19
+ raise "jslint.rb is no longer supported. Please use jshint.rb."
20
+ end
21
+ end
22
+
16
23
  get "/run/:name" do
17
24
  run_specs([SpecFile.new(params[:name])])
18
25
  end
@@ -74,12 +81,12 @@ module ScrewServer
74
81
  "#{url}?#{rand}"
75
82
  end
76
83
 
77
- def jslint_suites
78
- jslint_file = File.join(Base.spec_base_dir, "jslint.rb")
79
- if !File.exists?(jslint_file)
84
+ def jshint_suites
85
+ jshint_file = File.join(Base.spec_base_dir, "jshint.rb")
86
+ if !File.exists?(jshint_file)
80
87
  []
81
88
  else
82
- JslintSuite.suites_from(jslint_file).map do |suite|
89
+ JshintSuite.suites_from(jshint_file).map do |suite|
83
90
  {
84
91
  :file_list => suite.file_list.map { |file| url_for_source_file(file) },
85
92
  :options => suite.options_with_defaults
@@ -127,7 +134,7 @@ module ScrewServer
127
134
 
128
135
  def screw_assets
129
136
  %w{
130
- vendor/jslint/jslint.js
137
+ vendor/jshint.js
131
138
  vendor/screw-unit/lib/jquery.fn.js
132
139
  vendor/screw-unit/lib/jquery.print.js
133
140
  vendor/screw-unit/lib/screw.builder.js
@@ -177,7 +184,7 @@ module ScrewServer
177
184
  elsif file.start_with?(Base.spec_base_dir.to_s)
178
185
  url_for_spec(file[(Base.spec_base_dir.to_s.length + 1)..-1])
179
186
  else
180
- raise "file #{file} cannot be checked by jslint since it it not inside the spec or code path: #{Base.code_base_dir} or #{Base.spec_base_dir}"
187
+ raise "file #{file} cannot be checked by jshint since it it not inside the spec or code path: #{Base.code_base_dir} or #{Base.spec_base_dir}"
181
188
  end
182
189
  end
183
190
 
@@ -1,22 +1,15 @@
1
1
  module ScrewServer
2
- class JslintSuite
2
+ class JshintSuite
3
3
 
4
+ # All options see http://www.jshint.com/docs/
4
5
  DEFAULT_OPTIONS = {
5
6
  "bitwise" => true,
6
7
  "browser" => true,
8
+ "jquery" => true,
7
9
  "eqeqeq" => true,
8
10
  "immed" => true,
9
11
  "newcap" => true,
10
- "nomen" => true,
11
- "regexp" => true,
12
12
  "undef" => true,
13
- "white" => true,
14
- "sloppy" => true,
15
- "vars" => true,
16
- "nomen" => true,
17
- "regexp" => true,
18
- "plusplus" => true,
19
- "indent" => true,
20
13
  }
21
14
 
22
15
  attr_accessor :name, :file_list, :options
@@ -41,8 +34,8 @@ module ScrewServer
41
34
 
42
35
  private
43
36
 
44
- def self.jslint(name)
45
- suite = JslintSuite.new(name)
37
+ def self.jshint(name)
38
+ suite = JshintSuite.new(name)
46
39
  yield suite
47
40
  @suites << suite
48
41
  end
data/screw_server.gemspec CHANGED
@@ -2,7 +2,7 @@ require File.expand_path("../bundler_version", __FILE__)
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{screw_server}
5
- s.version = '0.1.9'
5
+ s.version = '0.1.10'
6
6
  s.authors = ["Kristian Hanekamp", "Infopark AG"]
7
7
  s.description = %q{Screw Server - easy javascript unit tests}
8
8
  s.email = %q{kristian.hanekamp@infopark.de}
data/views/run_spec.haml CHANGED
@@ -14,7 +14,7 @@
14
14
 
15
15
  %script{:type => "text/javascript"}
16
16
  = "fixture_container = #{fixture_html.to_json}"
17
- = "Screw.jslint_suites = #{jslint_suites.to_json};"
17
+ = "Screw.jshint_suites = #{jshint_suites.to_json};"
18
18
  %body
19
19
  %h3#screw_server_loading{:class => "status"}
20
20
  Loading...
@@ -22,7 +22,7 @@
22
22
  - @specs.each do |spec|
23
23
  %script{:type => "text/javascript", :src => cache_busting_url(url_for_spec(spec.full_name))}
24
24
 
25
- %script{:type => "text/javascript", :src => url_for_screw_asset("screw-jslint.js")}
25
+ %script{:type => "text/javascript", :src => url_for_screw_asset("screw-jshint.js")}
26
26
 
27
27
  :javascript
28
28
  $("#screw_server_loading").remove();
metadata CHANGED
@@ -1,169 +1,122 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: screw_server
3
- version: !ruby/object:Gem::Version
4
- hash: 9
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.10
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 1
9
- - 9
10
- version: 0.1.9
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Kristian Hanekamp
14
9
  - Infopark AG
15
10
  autorequire:
16
11
  bindir: bin
17
12
  cert_chain: []
18
-
19
- date: 2013-02-04 00:00:00 +01:00
20
- default_executable:
21
- dependencies:
22
- - !ruby/object:Gem::Dependency
13
+ date: 2013-03-08 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
23
16
  name: json
24
- prerelease: false
25
- requirement: &id001 !ruby/object:Gem::Requirement
17
+ requirement: &70307345188540 !ruby/object:Gem::Requirement
26
18
  none: false
27
- requirements:
28
- - - "="
29
- - !ruby/object:Gem::Version
30
- hash: 5
31
- segments:
32
- - 1
33
- - 6
34
- - 5
19
+ requirements:
20
+ - - =
21
+ - !ruby/object:Gem::Version
35
22
  version: 1.6.5
36
23
  type: :runtime
37
- version_requirements: *id001
38
- - !ruby/object:Gem::Dependency
39
- name: haml
40
24
  prerelease: false
41
- requirement: &id002 !ruby/object:Gem::Requirement
25
+ version_requirements: *70307345188540
26
+ - !ruby/object:Gem::Dependency
27
+ name: haml
28
+ requirement: &70307345187620 !ruby/object:Gem::Requirement
42
29
  none: false
43
- requirements:
44
- - - "="
45
- - !ruby/object:Gem::Version
46
- hash: 29
47
- segments:
48
- - 3
49
- - 0
50
- - 13
30
+ requirements:
31
+ - - =
32
+ - !ruby/object:Gem::Version
51
33
  version: 3.0.13
52
34
  type: :runtime
53
- version_requirements: *id002
54
- - !ruby/object:Gem::Dependency
55
- name: bundler
56
35
  prerelease: false
57
- requirement: &id003 !ruby/object:Gem::Requirement
36
+ version_requirements: *70307345187620
37
+ - !ruby/object:Gem::Dependency
38
+ name: bundler
39
+ requirement: &70307345185580 !ruby/object:Gem::Requirement
58
40
  none: false
59
- requirements:
41
+ requirements:
60
42
  - - ~>
61
- - !ruby/object:Gem::Version
62
- hash: 31
63
- segments:
64
- - 1
65
- - 2
66
- - 0
67
- version: 1.2.0
43
+ - !ruby/object:Gem::Version
44
+ version: '1.2'
68
45
  type: :runtime
69
- version_requirements: *id003
70
- - !ruby/object:Gem::Dependency
71
- name: rack
72
46
  prerelease: false
73
- requirement: &id004 !ruby/object:Gem::Requirement
47
+ version_requirements: *70307345185580
48
+ - !ruby/object:Gem::Dependency
49
+ name: rack
50
+ requirement: &70307345183220 !ruby/object:Gem::Requirement
74
51
  none: false
75
- requirements:
76
- - - "="
77
- - !ruby/object:Gem::Version
78
- hash: 19
79
- segments:
80
- - 1
81
- - 1
82
- - 0
52
+ requirements:
53
+ - - =
54
+ - !ruby/object:Gem::Version
83
55
  version: 1.1.0
84
56
  type: :runtime
85
- version_requirements: *id004
86
- - !ruby/object:Gem::Dependency
87
- name: sinatra
88
57
  prerelease: false
89
- requirement: &id005 !ruby/object:Gem::Requirement
58
+ version_requirements: *70307345183220
59
+ - !ruby/object:Gem::Dependency
60
+ name: sinatra
61
+ requirement: &70307345198180 !ruby/object:Gem::Requirement
90
62
  none: false
91
- requirements:
92
- - - "="
93
- - !ruby/object:Gem::Version
94
- hash: 15
95
- segments:
96
- - 1
97
- - 0
98
- version: "1.0"
63
+ requirements:
64
+ - - =
65
+ - !ruby/object:Gem::Version
66
+ version: '1.0'
99
67
  type: :runtime
100
- version_requirements: *id005
101
- - !ruby/object:Gem::Dependency
102
- name: daemons
103
68
  prerelease: false
104
- requirement: &id006 !ruby/object:Gem::Requirement
69
+ version_requirements: *70307345198180
70
+ - !ruby/object:Gem::Dependency
71
+ name: daemons
72
+ requirement: &70307345197380 !ruby/object:Gem::Requirement
105
73
  none: false
106
- requirements:
107
- - - "="
108
- - !ruby/object:Gem::Version
109
- hash: 3
110
- segments:
111
- - 1
112
- - 0
113
- - 10
74
+ requirements:
75
+ - - =
76
+ - !ruby/object:Gem::Version
114
77
  version: 1.0.10
115
78
  type: :runtime
116
- version_requirements: *id006
117
- - !ruby/object:Gem::Dependency
118
- name: eventmachine
119
79
  prerelease: false
120
- requirement: &id007 !ruby/object:Gem::Requirement
80
+ version_requirements: *70307345197380
81
+ - !ruby/object:Gem::Dependency
82
+ name: eventmachine
83
+ requirement: &70307345196580 !ruby/object:Gem::Requirement
121
84
  none: false
122
- requirements:
123
- - - "="
124
- - !ruby/object:Gem::Version
125
- hash: 35
126
- segments:
127
- - 0
128
- - 12
129
- - 6
85
+ requirements:
86
+ - - =
87
+ - !ruby/object:Gem::Version
130
88
  version: 0.12.6
131
89
  type: :runtime
132
- version_requirements: *id007
133
- - !ruby/object:Gem::Dependency
134
- name: thin
135
90
  prerelease: false
136
- requirement: &id008 !ruby/object:Gem::Requirement
91
+ version_requirements: *70307345196580
92
+ - !ruby/object:Gem::Dependency
93
+ name: thin
94
+ requirement: &70307345195520 !ruby/object:Gem::Requirement
137
95
  none: false
138
- requirements:
139
- - - "="
140
- - !ruby/object:Gem::Version
141
- hash: 17
142
- segments:
143
- - 1
144
- - 2
145
- - 7
96
+ requirements:
97
+ - - =
98
+ - !ruby/object:Gem::Version
146
99
  version: 1.2.7
147
100
  type: :runtime
148
- version_requirements: *id008
101
+ prerelease: false
102
+ version_requirements: *70307345195520
149
103
  description: Screw Server - easy javascript unit tests
150
104
  email: kristian.hanekamp@infopark.de
151
- executables:
105
+ executables:
152
106
  - screw_server
153
107
  extensions: []
154
-
155
108
  extra_rdoc_files: []
156
-
157
- files:
109
+ files:
158
110
  - lib/screw_server/app.rb
159
111
  - lib/screw_server/base.rb
160
112
  - lib/screw_server/fixture_file.rb
161
- - lib/screw_server/jslint_suite.rb
113
+ - lib/screw_server/jshint_suite.rb
162
114
  - lib/screw_server/spec_file.rb
163
115
  - lib/screw_server.rb
164
- - assets/screw-jslint.js
116
+ - assets/screw-jshint.js
165
117
  - assets/screw-server.js
166
118
  - assets/screw.css
119
+ - assets/vendor/jshint.js
167
120
  - assets/vendor/jslint/init_ui.js
168
121
  - assets/vendor/jslint/intercept.js
169
122
  - assets/vendor/jslint/jslint.html
@@ -225,39 +178,29 @@ files:
225
178
  - Gemfile.run.lock
226
179
  - screw_server.gemspec
227
180
  - bundler_version.rb
228
- has_rdoc: true
229
181
  homepage:
230
182
  licenses: []
231
-
232
183
  post_install_message:
233
184
  rdoc_options: []
234
-
235
- require_paths:
185
+ require_paths:
236
186
  - lib
237
- required_ruby_version: !ruby/object:Gem::Requirement
187
+ required_ruby_version: !ruby/object:Gem::Requirement
238
188
  none: false
239
- requirements:
240
- - - ">="
241
- - !ruby/object:Gem::Version
242
- hash: 3
243
- segments:
244
- - 0
245
- version: "0"
246
- required_rubygems_version: !ruby/object:Gem::Requirement
189
+ requirements:
190
+ - - ! '>='
191
+ - !ruby/object:Gem::Version
192
+ version: '0'
193
+ required_rubygems_version: !ruby/object:Gem::Requirement
247
194
  none: false
248
- requirements:
249
- - - ">="
250
- - !ruby/object:Gem::Version
251
- hash: 3
252
- segments:
253
- - 0
254
- version: "0"
195
+ requirements:
196
+ - - ! '>='
197
+ - !ruby/object:Gem::Version
198
+ version: '0'
255
199
  requirements: []
256
-
257
200
  rubyforge_project:
258
- rubygems_version: 1.6.2
201
+ rubygems_version: 1.8.11
259
202
  signing_key:
260
203
  specification_version: 3
261
204
  summary: Screw Server
262
205
  test_files: []
263
-
206
+ has_rdoc: