lambchop 0.0.8 → 0.0.9
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 +4 -4
- data/README.md +9 -2
- data/bin/lambchop +2 -1
- data/lib/lambchop/client.rb +4 -0
- data/lib/lambchop/version.rb +1 -1
- data/lib/lambchop.rb +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bf6a5985315df51adac5c579beabbf9606d060e4
|
|
4
|
+
data.tar.gz: 85361457e005631838c8b2d8b8bef657d3b14286
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a62a040cb8ed2a76d77db9af14d41793ea7b22be088d0e043233ee75ab14a5611933b0055c22679af1a95c66c983b56368a72cfcba2c7f698b34537b03812839
|
|
7
|
+
data.tar.gz: 07ccfb2011e1f8e622304481799e5826bee1fcde74902f9ff3777fa0fcc206dc13285ce38432a69eaf0b09276fccad9455e9ad1fe62ae75ce3ae61958370ffe8
|
data/README.md
CHANGED
|
@@ -115,6 +115,13 @@ exports.handler = function(event, context) {
|
|
|
115
115
|
...
|
|
116
116
|
```
|
|
117
117
|
|
|
118
|
+
## Use [ERB](http://docs.ruby-lang.org/en/trunk/ERB.html) as preprocessor
|
|
119
|
+
|
|
120
|
+
```javascript
|
|
121
|
+
#!/usr/bin/env lambchop -e
|
|
122
|
+
...
|
|
123
|
+
```
|
|
124
|
+
|
|
118
125
|
## Follow log only
|
|
119
126
|
|
|
120
127
|
```sh
|
|
@@ -126,14 +133,14 @@ START RequestId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
|
|
|
126
133
|
...
|
|
127
134
|
```
|
|
128
135
|
|
|
129
|
-
|
|
136
|
+
## node module path
|
|
130
137
|
```
|
|
131
138
|
.
|
|
132
139
|
├── lambda-script.js
|
|
133
140
|
└── node_modules/
|
|
134
141
|
```
|
|
135
142
|
|
|
136
|
-
|
|
143
|
+
## Diff
|
|
137
144
|
```sh
|
|
138
145
|
$ lambchop-diff
|
|
139
146
|
usage: lambchop-cat <function-name> <file>
|
data/bin/lambchop
CHANGED
|
@@ -9,7 +9,8 @@ Version = Lambchop::VERSION
|
|
|
9
9
|
options = {}
|
|
10
10
|
|
|
11
11
|
ARGV.options do |opt|
|
|
12
|
-
opt.on('-d', '--detach')
|
|
12
|
+
opt.on('-d', '--detach') { options[:detach] = true }
|
|
13
|
+
opt.on('-e', '--use-erb') { options[:use_erb] = true }
|
|
13
14
|
opt.parse!
|
|
14
15
|
end
|
|
15
16
|
|
data/lib/lambchop/client.rb
CHANGED
|
@@ -14,6 +14,10 @@ class Lambchop::Client
|
|
|
14
14
|
src = Lambchop::Utils.remove_shebang(@source)
|
|
15
15
|
config, src = Lambchop::Utils.parse_magic_comment(src)
|
|
16
16
|
|
|
17
|
+
if @options[:use_erb]
|
|
18
|
+
src = ERB.new(src, nil, '-').result
|
|
19
|
+
end
|
|
20
|
+
|
|
17
21
|
config['function_name'] ||= File.basename(@path, '.js')
|
|
18
22
|
function_name = config['function_name']
|
|
19
23
|
|
data/lib/lambchop/version.rb
CHANGED
data/lib/lambchop.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: lambchop
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.9
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Genki Sugawara
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-11-
|
|
11
|
+
date: 2014-11-28 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: aws-sdk-core
|