You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -8,13 +8,15 @@ It auto configures the lamda layer and RUBY_PATH to the all the functions.
8
8
9
9
## Install
10
10
11
-
```shell
12
-
npm install serverless-ruby-layer
13
11
```
12
+
sls plugin install -n serverless-ruby-layer
13
+
```
14
+
15
+
*This will add the plugin to `package.json` and the plugins section of `serverless.yml`.*
14
16
15
17
## Simple Usage
16
18
17
-
*Include plugin in the `serverless.yml`*
19
+
*`serverless.yml`*
18
20
19
21
```YML
20
22
service: basic
@@ -31,7 +33,7 @@ functions:
31
33
handler: handler.hello
32
34
```
33
35
34
-
*Gemfile*
36
+
*`Gemfile`*
35
37
36
38
```ruby
37
39
source 'https://rubygems.org'
@@ -40,11 +42,13 @@ functions:
40
42
41
43
Running `servleress deploy` automatically deploys the required gems as in Gemfile to AWS lambda layer and make the gems available to the `RUBY_PATH` of the functions `hello.handler`
42
44
45
+
Refer [here](https://github.com/navarasu/serverless-ruby-layer/blob/master/examples/basic) for example.
46
+
43
47
## Customization
44
48
45
49
### Using docker for gems with OS specific C extentions
46
50
47
-
*Add custom config in `serverless.yml`*
51
+
*`serverless.yml`*
48
52
49
53
```YML
50
54
service: basic
@@ -65,23 +69,20 @@ functions:
65
69
handler: handler.hello
66
70
```
67
71
68
-
*Gemfile*
72
+
*`Gemfile`*
69
73
70
74
```ruby
71
75
source 'https://rubygems.org'
72
76
gem 'http'
73
77
gem 'nokogiri'
74
78
```
75
79
76
-
77
80
## Contributing
78
81
79
-
80
82
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
0 commit comments