joosy 1.2.0.alpha.53 → 1.2.0.alpha.54
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bower.json +1 -1
- data/build/joosy.js +14 -0
- data/dummy +2 -0
- data/generators/project/standalone.coffee +9 -0
- data/generators/templates/application/standalone/Gruntfile.coffee +19 -0
- data/generators/templates/application/standalone/_gitignore +1 -1
- data/generators/templates/application/standalone/package.json +3 -1
- data/generators/templates/application/standalone/spec/application_spec.coffee +4 -0
- data/generators/templates/application/standalone/spec/helpers/environment.coffee +2 -0
- data/generators/templates/application/standalone/tasks/spec.coffee +15 -0
- data/package.json +1 -1
- data/source/joosy/application.coffee +11 -0
- metadata +5 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6dcc12f195bd622073b8f775a078d59cd88c457f
|
4
|
+
data.tar.gz: 4abf8429b170d5727e50591e3bc57097bdeabf83
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 530bec08fe78811958c419372b6cb5aa2615418788b24abc03cd852aa4185140fa43dd28556f65fd3ef238c9d622a8c09eacef8f8747f7560a10b56bf372551b
|
7
|
+
data.tar.gz: 7e7c805a6ec51aa6ace2a386306ca0f0870b84a48476ae0dae875016067ac14dedc07fa38174414e4523617541bc8a5ad20d13ae25e73c18e96b115c5c53fe99
|
data/bower.json
CHANGED
data/build/joosy.js
CHANGED
@@ -2313,6 +2313,7 @@
|
|
2313
2313
|
initialized: false,
|
2314
2314
|
loading: true,
|
2315
2315
|
config: {
|
2316
|
+
test: false,
|
2316
2317
|
debug: false,
|
2317
2318
|
templater: {
|
2318
2319
|
prefix: ''
|
@@ -2336,6 +2337,9 @@
|
|
2336
2337
|
Object.merge(this.config, window.JoosyEnvironment, true);
|
2337
2338
|
}
|
2338
2339
|
Object.merge(this.config, options, true);
|
2340
|
+
if (this.config.test) {
|
2341
|
+
this.forceSandbox();
|
2342
|
+
}
|
2339
2343
|
Joosy.templater(new Joosy.Templaters.JST(this.config.templater));
|
2340
2344
|
Joosy.debug(this.config.debug);
|
2341
2345
|
Joosy.Router.setup(this.config.router, function(action, params) {
|
@@ -2379,6 +2383,16 @@
|
|
2379
2383
|
}
|
2380
2384
|
return this.page = attempt;
|
2381
2385
|
}
|
2386
|
+
},
|
2387
|
+
forceSandbox: function() {
|
2388
|
+
var sandbox;
|
2389
|
+
sandbox = Joosy.uid();
|
2390
|
+
this.selector = "#" + sandbox;
|
2391
|
+
return $('body').append($('<div/>').attr('id', sandbox).css({
|
2392
|
+
height: '0px',
|
2393
|
+
width: '0px',
|
2394
|
+
overflow: 'hidden'
|
2395
|
+
}));
|
2382
2396
|
}
|
2383
2397
|
};
|
2384
2398
|
|
data/dummy
ADDED
@@ -24,6 +24,15 @@ class ProjectStandalone extends @Base
|
|
24
24
|
@copy ['application', 'standalone', 'source', 'stylesheets', 'application.styl'],
|
25
25
|
['source', 'stylesheets', 'application.styl']
|
26
26
|
|
27
|
+
@copy ['application', 'standalone', 'tasks', 'spec.coffee'],
|
28
|
+
['tasks', 'spec.coffee']
|
29
|
+
|
30
|
+
@copy ['application', 'standalone', 'spec', 'helpers', 'environment.coffee'],
|
31
|
+
['spec', 'helpers', 'environment.coffee']
|
32
|
+
|
33
|
+
@copy ['application', 'standalone', 'spec', 'application_spec.coffee'],
|
34
|
+
['spec', 'application_spec.coffee']
|
35
|
+
|
27
36
|
@template ['application', 'standalone', 'bower.json'], ['bower.json'],
|
28
37
|
application: @options.name
|
29
38
|
@template ['application', 'standalone', 'package.json'], ['package.json'],
|
@@ -3,14 +3,20 @@ module.exports = (grunt) ->
|
|
3
3
|
grunt.loadNpmTasks 'joosy'
|
4
4
|
grunt.loadNpmTasks 'grunt-contrib-uglify'
|
5
5
|
grunt.loadNpmTasks 'grunt-contrib-cssmin'
|
6
|
+
grunt.loadNpmTasks 'grunt-contrib-jasmine'
|
7
|
+
grunt.loadNpmTasks 'grunt-contrib-coffee'
|
6
8
|
|
7
9
|
#
|
8
10
|
# Config
|
9
11
|
#
|
10
12
|
grunt.initConfig
|
11
13
|
joosy:
|
14
|
+
# Pass data to Stylus and HAML templates
|
12
15
|
# config: require('./config.json')
|
16
|
+
|
17
|
+
# Setup built-in development proxy to workaround Cross-Origin
|
13
18
|
# proxy: [ {'/joosy': 'http://joosy.ws'} ]
|
19
|
+
|
14
20
|
assets:
|
15
21
|
application:
|
16
22
|
src: 'application.coffee'
|
@@ -35,10 +41,23 @@ module.exports = (grunt) ->
|
|
35
41
|
files:
|
36
42
|
'public/assets/application.css': 'public/assets/application.css'
|
37
43
|
|
44
|
+
jasmine:
|
45
|
+
application:
|
46
|
+
src: 'public/assets/application.js'
|
47
|
+
options:
|
48
|
+
keepRunner: true
|
49
|
+
outfile: 'spec/application.html'
|
50
|
+
specs: '.grunt/spec/*_spec.js'
|
51
|
+
helpers: '.grunt/spec/helpers/environment.js'
|
52
|
+
|
38
53
|
#
|
39
54
|
# Tasks
|
40
55
|
#
|
56
|
+
grunt.loadTasks 'tasks'
|
57
|
+
|
41
58
|
grunt.registerTask 'compile', ['joosy:compile', 'uglify', 'cssmin']
|
42
59
|
grunt.registerTask 'server', ['joosy:server']
|
43
60
|
|
61
|
+
grunt.registerTask 'spec', ['coffee', 'joosy:compile', 'jasmine']
|
62
|
+
|
44
63
|
grunt.registerTask 'joosy:postinstall', ['joosy:bower', 'joosy:compile:production']
|
@@ -4,7 +4,9 @@
|
|
4
4
|
"grunt": "~0.4.1",
|
5
5
|
"grunt-cli": "~0.1.9",
|
6
6
|
"grunt-contrib-uglify": "~0.2.2",
|
7
|
-
"grunt-contrib-cssmin": "~0.6.1"
|
7
|
+
"grunt-contrib-cssmin": "~0.6.1",
|
8
|
+
"grunt-contrib-jasmine": "~0.5.1",
|
9
|
+
"grunt-contrib-coffee": "~0.7.0"
|
8
10
|
},
|
9
11
|
"scripts": {
|
10
12
|
"postinstall": "node_modules/.bin/grunt joosy:postinstall"
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module.exports = (grunt) ->
|
2
|
+
|
3
|
+
grunt.config.data.coffee ||= {}
|
4
|
+
|
5
|
+
grunt.config.data.coffee.specs =
|
6
|
+
expand: true
|
7
|
+
src: 'spec/**/*_spec.coffee'
|
8
|
+
dest: '.grunt'
|
9
|
+
ext: '.js'
|
10
|
+
|
11
|
+
grunt.config.data.coffee.spec_helpers =
|
12
|
+
expand: true
|
13
|
+
src: 'spec/helpers/**/*.coffee'
|
14
|
+
dest: '.grunt'
|
15
|
+
ext: '.js'
|
data/package.json
CHANGED
@@ -18,6 +18,7 @@ Joosy.Application =
|
|
18
18
|
loading: true
|
19
19
|
|
20
20
|
config:
|
21
|
+
test: false
|
21
22
|
debug: false
|
22
23
|
templater:
|
23
24
|
prefix: ''
|
@@ -40,6 +41,8 @@ Joosy.Application =
|
|
40
41
|
Object.merge @config, window.JoosyEnvironment, true if window.JoosyEnvironment?
|
41
42
|
Object.merge @config, options, true
|
42
43
|
|
44
|
+
@forceSandbox() if @config.test
|
45
|
+
|
43
46
|
Joosy.templater new Joosy.Templaters.JST(@config.templater)
|
44
47
|
Joosy.debug @config.debug
|
45
48
|
|
@@ -90,6 +93,14 @@ Joosy.Application =
|
|
90
93
|
|
91
94
|
@page = attempt
|
92
95
|
|
96
|
+
forceSandbox: ->
|
97
|
+
sandbox = Joosy.uid()
|
98
|
+
@selector = "##{sandbox}"
|
99
|
+
$('body').append $('<div/>').attr('id', sandbox).css
|
100
|
+
height: '0px'
|
101
|
+
width: '0px'
|
102
|
+
overflow: 'hidden'
|
103
|
+
|
93
104
|
# AMD wrapper
|
94
105
|
if define?.amd?
|
95
106
|
define 'joosy/application', -> Joosy.Application
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: joosy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.0.alpha.
|
4
|
+
version: 1.2.0.alpha.54
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Boris Staal
|
@@ -57,6 +57,7 @@ files:
|
|
57
57
|
- build/joosy/extensions/preloaders.js
|
58
58
|
- build/joosy/extensions/resources-form.js
|
59
59
|
- build/joosy/extensions/resources.js
|
60
|
+
- dummy
|
60
61
|
- generators/base.coffee
|
61
62
|
- generators/command/command.coffee
|
62
63
|
- generators/command/help.coffee
|
@@ -80,6 +81,9 @@ files:
|
|
80
81
|
- generators/templates/application/standalone/package.json
|
81
82
|
- generators/templates/application/standalone/source/haml/index.haml
|
82
83
|
- generators/templates/application/standalone/source/stylesheets/application.styl
|
84
|
+
- generators/templates/application/standalone/spec/application_spec.coffee
|
85
|
+
- generators/templates/application/standalone/spec/helpers/environment.coffee
|
86
|
+
- generators/templates/application/standalone/tasks/spec.coffee
|
83
87
|
- generators/templates/layout/basic.coffee
|
84
88
|
- generators/templates/layout/namespaced.coffee
|
85
89
|
- generators/templates/page/basic.coffee
|