Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
diaspora
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Milan
diaspora
Commits
a6028734
Commit
a6028734
authored
14 years ago
by
ilya
Browse files
Options
Downloads
Patches
Plain Diff
not overwriting app config if it already exists
parent
606a6bb4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
db/seeds/backer.rb
+2
-1
2 additions, 1 deletion
db/seeds/backer.rb
db/seeds/dev.rb
+3
-1
3 additions, 1 deletion
db/seeds/dev.rb
db/seeds/tom.rb
+2
-1
2 additions, 1 deletion
db/seeds/tom.rb
with
7 additions
and
3 deletions
db/seeds/backer.rb
+
2
−
1
View file @
a6028734
...
...
@@ -13,7 +13,8 @@ def create
#set pod url
username
=
backer_info
[
backer_number
][
'username'
].
gsub
(
/ /
,
''
).
downcase
set_app_config
username
set_app_config
username
unless
File
.
exists?
(
Rails
.
root
.
join
(
'config'
,
'app_config.yml'
))
require
File
.
join
(
File
.
dirname
(
__FILE__
),
".."
,
".."
,
"config"
,
"initializers"
,
"_load_app_config.rb"
)
# Create seed user
...
...
This diff is collapsed.
Click to expand it.
db/seeds/dev.rb
+
3
−
1
View file @
a6028734
...
...
@@ -15,7 +15,9 @@ def set_app_config username
end
username
=
"tom"
set_app_config
username
set_app_config
username
unless
File
.
exists?
(
Rails
.
root
.
join
(
'config'
,
'app_config.yml'
))
require
Rails
.
root
.
join
(
'config'
,
"initializers"
,
"_load_app_config.rb"
)
# Create seed user
user
=
User
.
build
(
:email
=>
"tom@tom.joindiaspora.com"
,
...
...
This diff is collapsed.
Click to expand it.
db/seeds/tom.rb
+
2
−
1
View file @
a6028734
...
...
@@ -14,7 +14,8 @@ def set_app_config username
file
.
close
end
set_app_config
"tom"
set_app_config
"tom"
unless
File
.
exists?
(
Rails
.
root
.
join
(
'config'
,
'app_config.yml'
))
require
'config/initializers/_load_app_config.rb'
# Create seed user
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment