ninjs-framework 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. data/.DS_Store +0 -0
  2. data/.bundle/config +2 -0
  3. data/.travis.yml +2 -0
  4. data/Gemfile +10 -0
  5. data/Gemfile.lock +47 -0
  6. data/LICENSE.txt +20 -0
  7. data/README.md +4 -0
  8. data/Rakefile +76 -0
  9. data/VERSION +1 -0
  10. data/lib/.DS_Store +0 -0
  11. data/lib/ninjs-framework.rb +164 -0
  12. data/lib/ninjs-framework/assets/jasmine/jasmine-html.js +190 -0
  13. data/lib/ninjs-framework/assets/jasmine/jasmine.css +166 -0
  14. data/lib/ninjs-framework/assets/jasmine/jasmine.js +2476 -0
  15. data/lib/ninjs-framework/assets/jasmine/jasmine_favicon.png +0 -0
  16. data/lib/ninjs-framework/core/.core.pdoc.yaml +0 -0
  17. data/lib/ninjs-framework/core/.existence.pdoc.yaml +12 -0
  18. data/lib/ninjs-framework/core/.extend.pdoc.yaml +0 -0
  19. data/lib/ninjs-framework/core/.nin.pdoc.yaml +0 -0
  20. data/lib/ninjs-framework/core/application.js +17 -0
  21. data/lib/ninjs-framework/core/dom.js +164 -0
  22. data/lib/ninjs-framework/core/existence.js +60 -0
  23. data/lib/ninjs-framework/core/extend.js +14 -0
  24. data/lib/ninjs-framework/core/module.js +66 -0
  25. data/lib/ninjs-framework/core/nin.js +5 -0
  26. data/lib/ninjs-framework/extensions/jquery.elements.js +60 -0
  27. data/lib/ninjs-framework/templates/application.js.erb +3 -0
  28. data/lib/ninjs-framework/templates/autoload.js.erb +3 -0
  29. data/lib/ninjs-framework/templates/core.js.erb +3 -0
  30. data/lib/ninjs-framework/templates/dependency.js.erb +3 -0
  31. data/lib/ninjs-framework/templates/jasmine.yml.erb +75 -0
  32. data/lib/ninjs-framework/templates/test-index.html.erb +51 -0
  33. data/lib/ninjs-framework/utilities/all.js +5 -0
  34. data/lib/ninjs-framework/utilities/array.js +29 -0
  35. data/lib/ninjs-framework/utilities/cookie.js +59 -0
  36. data/lib/ninjs-framework/utilities/css.js +51 -0
  37. data/lib/ninjs-framework/utilities/number.js +11 -0
  38. data/lib/ninjs-framework/utilities/string.js +61 -0
  39. data/spec/fixtures/myapp.js +530 -0
  40. data/spec/fixtures/nin.js +297 -0
  41. data/spec/fixtures/ninjs.conf +9 -0
  42. data/spec/fixtures/test.elements.js +3 -0
  43. data/spec/fixtures/test.js +14 -0
  44. data/spec/fixtures/test.model.js +3 -0
  45. data/spec/fixtures/test.module.js +10 -0
  46. data/spec/fixtures/utilities.js +211 -0
  47. data/spec/javascripts/application_spec.js +22 -0
  48. data/spec/javascripts/array_utility_spec.js +49 -0
  49. data/spec/javascripts/existence_spec.js +71 -0
  50. data/spec/javascripts/extension_spec.js +22 -0
  51. data/spec/javascripts/helpers/SpecHelper.js +3 -0
  52. data/spec/javascripts/module_spec.js +30 -0
  53. data/spec/javascripts/string_utility_spec.js +85 -0
  54. data/spec/javascripts/support/jasmine.yml +75 -0
  55. data/spec/javascripts/support/jasmine_config.rb +23 -0
  56. data/spec/javascripts/support/jasmine_runner.rb +32 -0
  57. data/spec/ninjs_framework_spec.rb +121 -0
  58. data/spec/spec_helper.rb +41 -0
  59. data/spec/tmp/Rakefile +76 -0
  60. data/spec/tmp/application/myapp.js +530 -0
  61. data/spec/tmp/application/test.js +14 -0
  62. data/spec/tmp/elements/test.elements.js +3 -0
  63. data/spec/tmp/lib/nin.js +297 -0
  64. data/spec/tmp/lib/utilities.js +211 -0
  65. data/spec/tmp/models/test.model.js +3 -0
  66. data/spec/tmp/modules/test.module.js +10 -0
  67. data/spec/tmp/ninjs.conf +9 -0
  68. data/spec/tmp/spec/index.html +51 -0
  69. data/spec/tmp/spec/javascripts/application_spec.js +22 -0
  70. data/spec/tmp/spec/javascripts/array_utility_spec.js +49 -0
  71. data/spec/tmp/spec/javascripts/existence_spec.js +71 -0
  72. data/spec/tmp/spec/javascripts/extension_spec.js +22 -0
  73. data/spec/tmp/spec/javascripts/module_spec.js +30 -0
  74. data/spec/tmp/spec/javascripts/string_utility_spec.js +85 -0
  75. data/spec/tmp/spec/javascripts/support/jasmine-html.js +190 -0
  76. data/spec/tmp/spec/javascripts/support/jasmine.css +166 -0
  77. data/spec/tmp/spec/javascripts/support/jasmine.js +2476 -0
  78. data/spec/tmp/spec/javascripts/support/jasmine.yml.erb +75 -0
  79. data/spec/tmp/spec/javascripts/support/jasmine_config.rb +23 -0
  80. data/spec/tmp/spec/javascripts/support/jasmine_favicon.png +0 -0
  81. data/spec/tmp/spec/javascripts/support/jasmine_runner.rb +32 -0
  82. metadata +285 -0
@@ -0,0 +1,75 @@
1
+ # src_files
2
+ #
3
+ # Return an array of filepaths relative to src_dir to include before jasmine specs.
4
+ # Default: []
5
+ #
6
+ # EXAMPLE:
7
+ #
8
+ # src_files:
9
+ # - lib/source1.js
10
+ # - lib/source2.js
11
+ # - dist/**/*.js
12
+ #
13
+ src_files:
14
+ - lib/core/*.js
15
+ - lib/extensions/*.js
16
+ - lib/utilities/*.js
17
+
18
+ # stylesheets
19
+ #
20
+ # Return an array of stylesheet filepaths relative to src_dir to include before jasmine specs.
21
+ # Default: []
22
+ #
23
+ # EXAMPLE:
24
+ #
25
+ # stylesheets:
26
+ # - css/style.css
27
+ # - stylesheets/*.css
28
+ #
29
+ stylesheets:
30
+
31
+ # helpers
32
+ #
33
+ # Return an array of filepaths relative to spec_dir to include before jasmine specs.
34
+ # Default: ["helpers/**/*.js"]
35
+ #
36
+ # EXAMPLE:
37
+ #
38
+ # helpers:
39
+ # - helpers/**/*.js
40
+ #
41
+ helpers:
42
+
43
+ # spec_files
44
+ #
45
+ # Return an array of filepaths relative to spec_dir to include.
46
+ # Default: ["**/*[sS]pec.js"]
47
+ #
48
+ # EXAMPLE:
49
+ #
50
+ # spec_files:
51
+ # - **/*[sS]pec.js
52
+ #
53
+ spec_files:
54
+
55
+ # src_dir
56
+ #
57
+ # Source directory path. Your src_files must be returned relative to this path. Will use root if left blank.
58
+ # Default: project root
59
+ #
60
+ # EXAMPLE:
61
+ #
62
+ # src_dir: public
63
+ #
64
+ src_dir:
65
+
66
+ # spec_dir
67
+ #
68
+ # Spec directory path. Your spec_files must be returned relative to this path.
69
+ # Default: spec/javascripts
70
+ #
71
+ # EXAMPLE:
72
+ #
73
+ # spec_dir: spec/javascripts
74
+ #
75
+ spec_dir:
@@ -0,0 +1,23 @@
1
+ module Jasmine
2
+ class Config
3
+
4
+ # Add your overrides or custom config code here
5
+
6
+ end
7
+ end
8
+
9
+
10
+ # Note - this is necessary for rspec2, which has removed the backtrace
11
+ module Jasmine
12
+ class SpecBuilder
13
+ def declare_spec(parent, spec)
14
+ me = self
15
+ example_name = spec["name"]
16
+ @spec_ids << spec["id"]
17
+ backtrace = @example_locations[parent.description + " " + example_name]
18
+ parent.it example_name, {} do
19
+ me.report_spec(spec["id"])
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,32 @@
1
+ $:.unshift(ENV['JASMINE_GEM_PATH']) if ENV['JASMINE_GEM_PATH'] # for gem testing purposes
2
+
3
+ require 'rubygems'
4
+ require 'jasmine'
5
+ jasmine_config_overrides = File.expand_path(File.join(File.dirname(__FILE__), 'jasmine_config.rb'))
6
+ require jasmine_config_overrides if File.exist?(jasmine_config_overrides)
7
+ if Jasmine::rspec2?
8
+ require 'rspec'
9
+ else
10
+ require 'spec'
11
+ end
12
+
13
+ jasmine_config = Jasmine::Config.new
14
+ spec_builder = Jasmine::SpecBuilder.new(jasmine_config)
15
+
16
+ should_stop = false
17
+
18
+ if Jasmine::rspec2?
19
+ RSpec.configuration.after(:suite) do
20
+ spec_builder.stop if should_stop
21
+ end
22
+ else
23
+ Spec::Runner.configure do |config|
24
+ config.after(:suite) do
25
+ spec_builder.stop if should_stop
26
+ end
27
+ end
28
+ end
29
+
30
+ spec_builder.start
31
+ should_stop = true
32
+ spec_builder.declare_suites
metadata ADDED
@@ -0,0 +1,285 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ninjs-framework
3
+ version: !ruby/object:Gem::Version
4
+ prerelease:
5
+ version: 0.1.0
6
+ platform: ruby
7
+ authors:
8
+ - Dayton Nolan
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+
13
+ date: 2011-11-15 00:00:00 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: rake
17
+ requirement: &id001 !ruby/object:Gem::Requirement
18
+ none: false
19
+ requirements:
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: "0"
23
+ type: :development
24
+ prerelease: false
25
+ version_requirements: *id001
26
+ - !ruby/object:Gem::Dependency
27
+ name: jasmine
28
+ requirement: &id002 !ruby/object:Gem::Requirement
29
+ none: false
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: "0"
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: *id002
37
+ - !ruby/object:Gem::Dependency
38
+ name: rspec
39
+ requirement: &id003 !ruby/object:Gem::Requirement
40
+ none: false
41
+ requirements:
42
+ - - ~>
43
+ - !ruby/object:Gem::Version
44
+ version: 2.3.0
45
+ type: :development
46
+ prerelease: false
47
+ version_requirements: *id003
48
+ - !ruby/object:Gem::Dependency
49
+ name: bundler
50
+ requirement: &id004 !ruby/object:Gem::Requirement
51
+ none: false
52
+ requirements:
53
+ - - ~>
54
+ - !ruby/object:Gem::Version
55
+ version: 1.0.0
56
+ type: :development
57
+ prerelease: false
58
+ version_requirements: *id004
59
+ - !ruby/object:Gem::Dependency
60
+ name: jeweler
61
+ requirement: &id005 !ruby/object:Gem::Requirement
62
+ none: false
63
+ requirements:
64
+ - - ~>
65
+ - !ruby/object:Gem::Version
66
+ version: 1.5.2
67
+ type: :development
68
+ prerelease: false
69
+ version_requirements: *id005
70
+ - !ruby/object:Gem::Dependency
71
+ name: rcov
72
+ requirement: &id006 !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ">="
76
+ - !ruby/object:Gem::Version
77
+ version: "0"
78
+ type: :development
79
+ prerelease: false
80
+ version_requirements: *id006
81
+ - !ruby/object:Gem::Dependency
82
+ name: rake
83
+ requirement: &id007 !ruby/object:Gem::Requirement
84
+ none: false
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ version: "0"
89
+ type: :development
90
+ prerelease: false
91
+ version_requirements: *id007
92
+ - !ruby/object:Gem::Dependency
93
+ name: jasmine
94
+ requirement: &id008 !ruby/object:Gem::Requirement
95
+ none: false
96
+ requirements:
97
+ - - ">="
98
+ - !ruby/object:Gem::Version
99
+ version: "0"
100
+ type: :development
101
+ prerelease: false
102
+ version_requirements: *id008
103
+ - !ruby/object:Gem::Dependency
104
+ name: rake
105
+ requirement: &id009 !ruby/object:Gem::Requirement
106
+ none: false
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: "0"
111
+ type: :development
112
+ prerelease: false
113
+ version_requirements: *id009
114
+ - !ruby/object:Gem::Dependency
115
+ name: rspec
116
+ requirement: &id010 !ruby/object:Gem::Requirement
117
+ none: false
118
+ requirements:
119
+ - - ~>
120
+ - !ruby/object:Gem::Version
121
+ version: 2.3.0
122
+ type: :development
123
+ prerelease: false
124
+ version_requirements: *id010
125
+ - !ruby/object:Gem::Dependency
126
+ name: bundler
127
+ requirement: &id011 !ruby/object:Gem::Requirement
128
+ none: false
129
+ requirements:
130
+ - - ~>
131
+ - !ruby/object:Gem::Version
132
+ version: 1.0.0
133
+ type: :development
134
+ prerelease: false
135
+ version_requirements: *id011
136
+ - !ruby/object:Gem::Dependency
137
+ name: jeweler
138
+ requirement: &id012 !ruby/object:Gem::Requirement
139
+ none: false
140
+ requirements:
141
+ - - ~>
142
+ - !ruby/object:Gem::Version
143
+ version: 1.5.2
144
+ type: :development
145
+ prerelease: false
146
+ version_requirements: *id012
147
+ - !ruby/object:Gem::Dependency
148
+ name: rcov
149
+ requirement: &id013 !ruby/object:Gem::Requirement
150
+ none: false
151
+ requirements:
152
+ - - ">="
153
+ - !ruby/object:Gem::Version
154
+ version: "0"
155
+ type: :development
156
+ prerelease: false
157
+ version_requirements: *id013
158
+ description: ninjs-framework is the JavaScript framework component of the ninjs development framework. ninjs-framework is focus on helping you build extensible modular javascript applications, without using a classical inheritance pattern.
159
+ email: daytonn@gmail.com
160
+ executables: []
161
+
162
+ extensions: []
163
+
164
+ extra_rdoc_files:
165
+ - LICENSE.txt
166
+ - README.md
167
+ files:
168
+ - .DS_Store
169
+ - .bundle/config
170
+ - .travis.yml
171
+ - Gemfile
172
+ - Gemfile.lock
173
+ - LICENSE.txt
174
+ - README.md
175
+ - Rakefile
176
+ - VERSION
177
+ - lib/.DS_Store
178
+ - lib/ninjs-framework.rb
179
+ - lib/ninjs-framework/assets/jasmine/jasmine-html.js
180
+ - lib/ninjs-framework/assets/jasmine/jasmine.css
181
+ - lib/ninjs-framework/assets/jasmine/jasmine.js
182
+ - lib/ninjs-framework/assets/jasmine/jasmine_favicon.png
183
+ - lib/ninjs-framework/core/.core.pdoc.yaml
184
+ - lib/ninjs-framework/core/.existence.pdoc.yaml
185
+ - lib/ninjs-framework/core/.extend.pdoc.yaml
186
+ - lib/ninjs-framework/core/.nin.pdoc.yaml
187
+ - lib/ninjs-framework/core/application.js
188
+ - lib/ninjs-framework/core/dom.js
189
+ - lib/ninjs-framework/core/existence.js
190
+ - lib/ninjs-framework/core/extend.js
191
+ - lib/ninjs-framework/core/module.js
192
+ - lib/ninjs-framework/core/nin.js
193
+ - lib/ninjs-framework/extensions/jquery.elements.js
194
+ - lib/ninjs-framework/templates/application.js.erb
195
+ - lib/ninjs-framework/templates/autoload.js.erb
196
+ - lib/ninjs-framework/templates/core.js.erb
197
+ - lib/ninjs-framework/templates/dependency.js.erb
198
+ - lib/ninjs-framework/templates/jasmine.yml.erb
199
+ - lib/ninjs-framework/templates/test-index.html.erb
200
+ - lib/ninjs-framework/utilities/all.js
201
+ - lib/ninjs-framework/utilities/array.js
202
+ - lib/ninjs-framework/utilities/cookie.js
203
+ - lib/ninjs-framework/utilities/css.js
204
+ - lib/ninjs-framework/utilities/number.js
205
+ - lib/ninjs-framework/utilities/string.js
206
+ - spec/fixtures/myapp.js
207
+ - spec/fixtures/nin.js
208
+ - spec/fixtures/ninjs.conf
209
+ - spec/fixtures/test.elements.js
210
+ - spec/fixtures/test.js
211
+ - spec/fixtures/test.model.js
212
+ - spec/fixtures/test.module.js
213
+ - spec/fixtures/utilities.js
214
+ - spec/javascripts/application_spec.js
215
+ - spec/javascripts/array_utility_spec.js
216
+ - spec/javascripts/existence_spec.js
217
+ - spec/javascripts/extension_spec.js
218
+ - spec/javascripts/helpers/SpecHelper.js
219
+ - spec/javascripts/module_spec.js
220
+ - spec/javascripts/string_utility_spec.js
221
+ - spec/javascripts/support/jasmine.yml
222
+ - spec/javascripts/support/jasmine_config.rb
223
+ - spec/javascripts/support/jasmine_runner.rb
224
+ - spec/ninjs_framework_spec.rb
225
+ - spec/spec_helper.rb
226
+ - spec/tmp/Rakefile
227
+ - spec/tmp/application/myapp.js
228
+ - spec/tmp/application/test.js
229
+ - spec/tmp/elements/test.elements.js
230
+ - spec/tmp/lib/nin.js
231
+ - spec/tmp/lib/utilities.js
232
+ - spec/tmp/models/test.model.js
233
+ - spec/tmp/modules/test.module.js
234
+ - spec/tmp/ninjs.conf
235
+ - spec/tmp/spec/index.html
236
+ - spec/tmp/spec/javascripts/application_spec.js
237
+ - spec/tmp/spec/javascripts/array_utility_spec.js
238
+ - spec/tmp/spec/javascripts/existence_spec.js
239
+ - spec/tmp/spec/javascripts/extension_spec.js
240
+ - spec/tmp/spec/javascripts/module_spec.js
241
+ - spec/tmp/spec/javascripts/string_utility_spec.js
242
+ - spec/tmp/spec/javascripts/support/jasmine-html.js
243
+ - spec/tmp/spec/javascripts/support/jasmine.css
244
+ - spec/tmp/spec/javascripts/support/jasmine.js
245
+ - spec/tmp/spec/javascripts/support/jasmine.yml.erb
246
+ - spec/tmp/spec/javascripts/support/jasmine_config.rb
247
+ - spec/tmp/spec/javascripts/support/jasmine_favicon.png
248
+ - spec/tmp/spec/javascripts/support/jasmine_runner.rb
249
+ homepage: http://github.com/daytonn/ninjs-framework
250
+ licenses:
251
+ - MIT
252
+ post_install_message:
253
+ rdoc_options: []
254
+
255
+ require_paths:
256
+ - lib
257
+ required_ruby_version: !ruby/object:Gem::Requirement
258
+ none: false
259
+ requirements:
260
+ - - ">="
261
+ - !ruby/object:Gem::Version
262
+ hash: 1664246232139270188
263
+ segments:
264
+ - 0
265
+ version: "0"
266
+ required_rubygems_version: !ruby/object:Gem::Requirement
267
+ none: false
268
+ requirements:
269
+ - - ">="
270
+ - !ruby/object:Gem::Version
271
+ version: "0"
272
+ requirements: []
273
+
274
+ rubyforge_project:
275
+ rubygems_version: 1.8.8
276
+ signing_key:
277
+ specification_version: 3
278
+ summary: ninjs-framework is a small JavaScript framework for building modular javascript applications
279
+ test_files:
280
+ - spec/javascripts/support/jasmine_config.rb
281
+ - spec/javascripts/support/jasmine_runner.rb
282
+ - spec/ninjs_framework_spec.rb
283
+ - spec/spec_helper.rb
284
+ - spec/tmp/spec/javascripts/support/jasmine_config.rb
285
+ - spec/tmp/spec/javascripts/support/jasmine_runner.rb