simplygenius-atmos 0.11.10 → 0.11.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/simplygenius/atmos/cli.rb +38 -0
- data/lib/simplygenius/atmos/version.rb +1 -1
- data/templates/new/config/atmos/runtime.yml +6 -0
- metadata +38 -38
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 72a21c734727cfb54965b10fd0f7dac8e4edc3a85c461877e53e43be0da20668
|
4
|
+
data.tar.gz: 7deb82dabe355ae7bfaab079e7bf06607677e1759254dc98bc38ee369b925f92
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4539ef0beadd221b8e3bd114040ef29aaf310c9b12b065fd779d0da3832d955f8672097ba7a3fc5408a476501a95fdb90b531a9de811dcee3f20b1af799f9caa
|
7
|
+
data.tar.gz: ea937bd0db5c0072e5b2170702168830229bf4fa2dd99e67acd04cff7f71d080099a1bc05c6a4b93946186d1481985b91b5652c5e8c6816fc7b7bf77910d3714
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,7 @@ require_relative '../atmos'
|
|
2
2
|
require_relative '../atmos/ui'
|
3
3
|
require 'clamp'
|
4
4
|
require 'sigdump/setup'
|
5
|
+
require 'open-uri'
|
5
6
|
|
6
7
|
Dir.glob(File.join(File.join(__dir__, 'commands'), '*.rb')) do |f|
|
7
8
|
require_relative "commands/#{File.basename(f).sub(/\.rb$/, "")}"
|
@@ -119,6 +120,41 @@ module SimplyGenius
|
|
119
120
|
end
|
120
121
|
end
|
121
122
|
|
123
|
+
def fetch_latest_version
|
124
|
+
begin
|
125
|
+
latest_ver = JSON.parse(open("https://rubygems.org/api/v1/versions/simplygenius-atmos/latest.json").read)['version']
|
126
|
+
rescue => e
|
127
|
+
latest_ver = "[Version Fetch Failed]"
|
128
|
+
logger.log_exception(e, "Couldn't check latest atmos gem version", level: :debug)
|
129
|
+
end
|
130
|
+
latest_ver
|
131
|
+
end
|
132
|
+
|
133
|
+
def version_check(atmos_version)
|
134
|
+
|
135
|
+
required_ver = Atmos.config["atmos.version_requirement"]
|
136
|
+
if required_ver.present?
|
137
|
+
case required_ver
|
138
|
+
|
139
|
+
when "latest"
|
140
|
+
latest_ver = fetch_latest_version
|
141
|
+
|
142
|
+
if latest_ver != atmos_version
|
143
|
+
raise "The atmos version (#{atmos_version}) does not match the given requirement (latest: #{latest_ver})"
|
144
|
+
end
|
145
|
+
|
146
|
+
when /[~<>=]*\s*[\d\.]*/
|
147
|
+
if ! Gem::Dependency.new('', required_ver).match?('', atmos_version)
|
148
|
+
raise "The atmos version (#{atmos_version}) does not match the given requirement (#{required_ver})"
|
149
|
+
end
|
150
|
+
|
151
|
+
else
|
152
|
+
raise "Invalid atmos.version_requirement, should be 'latest' or in a gem dependency form"
|
153
|
+
end
|
154
|
+
end
|
155
|
+
|
156
|
+
end
|
157
|
+
|
122
158
|
# hook into clamp lifecycle to force logging setup even when we are calling
|
123
159
|
# a subcommand
|
124
160
|
def parse(arguments)
|
@@ -149,6 +185,8 @@ module SimplyGenius
|
|
149
185
|
logger.info "Atmos Version #{VERSION}"
|
150
186
|
exit(0)
|
151
187
|
end
|
188
|
+
|
189
|
+
version_check(VERSION)
|
152
190
|
end
|
153
191
|
end
|
154
192
|
|
@@ -35,6 +35,12 @@ atmos:
|
|
35
35
|
# gets expanded at runtime
|
36
36
|
load_path:
|
37
37
|
|
38
|
+
# Forces one to use the version of atmos that is given. This version
|
39
|
+
# specifier can be 'latest' or in the form of a gem version dependency
|
40
|
+
# specifier, e.g. '~> 0.11.10'. If unset, then no version check will be
|
41
|
+
# performed
|
42
|
+
version_requirement:
|
43
|
+
|
38
44
|
# Configure the mechanism that allows terraform to callback into atmos
|
39
45
|
ipc:
|
40
46
|
# Disables all IPC callbacks into atmos from terraform
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simplygenius-atmos
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Conway
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-02-
|
11
|
+
date: 2020-02-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -28,128 +28,128 @@ dependencies:
|
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: simplecov
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '0
|
61
|
+
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '0
|
68
|
+
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: coveralls
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - "
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '0
|
75
|
+
version: '0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - "
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '0
|
82
|
+
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: test_construct
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - "
|
87
|
+
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
89
|
+
version: '0'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- - "
|
94
|
+
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
96
|
+
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: vcr
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- - "
|
101
|
+
- - ">="
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
103
|
+
version: '0'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- - "
|
108
|
+
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version:
|
110
|
+
version: '0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: webmock
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- - "
|
115
|
+
- - ">="
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version:
|
117
|
+
version: '0'
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- - "
|
122
|
+
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version:
|
124
|
+
version: '0'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: pry
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
|
-
- - "
|
129
|
+
- - ">="
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: 0
|
131
|
+
version: '0'
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
|
-
- - "
|
136
|
+
- - ">="
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: 0
|
138
|
+
version: '0'
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: pry-byebug
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
142
142
|
requirements:
|
143
|
-
- - "
|
143
|
+
- - ">="
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version:
|
145
|
+
version: '0'
|
146
146
|
type: :development
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
|
-
- - "
|
150
|
+
- - ">="
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version:
|
152
|
+
version: '0'
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
154
|
name: activesupport
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|