lono 7.4.2 → 7.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/lib/lono/blueprint/new.rb +2 -22
- data/lib/lono/cfn/preview/diff_viewer.rb +5 -1
- data/lib/lono/configset/new.rb +2 -9
- data/lib/lono/extension/new.rb +2 -9
- data/lib/lono/registration/temp.rb +1 -1
- data/lib/lono/s3/aws_setup.rb +16 -0
- data/lib/lono/s3/bucket.rb +6 -0
- data/lib/lono/utils/generators/tree.rb +18 -0
- data/lib/lono/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e7a001c358dbf937c901b77fff338512c2052e76882b54c77de5048e5e400c07
|
4
|
+
data.tar.gz: 71ab52b2e5af1533524c81e036b412017754db18f59a85da9e9a2b97cf9d14e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b062a87dc0476db11d5fe02f8866d5da0455549727015eb7d98a50dfe16802ea01ba5b9fa0efa3a2f3dc304a68d89cc6ee9747cf8e33a6e44cfb877ca3036489
|
7
|
+
data.tar.gz: 39919280a8d06fdb119018fe4fa173f9ab52ecb8979ff210bfd307c8362146cb446aedeadcdaccf86c6f22b207826b6a3a6a58f8f72098c2abb8de412933f579
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,13 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
This project *tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
|
5
5
|
|
6
|
+
## [7.4.3]
|
7
|
+
- #61 clean install fixes
|
8
|
+
- improve tree detection
|
9
|
+
- improve colordiff detection
|
10
|
+
- improve AWS setup detection
|
11
|
+
- remove bundler install for blueprint, extension, and configsets
|
12
|
+
|
6
13
|
## [7.4.2]
|
7
14
|
- #60 fix edge case when cached materialized Gemfile.lock breaks finder
|
8
15
|
|
data/lib/lono/blueprint/new.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
class Lono::Blueprint
|
2
2
|
class New < Lono::Sequence
|
3
3
|
include Helper
|
4
|
+
include Lono::Utils::Generators::Tree
|
4
5
|
|
5
6
|
argument :blueprint_name
|
6
7
|
|
@@ -95,17 +96,6 @@ class Lono::Blueprint
|
|
95
96
|
FileUtils.cd(self.destination_root)
|
96
97
|
end
|
97
98
|
|
98
|
-
def bundle_install
|
99
|
-
return if options[:from_new] || options[:import]
|
100
|
-
|
101
|
-
return unless options[:bundle]
|
102
|
-
|
103
|
-
puts "=> Installing dependencies with: bundle install"
|
104
|
-
Bundler.with_unbundled_env do
|
105
|
-
system("BUNDLE_IGNORE_CONFIG=1 bundle install")
|
106
|
-
end
|
107
|
-
end
|
108
|
-
|
109
99
|
def welcome_message
|
110
100
|
return if options[:from_new] || options[:import]
|
111
101
|
puts <<~EOL
|
@@ -122,17 +112,7 @@ class Lono::Blueprint
|
|
122
112
|
end
|
123
113
|
|
124
114
|
def tree
|
125
|
-
|
126
|
-
|
127
|
-
tree_installed = system("type tree > /dev/null")
|
128
|
-
return unless tree_installed
|
129
|
-
|
130
|
-
structure = `tree .`
|
131
|
-
puts <<~EOL
|
132
|
-
Here is the structure of your blueprint:
|
133
|
-
|
134
|
-
#{structure}
|
135
|
-
EOL
|
115
|
+
tree_structure("blueprint")
|
136
116
|
end
|
137
117
|
|
138
118
|
# Reason: So `lono code import` prints out the params values with relative paths
|
@@ -13,7 +13,11 @@ module Lono::Cfn::Preview
|
|
13
13
|
|
14
14
|
def diff_viewer
|
15
15
|
return ENV['LONO_DIFF'] if ENV['LONO_DIFF']
|
16
|
-
system("type colordiff > /dev/null")
|
16
|
+
colordiff_installed = system("type colordiff > /dev/null 2>&1")
|
17
|
+
unless colordiff_installed
|
18
|
+
puts "INFO: colordiff it not available. Recommend installing it."
|
19
|
+
end
|
20
|
+
colordiff_installed ? "colordiff" : "diff"
|
17
21
|
end
|
18
22
|
end
|
19
23
|
end
|
data/lib/lono/configset/new.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
class Lono::Configset
|
2
2
|
class New < Lono::Sequence
|
3
3
|
include Lono::Blueprint::Helper
|
4
|
+
include Lono::Utils::Generators::Tree
|
4
5
|
|
5
6
|
argument :configset_name
|
6
7
|
|
@@ -70,15 +71,7 @@ class Lono::Configset
|
|
70
71
|
end
|
71
72
|
|
72
73
|
def tree
|
73
|
-
|
74
|
-
return unless tree_installed
|
75
|
-
|
76
|
-
structure = `tree .`
|
77
|
-
puts <<~EOL
|
78
|
-
Here is the structure of your configset:
|
79
|
-
|
80
|
-
#{structure}
|
81
|
-
EOL
|
74
|
+
tree_structure("configset")
|
82
75
|
end
|
83
76
|
end
|
84
77
|
end
|
data/lib/lono/extension/new.rb
CHANGED
@@ -2,6 +2,7 @@ class Lono::Extension
|
|
2
2
|
class New < Lono::Sequence
|
3
3
|
include Lono::Blueprint::Helper # for user_info
|
4
4
|
include Lono::Extension::Helper
|
5
|
+
include Lono::Utils::Generators::Tree
|
5
6
|
|
6
7
|
argument :extension_name
|
7
8
|
|
@@ -58,15 +59,7 @@ class Lono::Extension
|
|
58
59
|
end
|
59
60
|
|
60
61
|
def tree
|
61
|
-
|
62
|
-
return unless tree_installed
|
63
|
-
|
64
|
-
structure = `tree .`
|
65
|
-
puts <<~EOL
|
66
|
-
Here is the structure of your extension:
|
67
|
-
|
68
|
-
#{structure}
|
69
|
-
EOL
|
62
|
+
tree_structure("extension")
|
70
63
|
end
|
71
64
|
end
|
72
65
|
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
class Lono::S3
|
2
|
+
class AwsSetup
|
3
|
+
include Lono::AwsServices
|
4
|
+
|
5
|
+
def check!
|
6
|
+
s3.config.region
|
7
|
+
rescue Aws::Errors::MissingRegionError => e
|
8
|
+
puts "ERROR: #{e.class}: #{e.message}".color(:red)
|
9
|
+
puts <<~EOL
|
10
|
+
Unable to detect the AWS_REGION to make AWS API calls. This is might be because the AWS access
|
11
|
+
has not been set up yet. Please either your ~/.aws files.
|
12
|
+
EOL
|
13
|
+
exit 1
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data/lib/lono/s3/bucket.rb
CHANGED
@@ -10,6 +10,8 @@ class Lono::S3
|
|
10
10
|
def name
|
11
11
|
return @@name if @@name # only memoize once bucket has been created
|
12
12
|
|
13
|
+
check_aws_setup!
|
14
|
+
|
13
15
|
stack = new.find_stack
|
14
16
|
return unless stack
|
15
17
|
|
@@ -17,6 +19,10 @@ class Lono::S3
|
|
17
19
|
bucket = resp.stack_resources.find { |r| r.logical_resource_id == "Bucket" }
|
18
20
|
@@name = bucket.physical_resource_id # actual bucket name
|
19
21
|
end
|
22
|
+
|
23
|
+
def check_aws_setup!
|
24
|
+
AwsSetup.new.check!
|
25
|
+
end
|
20
26
|
end
|
21
27
|
|
22
28
|
def initialize(options={})
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module Lono::Utils::Generators
|
2
|
+
module Tree
|
3
|
+
private
|
4
|
+
def tree_structure(name)
|
5
|
+
return if options[:from_new] || options[:import] # only for lono new
|
6
|
+
|
7
|
+
tree_installed = system("type tree > /dev/null 2>&1")
|
8
|
+
return unless tree_installed
|
9
|
+
|
10
|
+
structure = `tree .`
|
11
|
+
puts <<~EOL
|
12
|
+
Here is the structure of your #{name}:
|
13
|
+
|
14
|
+
#{structure}
|
15
|
+
EOL
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
data/lib/lono/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lono
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.4.
|
4
|
+
version: 7.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tung Nguyen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-03-
|
11
|
+
date: 2020-03-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -628,6 +628,7 @@ files:
|
|
628
628
|
- lib/lono/registration/temp.rb
|
629
629
|
- lib/lono/registration/user.rb
|
630
630
|
- lib/lono/s3.rb
|
631
|
+
- lib/lono/s3/aws_setup.rb
|
631
632
|
- lib/lono/s3/bucket.rb
|
632
633
|
- lib/lono/s3/uploader.rb
|
633
634
|
- lib/lono/script.rb
|
@@ -713,6 +714,7 @@ files:
|
|
713
714
|
- lib/lono/template/util.rb
|
714
715
|
- lib/lono/upgrade.rb
|
715
716
|
- lib/lono/user_data.rb
|
717
|
+
- lib/lono/utils/generators/tree.rb
|
716
718
|
- lib/lono/utils/item/file_methods.rb
|
717
719
|
- lib/lono/utils/item/zip.rb
|
718
720
|
- lib/lono/utils/pretty_time.rb
|