lamma 0.2.5 → 0.2.6
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/lib/lamma/code.rb +4 -2
- data/lib/lamma/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd41dff54c55a0fd646f544d6266833d897186d87fc56e92e1f9e6dfc3bfefd5
|
4
|
+
data.tar.gz: 70381e48bc18030e2b05afc8b189e72ad008a5ef252ec2b15856b14c102710d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b09da12cf200d0b7e07932f38baa95ddcb1044f60ab0880d5688a34644c9cee2c8548c21a8085f6759c697b079c4be2d7c42c7197ae36a7904e03185cdb0ae9
|
7
|
+
data.tar.gz: 1fb076ca37421862c28b11c6b129e9c652a92dc310a75494358338f90963323a3b9a245f09464b096a64d9c6dc5fcbd5fce68960fc287bb63b4edd8aab22d4a4
|
data/lib/lamma/code.rb
CHANGED
@@ -10,6 +10,8 @@ module Lamma
|
|
10
10
|
def initialize(function, yaml)
|
11
11
|
@function = function
|
12
12
|
@source_path = yaml.fetch('source_path', '.')
|
13
|
+
raise Exception("Invalid source_path #{@source_path}") if @source_path&.empty?
|
14
|
+
|
13
15
|
@prebuild = yaml.fetch('prebuild', nil)
|
14
16
|
@build_path = yaml.fetch('build_path', nil)
|
15
17
|
end
|
@@ -47,7 +49,7 @@ module Lamma
|
|
47
49
|
active_paths.each do |path|
|
48
50
|
next unless File.file?(path)
|
49
51
|
File.open(path) do |source_io|
|
50
|
-
zio.put_next_entry(path)
|
52
|
+
zio.put_next_entry(path[(@source_path.length + 1)..-1])
|
51
53
|
data = source_io.read
|
52
54
|
zio.write(data)
|
53
55
|
end
|
@@ -71,7 +73,7 @@ module Lamma
|
|
71
73
|
raise unless system(@prebuild)
|
72
74
|
elsif [Lamma::Runtime::PYTHON_27, Lamma::Runtime::PYTHON_36].include?(@function.runtime.type) \
|
73
75
|
&& File.exist?(File.join(@source_path, 'requirements.txt'))
|
74
|
-
raise unless system("pip", "install", "-r", "requirements.txt", "-t",
|
76
|
+
raise unless system("pip", "install", "-r", File.join(@source_path, "requirements.txt"), "-t", @source_path)
|
75
77
|
elsif [Lamma::Runtime::EDGE_NODE_43, Lamma::Runtime::NODE_43].include?(@function.runtime.type) \
|
76
78
|
&& File.exist?(File.join(@source_path, 'package.json'))
|
77
79
|
raise unless system("npm", "install", "--production")
|
data/lib/lamma/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lamma
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yuichiro Someya
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-04-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -188,7 +188,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
188
188
|
version: '0'
|
189
189
|
requirements: []
|
190
190
|
rubyforge_project:
|
191
|
-
rubygems_version: 2.7.
|
191
|
+
rubygems_version: 2.7.6
|
192
192
|
signing_key:
|
193
193
|
specification_version: 4
|
194
194
|
summary: Deploy toolset for Amazon Lambda functions.
|