spectat 0.1.0 → 0.2.0.pre.pre1
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/.gitlab-ci.yml +15 -3
- data/lib/spectat/fqdn.rb +7 -5
- data/lib/spectat/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e4dbbf34e024cafa6982cc5073d76f3da41af85947891c10fef70d07a72f48a7
|
4
|
+
data.tar.gz: 62191cd6c799337188f235734f88d0f45e11e3a251fa2e440fe9c50c7388db80
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef3916e341a29aeb3c2389d23e54041216e732521e3ad6ec783705f8e42a6dc2aa479588e07629e14d04786852acf7dd82a1bd2a2c95f50d0474c17e52ea5696
|
7
|
+
data.tar.gz: d19ecf0930fae7d60db8bdcdecea333338954540099e9b2f421396b1b79e56b81b008beb0ac9507dbfd8be75c930ced0cc07a21f7003328e6701fda4984bb4c9
|
data/.gitlab-ci.yml
CHANGED
@@ -1,6 +1,18 @@
|
|
1
|
-
|
1
|
+
release:
|
2
2
|
image: ruby:2.5
|
3
|
+
variables:
|
4
|
+
GIT_STRATEGY: clone
|
5
|
+
GIT_CHECKOUT: 'true'
|
3
6
|
script:
|
4
7
|
- bundle install
|
5
|
-
|
6
|
-
-
|
8
|
+
# Git config for push-back {{{
|
9
|
+
- git config user.name 'GitLab CI'
|
10
|
+
- git config user.email 'ci@gitlab'
|
11
|
+
- eval $(ssh-agent -s)
|
12
|
+
- echo -e "$SSH_PRIVATE_KEY" | ssh-add -
|
13
|
+
# }}}
|
14
|
+
# push to RubyGems {{{
|
15
|
+
- bundle config gem.push_key $RUBYGEMS_API_KEY
|
16
|
+
# }}}
|
17
|
+
- git status
|
18
|
+
- bundle exec rake release
|
data/lib/spectat/fqdn.rb
CHANGED
@@ -8,8 +8,8 @@ module Spectat
|
|
8
8
|
|
9
9
|
SITE_ROOT ||= '/srv/www'.freeze
|
10
10
|
|
11
|
-
def initialize(fqdn,
|
12
|
-
@fqdn = Spectat::Fqdn.fqdn(fqdn,
|
11
|
+
def initialize(fqdn, env)
|
12
|
+
@fqdn = Spectat::Fqdn.fqdn(fqdn, env)
|
13
13
|
@review_apps_fqdn = Spectat::Fqdn.review_apps_fqdn(fqdn)
|
14
14
|
end
|
15
15
|
|
@@ -29,15 +29,17 @@ module Spectat
|
|
29
29
|
@fqdn.downcase.strip.gsub(/\W/, '_')
|
30
30
|
end
|
31
31
|
|
32
|
-
def self.fqdn(fqdn,
|
32
|
+
def self.fqdn(fqdn, env)
|
33
33
|
domain_name = DomainName(fqdn)
|
34
34
|
raise 'FQDN already contains `staging.`' if fqdn =~ /staging\.#{domain_name.domain}/
|
35
35
|
|
36
36
|
# we keep the trailing `.`
|
37
37
|
subdomain = fqdn.gsub(domain_name.domain, '')
|
38
38
|
|
39
|
-
|
40
|
-
|
39
|
+
env_sym = env.to_sym
|
40
|
+
|
41
|
+
case env_sym
|
42
|
+
when :production
|
41
43
|
fqdn
|
42
44
|
else
|
43
45
|
if fqdn =~ /review\.#{domain_name.domain}/
|
data/lib/spectat/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spectat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0.pre.pre1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jamie Tanna
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-07-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -116,12 +116,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
116
116
|
version: '0'
|
117
117
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
118
118
|
requirements:
|
119
|
-
- - "
|
119
|
+
- - ">"
|
120
120
|
- !ruby/object:Gem::Version
|
121
|
-
version:
|
121
|
+
version: 1.3.1
|
122
122
|
requirements: []
|
123
123
|
rubyforge_project:
|
124
|
-
rubygems_version: 2.7.
|
124
|
+
rubygems_version: 2.7.7
|
125
125
|
signing_key:
|
126
126
|
specification_version: 4
|
127
127
|
summary: Opiononated configuration for Spectat Designs infrastructure
|