ninjs 0.13.4 → 0.13.5

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/README.md CHANGED
@@ -6,7 +6,7 @@ About
6
6
 
7
7
  ninjs is a new way of building JavaScript applications that allows you to write modular, testable, and reusable JavaScript. ninjs is not really a framework. It provides three essential JavaScript development tools in one coherent package.
8
8
 
9
- 1. ninjs uses the "Sprockets" (http://getsprockets.org) JavaScript compiler to package and include scripts. This provides a way to manage all 3rd party and custom libraries and require them directly into your scripts.
9
+ 1. ninjs uses the "Sprockets" (http://getsprockets.org) JavaScript compiler to package and include scripts. This provides a way to manage all 3rd party and custom libraries and require them directly in your scripts.
10
10
  2. ninjs includes a small JavaScript framework, based on the module pattern (http://javascript.crockford.com/private.html) and "JavaScript: The Good Parts" (http://www.amazon.com/gp/product/B0026OR2ZY/ref=s9_bbs_gw_d6_ir01?pf_rd_m=ATVPDKIKX0DER&pf_rd_s=center-2&pf_rd_r=0HQ3A0RDW9269GPJRGW8&pf_rd_t=101&pf_rd_p=470938631&pf_rd_i=507846), which provides a solid foundation for any JavaScript application.
11
11
  3. The "ninjs" command line application eases the pain of repetitive tasks like compiling, scaffolding, and updating your application.
12
12
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.13.4
1
+ 0.13.5
data/bin/ninjs CHANGED
@@ -12,16 +12,7 @@ rescue LoadError
12
12
  end
13
13
 
14
14
  header = <<-HEADER
15
- ninjs #{Ninjs::VERSION}
16
- Copyright (c) #{Time.new.year} Dayton Nolan
17
- Released under the MIT License
18
15
 
19
- Description:
20
- The ninjs command line application is a simple way to quickly develop and manage your application. With it you can create an application, generate scaffolding, compile, and upgrade your application.
21
-
22
- Usage: ninjs [command] [arguments] [options (-h, --help)]
23
-
24
- Commands:
25
16
  HEADER
26
17
 
27
18
  create = <<-CREATE
@@ -111,14 +102,18 @@ optparse = OptionParser.new do|opts|
111
102
 
112
103
  opts.on( '-v', '--version', 'Display the version') do
113
104
  time = Time.now
114
- Ninjs::Notification.notice 'ninjs ' + Ninjs::VERSION
115
- Ninjs::Notification.notice "Copyright (c) #{time.year} Dayton Nolan"
116
- Ninjs::Notification.notice "Released under the MIT License"
105
+ puts Ninjs::Notification.notice 'ninjs ' + Ninjs::VERSION
106
+ puts Ninjs::Notification.notice "Copyright (c) #{time.year} Dayton Nolan"
107
+ puts Ninjs::Notification.notice "Released under the MIT License"
117
108
  exit
118
109
  end
119
110
 
120
- opts.on( '-a', '--alias', 'Generate application alias') do
121
- options[:alias] = true
111
+ opts.on( '-a', '--alias [alias]', 'Generate application alias') do |als|
112
+ options[:alias] = als || "app"
113
+ end
114
+
115
+ opts.on( '-d', '--dest [dest]', 'Module destination directory') do |dest|
116
+ options[:dest] = dest
122
117
  end
123
118
 
124
119
  opts.on('-e', '--elements', 'Generate elements file') do
@@ -158,10 +153,12 @@ case command
158
153
  puts help[:generate]
159
154
  exit
160
155
  end
156
+
161
157
  errors = Hash.new
162
158
  type = ARGV[1]
163
159
  name = ARGV[2]
164
- als = ARGV[3] || 'app'
160
+ als = options[:alias] || nil
161
+ dest = options[:dest] || nil
165
162
 
166
163
  errors[:type] = "Error! Scaffold type is required (ninjs generate module mymodule)" if type.nil?
167
164
  errors[:name] = "Error! Module name is required (ninjs generate module mymodule)" if name.nil?
@@ -173,16 +170,20 @@ case command
173
170
  exit
174
171
  end
175
172
 
176
- with = {
173
+ dependencies = {
177
174
  :model => options[:model],
178
175
  :elements => options[:elements]
179
176
  }
180
177
 
181
- if options[:alias]
182
- Ninjs::Command.generate_with_alias(type, name, with, als)
183
- else
184
- Ninjs::Command.generate(type, name, with)
185
- end
178
+ config = {
179
+ :type => type,
180
+ :name => name,
181
+ :alias => als,
182
+ :dest => dest,
183
+ :dependencies => dependencies
184
+ }
185
+
186
+ Ninjs::Command.generate(config)
186
187
  # compile
187
188
  when "compile"
188
189
  if options[:help]
data/lib/ninjs/command.rb CHANGED
@@ -2,9 +2,11 @@ module Ninjs
2
2
  module Command
3
3
  def watch
4
4
  require "fssm"
5
+
5
6
  project_path = Dir.getwd << '/'
6
7
  raise "ninjs.conf was not located in #{project_path}" unless File.exists? "#{project_path}ninjs.conf"
7
- Ninjs::Notification.log "Ninjs are watching for changes. Press Ctrl-C to stop."
8
+
9
+ puts Ninjs::Notification.log "Ninjs are watching for changes. Press Ctrl-C to stop."
8
10
  project = Ninjs::Project.new
9
11
  project.update
10
12
 
@@ -26,12 +28,12 @@ module Ninjs
26
28
  glob g
27
29
 
28
30
  update do |base, relative|
29
- Ninjs::Notification.event "change detected in #{relative}"
31
+ puts Ninjs::Notification.event "change detected in #{relative}"
30
32
  project.update
31
33
  end
32
34
 
33
35
  create do |base, relative|
34
- Ninjs::Notification.event "#{relative} created"
36
+ puts Ninjs::Notification.event "#{relative} created"
35
37
  project.update
36
38
  end
37
39
  end
@@ -60,48 +62,29 @@ module Ninjs
60
62
  Ninjs::PackageManager.import(package)
61
63
  end
62
64
 
63
- def generate(object, name, with)
64
- begin
65
- conf_path = "#{Dir.getwd}/ninjs.conf"
66
- raise "ninjs.conf was not located in #{conf_path}" unless File.exists? "#{conf_path}"
67
- generator = Ninjs::Generator.new(Ninjs::Project.new, name)
68
- self.generate_object generator, object, with
69
- end
70
- end
71
-
72
- def generate_with_alias(object, name, with, als = 'app')
65
+ def generate(config)
73
66
  begin
74
67
  conf_path = "#{Dir.getwd}/ninjs.conf"
75
68
  raise "ninjs.conf was not located in #{conf_path}" unless File.exists? "#{conf_path}"
76
- generator = Ninjs::Generator.new(Ninjs::Project.new, name)
77
- generator.alias = true
78
- generator.app_name = als
79
- self.generate_object generator, object, with
69
+ generator = Ninjs::Generator.new(config)
70
+ generator.generate
80
71
  end
81
72
  end
82
-
83
- def generate_object(generator, object, with)
84
- case object
85
- when 'module'
86
- generator.generate_module_file(with)
87
- generator.generate_elements_file if with[:elements]
88
- generator.generate_model_file if with[:model]
89
- when 'elements'
90
- generator.generate_elements_file
91
- when 'model'
92
- generator.generate_model_file
93
- end
94
- end
95
73
 
96
74
  def update
97
75
  project_path = Dir.getwd << '/'
98
76
  raise "ninjs.conf was not located in #{project_path}" unless File.exists? "#{project_path}ninjs.conf"
99
- project = Ninjs::Project.new
100
77
 
78
+ project = Ninjs::Project.new
101
79
  project.create_ninjs_lib_file
102
80
  project.create_utility_lib_file
103
81
  end
104
82
 
105
- module_function :create, :watch, :compile, :import, :generate, :generate_object, :generate_with_alias, :update
83
+ module_function :create,
84
+ :watch,
85
+ :compile,
86
+ :import,
87
+ :generate,
88
+ :update
106
89
  end
107
90
  end
@@ -4,7 +4,9 @@ module Ninjs
4
4
  attr_reader :name,
5
5
  :dependencies,
6
6
  :autoload,
7
- :asset_root
7
+ :asset_root,
8
+ :src_dir,
9
+ :dest_dir
8
10
 
9
11
  attr_accessor :output
10
12
 
@@ -15,7 +17,9 @@ module Ninjs
15
17
  :name => name,
16
18
  :output => 'expanded',
17
19
  :dependencies => ['"<jquery/latest>"'],
18
- :autoload => ['"../lib/utilities"']
20
+ :autoload => ['"../lib/utilities"'],
21
+ :src_dir => 'modules',
22
+ :dest_dir => 'application'
19
23
  }
20
24
 
21
25
  @asset_root = @project_path
@@ -47,7 +51,7 @@ module Ninjs
47
51
  conf_file << conf_content(@defaults)
48
52
  end
49
53
 
50
- Ninjs::Notification.notify "ninjs.conf created", :added
54
+ puts Ninjs::Notification.notify "ninjs.conf created", :added
51
55
  end
52
56
 
53
57
  def read
@@ -55,6 +59,8 @@ module Ninjs
55
59
 
56
60
  @name = config['name']
57
61
  @output = config['output']
62
+ @src_dir = config['src_dir']
63
+ @dest_dir = config['dest_dir']
58
64
 
59
65
  @dependencies = config['dependencies'] || Array.new
60
66
  @autoload = config['autoload'] || Array.new
@@ -3,43 +3,52 @@ module Ninjs
3
3
 
4
4
  attr_writer :alias, :app_name
5
5
 
6
- def initialize(project, name)
7
- @project = project
8
- @name = name
9
- @alias = false
10
- @app_name = @use_alias ? 'app' : @project.config.name
6
+ def initialize(config)
7
+ @type = config[:type]
8
+ @project = Ninjs::Project.new
9
+ @name = config[:name]
10
+ @module_name = config[:name].gsub(/^_/, '')
11
+ @alias = config[:alias].nil? ? false : true
12
+ @app_name = config[:alias] || @project.config.name
13
+ @dest = config[:dest] || @project.config.src_dir.is_a?(String) ? @project.config.src_dir : @project.config.src_dir.first
14
+ @dependencies = config[:dependencies] || { :elements => false, :model => false }
11
15
  end
12
16
 
13
- def generate_module_file(with = { :elements => false, :model => false })
14
-
15
- File.open "#{@project.project_path}modules/#{@name.downcase}.module.js", "w" do |file|
16
- file << "(function(#{@app_name if @alias}){\n"
17
+ def generate
18
+ generate_module_file if @type === 'module'
19
+ generate_elements_file if @type === 'elements' || @dependencies[:elements]
20
+ generate_model_file if @type === 'model' || @dependencies[:model]
21
+ end
22
+
23
+ def generate_module_file
24
+ File.open "#{@project.project_path}#{@dest}/#{@name}.module.js", "w" do |file|
25
+ file << "(function(#{@app_name if @alias}) {\n"
17
26
  file << "\tvar self = #{@app_name}.add_module('#{@name}');\n\n"
18
- file << "\t" + '//= require "../elements/' + @name.downcase + '.elements"' + "\n\n" if with[:elements]
19
- file << "\t" + '//= require "../models/' + @name.downcase + '.model"' + "\n\n" if with[:model]
20
- file << "\t #{@app_name}.#{@name}.actions = function() {\n\n\t};\n\n"
21
- file << "\t #{@app_name}.#{@name}.run();\n"
22
- file << "})(#{@project.config.name if @alias});"
23
- Ninjs::Notification.added "created #{@name.downcase}.module.js"
24
- end unless File.exists? "#{@project.project_path}modules/#{@name.downcase}.module.js"
27
+ file << %Q(\t//= require "../elements/#{@name.downcase}.elements"\n\n) if @dependencies[:elements] || @type === 'elements'
28
+ file << %Q(\t//= require "../models/#{@name.downcase}.model\n\n) if @dependencies[:model] || @type === 'model'
29
+ file << "\t#{@app_name}.#{@module_name}.actions = function() {\n\n\t};\n\n"
30
+ file << "\t#{@app_name}.#{@module_name}.run();\n"
31
+ file << "})(#{@project.config.name});" if @alias
32
+ puts Ninjs::Notification.added "created #{@name.downcase}.module.js"
33
+ end unless File.exists? "#{@project.project_path}#{@dest}/#{@name}.module.js"
25
34
 
26
35
  self
27
36
  end
28
37
 
29
38
  def generate_elements_file
30
- File.open("#{@project.project_path}elements/#{@name.downcase}" + ".elements.js", "w") do |file|
31
- file << "#{@app_name}.#{@name}.elements({\n\n});"
32
- Ninjs::Notification.added "created #{@name.downcase}.elements.js"
33
- end unless File.exists? "#{@project.project_path}elements/#{@name.downcase}.elements.js"
39
+ File.open("#{@project.project_path}elements/#{@module_name}" + ".elements.js", "w") do |file|
40
+ file << "#{@app_name}.#{@module_name}.elements({\n\n});"
41
+ puts Ninjs::Notification.added "created #{@module_name}.elements.js"
42
+ end unless File.exists? "#{@project.project_path}elements/#{@module_name}.elements.js"
34
43
 
35
44
  self
36
45
  end
37
46
 
38
47
  def generate_model_file
39
- File.open "#{@project.project_path}models/#{@name.downcase}.model.js", "w" do |file|
40
- file << "#{@app_name}.#{@name}.set_data({\n\t\n});"
41
- Ninjs::Notification.added "created #{@name.downcase}.model.js"
42
- end unless File.exists? "#{@project.project_path}models/#{@name.downcase}.model.js"
48
+ File.open "#{@project.project_path}models/#{@module_name}.model.js", "w" do |file|
49
+ file << "#{@app_name}.#{@module_name}.set_data({\n\t\n});"
50
+ puts Ninjs::Notification.added "created #{@module_name}.model.js"
51
+ end unless File.exists? "#{@project.project_path}models/#{@module_name}.model.js"
43
52
 
44
53
  self
45
54
  end
data/lib/ninjs/helpers.rb CHANGED
@@ -2,6 +2,7 @@ module Ninjs
2
2
  module Helpers
3
3
 
4
4
  def create_module_filename(module_name)
5
+ module_name = module_name.split(/[\\\/]/).last
5
6
  split = module_name.split(/[\.\-\s]/)
6
7
  module_filename = String.new
7
8
  split.each do |piece|
@@ -10,7 +10,7 @@ module Ninjs
10
10
  }
11
11
 
12
12
  def self.notify(message, style)
13
- puts @@indicators[style] + message
13
+ @@indicators[style] + message
14
14
  end
15
15
 
16
16
  def self.notice(message)
data/lib/ninjs/project.rb CHANGED
@@ -22,7 +22,7 @@ module Ninjs
22
22
  end
23
23
 
24
24
  def create
25
- Ninjs::Notification.notice "Creating the #{@config.name} project in #{@project_path}"
25
+ puts Ninjs::Notification.notice "Creating the #{@config.name} project in #{@project_path}"
26
26
  create_project_structure
27
27
  @config.create
28
28
  create_ninjs_lib_file
@@ -34,7 +34,7 @@ module Ninjs
34
34
  def create_project_structure
35
35
  Dir.mkdir "#{@project_path}" unless File.exists? "#{@project_path}"
36
36
  Ninjs::Manifest.directories.each do |folder|
37
- Ninjs::Notification.added "#{folder}/ created" unless File.exists? "#{@project_path}#{folder}"
37
+ puts Ninjs::Notification.added "#{folder}/ created" unless File.exists? "#{@project_path}#{folder}"
38
38
  Dir.mkdir "#{@project_path}#{folder}" unless File.exists? "#{@project_path}#{folder}"
39
39
  end
40
40
  end
@@ -49,7 +49,7 @@ module Ninjs
49
49
 
50
50
  ninjs_lib_secretary.concatenation.save_to "#{@project_path}lib/nin.js"
51
51
 
52
- Ninjs::Notification.added "lib/nin.js #{operation}"
52
+ puts Ninjs::Notification.added "lib/nin.js #{operation}"
53
53
  end
54
54
 
55
55
  def create_utility_lib_file
@@ -61,7 +61,7 @@ module Ninjs
61
61
 
62
62
  utility_lib_secretary.concatenation.save_to "#{@project_path}lib/utilities.js"
63
63
 
64
- Ninjs::Notification.added "lib/utilities.js created"
64
+ puts Ninjs::Notification.added "lib/utilities.js created"
65
65
  end
66
66
 
67
67
  def create_ninjs_application_file
@@ -87,7 +87,7 @@ module Ninjs
87
87
  compile_modules
88
88
  update_application_file
89
89
  compress_application if @config.output == 'compressed'
90
- Ninjs::Notification.log "application updated" unless @errors
90
+ puts Ninjs::Notification.log "application updated" unless @errors
91
91
  @errors = false
92
92
  end
93
93
 
@@ -107,11 +107,20 @@ module Ninjs
107
107
  end
108
108
 
109
109
  def get_updated_modules
110
- # TODO actually check the files against a cache
111
110
  @modules = Array.new
112
- Dir["#{@project_path}modules/*.js"].each do |file|
113
- module_filename = file.gsub(@project_path + 'modules/', '')
114
- @modules << module_filename unless module_filename.match(/^_/)
111
+ if @config.src_dir.is_a? Array
112
+ @config.src_dir.each do |directory|
113
+ get_directory_modules "#{@project_path}#{directory}/"
114
+ end
115
+ else
116
+ get_directory_modules "#{@project_path}#{@config.src_dir}/"
117
+ end
118
+ end
119
+
120
+ def get_directory_modules(directory)
121
+ Dir["#{directory}*.js"].each do |file|
122
+ module_filename = file.gsub(directory, '')
123
+ @modules << "#{directory}#{module_filename}" unless module_filename.match(/^_/)
115
124
  end
116
125
  end
117
126
 
@@ -122,30 +131,37 @@ module Ninjs
122
131
  end
123
132
  end
124
133
 
134
+ def create_module_filename(module_name)
135
+ split = module_name.split(/[\.\-\s]/)
136
+ module_filename = String.new
137
+ split.each do |piece|
138
+ module_filename << piece unless piece.match(/^module$|^js$/i)
139
+ end
140
+ module_filename
141
+ end
142
+
125
143
  def create_module_file(module_file, module_name)
126
144
  begin
127
- module_src = "#{@project_path}modules/#{module_file}"
128
-
129
145
  ninjs_lib_secretary = Sprockets::Secretary.new(
130
146
  :root => "#{Ninjs::BASE_DIR}",
131
147
  :asset_root => @config.asset_root,
132
148
  :load_path => ["repository"],
133
- :source_files => ["#{module_src}"]
149
+ :source_files => ["#{module_file}"]
134
150
  )
135
151
 
136
152
  module_file = ninjs_lib_secretary.concatenation
137
- message = File.exists?("#{@project_path}application/#{module_name}.js") ? "\e[32m>>>\e[0m application/#{module_name}.js updated" : "\e[32m>>>\e[0m application/#{module_name}.js created"
138
- module_file.save_to "#{@project_path}application/#{module_name}.js"
153
+ message = File.exists?("#{@project_path}#{@config.dest_dir}/#{module_name}.js") ? "\e[32m>>>\e[0m #{@config.dest_dir}/#{module_name}.js updated" : "\e[32m>>>\e[0m #{@config.dest_dir}/#{module_name}.js created"
154
+ module_file.save_to "#{@project_path}#{@config.dest_dir}/#{module_name}.js"
139
155
  ninjs_lib_secretary.install_assets
140
156
 
141
157
  rescue Exception => error
142
158
  @errors = true
143
- Ninjs::Notification.error "Sprockets error: #{error.message}"
159
+ puts Ninjs::Notification.error "Sprockets error: #{error.message}"
144
160
  end
145
161
  end
146
162
 
147
163
  def update_application_file
148
- application_file = "#{@project_path}application/#{@app_filename}.js"
164
+ application_file = "#{@project_path}#{@config.dest_dir}/#{@app_filename}.js"
149
165
 
150
166
  File.open(application_file, "w+") do |file|
151
167
  write_dependencies(file)
@@ -192,12 +208,12 @@ module Ninjs
192
208
  application_file.save_to "#{file}"
193
209
  rescue Exception => error
194
210
  @errors = true
195
- Ninjs::Notification.error "Sprockets error: #{error.message}"
211
+ puts Ninjs::Notification.error "Sprockets error: #{error.message}"
196
212
  end
197
213
  end
198
214
 
199
215
  def compress_application
200
- application = @project_path + 'application'
216
+ application = @project_path + '#{@config.dest_dir}'
201
217
  modules = Dir.entries(application)
202
218
  modules.reject! { |file| file =~ /^\./ }
203
219
 
data/ninjs.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{ninjs}
8
- s.version = "0.13.4"
8
+ s.version = "0.13.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Dayton Nolan"]
12
- s.date = %q{2011-05-06}
12
+ s.date = %q{2011-05-17}
13
13
  s.default_executable = %q{ninjs}
14
14
  s.description = %q{Ninjs is a ruby application and small javascript framework that helps you build clean, modular javascript applications. Ninjs encourages "Good Parts" best practices and the Crockford school Module pattern (http://www.crockford.com/). The ninjs command line application is an automatic compiler, written in ruby, and based on the Sprockets library (http://getsprockets.org/).}
15
15
  s.email = %q{daytonn@gmail.com}
@@ -186,7 +186,7 @@ Gem::Specification.new do |s|
186
186
  "repository/ninjs/docs/search/VariablesR.html",
187
187
  "repository/ninjs/docs/search/VariablesT.html",
188
188
  "repository/ninjs/docs/styles/main.css",
189
- "repository/ninjs/extensions/ninjs.jquery.js",
189
+ "repository/ninjs/extensions/jquery.elements.js",
190
190
  "repository/ninjs/tests/index.html",
191
191
  "repository/ninjs/tests/ninjs.test.js",
192
192
  "repository/ninjs/tests/ninjs.utilities.test.js",
@@ -203,6 +203,7 @@ Gem::Specification.new do |s|
203
203
  "repository/qunit/qunit.js",
204
204
  "repository/selectivizr/1.0.js",
205
205
  "repository/selectivizr/latest.js",
206
+ "repository/syntaxhighlighter/all.js",
206
207
  "repository/syntaxhighlighter/assets/css/syntaxhighlighter/shCore.css",
207
208
  "repository/syntaxhighlighter/assets/css/syntaxhighlighter/shCoreDefault.css",
208
209
  "repository/syntaxhighlighter/assets/css/syntaxhighlighter/shCoreDjango.css",
@@ -238,7 +239,6 @@ Gem::Specification.new do |s|
238
239
  "repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shThemeMidnight.scss",
239
240
  "repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shThemeRDark.scss",
240
241
  "repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_theme_template.scss",
241
- "repository/syntaxhighlighter/default.js",
242
242
  "repository/syntaxhighlighter/shAutoloader.js",
243
243
  "repository/syntaxhighlighter/shBrushAS3.js",
244
244
  "repository/syntaxhighlighter/shBrushAppleScript.js",
@@ -278,7 +278,11 @@ Gem::Specification.new do |s|
278
278
  "spec/fixtures/test.module.js",
279
279
  "spec/fixtures/updated.myapplication.js",
280
280
  "spec/fixtures/utilities.js",
281
+ "spec/helpers_spec.rb",
282
+ "spec/integration_spec.rb",
283
+ "spec/manifest_spec.rb",
281
284
  "spec/ninjs_spec.rb",
285
+ "spec/notification_spec.rb",
282
286
  "spec/spec_helper.rb",
283
287
  "tmp/ff9e83aa019b712b90200b8d1b8fa0c7e14576af.json",
284
288
  "tmp/metric_fu/_data/20110305.yml",
@@ -295,14 +299,19 @@ Gem::Specification.new do |s|
295
299
  s.licenses = ["MIT"]
296
300
  s.require_paths = ["lib"]
297
301
  s.rubyforge_project = %q{nowarning}
298
- s.rubygems_version = %q{1.5.2}
302
+ s.rubygems_version = %q{1.3.7}
299
303
  s.summary = %q{ninjs is a command line application to help you write clean, modular javascript applications.}
300
304
  s.test_files = [
305
+ "spec/helpers_spec.rb",
306
+ "spec/integration_spec.rb",
307
+ "spec/manifest_spec.rb",
301
308
  "spec/ninjs_spec.rb",
309
+ "spec/notification_spec.rb",
302
310
  "spec/spec_helper.rb"
303
311
  ]
304
312
 
305
313
  if s.respond_to? :specification_version then
314
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
306
315
  s.specification_version = 3
307
316
 
308
317
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then