newjs 1.7.0 → 1.7.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/History.txt +6 -0
- data/Manifest.txt +5 -0
- data/app_generators/newjs/newjs_generator.rb +21 -3
- data/app_generators/newjs/templates/ext/jquery.js +4376 -0
- data/app_generators/newjs/templates/ext/prototype.js +4170 -0
- data/app_generators/newjs/templates/test/assets/jshoulda.js +186 -0
- data/config/website.yml +2 -0
- data/config/website.yml.sample +2 -0
- data/features/imported_files_for_generators.feature +1 -0
- data/javascript_test_generators/functional_test/functional_test_generator.rb +5 -4
- data/javascript_test_generators/unit_test/unit_test_generator.rb +1 -0
- data/lib/newjs.rb +1 -1
- data/rack_generators/javascript_test/templates/ext/jquery.js +2589 -1621
- data/rails_generators/javascript_test/templates/ext/jquery.js +2589 -1621
- data/script/txt2html +2 -2
- data/test/test_newjs_generator.rb +28 -0
- data/website/index.html +2 -1
- metadata +15 -6
data/script/txt2html
CHANGED
@@ -11,9 +11,9 @@ end
|
|
11
11
|
require 'redcloth'
|
12
12
|
require 'syntax/convertors/html'
|
13
13
|
require 'erb'
|
14
|
-
require File.dirname(__FILE__) + '/../lib/newjs
|
14
|
+
require File.dirname(__FILE__) + '/../lib/newjs.rb'
|
15
15
|
|
16
|
-
version = Newjs::VERSION
|
16
|
+
version = Newjs::VERSION
|
17
17
|
download = 'http://rubyforge.org/projects/newjs'
|
18
18
|
|
19
19
|
class Fixnum
|
@@ -51,6 +51,34 @@ class TestNewjsGenerator < Test::Unit::TestCase
|
|
51
51
|
assert_generated_file "lib/jstest.rb"
|
52
52
|
end
|
53
53
|
|
54
|
+
def test_generator_for_jshoulda_and_jquery
|
55
|
+
run_generator('newjs', [APP_ROOT], sources, {:test_framework => 'jshoulda', :framework => 'jquery'})
|
56
|
+
assert_directory_exists "lib"
|
57
|
+
assert_directory_exists "config"
|
58
|
+
assert_directory_exists "src"
|
59
|
+
assert_directory_exists "script"
|
60
|
+
assert_directory_exists "tasks"
|
61
|
+
assert_directory_exists "test/assets"
|
62
|
+
assert_generated_file "test/assets/unittest.css"
|
63
|
+
assert_generated_file "test/assets/jsunittest.js"
|
64
|
+
assert_generated_file "test/assets/jshoulda.js"
|
65
|
+
assert_generated_file "lib/ext/jquery.js"
|
66
|
+
assert_generated_file "Rakefile"
|
67
|
+
assert_generated_file "README.txt"
|
68
|
+
assert_generated_file "License.txt"
|
69
|
+
assert_generated_file "History.txt"
|
70
|
+
assert_generated_file "script/rstakeout"
|
71
|
+
assert_generated_file "script/js_autotest"
|
72
|
+
assert_generated_file "tasks/javascript_test_autotest_tasks.rake"
|
73
|
+
assert_generated_file "tasks/environment.rake"
|
74
|
+
assert_generated_file "tasks/deploy.rake"
|
75
|
+
assert_generated_file "config/javascript_test_autotest.yml.sample"
|
76
|
+
assert_generated_file "src/myproject.js.erb"
|
77
|
+
assert_generated_file "src/HEADER"
|
78
|
+
assert_generated_file "lib/protodoc.rb"
|
79
|
+
assert_generated_file "lib/jstest.rb"
|
80
|
+
end
|
81
|
+
|
54
82
|
private
|
55
83
|
def sources
|
56
84
|
[RubiGen::PathSource.new(:test, File.join(File.dirname(__FILE__),"..", generator_path))
|
data/website/index.html
CHANGED
@@ -31,7 +31,7 @@
|
|
31
31
|
<h1>JavaScript Project Generator</h1>
|
32
32
|
<div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/newjs"; return false'>
|
33
33
|
<p>Get Version</p>
|
34
|
-
<a href="http://rubyforge.org/projects/newjs" class="numbers">1.
|
34
|
+
<a href="http://rubyforge.org/projects/newjs" class="numbers">1.7.0</a>
|
35
35
|
</div>
|
36
36
|
<h1>&#x2192; ‘newjs’</h1>
|
37
37
|
<h2>What</h2>
|
@@ -108,6 +108,7 @@ test <span class="caps">HTML</span> files, ready to rock and roll.</p>
|
|
108
108
|
<pre>$ script/generate unit_test some_lib
|
109
109
|
create test/unit
|
110
110
|
create test/unit/some_lib_test.html</pre>
|
111
|
+
|
111
112
|
<p>Now edit <code>test/unit/some_lib_test.html</code> and follow the comments<br />
|
112
113
|
that tell you what to do to write your unit tests.</p>
|
113
114
|
<p>Want to name your test file something different? Specify the target<br />
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: newjs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dr Nic Williams
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-04-18 00:00:00 +10:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -20,7 +20,7 @@ dependencies:
|
|
20
20
|
requirements:
|
21
21
|
- - ">="
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: 1.
|
23
|
+
version: 1.3.0
|
24
24
|
version:
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: hoe
|
@@ -32,7 +32,9 @@ dependencies:
|
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 1.8.0
|
34
34
|
version:
|
35
|
-
description:
|
35
|
+
description: |-
|
36
|
+
The +newjs+ command creates a new JavaScript project/application
|
37
|
+
with a default directory structure and configuration at the path you specify.
|
36
38
|
email:
|
37
39
|
- drnicwilliams@gmail.com
|
38
40
|
executables:
|
@@ -64,6 +66,8 @@ files:
|
|
64
66
|
- app_generators/newjs/templates/README.txt.erb
|
65
67
|
- app_generators/newjs/templates/Rakefile.erb
|
66
68
|
- app_generators/newjs/templates/config/javascript_test_autotest.yml.sample
|
69
|
+
- app_generators/newjs/templates/ext/jquery.js
|
70
|
+
- app_generators/newjs/templates/ext/prototype.js
|
67
71
|
- app_generators/newjs/templates/lib/jstest.rb
|
68
72
|
- app_generators/newjs/templates/lib/protodoc.rb
|
69
73
|
- app_generators/newjs/templates/script/js_autotest
|
@@ -74,6 +78,7 @@ files:
|
|
74
78
|
- app_generators/newjs/templates/tasks/deploy.rake
|
75
79
|
- app_generators/newjs/templates/tasks/environment.rake
|
76
80
|
- app_generators/newjs/templates/tasks/javascript_test_autotest_tasks.rake
|
81
|
+
- app_generators/newjs/templates/test/assets/jshoulda.js
|
77
82
|
- app_generators/newjs/templates/test/assets/jsunittest.js
|
78
83
|
- app_generators/newjs/templates/test/assets/unittest.css
|
79
84
|
- app_generators/newjs_iphone/USAGE
|
@@ -91,6 +96,8 @@ files:
|
|
91
96
|
- app_generators/newjs_iphone/templates/Html/test/assets/unittest.css
|
92
97
|
- bin/newjs
|
93
98
|
- bin/newjs_iphone
|
99
|
+
- config/website.yml
|
100
|
+
- config/website.yml.sample
|
94
101
|
- features/development.feature
|
95
102
|
- features/imported_files_for_generators.feature
|
96
103
|
- features/steps/common.rb
|
@@ -317,6 +324,8 @@ files:
|
|
317
324
|
- website/template.html.erb
|
318
325
|
has_rdoc: true
|
319
326
|
homepage: http://newjs.rubyforge.org
|
327
|
+
licenses: []
|
328
|
+
|
320
329
|
post_install_message:
|
321
330
|
rdoc_options:
|
322
331
|
- --main
|
@@ -338,9 +347,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
338
347
|
requirements: []
|
339
348
|
|
340
349
|
rubyforge_project: newjs
|
341
|
-
rubygems_version: 1.3.
|
350
|
+
rubygems_version: 1.3.2
|
342
351
|
signing_key:
|
343
|
-
specification_version:
|
352
|
+
specification_version: 3
|
344
353
|
summary: The +newjs+ command creates a new JavaScript project/application with a default directory structure and configuration at the path you specify.
|
345
354
|
test_files:
|
346
355
|
- test/test_functional_test_generator.rb
|