hyla 1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. data/.rakeTasks +7 -0
  2. data/.travis.yml +10 -0
  3. data/Gemfile +7 -0
  4. data/Gemfile.lock +49 -0
  5. data/LICENSE.txt +22 -0
  6. data/README.adoc +136 -0
  7. data/Rakefile +61 -0
  8. data/archive/GruntFile.js +72 -0
  9. data/archive/watch_files.rb +70 -0
  10. data/bin/hyla +155 -0
  11. data/data/generated/A_Introduction_module/1_Chapter.adoc +42 -0
  12. data/data/generated/A_Introduction_module/2_Chapter.adoc +31 -0
  13. data/data/generated/A_Introduction_module/3_Chapter.adoc +23 -0
  14. data/data/generated/A_Introduction_module/A_Introduction_module_AllSlides.index +9 -0
  15. data/data/generated/B_Instruction_module/1_Chapter.adoc +27 -0
  16. data/data/generated/B_Instruction_module/B_Instruction_module_AllSlides.index +7 -0
  17. data/data/generated/C_Installation_module/1_Chapter.adoc +14 -0
  18. data/data/generated/C_Installation_module/2_Chapter.adoc +17 -0
  19. data/data/generated/C_Installation_module/C_Installation_module_AllSlides.index +8 -0
  20. data/data/generated/camel_AllSlides.index +9 -0
  21. data/data/js/livereload.js +1055 -0
  22. data/data/mime.types +85 -0
  23. data/data/toc.adoc +63 -0
  24. data/hyla.gemspec +37 -0
  25. data/hyla_frog.jpg +0 -0
  26. data/lib/hyla.rb +47 -0
  27. data/lib/hyla/command.rb +21 -0
  28. data/lib/hyla/commands/build.rb +40 -0
  29. data/lib/hyla/commands/create.rb +25 -0
  30. data/lib/hyla/commands/generate.rb +264 -0
  31. data/lib/hyla/commands/new.rb +82 -0
  32. data/lib/hyla/commands/publish.rb +8 -0
  33. data/lib/hyla/commands/reload.rb +109 -0
  34. data/lib/hyla/commands/serve.rb +59 -0
  35. data/lib/hyla/commands/watch.rb +172 -0
  36. data/lib/hyla/configuration.rb +47 -0
  37. data/lib/hyla/logger.rb +89 -0
  38. data/lib/hyla/project.rb +5 -0
  39. data/lib/hyla/training.rb +25 -0
  40. data/lib/hyla/websocket.rb +53 -0
  41. data/lib/templates/sample/asciidoc_article.adoc +64 -0
  42. data/lib/templates/sample/asciidoc_audio.adoc +4 -0
  43. data/lib/templates/sample/asciidoc_source_highlight.adoc +37 -0
  44. data/lib/templates/sample/asciidoc_video.adoc +4 -0
  45. data/lib/templates/sample/audio/ocean_waves.mp3 +0 -0
  46. data/lib/templates/sample/image/hyla_arborea.jpg +0 -0
  47. data/lib/templates/sample/slideshow_deckjs.adoc +186 -0
  48. data/lib/templates/sample/video/small.ogv +0 -0
  49. data/lib/templates/training-exercises/Gemfile +4 -0
  50. data/lib/templates/training-exercises/README.md +1 -0
  51. data/lib/templates/training-exercises/modules/introduction/docs/audio/ocean_waves.mp3 +0 -0
  52. data/lib/templates/training-exercises/modules/introduction/docs/video/small.ogv +0 -0
  53. data/lib/templates/training-exercises/modules/introduction/pom.xml +114 -0
  54. data/lib/templates/training-exercises/modules/introduction/src/main/java/HelloWorld.java +16 -0
  55. data/lib/templates/training-exercises/modules/introduction/src/test/java/HelloWorldTest.java +29 -0
  56. data/lib/templates/training-exercises/modules/pom.xml +61 -0
  57. data/lib/templates/training-exercises/modules/src/main/assembly/code.xml +31 -0
  58. data/lib/templates/training-exercises/modules/src/main/assembly/content.xml +16 -0
  59. data/lib/templates/training-exercises/pom.xml +157 -0
  60. data/lib/templates/training/GemFile +4 -0
  61. data/lib/templates/training/development/article.adoc +64 -0
  62. data/lib/templates/training/development/audio/ocean_waves.mp3 +0 -0
  63. data/lib/templates/training/development/image/hyla_frog.jpg +0 -0
  64. data/lib/templates/training/development/video/small.ogv +0 -0
  65. data/lib/templates/training/introduction/article.adoc +64 -0
  66. data/lib/templates/training/introduction/audio/ocean_waves.mp3 +0 -0
  67. data/lib/templates/training/introduction/image/hyla_frog.jpg +0 -0
  68. data/lib/templates/training/introduction/video/small.ogv +0 -0
  69. data/lib/templates/training/readme.adoc +1 -0
  70. data/scenario.adoc +59 -0
  71. data/test/my_test.rb +23 -0
  72. metadata +265 -0
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'hyla', '~> 1.0'
4
+ gem 'asciidoctor', '~> 0.1.4'
@@ -0,0 +1 @@
1
+ # Hyla Training Project
@@ -0,0 +1,114 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3
+ <modelVersion>4.0.0</modelVersion>
4
+
5
+ <parent>
6
+ <groupId>${groupId}.${training-code}</groupId>
7
+ <artifactId>modules</artifactId>
8
+ <version>${version}</version>
9
+ </parent>
10
+
11
+ <groupId>${groupId}.${training-code}</groupId>
12
+ <artifactId>introduction</artifactId>
13
+ <packaging>jar</packaging>
14
+
15
+ <name>Hyla :: ${training-name} Training :: Module A</name>
16
+
17
+ <dependencies>
18
+ <dependency>
19
+ <groupId>junit</groupId>
20
+ <artifactId>junit</artifactId>
21
+ </dependency>
22
+ </dependencies>
23
+
24
+ <build>
25
+ <plugins>
26
+
27
+ <!-- Skip assembly as this is only required by 'modules' project -->
28
+ <plugin>
29
+ <groupId>org.apache.maven.plugins</groupId>
30
+ <artifactId>maven-assembly-plugin</artifactId>
31
+ <configuration>
32
+ <skipAssembly>true</skipAssembly>
33
+ </configuration>
34
+ </plugin>
35
+
36
+ <!-- Copy Hyla Training Resources - Asciidoc conf file, stylesheets, javascript required to generate pages
37
+ using Hy common Dependency -->
38
+ <plugin>
39
+ <groupId>org.apache.maven.plugins</groupId>
40
+ <artifactId>maven-remote-resources-plugin</artifactId>
41
+ <configuration>
42
+ <resourceBundles>
43
+ <resourceBundle>${resources.location}</resourceBundle>
44
+ </resourceBundles>
45
+ </configuration>
46
+ <executions>
47
+ <execution>
48
+ <phase>validate</phase>
49
+ <goals>
50
+ <goal>process</goal>
51
+ </goals>
52
+ </execution>
53
+ </executions>
54
+ </plugin>
55
+
56
+ <!-- Copy local resources -->
57
+ <plugin>
58
+ <groupId>org.apache.maven.plugins</groupId>
59
+ <artifactId>maven-resources-plugin</artifactId>
60
+ <executions>
61
+ <execution>
62
+ <id>Copy Resources Required to generate HTML Pages</id>
63
+ <phase>validate</phase>
64
+ <goals>
65
+ <goal>copy-resources</goal>
66
+ </goals>
67
+ <configuration>
68
+ <outputDirectory>${project.build.directory}/generated-docs/${mode}/${project.artifactId}</outputDirectory>
69
+ <resources>
70
+ <!-- Copy local resources image, audio and video -->
71
+ <resource>
72
+ <directory>${project.basedir}/docs</directory>
73
+ <includes>
74
+ <include>**/audio/*.*</include>
75
+ <include>**/video/*.*</include>
76
+ <include>**/images/*.*</include>
77
+ </includes>
78
+ </resource>
79
+ <!-- Copy deck.js, ... Resources from hyla project -->
80
+ <resource>
81
+ <directory>${project.build.directory}/maven-shared-archive-resources</directory>
82
+ <excludes>
83
+ <exclude>asciidoc-conf/*.*</exclude>
84
+ <exclude>asciidoctor-backend/**/*.*</exclude>
85
+ </excludes>
86
+ </resource>
87
+ </resources>
88
+ </configuration>
89
+ </execution>
90
+ <execution>
91
+ <id>Copy what has been generated to parent directory</id>
92
+ <phase>package</phase>
93
+ <goals>
94
+ <goal>copy-resources</goal>
95
+ </goals>
96
+ <configuration>
97
+ <outputDirectory>../target/content/${mode}/${project.artifactId}</outputDirectory>
98
+ <resources>
99
+ <resource>
100
+ <directory>${project.build.directory}/generated-docs/${mode}/${project.artifactId}</directory>
101
+ <excludes>
102
+ <exclude>asciidoc-conf/*.*</exclude>
103
+ <exclude>asciidoctor-backend/**/*.*</exclude>
104
+ </excludes>
105
+ </resource>
106
+ </resources>
107
+ </configuration>
108
+ </execution>
109
+ </executions>
110
+ </plugin>
111
+ </plugins>
112
+ </build>
113
+
114
+ </project>
@@ -0,0 +1,16 @@
1
+ #set( $symbol_pound = '#' )
2
+ #set( $symbol_dollar = '$' )
3
+ #set( $symbol_escape = '\' )
4
+ package ${package};
5
+
6
+ /**
7
+ * Simple Hello World
8
+ *
9
+ **/
10
+ public class HelloWorld {
11
+
12
+ public static void main(String[] args) {
13
+ System.out.println(">> Hello Hyla Students");
14
+ }
15
+
16
+ }
@@ -0,0 +1,29 @@
1
+ #set( $symbol_pound = '#' )
2
+ #set( $symbol_dollar = '$' )
3
+ #set( $symbol_escape = '\' )
4
+ package ${package};
5
+
6
+ import org.junit.Before;
7
+ import org.junit.BeforeClass;
8
+ import org.junit.Test;
9
+
10
+ import static org.junit.Assert.*;
11
+
12
+ /**
13
+ * Simple Hello World Unit test
14
+ */
15
+ public class HelloWorldTest {
16
+
17
+ @BeforeClass public static void setUpOnce() {
18
+ System.out.println("@BeforeClass: set up once");
19
+ }
20
+
21
+ @Before public void setUp() {
22
+ System.out.println("@Before: set up ");
23
+ }
24
+
25
+ @Test public void testCopy() {
26
+ assertTrue(1 == 1);
27
+ }
28
+
29
+ }
@@ -0,0 +1,61 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3
+ <parent>
4
+ <groupId>${groupId}</groupId>
5
+ <artifactId>${training-code}</artifactId>
6
+ <version>${version}</version>
7
+ </parent>
8
+ <modelVersion>4.0.0</modelVersion>
9
+
10
+ <groupId>${groupId}.${training-code}</groupId>
11
+ <artifactId>modules</artifactId>
12
+ <packaging>pom</packaging>
13
+
14
+ <name>Hyla :: ${training-name} Training :: Modules</name>
15
+
16
+ <modules>
17
+ <module>introduction</module>
18
+ </modules>
19
+
20
+ <profiles>
21
+ <!-- Generate zip file of the content of all the modules -->
22
+ <profile>
23
+ <id>content-distro</id>
24
+ <activation>
25
+ <activeByDefault>false</activeByDefault>
26
+ </activation>
27
+ <build>
28
+ <plugins>
29
+ <plugin>
30
+ <groupId>org.apache.maven.plugins</groupId>
31
+ <artifactId>maven-assembly-plugin</artifactId>
32
+ <configuration>
33
+ <descriptor>src/main/assembly/content.xml</descriptor>
34
+ <skipAssembly>false</skipAssembly>
35
+ </configuration>
36
+ </plugin>
37
+ </plugins>
38
+ </build>
39
+ </profile>
40
+
41
+ <!-- Generate zip file of the code source / exercises of all the modules -->
42
+ <profile>
43
+ <id>code-distro</id>
44
+ <activation>
45
+ <activeByDefault>false</activeByDefault>
46
+ </activation>
47
+ <build>
48
+ <plugins>
49
+ <plugin>
50
+ <groupId>org.apache.maven.plugins</groupId>
51
+ <artifactId>maven-assembly-plugin</artifactId>
52
+ <configuration>
53
+ <descriptor>src/main/assembly/code.xml</descriptor>
54
+ <skipAssembly>false</skipAssembly>
55
+ </configuration>
56
+ </plugin>
57
+ </plugins>
58
+ </build>
59
+ </profile>
60
+ </profiles>
61
+ </project>
@@ -0,0 +1,31 @@
1
+ <assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
2
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
4
+ <id>src</id>
5
+ <formats>
6
+ <format>dir</format>
7
+ <format>zip</format>
8
+ <format>tar</format>
9
+ </formats>
10
+ <includeBaseDirectory>false</includeBaseDirectory>
11
+ <moduleSets>
12
+ <moduleSet>
13
+ <includes>
14
+ <include>${groupId}:*</include>
15
+ </includes>
16
+ <sources>
17
+ <fileSets>
18
+ <fileSet>
19
+ <outputDirectory>/</outputDirectory>
20
+ <excludes>
21
+ <exclude>**/target/**</exclude>
22
+ <exclude>**/docs/**</exclude>
23
+ <exclude>**/*.iml/**</exclude>
24
+ <exclude>**/${mode}/**</exclude>
25
+ </excludes>
26
+ </fileSet>
27
+ </fileSets>
28
+ </sources>
29
+ </moduleSet>
30
+ </moduleSets>
31
+ </assembly>
@@ -0,0 +1,16 @@
1
+ <assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
3
+ <id>content</id>
4
+ <baseDirectory>/</baseDirectory>
5
+ <formats>
6
+ <format>zip</format>
7
+ <format>tar</format>
8
+ <format>dir</format>
9
+ </formats>
10
+ <fileSets>
11
+ <fileSet>
12
+ <directory>${project.build.directory}/content</directory>
13
+ <outputDirectory>/</outputDirectory>
14
+ </fileSet>
15
+ </fileSets>
16
+ </assembly>
@@ -0,0 +1,157 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3
+ <modelVersion>4.0.0</modelVersion>
4
+
5
+ <parent>
6
+ <groupId>org.apache.hyla</groupId>
7
+ <artifactId>parent</artifactId>
8
+ <version>1.0-SNAPSHOT</version>
9
+ </parent>
10
+
11
+ <groupId>${groupId}</groupId>
12
+ <artifactId>${training-code}</artifactId>
13
+ <version>${version}</version>
14
+ <packaging>pom</packaging>
15
+
16
+ <name>Hyla :: ${training-name} Training Project</name>
17
+ <description>${training-name} Hyla Training Project</description>
18
+
19
+ <properties>
20
+ <!-- Project -->
21
+ <resources.location>org.apache.hyla:common:1.0-SNAPSHOT</resources.location>
22
+ <generated.doc>${project.build.directory}/generated-docs</generated.doc>
23
+ <theme>my_theme.css</theme>
24
+ <stylesheet.location>${project.build.directory}/maven-shared-archive-resources/css</stylesheet.location>
25
+ <javascript.location>${project.build.directory}/maven-shared-archive-resources/js</javascript.location>
26
+ <image.location>${project.build.directory}/maven-shared-archive-resources/images</image.location>
27
+ <asciidoctor.backends>${project.build.directory}/maven-shared-archive-resources/asciidoctor-backend</asciidoctor.backends>
28
+ <!-- Unit Test -->
29
+ <junit.version>4.11</junit.version>
30
+ </properties>
31
+
32
+ <dependencyManagement>
33
+ <dependencies>
34
+ <dependency>
35
+ <groupId>junit</groupId>
36
+ <artifactId>junit</artifactId>
37
+ <version>${junit.version}</version>
38
+ </dependency>
39
+ </dependencies>
40
+ </dependencyManagement>
41
+
42
+ <build>
43
+ <pluginManagement>
44
+ <plugins>
45
+ <plugin>
46
+ <groupId>org.apache.maven.plugins</groupId>
47
+ <artifactId>maven-assembly-plugin</artifactId>
48
+ <executions>
49
+ <execution>
50
+ <goals>
51
+ <goal>assembly</goal>
52
+ </goals>
53
+ <phase>prepare-package</phase>
54
+ </execution>
55
+ </executions>
56
+ </plugin>
57
+
58
+ <plugin>
59
+ <groupId>org.asciidoctor</groupId>
60
+ <artifactId>asciidoctor-maven-plugin</artifactId>
61
+ <executions>
62
+ <execution>
63
+ <id>output-html</id>
64
+ <phase>generate-resources</phase>
65
+ <goals>
66
+ <goal>process-asciidoc</goal>
67
+ </goals>
68
+ </execution>
69
+ </executions>
70
+ </plugin>
71
+
72
+ </plugins>
73
+ </pluginManagement>
74
+ </build>
75
+
76
+ <profiles>
77
+ <profile>
78
+ <id>LMS</id>
79
+ <activation>
80
+ <activeByDefault>true</activeByDefault>
81
+ </activation>
82
+ <properties>
83
+ <mode>LMSClass</mode>
84
+ </properties>
85
+ <build>
86
+ <plugins>
87
+ <!-- Asciidoctor Plugin doing rendering of asciidoc docs to HTML -->
88
+ <plugin>
89
+ <groupId>org.asciidoctor</groupId>
90
+ <artifactId>asciidoctor-maven-plugin</artifactId>
91
+ <configuration>
92
+ <sourceDirectory>${basedir}/docs</sourceDirectory>
93
+ <outputDirectory>${generated.doc}/${mode}/${project.artifactId}</outputDirectory>
94
+ <backend>html5</backend>
95
+ <templateDir>${asciidoctor.backends}/haml/html5</templateDir>
96
+ <attributes>
97
+ <max-width>1024px</max-width>
98
+ <icons/>
99
+ <!-- Embed in HTML page css files -->
100
+ <embedAssets>true</embedAssets>
101
+ <stylesheet>${stylesheet.location}/${theme}</stylesheet>
102
+ <docinfo1/>
103
+ </attributes>
104
+ <extensions>
105
+ <extension>txt</extension>
106
+ <extension>doc</extension>
107
+ <extension>adoc</extension>
108
+ <extension>asciidoc</extension>
109
+ </extensions>
110
+ </configuration>
111
+ </plugin>
112
+ </plugins>
113
+ </build>
114
+ </profile>
115
+
116
+ <profile>
117
+ <id>ILT</id>
118
+ <properties>
119
+ <mode>ILTClass</mode>
120
+ </properties>
121
+ <build>
122
+ <plugins>
123
+ <!-- Asciidoctor Plugin doing rendering of asciidoc docs to HTML Slideshow -->
124
+ <plugin>
125
+ <groupId>org.asciidoctor</groupId>
126
+ <artifactId>asciidoctor-maven-plugin</artifactId>
127
+ <configuration>
128
+ <sourceDirectory>${basedir}/docs</sourceDirectory>
129
+ <outputDirectory>${generated.doc}/${mode}/${project.artifactId}</outputDirectory>
130
+ <backend>deckjs</backend>
131
+ <templateDir>${asciidoctor.backends}/haml/deckjs</templateDir>
132
+ <attributes>
133
+ <max-width>1024px</max-width>
134
+ <icons>font</icons>
135
+ <doc-uri/>
136
+ <!-- Embed in HTML page css files -->
137
+ <embedAssets>true</embedAssets>
138
+ <!-- themes supported : swiss, web-2.0, beamer, neon -->
139
+ <deckjs_theme>swiss</deckjs_theme>
140
+ <!-- transition supported : horizontal-slide, vertical-slide, fade, beamer -->
141
+ <deckjs_transition>horizontal-slide</deckjs_transition>
142
+ </attributes>
143
+ <extensions>
144
+ <extension>index</extension>
145
+ </extensions>
146
+ </configuration>
147
+ </plugin>
148
+ </plugins>
149
+ </build>
150
+ </profile>
151
+ </profiles>
152
+
153
+ <modules>
154
+ <module>modules</module>
155
+ </modules>
156
+
157
+ </project>