Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
67327952
Commit
67327952
authored
Jan 08, 2018
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add memoization for properties
parent
c425ff75
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
db/post_migrate/20171124104327_migrate_kubernetes_service_to_new_clusters_architectures.rb
...grate_kubernetes_service_to_new_clusters_architectures.rb
+10
-4
No files found.
db/post_migrate/20171124104327_migrate_kubernetes_service_to_new_clusters_architectures.rb
View file @
67327952
...
...
@@ -76,19 +76,25 @@ class MigrateKubernetesServiceToNewClustersArchitectures < ActiveRecord::Migrati
end
def
api_url
JSON
.
parse
(
self
.
properties
)
[
'api_url'
]
parsed_properties
[
'api_url'
]
end
def
ca_pem
JSON
.
parse
(
self
.
properties
)
[
'ca_pem'
]
parsed_properties
[
'ca_pem'
]
end
def
namespace
JSON
.
parse
(
self
.
properties
)
[
'namespace'
]
parsed_properties
[
'namespace'
]
end
def
token
JSON
.
parse
(
self
.
properties
)[
'token'
]
parsed_properties
[
'token'
]
end
private
def
parsed_properties
@parsed_properties
||=
JSON
.
parse
(
self
.
properties
)
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment