jsus 0.2.0 → 0.2.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/CHANGELOG +5 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +12 -2
- data/VERSION +1 -1
- data/autotest/discover.rb +1 -0
- data/bin/jsus +86 -90
- data/cucumber.yml +1 -0
- data/features/command-line/basic_dependency_resolution.feature +99 -0
- data/features/command-line/extensions.feature +70 -0
- data/features/command-line/external_dependency_resolution.feature +120 -0
- data/features/command-line/json_package.feature +50 -0
- data/features/command-line/structure_json.feature +56 -0
- data/features/data/Basic/Source/Library/Color.js +16 -0
- data/features/data/Basic/Source/Widget/Input/Input.Color.js +19 -0
- data/features/data/Basic/package.yml +9 -0
- data/features/data/BasicWrongOrder/Source/Library/Color.js +16 -0
- data/features/data/BasicWrongOrder/Source/Widget/Input/Input.Color.js +19 -0
- data/features/data/BasicWrongOrder/package.yml +9 -0
- data/features/data/Extensions/Mootools/Source/Core.js +16 -0
- data/features/data/Extensions/Mootools/package.yml +8 -0
- data/features/data/Extensions/Source/Extensions/MootoolsCore.js +16 -0
- data/features/data/Extensions/Source/Library/Color.js +19 -0
- data/features/data/Extensions/package.yml +9 -0
- data/features/data/ExternalDependency/Mootools/Source/Core.js +16 -0
- data/features/data/ExternalDependency/Mootools/package.yml +8 -0
- data/features/data/ExternalDependency/Source/Library/Color.js +19 -0
- data/features/data/ExternalDependency/Source/Widget/Input/Input.Color.js +19 -0
- data/features/data/ExternalDependency/package.yml +9 -0
- data/features/data/ExternalDependencyWithExternalDependency/Leonardo/Source/Core.js +19 -0
- data/features/data/ExternalDependencyWithExternalDependency/Leonardo/package.yml +8 -0
- data/features/data/ExternalDependencyWithExternalDependency/Mootools/Source/Core.js +16 -0
- data/features/data/ExternalDependencyWithExternalDependency/Mootools/package.yml +8 -0
- data/features/data/ExternalDependencyWithExternalDependency/Source/Library/Color.js +19 -0
- data/features/data/ExternalDependencyWithExternalDependency/Source/Widget/Input/Input.Color.js +19 -0
- data/features/data/ExternalDependencyWithExternalDependency/package.yml +9 -0
- data/features/data/JsonPackage/Source/Library/Color.js +16 -0
- data/features/data/JsonPackage/Source/Widget/Input/Input.Color.js +19 -0
- data/features/data/JsonPackage/package.json +12 -0
- data/features/data/tmp2/package.js +35 -0
- data/features/data/tmp2/scripts.json +13 -0
- data/features/data/tmp2/tree.json +26 -0
- data/features/step_definitions/cli_steps.rb +53 -0
- data/features/support/env.rb +9 -0
- data/jsus.gemspec +42 -5
- metadata +45 -8
@@ -0,0 +1,120 @@
|
|
1
|
+
Feature: external dependencies
|
2
|
+
In order to resolve dependencies, jsus should be able to preload them into
|
3
|
+
pool.
|
4
|
+
|
5
|
+
Scenario: basic external dependency
|
6
|
+
When I run "jsus -i ExternalDependency -o tmp -d ExternalDependency/Mootools"
|
7
|
+
Then the following files should exist:
|
8
|
+
| tmp/package.js |
|
9
|
+
And file "tmp/package.js" should contain
|
10
|
+
"""
|
11
|
+
/*
|
12
|
+
---
|
13
|
+
|
14
|
+
script: Core.js
|
15
|
+
|
16
|
+
description: Mootools fake core
|
17
|
+
|
18
|
+
license: MIT-style license
|
19
|
+
|
20
|
+
authors:
|
21
|
+
- Valerio Proietti
|
22
|
+
|
23
|
+
provides: [Core]
|
24
|
+
|
25
|
+
...
|
26
|
+
*/
|
27
|
+
"""
|
28
|
+
And file "tmp/package.js" should contain
|
29
|
+
"""
|
30
|
+
/*
|
31
|
+
---
|
32
|
+
|
33
|
+
script: Color.js
|
34
|
+
|
35
|
+
description: A library to work with colors
|
36
|
+
|
37
|
+
license: MIT-style license
|
38
|
+
|
39
|
+
authors:
|
40
|
+
- Valerio Proietti
|
41
|
+
|
42
|
+
requires:
|
43
|
+
- Mootools/Core
|
44
|
+
|
45
|
+
provides: [Color]
|
46
|
+
|
47
|
+
...
|
48
|
+
*/
|
49
|
+
"""
|
50
|
+
And file "tmp/package.js" should have "script: Core.js" before "script: Color.js"
|
51
|
+
|
52
|
+
Scenario: external dependency with external dependency
|
53
|
+
When I run "jsus -i ExternalDependencyWithExternalDependency -o tmp -d ExternalDependencyWithExternalDependency"
|
54
|
+
Then the following files should exist:
|
55
|
+
| tmp/package.js |
|
56
|
+
And file "tmp/package.js" should contain
|
57
|
+
"""
|
58
|
+
/*
|
59
|
+
---
|
60
|
+
|
61
|
+
script: Core.js
|
62
|
+
|
63
|
+
description: Leonardo fake core
|
64
|
+
|
65
|
+
license: Public Domain, http://unlicense.org/UNLICENSE
|
66
|
+
|
67
|
+
authors:
|
68
|
+
- Mark Abramov
|
69
|
+
|
70
|
+
requires:
|
71
|
+
- Mootools/Core
|
72
|
+
|
73
|
+
provides: [Core]
|
74
|
+
|
75
|
+
...
|
76
|
+
*/
|
77
|
+
"""
|
78
|
+
And file "tmp/package.js" should contain
|
79
|
+
"""
|
80
|
+
/*
|
81
|
+
---
|
82
|
+
|
83
|
+
script: Core.js
|
84
|
+
|
85
|
+
description: Mootools fake core
|
86
|
+
|
87
|
+
license: MIT-style license
|
88
|
+
|
89
|
+
authors:
|
90
|
+
- Valerio Proietti
|
91
|
+
|
92
|
+
provides: [Core]
|
93
|
+
|
94
|
+
...
|
95
|
+
*/
|
96
|
+
"""
|
97
|
+
And file "tmp/package.js" should contain
|
98
|
+
"""
|
99
|
+
/*
|
100
|
+
---
|
101
|
+
|
102
|
+
script: Color.js
|
103
|
+
|
104
|
+
description: A library to work with colors
|
105
|
+
|
106
|
+
license: MIT-style license
|
107
|
+
|
108
|
+
authors:
|
109
|
+
- Valerio Proietti
|
110
|
+
|
111
|
+
requires:
|
112
|
+
- Leonardo/Core
|
113
|
+
|
114
|
+
provides: [Color]
|
115
|
+
|
116
|
+
...
|
117
|
+
*/
|
118
|
+
"""
|
119
|
+
And file "tmp/package.js" should have "Mootools fake core" before "Leonardo fake core"
|
120
|
+
And file "tmp/package.js" should have "Leonardo fake core" before "script: Color.js"
|
@@ -0,0 +1,50 @@
|
|
1
|
+
Feature: json package files
|
2
|
+
In order to be compliant with mooforge packages, we should accept
|
3
|
+
package.json
|
4
|
+
|
5
|
+
Scenario: package with package.json file
|
6
|
+
When I run "jsus -i JsonPackage -o tmp"
|
7
|
+
Then the following files should exist:
|
8
|
+
| tmp/package.js |
|
9
|
+
And file "tmp/package.js" should contain
|
10
|
+
"""
|
11
|
+
/*
|
12
|
+
---
|
13
|
+
|
14
|
+
script: Color.js
|
15
|
+
|
16
|
+
description: A library to work with colors
|
17
|
+
|
18
|
+
license: MIT-style license
|
19
|
+
|
20
|
+
authors:
|
21
|
+
- Valerio Proietti
|
22
|
+
|
23
|
+
provides: [Color]
|
24
|
+
|
25
|
+
...
|
26
|
+
*/
|
27
|
+
"""
|
28
|
+
And file "tmp/package.js" should contain
|
29
|
+
"""
|
30
|
+
/*
|
31
|
+
---
|
32
|
+
|
33
|
+
script: Input.Color.js
|
34
|
+
|
35
|
+
description: Cool colorpicker for everyone to enjoy
|
36
|
+
|
37
|
+
license: MIT-style license
|
38
|
+
|
39
|
+
authors:
|
40
|
+
- Yaroslaff Fedin
|
41
|
+
|
42
|
+
requires:
|
43
|
+
- Color
|
44
|
+
|
45
|
+
provides: [Input.Color]
|
46
|
+
|
47
|
+
...
|
48
|
+
*/
|
49
|
+
"""
|
50
|
+
And file "tmp/package.js" should have "script: Color.js" before "script: Input.Color.js"
|
@@ -0,0 +1,56 @@
|
|
1
|
+
Feature: structure json files
|
2
|
+
In order to have programmatic ability to introspect resulting packages, we
|
3
|
+
generate some extra files.
|
4
|
+
|
5
|
+
Scenario: auto-generation of tree.json and scripts.json
|
6
|
+
When I run "jsus -i Basic -o tmp"
|
7
|
+
Then the following files should exist:
|
8
|
+
| tmp/tree.json |
|
9
|
+
| tmp/scripts.json |
|
10
|
+
And file "tmp/tree.json" should contain valid JSON
|
11
|
+
And file "tmp/tree.json" should contain JSON equivalent to
|
12
|
+
"""
|
13
|
+
{
|
14
|
+
"Library": {
|
15
|
+
"Color": {
|
16
|
+
"desc": "A library to work with colors",
|
17
|
+
"requires": [
|
18
|
+
|
19
|
+
],
|
20
|
+
"provides": [
|
21
|
+
"Color"
|
22
|
+
]
|
23
|
+
}
|
24
|
+
},
|
25
|
+
"Widget": {
|
26
|
+
"Input": {
|
27
|
+
"Input.Color": {
|
28
|
+
"desc": "Cool colorpicker for everyone to enjoy",
|
29
|
+
"requires": [
|
30
|
+
"Color"
|
31
|
+
],
|
32
|
+
"provides": [
|
33
|
+
"Input.Color"
|
34
|
+
]
|
35
|
+
}
|
36
|
+
}
|
37
|
+
}
|
38
|
+
}
|
39
|
+
"""
|
40
|
+
And file "tmp/scripts.json" should contain valid JSON
|
41
|
+
And file "tmp/scripts.json" should contain JSON equivalent to
|
42
|
+
"""
|
43
|
+
{
|
44
|
+
"Package": {
|
45
|
+
"desc": "Jsus package with correct order set",
|
46
|
+
"provides": [
|
47
|
+
"Color",
|
48
|
+
"Input.Color"
|
49
|
+
],
|
50
|
+
"requires": [
|
51
|
+
|
52
|
+
]
|
53
|
+
}
|
54
|
+
}
|
55
|
+
"""
|
56
|
+
|
@@ -0,0 +1,9 @@
|
|
1
|
+
name: Package
|
2
|
+
filename: package.js
|
3
|
+
web: http://github.com/markiz/jsus
|
4
|
+
description: Jsus package with correct order set
|
5
|
+
license: Public Domain, http://unlicense.org/UNLICENSE
|
6
|
+
authors: Mark Abramov (http://github.com/markiz)
|
7
|
+
sources:
|
8
|
+
- "Source/Library/Color.js"
|
9
|
+
- "Source/Widget/Input/Input.Color.js"
|
@@ -0,0 +1,9 @@
|
|
1
|
+
name: Package
|
2
|
+
filename: package.js
|
3
|
+
web: http://github.com/markiz/jsus
|
4
|
+
description: Jsus package with wrong order set
|
5
|
+
license: Public Domain, http://unlicense.org/UNLICENSE
|
6
|
+
authors: Mark Abramov (http://github.com/markiz)
|
7
|
+
sources:
|
8
|
+
- "Source/Widget/Input/Input.Color.js"
|
9
|
+
- "Source/Library/Color.js"
|
@@ -0,0 +1,9 @@
|
|
1
|
+
name: Package
|
2
|
+
filename: package.js
|
3
|
+
web: http://github.com/markiz/jsus
|
4
|
+
description: Jsus package with extension for extdep
|
5
|
+
license: Public Domain, http://unlicense.org/UNLICENSE
|
6
|
+
authors: Mark Abramov (http://github.com/markiz)
|
7
|
+
sources:
|
8
|
+
- "Source/Library/Color.js"
|
9
|
+
- "Source/Extensions/MootoolsCore.js"
|