tck-lambdas 0.3.6 → 0.3.7

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dbcc311287ab7ec6b7e5527489561c0891fddb58
4
- data.tar.gz: c4d8458c1f255d99cbeea69d7b46dd8383f67078
3
+ metadata.gz: 6cb8b1b804c24b88b668727703eba414e51941b3
4
+ data.tar.gz: 2bf01a9577dd1959e708e1e826b908fcd8b75be3
5
5
  SHA512:
6
- metadata.gz: d322d9d3a75f7b5d6643fcc4fa70fa07ab1ed9b590c5cbce2cc2036a4f1723d3b78053fc3168839f9f0cf980fa326741e476350c199ccddee2b0664b0e0f5b6a
7
- data.tar.gz: a84999fe5e679f6fdc91952a5222d6baa2707d7f9cd0ff1310a47692e7d190c0dae48b6505a9b27b770ea53c037ef3467591c3d99b4d8352bcf0f93c168172c4
6
+ metadata.gz: d074e15e74fb55a9eba15f4aeb795da606ffe8bc3291a9c434d180c0b314100b908c18d2587cd7fb2ea4c902cca1f8238ba6ae884f7fa2ab1cc797c25f223042
7
+ data.tar.gz: 22ec631e2b4b6922df34e4d591f3c9f6df6043e4fa8f9678c0e6d6e5989a141b115e8d3a2d670f04adba3b2eb7eb9810342310eeeeed588ed03cdbae7d8b5d99
@@ -11,6 +11,11 @@ module Tck
11
11
  File.dirname(__FILE__)
12
12
  end
13
13
 
14
+ desc "version", "Show tck-lambdas version."
15
+ def version
16
+ puts "tck-lambdas v" + Tck::Lambdas::VERSION
17
+ end
18
+
14
19
  desc "all", "List all AWS Lambdas currently available in tck-lambdas."
15
20
  def all
16
21
  puts "Available functions in tck-lambdas:"
@@ -21,9 +26,9 @@ module Tck
21
26
 
22
27
  desc "used", "List functions currently used by this project."
23
28
  def used
24
- puts "Functions currently used by this project:"
25
29
  yaml = Tck::Lambdas::AwsFunction.yaml
26
30
  if yaml.any?
31
+ puts "Functions currently used by this project:"
27
32
  yaml.each do |lambda_name, properties|
28
33
  puts " - #{properties["function-name"]} (cloned from '#{lambda_name}')"
29
34
  end
@@ -43,6 +48,8 @@ module Tck
43
48
  copy_file "Gemfile.example"
44
49
  template "templates/lambdas.yml.erb", ".lambdas.yml"
45
50
  template "templates/lambdas.rake.erb", "lib/tasks/lambdas.rake"
51
+ template "templates/serverless.yml.erb", "serverless.yml"
52
+ template "templates/handler.js.erb", "handler.js"
46
53
  copy_file "aws_function.rb", "lib/tck/lambdas/aws_function.rb"
47
54
  copy_file "test.rb", "lambdas/test.rb"
48
55
  directory name, "lambdas/#{name}"
@@ -0,0 +1,7 @@
1
+ /* Copyright 2016 The Cocktail Experience, S.L. */
2
+ 'use strict';
3
+
4
+ module.exports.<%= @lambda.name %> = (event, context) => {
5
+ var lambda = require('./lambdas/<%= @lambda.name %>/source/<%= @lambda.name %>');
6
+ lambda(event, context);
7
+ };
@@ -1,6 +1,6 @@
1
1
  namespace :lambdas do
2
2
  namespace :<%= @lambda.name %> do
3
- desc "Upload tests lambda, run tests, read emails..."
3
+ desc "Update tests lambda and run its tests."
4
4
  task build_lambda: [
5
5
  :upload_test,
6
6
  :test
@@ -0,0 +1,15 @@
1
+ service: service_using_<%= @lambda.name %>
2
+
3
+ provider:
4
+ name: aws
5
+ runtime: nodejs4.3
6
+ stage: dev
7
+ # region: eu-west-1
8
+
9
+ functions:
10
+ <%= @lambda.name %>:
11
+ handler: handler.<%= @lambda.name %>
12
+ events:
13
+ - http:
14
+ path: <%= @lambda.name %>
15
+ method: get
@@ -1,5 +1,5 @@
1
1
  module Tck
2
2
  module Lambdas
3
- VERSION = "0.3.6"
3
+ VERSION = "0.3.7"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tck-lambdas
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.6
4
+ version: 0.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fernando Garcia Samblas
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-10-01 00:00:00.000000000 Z
11
+ date: 2016-10-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -801,8 +801,10 @@ files:
801
801
  - lib/tck/lambdas/contact_form/test/failed/message_empty.json
802
802
  - lib/tck/lambdas/contact_form/test/succeeded/basic.json
803
803
  - lib/tck/lambdas/contact_form/test/succeeded/with_cc.json
804
+ - lib/tck/lambdas/templates/handler.js.erb
804
805
  - lib/tck/lambdas/templates/lambdas.rake.erb
805
806
  - lib/tck/lambdas/templates/lambdas.yml.erb
807
+ - lib/tck/lambdas/templates/serverless.yml.erb
806
808
  - lib/tck/lambdas/test.rb
807
809
  - lib/tck/lambdas/version.rb
808
810
  homepage: https://github.com/the-cocktail/tck-lambdas