blufin-lib 1.7.6 → 1.8.0
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 +4 -4
- data/lib/blufin-lib.rb +5 -0
- data/lib/core/arrays.rb +21 -0
- data/lib/core/aws.rb +12 -3
- data/lib/core/config.rb +1 -1
- data/lib/core/git.rb +274 -0
- data/lib/core/projects.rb +285 -32
- data/lib/core/routes.rb +20 -1
- data/lib/core/strings.rb +16 -0
- data/lib/core/terminal.rb +25 -15
- data/lib/core/update.rb +15 -0
- data/lib/core/yml.rb +43 -0
- data/lib/generate/generate_base.rb +25 -0
- data/lib/generate/generate_ui_routes.rb +165 -0
- data/lib/version.rb +1 -1
- data/opt/schema/projects.yml +15 -2
- data/opt/schema/routes.yml +44 -0
- data/opt/shell/ec2-check +24 -0
- metadata +9 -2
data/opt/shell/ec2-check
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
# Checks if we are running on an EC2 instance.
|
4
|
+
# https://serverfault.com/questions/462903/how-to-know-if-a-machine-is-an-ec2-instance
|
5
|
+
|
6
|
+
if [ -f /sys/hypervisor/uuid ]; then
|
7
|
+
if [ `head -c 3 /sys/hypervisor/uuid` == "ec2" ]; then
|
8
|
+
echo yes
|
9
|
+
else
|
10
|
+
echo no
|
11
|
+
fi
|
12
|
+
elif [ -r /sys/devices/virtual/dmi/id/product_uuid ]; then
|
13
|
+
if [ `head -c 3 /sys/devices/virtual/dmi/id/product_uuid` == "EC2" ]; then
|
14
|
+
echo yes
|
15
|
+
else
|
16
|
+
echo no
|
17
|
+
fi
|
18
|
+
else
|
19
|
+
if $(curl -s -m 1 http://169.254.169.254/latest/dynamic/instance-identity/document | grep -q availabilityZone) ; then
|
20
|
+
echo yes
|
21
|
+
else
|
22
|
+
echo no
|
23
|
+
fi
|
24
|
+
fi
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blufin-lib
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Albert Rannetsperger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-11-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: highline
|
@@ -135,6 +135,7 @@ files:
|
|
135
135
|
- lib/core/config.rb
|
136
136
|
- lib/core/datetime_utils.rb
|
137
137
|
- lib/core/files.rb
|
138
|
+
- lib/core/git.rb
|
138
139
|
- lib/core/image.rb
|
139
140
|
- lib/core/network.rb
|
140
141
|
- lib/core/numbers.rb
|
@@ -143,10 +144,16 @@ files:
|
|
143
144
|
- lib/core/strings.rb
|
144
145
|
- lib/core/terminal.rb
|
145
146
|
- lib/core/tools.rb
|
147
|
+
- lib/core/update.rb
|
146
148
|
- lib/core/validate.rb
|
147
149
|
- lib/core/versioning.rb
|
150
|
+
- lib/core/yml.rb
|
151
|
+
- lib/generate/generate_base.rb
|
152
|
+
- lib/generate/generate_ui_routes.rb
|
148
153
|
- lib/version.rb
|
149
154
|
- opt/schema/projects.yml
|
155
|
+
- opt/schema/routes.yml
|
156
|
+
- opt/shell/ec2-check
|
150
157
|
homepage: https://github.com/alb3rtuk
|
151
158
|
licenses:
|
152
159
|
- MIT
|