jsus 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. data/CHANGELOG +5 -0
  2. data/Gemfile +1 -1
  3. data/Gemfile.lock +12 -2
  4. data/VERSION +1 -1
  5. data/autotest/discover.rb +1 -0
  6. data/bin/jsus +86 -90
  7. data/cucumber.yml +1 -0
  8. data/features/command-line/basic_dependency_resolution.feature +99 -0
  9. data/features/command-line/extensions.feature +70 -0
  10. data/features/command-line/external_dependency_resolution.feature +120 -0
  11. data/features/command-line/json_package.feature +50 -0
  12. data/features/command-line/structure_json.feature +56 -0
  13. data/features/data/Basic/Source/Library/Color.js +16 -0
  14. data/features/data/Basic/Source/Widget/Input/Input.Color.js +19 -0
  15. data/features/data/Basic/package.yml +9 -0
  16. data/features/data/BasicWrongOrder/Source/Library/Color.js +16 -0
  17. data/features/data/BasicWrongOrder/Source/Widget/Input/Input.Color.js +19 -0
  18. data/features/data/BasicWrongOrder/package.yml +9 -0
  19. data/features/data/Extensions/Mootools/Source/Core.js +16 -0
  20. data/features/data/Extensions/Mootools/package.yml +8 -0
  21. data/features/data/Extensions/Source/Extensions/MootoolsCore.js +16 -0
  22. data/features/data/Extensions/Source/Library/Color.js +19 -0
  23. data/features/data/Extensions/package.yml +9 -0
  24. data/features/data/ExternalDependency/Mootools/Source/Core.js +16 -0
  25. data/features/data/ExternalDependency/Mootools/package.yml +8 -0
  26. data/features/data/ExternalDependency/Source/Library/Color.js +19 -0
  27. data/features/data/ExternalDependency/Source/Widget/Input/Input.Color.js +19 -0
  28. data/features/data/ExternalDependency/package.yml +9 -0
  29. data/features/data/ExternalDependencyWithExternalDependency/Leonardo/Source/Core.js +19 -0
  30. data/features/data/ExternalDependencyWithExternalDependency/Leonardo/package.yml +8 -0
  31. data/features/data/ExternalDependencyWithExternalDependency/Mootools/Source/Core.js +16 -0
  32. data/features/data/ExternalDependencyWithExternalDependency/Mootools/package.yml +8 -0
  33. data/features/data/ExternalDependencyWithExternalDependency/Source/Library/Color.js +19 -0
  34. data/features/data/ExternalDependencyWithExternalDependency/Source/Widget/Input/Input.Color.js +19 -0
  35. data/features/data/ExternalDependencyWithExternalDependency/package.yml +9 -0
  36. data/features/data/JsonPackage/Source/Library/Color.js +16 -0
  37. data/features/data/JsonPackage/Source/Widget/Input/Input.Color.js +19 -0
  38. data/features/data/JsonPackage/package.json +12 -0
  39. data/features/data/tmp2/package.js +35 -0
  40. data/features/data/tmp2/scripts.json +13 -0
  41. data/features/data/tmp2/tree.json +26 -0
  42. data/features/step_definitions/cli_steps.rb +53 -0
  43. data/features/support/env.rb +9 -0
  44. data/jsus.gemspec +42 -5
  45. 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,16 @@
1
+ /*
2
+ ---
3
+
4
+ script: Color.js
5
+
6
+ description: A library to work with colors
7
+
8
+ license: MIT-style license
9
+
10
+ authors:
11
+ - Valerio Proietti
12
+
13
+ provides: [Color]
14
+
15
+ ...
16
+ */
@@ -0,0 +1,19 @@
1
+ /*
2
+ ---
3
+
4
+ script: Input.Color.js
5
+
6
+ description: Cool colorpicker for everyone to enjoy
7
+
8
+ license: MIT-style license
9
+
10
+ authors:
11
+ - Yaroslaff Fedin
12
+
13
+ requires:
14
+ - Color
15
+
16
+ provides: [Input.Color]
17
+
18
+ ...
19
+ */
@@ -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,16 @@
1
+ /*
2
+ ---
3
+
4
+ script: Color.js
5
+
6
+ description: A library to work with colors
7
+
8
+ license: MIT-style license
9
+
10
+ authors:
11
+ - Valerio Proietti
12
+
13
+ provides: [Color]
14
+
15
+ ...
16
+ */
@@ -0,0 +1,19 @@
1
+ /*
2
+ ---
3
+
4
+ script: Input.Color.js
5
+
6
+ description: Cool colorpicker for everyone to enjoy
7
+
8
+ license: MIT-style license
9
+
10
+ authors:
11
+ - Yaroslaff Fedin
12
+
13
+ requires:
14
+ - Color
15
+
16
+ provides: [Input.Color]
17
+
18
+ ...
19
+ */
@@ -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,16 @@
1
+ /*
2
+ ---
3
+
4
+ script: Core.js
5
+
6
+ description: Mootools fake core
7
+
8
+ license: MIT-style license
9
+
10
+ authors:
11
+ - Valerio Proietti
12
+
13
+ provides: [Core]
14
+
15
+ ...
16
+ */
@@ -0,0 +1,8 @@
1
+ name: Mootools
2
+ filename: mootools.js
3
+ web: http://mootools.net
4
+ description: Fake mootools package
5
+ license: Public Domain, http://unlicense.org/UNLICENSE
6
+ authors: mootools authors
7
+ sources:
8
+ - "Source/Core.js"
@@ -0,0 +1,16 @@
1
+ /*
2
+ ---
3
+
4
+ script: MootooolsCore.js
5
+
6
+ description: Extension for mootools core
7
+
8
+ license: MIT-style license
9
+
10
+ authors:
11
+ - Mark Abramov
12
+
13
+ extends: Mootools/Core
14
+
15
+ ...
16
+ */
@@ -0,0 +1,19 @@
1
+ /*
2
+ ---
3
+
4
+ script: Color.js
5
+
6
+ description: A library to work with colors
7
+
8
+ license: MIT-style license
9
+
10
+ authors:
11
+ - Valerio Proietti
12
+
13
+ requires:
14
+ - Mootools/Core
15
+
16
+ provides: [Color]
17
+
18
+ ...
19
+ */
@@ -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"
@@ -0,0 +1,16 @@
1
+ /*
2
+ ---
3
+
4
+ script: Core.js
5
+
6
+ description: Mootools fake core
7
+
8
+ license: MIT-style license
9
+
10
+ authors:
11
+ - Valerio Proietti
12
+
13
+ provides: [Core]
14
+
15
+ ...
16
+ */
@@ -0,0 +1,8 @@
1
+ name: Mootools
2
+ filename: mootools.js
3
+ web: http://mootools.net
4
+ description: Fake mootools package
5
+ license: Public Domain, http://unlicense.org/UNLICENSE
6
+ authors: mootools authors
7
+ sources:
8
+ - "Source/Core.js"
@@ -0,0 +1,19 @@
1
+ /*
2
+ ---
3
+
4
+ script: Color.js
5
+
6
+ description: A library to work with colors
7
+
8
+ license: MIT-style license
9
+
10
+ authors:
11
+ - Valerio Proietti
12
+
13
+ requires:
14
+ - Mootools/Core
15
+
16
+ provides: [Color]
17
+
18
+ ...
19
+ */