lamma 0.2.5 → 0.2.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c924bb615fcc7c4b5f4baa03624dddf90cb7ab4b6836ac0921658f2477b9e258
4
- data.tar.gz: 7b645cecaf5342501c9b8b256861e156f6f1231b38da0b0c0f906dcb6600ce18
3
+ metadata.gz: dd41dff54c55a0fd646f544d6266833d897186d87fc56e92e1f9e6dfc3bfefd5
4
+ data.tar.gz: 70381e48bc18030e2b05afc8b189e72ad008a5ef252ec2b15856b14c102710d6
5
5
  SHA512:
6
- metadata.gz: 74b3b5bd632f8fd27a6b7d6c84779952476df001b3d47b26c6a2c3e55a03ff72f564c71c1283001d3ab7a15884c15d9115a6d06dfc71452734b41df434f9914f
7
- data.tar.gz: 2e4d4b8e122a32eca8e92856d42473b2050e09a3c4d204c7d03e211932f0de856cb5b3463c29ee388241beec9d63fb1f8e852ae37e70f937f0d3460c88045bd7
6
+ metadata.gz: 6b09da12cf200d0b7e07932f38baa95ddcb1044f60ab0880d5688a34644c9cee2c8548c21a8085f6759c697b079c4be2d7c42c7197ae36a7904e03185cdb0ae9
7
+ data.tar.gz: 1fb076ca37421862c28b11c6b129e9c652a92dc310a75494358338f90963323a3b9a245f09464b096a64d9c6dc5fcbd5fce68960fc287bb63b4edd8aab22d4a4
@@ -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")
@@ -1,3 +1,3 @@
1
1
  module Lamma
2
- VERSION = "0.2.5"
2
+ VERSION = "0.2.6"
3
3
  end
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.5
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: 2017-11-06 00:00:00.000000000 Z
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.1
191
+ rubygems_version: 2.7.6
192
192
  signing_key:
193
193
  specification_version: 4
194
194
  summary: Deploy toolset for Amazon Lambda functions.