faastruby 0.5.28 → 0.5.29

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: 98e377126aebecb329bde2e7db6d6eb1193741c2b50295521850f61f915b9bed
4
- data.tar.gz: a2bf78e9c25df66bbd9bf41061edaab53ffee84515c45df0a0df968fd4957b84
3
+ metadata.gz: 2a7f43f1ee5e8b351ca12c3f6769cb86761c7aaae80fbcd6a14a2a75074061be
4
+ data.tar.gz: d2ea56296e407c88f245df0a031f83dcc722deefb5433db6426e5824790bcee1
5
5
  SHA512:
6
- metadata.gz: 5e64ef9487f827beda2414b6606f7c833f9d16979aed5118008aa8e1b57e8baeacab6ea3cec312f76bc42a8105cf0376a6065f314bcffffd2f4dc7f4a327c0ed
7
- data.tar.gz: ddde97246ff56c0ac8b3770d3fb80a087a81683989af87eb5c01739e05a8bab80fce299e1746fc0b0f5b0254824eb506266772b215a8c396db986f770fd07fff
6
+ metadata.gz: 1a8fef45c885d1817cafcc91151a7f0d539c6deb817e130c49b80278c288d6891e3d9e450f33d6b060afd640a63c2c8d7bc511f880942cf4f0cf8e966db70047
7
+ data.tar.gz: 339c0174d5042b81fff06c936102c477d1c1852c717c9546be2f68cbaf5859160e138844d1cf2c18a331be6f046bb7db72f57d787eb97e5a1be9f86b6c6fa887
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.5.29 - May 23 2019
4
+ - Support for Crystal 0.28
5
+
3
6
  ## 0.5.28 - May 21 2019
4
7
  - `faastruby local` will try to find the 'puma' executable
5
8
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- faastruby (0.5.28)
4
+ faastruby (0.5.29)
5
5
  colorize (~> 0.8)
6
6
  faastruby-rpc (~> 0.2.7)
7
7
  listen (~> 3.1)
@@ -90,7 +90,7 @@ GEM
90
90
  rspec-support (~> 3.8.0)
91
91
  rspec-support (3.8.0)
92
92
  ruby_dep (1.5.0)
93
- rubyzip (1.2.2)
93
+ rubyzip (1.2.3)
94
94
  safe_yaml (1.0.4)
95
95
  sinatra (2.0.5)
96
96
  mustermann (~> 1.0)
@@ -41,6 +41,12 @@ module FaaStRuby
41
41
  end
42
42
 
43
43
  def install_from_folder(folder)
44
+ folder = File.expand_path(folder)
45
+ folder_exists = File.directory?(folder)
46
+ folder_exists ? install_from_folder_run(folder) : FaaStRuby::CLI.error("Could not find folder #{folder}")
47
+ end
48
+
49
+ def install_from_folder_run(folder)
44
50
  if File.directory?(target)
45
51
  puts "! d #{@output_prefix}#{target}".yellow
46
52
  else
@@ -53,7 +59,6 @@ module FaaStRuby
53
59
  create_dir(full_target_path) if File.directory?(full_source_path)
54
60
  copy_file(source: full_source_path, destination: full_target_path) if File.file?(full_source_path)
55
61
  end
56
-
57
62
  end
58
63
 
59
64
  def create_dir(dir)
@@ -87,4 +92,4 @@ module FaaStRuby
87
92
  type == 'github'
88
93
  end
89
94
  end
90
- end
95
+ end
@@ -21,8 +21,13 @@ module FaaStRuby
21
21
 
22
22
  def self.get_crystal_version
23
23
  debug "self.get_crystal_version"
24
- ver = `crystal -v|head -n1|cut -f2 -d' ' 2>/dev/null`&.chomp
25
- ver == '' ? CRYSTAL_LATEST : ver
24
+ major, minor, patch = `crystal -v|head -n1|cut -f2 -d' ' 2>/dev/null`&.chomp&.split('.')
25
+ ver = "#{major}.#{minor}"
26
+ if ver == '.' || ver == ''
27
+ CRYSTAL_LATEST
28
+ else
29
+ ver
30
+ end
26
31
  end
27
32
 
28
33
  def self.crystal_present_and_supported?
@@ -4,8 +4,13 @@ module FaaStRuby
4
4
  require 'faastruby/supported_runtimes'
5
5
 
6
6
  def self.get_crystal_version
7
- ver = `crystal -v|head -n1|cut -f2 -d' ' 2>/dev/null`&.chomp
8
- ver == '' ? CRYSTAL_LATEST : ver
7
+ major, minor, patch = `crystal -v|head -n1|cut -f2 -d' ' 2>/dev/null`&.chomp&.split('.')
8
+ ver = "#{major}.#{minor}"
9
+ if ver == '.' || ver == ''
10
+ CRYSTAL_LATEST
11
+ else
12
+ ver
13
+ end
9
14
  end
10
15
 
11
16
  def self.crystal_present_and_supported?
@@ -1,9 +1,13 @@
1
1
  module FaaStRuby
2
2
  # It is important that they are sorted in version order!
3
3
  SUPPORTED_RUBY = ['~> 2.5.0', '~> 2.6.0']
4
- SUPPORTED_CRYSTAL = ['0.27.0', '0.27.2']
5
- CRYSTAL_LATEST = SUPPORTED_CRYSTAL.last
6
- RUBY_LATEST = SUPPORTED_RUBY.last
7
- SUPPORTED_RUNTIMES = ['ruby:2.5', 'ruby:2.6'] + SUPPORTED_CRYSTAL.map{|version| "crystal:#{version}"}
4
+ SUPPORTED_CRYSTAL = ['~> 0.27.2', '~> 0.28.0']
5
+ CRYSTAL_LATEST = "0.28"
6
+ SUPPORTED_RUNTIMES = [
7
+ 'ruby:2.5',
8
+ 'ruby:2.6',
9
+ 'crystal:0.27',
10
+ 'crystal:0.28'
11
+ ]
8
12
  CURRENT_MINOR_RUBY = RUBY_VERSION.split('.')[0..1].join('.')
9
13
  end
@@ -1,3 +1,3 @@
1
1
  module FaaStRuby
2
- VERSION = '0.5.28'
2
+ VERSION = '0.5.29'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: faastruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.28
4
+ version: 0.5.29
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paulo Arruda
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-05-21 00:00:00.000000000 Z
11
+ date: 2019-05-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client