diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2019-06-14 17:46:31 +0300 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2019-06-14 17:46:31 +0300 |
commit | 6b3de25996e32f9b78cf4dbbad6dfeba346758fd (patch) | |
tree | ce3f22d9f77be086eaa136ff559b0ec6f6db7262 /app/models/environment.rb | |
parent | ba6e134e2814e6d7616990c7f9aa3a521b4082b3 (diff) | |
parent | c449e35b33c55e2a0c8c3b7c08d0d68870e41ec4 (diff) |
Merge branch 'master' into 59532-danger-css59532-danger-css
* master: (1920 commits)
Upgrade gitlab-ui and migrate gl-pagination
New translations gitlab.pot (Danish) [skip ci]
Fix missing deployment rockets in monitor dashboard
Add basic support for AsciiDoc include directive
Improve the gitea importer test
Backport of EE changes from MR 13763
Clarify ED25519 SSH key support
Exclude preexisting lint issues for i18n
Add back sidekiq metrics exporter
Breakup first pass
Use scoped routes for labels and milestones
AutoDevops fix ensure_namespace() does not explicitly test namespace
Speed up commit loads by disabling BatchLoader replace_methods
Speed up merge request loads by disabling BatchLoader replace_methods
Remove unused selector
Disable unnecessary ESLint i18n offences
Unquarantine spec in user_edits_files_spec.rb
Refactor for cleaner caching in dashboards
Update height of -tabs-height
Change SLA to target SLO for bugs and defects
...
Diffstat (limited to 'app/models/environment.rb')
-rw-r--r-- | app/models/environment.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/models/environment.rb b/app/models/environment.rb index 69224635e34..aff20dae09b 100644 --- a/app/models/environment.rb +++ b/app/models/environment.rb @@ -3,8 +3,8 @@ class Environment < ApplicationRecord include Gitlab::Utils::StrongMemoize # Used to generate random suffixes for the slug - LETTERS = 'a'..'z' - NUMBERS = '0'..'9' + LETTERS = ('a'..'z').freeze + NUMBERS = ('0'..'9').freeze SUFFIX_CHARS = LETTERS.to_a + NUMBERS.to_a belongs_to :project, required: true @@ -155,11 +155,11 @@ class Environment < ApplicationRecord end def has_terminals? - project.deployment_platform.present? && available? && last_deployment.present? + deployment_platform.present? && available? && last_deployment.present? end def terminals - project.deployment_platform.terminals(self) if has_terminals? + deployment_platform.terminals(self) if has_terminals? end def has_metrics? |