This is an automated email from the ASF dual-hosted git repository.

dgrove pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openwhisk-runtime-rust.git


The following commit(s) were added to refs/heads/master by this push:
     new e9f97f9  release prep (#20)
e9f97f9 is described below

commit e9f97f9360877eda899326272e149cc4b28f7f2c
Author: David Grove <[email protected]>
AuthorDate: Sat Feb 8 12:36:24 2020 -0500

    release prep (#20)
    
    1. add license headers and boilerplate files
    2. adopt standard runtime directory `core` structure for language versions
    3. rename docker image to action-rust-v1.34 from actionloop-rust-v1.34
---
 CONTRIBUTING.md                                    | 71 ++++++++++++++++++++++
 NOTICE.txt                                         |  5 ++
 README.md                                          |  4 +-
 {rust1.34 => core/rust1.34}/Dockerfile             |  0
 core/rust1.34/Makefile                             | 33 ++++++++++
 {rust1.34 => core/rust1.34}/build.gradle           |  4 +-
 {rust1.34 => core/rust1.34}/compile                |  0
 {rust1.34 => core/rust1.34}/src/Cargo.lock         |  0
 {rust1.34 => core/rust1.34}/src/Cargo.toml         |  0
 .../rust1.34}/src/action_loop/Cargo.toml           |  0
 .../rust1.34}/src/action_loop/src/main.rs          | 17 ++++++
 {rust1.34 => core/rust1.34}/src/actions/.gitignore |  0
 {rust1.34 => core/rust1.34}/src/actions/Cargo.toml |  0
 .../rust1.34/src/actions/src/lib.rs                | 36 ++++++-----
 example/hello/src/lib.rs                           | 17 ++++++
 rust1.34/Makefile                                  | 16 -----
 rust1.34/src/actions/src/lib.rs                    | 27 --------
 settings.gradle                                    |  4 +-
 .../ActionLoopRustBasicTests.scala                 |  2 +-
 19 files changed, 172 insertions(+), 64 deletions(-)

diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 0000000..ab1fd94
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,71 @@
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0)
+
+# Contributing to Apache OpenWhisk
+
+Anyone can contribute to the OpenWhisk project and we welcome your 
contributions.
+
+There are multiple ways to contribute: report bugs, improve the docs, and
+contribute code, but you must follow these prerequisites and guidelines:
+
+ - [Contributor License Agreement](#contributor-license-agreement)
+ - [Raising issues](#raising-issues)
+ - [Coding Standards](#coding-standards)
+
+### Contributor License Agreement
+
+All contributors must sign and submit an Apache CLA (Contributor License 
Agreement).
+
+Instructions on how to do this can be found here:
+[http://www.apache.org/licenses/#clas](http://www.apache.org/licenses/#clas)
+
+Once submitted, you will receive a confirmation email from the Apache Software 
Foundation (ASF) and be added to
+the following list: http://people.apache.org/unlistedclas.html.
+
+Project committers will use this list to verify pull requests (PRs) come from 
contributors that have signed a CLA.
+
+We look forward to your contributions!
+
+## Raising issues
+
+Please raise any bug reports or enhancement requests on the respective project 
repository's GitHub issue tracker. Be sure to search the
+list to see if your issue has already been raised.
+
+A good bug report is one that make it easy for us to understand what you were 
trying to do and what went wrong.
+Provide as much context as possible so we can try to recreate the issue.
+
+A good enhancement request comes with an explanation of what you are trying to 
do and how that enhancement would help you.
+
+### Discussion
+
+Please use the project's developer email list to engage our community:
+[[email protected]]([email protected])
+
+In addition, we provide a "dev" Slack team channel for conversations at:
+https://openwhisk-team.slack.com/messages/dev/
+
+### Coding standards
+
+Please ensure you follow the coding standards used throughout the existing
+code base. Some basic rules include:
+
+ - all files must have the Apache license in the header.
+ - all PRs must have passing builds for all operating systems.
+ - the code is correctly formatted as defined in the [Scalariform plugin 
properties](tools/eclipse/scala.properties). If you use IntelliJ for 
development this [page](https://plugins.jetbrains.com/plugin/7480-scalariform) 
describes the setup and configuration of the plugin.
diff --git a/NOTICE.txt b/NOTICE.txt
new file mode 100644
index 0000000..c60326f
--- /dev/null
+++ b/NOTICE.txt
@@ -0,0 +1,5 @@
+Apache OpenWhisk Runtime Rust
+Copyright 2016-2020 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
diff --git a/README.md b/README.md
index 0ea2c2d..9783afa 100644
--- a/README.md
+++ b/README.md
@@ -25,7 +25,7 @@
 To use as a Docker action:
 
 ```
-wsk action update myAction my_action.rs --docker 
openwhisk/actionloop-rust-v1.34
+wsk action update myAction my_action.rs --docker openwhisk/action-rust-v1.34
 ```
 
 The file `my_action.rs` looks like:
@@ -85,5 +85,5 @@ serde_derive = "1.0"
 ```
 Once you have all your code zipped in a file with the showed folder structure 
you can generate your action with the following command:
 ```
-wsk action create yourAction /full_path_to/yourCode.zip --docker 
openwhisk/actionloop-rust-v1.34
+wsk action create yourAction /full_path_to/yourCode.zip --docker 
openwhisk/action-rust-v1.34
 ```
diff --git a/rust1.34/Dockerfile b/core/rust1.34/Dockerfile
similarity index 100%
rename from rust1.34/Dockerfile
rename to core/rust1.34/Dockerfile
diff --git a/core/rust1.34/Makefile b/core/rust1.34/Makefile
new file mode 100644
index 0000000..3ff1fc7
--- /dev/null
+++ b/core/rust1.34/Makefile
@@ -0,0 +1,33 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+USER=docker.io/openwhisk
+IMAGE=action-rust-v1.34
+
+.PHONY: build
+
+build:
+       docker build -t $(USER)/$(IMAGE) .
+
+devel: build
+       docker run -ti -p 8080:8080 --entrypoint=bash \
+       -v $(PWD):/mnt -e OW_COMPILER=/mnt/compile \
+       $(USER)/$(IMAGE)
+
+push: build
+       docker login
+       docker push $(USER)/$(IMAGE)
diff --git a/rust1.34/build.gradle b/core/rust1.34/build.gradle
similarity index 90%
rename from rust1.34/build.gradle
rename to core/rust1.34/build.gradle
index 9492350..7af44b4 100755
--- a/rust1.34/build.gradle
+++ b/core/rust1.34/build.gradle
@@ -15,5 +15,5 @@
  * limitations under the License.
  */
 
-ext.dockerImageName = 'actionloop-rust-v1.34'
-apply from: '../gradle/docker.gradle'
+ext.dockerImageName = 'action-rust-v1.34'
+apply from: '../../gradle/docker.gradle'
diff --git a/rust1.34/compile b/core/rust1.34/compile
similarity index 100%
rename from rust1.34/compile
rename to core/rust1.34/compile
diff --git a/rust1.34/src/Cargo.lock b/core/rust1.34/src/Cargo.lock
similarity index 100%
rename from rust1.34/src/Cargo.lock
rename to core/rust1.34/src/Cargo.lock
diff --git a/rust1.34/src/Cargo.toml b/core/rust1.34/src/Cargo.toml
similarity index 100%
rename from rust1.34/src/Cargo.toml
rename to core/rust1.34/src/Cargo.toml
diff --git a/rust1.34/src/action_loop/Cargo.toml 
b/core/rust1.34/src/action_loop/Cargo.toml
similarity index 100%
rename from rust1.34/src/action_loop/Cargo.toml
rename to core/rust1.34/src/action_loop/Cargo.toml
diff --git a/rust1.34/src/action_loop/src/main.rs 
b/core/rust1.34/src/action_loop/src/main.rs
similarity index 71%
rename from rust1.34/src/action_loop/src/main.rs
rename to core/rust1.34/src/action_loop/src/main.rs
index 2099f19..085dd11 100644
--- a/rust1.34/src/action_loop/src/main.rs
+++ b/core/rust1.34/src/action_loop/src/main.rs
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 use actions::main as actionMain;
 
 use serde_derive::Deserialize;
diff --git a/rust1.34/src/actions/.gitignore 
b/core/rust1.34/src/actions/.gitignore
similarity index 100%
rename from rust1.34/src/actions/.gitignore
rename to core/rust1.34/src/actions/.gitignore
diff --git a/rust1.34/src/actions/Cargo.toml 
b/core/rust1.34/src/actions/Cargo.toml
similarity index 100%
rename from rust1.34/src/actions/Cargo.toml
rename to core/rust1.34/src/actions/Cargo.toml
diff --git a/settings.gradle b/core/rust1.34/src/actions/src/lib.rs
old mode 100755
new mode 100644
similarity index 57%
copy from settings.gradle
copy to core/rust1.34/src/actions/src/lib.rs
index 1e627a9..83598f8
--- a/settings.gradle
+++ b/core/rust1.34/src/actions/src/lib.rs
@@ -15,22 +15,30 @@
  * limitations under the License.
  */
 
-include 'tests'
-include 'rust1.34'
+extern crate serde_json;
 
-rootProject.name = 'runtime-actionlooop'
+use serde_derive::{Deserialize, Serialize};
+use serde_json::{Error, Value};
 
-gradle.ext.openwhisk = [
-        version: '1.0.0-SNAPSHOT'
-]
+#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
+struct Input {
+    #[serde(default = "stranger")]
+    name: String,
+}
 
-gradle.ext.scala = [
-    version: '2.11.8',
-    compileFlags: ['-feature', '-unchecked', '-deprecation', 
'-Xfatal-warnings', '-Ywarn-unused-import']
-]
+#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
+struct Output {
+    greeting: String,
+}
 
-gradle.ext.scalafmt = [
-    version: '1.5.0',
-    config: new File(rootProject.projectDir, '.scalafmt.conf')
-]
+fn stranger() -> String {
+    "stranger".to_string()
+}
 
+pub fn main(args: Value) -> Result<Value, Error> {
+    let input: Input = serde_json::from_value(args)?;
+    let output = Output {
+        greeting: format!("Hello, {}", input.name),
+    };
+    serde_json::to_value(output)
+}
diff --git a/example/hello/src/lib.rs b/example/hello/src/lib.rs
index 732e23b..83598f8 100644
--- a/example/hello/src/lib.rs
+++ b/example/hello/src/lib.rs
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 extern crate serde_json;
 
 use serde_derive::{Deserialize, Serialize};
diff --git a/rust1.34/Makefile b/rust1.34/Makefile
deleted file mode 100644
index 64a81b8..0000000
--- a/rust1.34/Makefile
+++ /dev/null
@@ -1,16 +0,0 @@
-USER=docker.io/actionloop
-IMAGE=actionloop-rust-v1.32
-
-.PHONY: build
-
-build:
-       docker build -t $(USER)/$(IMAGE) .
-
-devel: build
-       docker run -ti -p 8080:8080 --entrypoint=bash \
-       -v $(PWD):/mnt -e OW_COMPILER=/mnt/compile \
-       $(USER)/$(IMAGE)
-
-push: build
-       docker login
-       docker push $(USER)/$(IMAGE)
diff --git a/rust1.34/src/actions/src/lib.rs b/rust1.34/src/actions/src/lib.rs
deleted file mode 100644
index 732e23b..0000000
--- a/rust1.34/src/actions/src/lib.rs
+++ /dev/null
@@ -1,27 +0,0 @@
-extern crate serde_json;
-
-use serde_derive::{Deserialize, Serialize};
-use serde_json::{Error, Value};
-
-#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
-struct Input {
-    #[serde(default = "stranger")]
-    name: String,
-}
-
-#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
-struct Output {
-    greeting: String,
-}
-
-fn stranger() -> String {
-    "stranger".to_string()
-}
-
-pub fn main(args: Value) -> Result<Value, Error> {
-    let input: Input = serde_json::from_value(args)?;
-    let output = Output {
-        greeting: format!("Hello, {}", input.name),
-    };
-    serde_json::to_value(output)
-}
diff --git a/settings.gradle b/settings.gradle
index 1e627a9..65cc0b3 100755
--- a/settings.gradle
+++ b/settings.gradle
@@ -16,9 +16,9 @@
  */
 
 include 'tests'
-include 'rust1.34'
+include 'core:rust1.34'
 
-rootProject.name = 'runtime-actionlooop'
+rootProject.name = 'runtime-rust'
 
 gradle.ext.openwhisk = [
         version: '1.0.0-SNAPSHOT'
diff --git 
a/tests/src/test/scala/runtime/actionContainers/ActionLoopRustBasicTests.scala 
b/tests/src/test/scala/runtime/actionContainers/ActionLoopRustBasicTests.scala
index 0f6803e..fd73a36 100755
--- 
a/tests/src/test/scala/runtime/actionContainers/ActionLoopRustBasicTests.scala
+++ 
b/tests/src/test/scala/runtime/actionContainers/ActionLoopRustBasicTests.scala
@@ -25,7 +25,7 @@ import org.scalatest.junit.JUnitRunner
 @RunWith(classOf[JUnitRunner])
 class ActionLoopRustBasicTests extends BasicActionRunnerTests with 
WskActorSystem {
 
-  val image = "actionloop-rust-v1.34"
+  val image = "action-rust-v1.34"
 
   override def withActionContainer(env: Map[String, String] = Map.empty)(code: 
ActionContainer => Unit) = {
     withContainer(image, env)(code)

Reply via email to