faastruby 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
  SHA256:
3
- metadata.gz: 4086556ca79303b6f5648d703b26a0a7f5170baa4f9736027d9aa728afe1bf47
4
- data.tar.gz: 5f8ed48b70913ecd61208b08315ef199492d8f1c02cf7cf7d42101a32313b0ba
3
+ metadata.gz: e9c4ebfe0705c085953b285f9da898433417c2cd719a6646d1953142d22d52be
4
+ data.tar.gz: 64bcfd70098d3a91bc752a6be8745083344703266b999f6755c89393aaf82355
5
5
  SHA512:
6
- metadata.gz: af818d48b8e17d6d56290f4181b6aadb026a8734bc7ee51d84ce5536dabf52ca728e9c15de7c8c8096e7ea06aff8e8bba2503cd6e44a0dd3b00386ae6bc0c473
7
- data.tar.gz: 7f6e33b947949e7d825930e2f5a0d87daf85c0ae2cce858ed01b58da52a39d592b093e52efa9332af4341e9a04b185d4f5d7d849f4d6a09df124de4107177dcd
6
+ metadata.gz: ef06c3ccfee9ab9020b40ae0c795e1303215ef0e41e36ea1a88c39c2d7ee79e7c97925f8d551a8b96117a72c752e47960f9f5e6d4811dd02fe012cdb072eb764
7
+ data.tar.gz: 1ca711328493bfb729be489ce5daa6a86850066a1d749cac74ab6a74a2a2f440874f89a3fcfd87c75afa6a9640880d4071046c3a9f459a4cecd6e3491192aaa4
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.7 - Dec 29 2018
4
+ - Error when unsupported runtimes are passed to `new`
5
+
6
+ ## 0.3.6 - Dec 29 2018
7
+ - Add support for different runtimes with `--runtime` to `new` command. Example: `faastruby new hello-world --runtime ruby:2.6.0`
8
+ - Add runtime `ruby:2.6.0`
9
+ - Add runtime `crystal:0.27.0`
10
+
3
11
  ## 0.3.5 - Dec 27 2018
4
12
  - Clean up credentials file when listing or saving it to remove nulls.
5
13
  - Raise error when trying to save null credentials to file.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- faastruby (0.3.5)
4
+ faastruby (0.3.6)
5
5
  colorize (~> 0.8)
6
6
  faastruby-rpc (~> 0.1.3)
7
7
  oj (~> 3.6)
@@ -38,7 +38,7 @@ GEM
38
38
  mustermann (1.0.3)
39
39
  necromancer (0.4.0)
40
40
  netrc (0.11.0)
41
- oj (3.7.4)
41
+ oj (3.7.5)
42
42
  pastel (0.7.2)
43
43
  equatable (~> 0.5.0)
44
44
  tty-color (~> 0.4.0)
@@ -9,6 +9,7 @@ require 'faastruby/cli/package'
9
9
  module FaaStRuby
10
10
  FAASTRUBY_YAML = 'faastruby.yml'
11
11
  SPINNER_FORMAT = :spin_2
12
+ SUPPORTED_RUNTIMES = ['ruby:2.5.3', 'ruby:2.6.0', 'crystal:0.27.0']
12
13
  class CLI
13
14
  def self.error(message, color: :red)
14
15
  message.each {|m| STDERR.puts m.colorize(color)} if message.is_a?(Array)
@@ -29,8 +29,7 @@ module FaaStRuby
29
29
 
30
30
  --blank # Create a blank function
31
31
  --force # Continue if directory already exists and overwrite files
32
- --runtime # Choose the runtime. Options are: crystal:0.27.0,
33
- # ruby:2.5.3 (default) and ruby:2.6.0
32
+ --runtime # Choose the runtime. Options are: #{SUPPORTED_RUNTIMES.join(', ')}
34
33
  EOS
35
34
  end
36
35
 
@@ -49,6 +48,7 @@ EOS
49
48
  @options['runtime'] = @args.shift
50
49
  @options['runtime_name'], @options['runtime_version'] = @options['runtime'].split(':')
51
50
  @options['template_path'] = "templates/#{@options['runtime_name']}"
51
+ FaaStRuby::CLI.error(["Unsupported runtime: #{@options['runtime']}".red, "Supported values are #{SUPPORTED_RUNTIMES.join(", ")}"], color: nil) unless SUPPORTED_RUNTIMES.include?(@options['runtime'])
52
52
  when '-f', '--force'
53
53
  @options['force'] = true
54
54
  when '--blank'
@@ -1,3 +1,3 @@
1
1
  module FaaStRuby
2
- VERSION = '0.3.6'
2
+ VERSION = '0.3.7'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: faastruby
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
  - Paulo Arruda