Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
capistrano-sneakers
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ikcrm_common
capistrano-sneakers
Commits
8665c70d
Unverified
Commit
8665c70d
authored
7 years ago
by
Tensho
Committed by
Andrew Babichev
7 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move monit template render and upload method to monit.rake file
parent
ffab78c8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
19 deletions
+19
-19
lib/capistrano/tasks/monit.rake
+19
-0
lib/capistrano/tasks/sneakers.rake
+0
-19
No files found.
lib/capistrano/tasks/monit.rake
View file @
8665c70d
...
...
@@ -63,5 +63,24 @@ namespace :sneakers do
def
sudo_if_needed
(
command
)
fetch
(
:sneakers_monit_use_sudo
)
?
sudo
(
command
)
:
execute
(
command
)
end
def
template_sneakers
(
from
,
to
,
role
)
[
File
.
join
(
'lib'
,
'capistrano'
,
'templates'
,
"
#{
from
}
-
#{
role
.
hostname
}
-
#{
fetch
(
:stage
)
}
.rb"
),
File
.
join
(
'lib'
,
'capistrano'
,
'templates'
,
"
#{
from
}
-
#{
role
.
hostname
}
.rb"
),
File
.
join
(
'lib'
,
'capistrano'
,
'templates'
,
"
#{
from
}
-
#{
fetch
(
:stage
)
}
.rb"
),
File
.
join
(
'lib'
,
'capistrano'
,
'templates'
,
"
#{
from
}
.rb.erb"
),
File
.
join
(
'lib'
,
'capistrano'
,
'templates'
,
"
#{
from
}
.rb"
),
File
.
join
(
'lib'
,
'capistrano'
,
'templates'
,
"
#{
from
}
.erb"
),
File
.
expand_path
(
"../../templates/
#{
from
}
.rb.erb"
,
__FILE__
),
File
.
expand_path
(
"../../templates/
#{
from
}
.erb"
,
__FILE__
)
].
each
do
|
path
|
if
File
.
file?
(
path
)
erb
=
File
.
read
(
path
)
upload!
StringIO
.
new
(
ERB
.
new
(
erb
).
result
(
binding
)),
to
break
end
end
end
end
end
This diff is collapsed.
Click to expand it.
lib/capistrano/tasks/sneakers.rake
View file @
8665c70d
...
...
@@ -252,23 +252,4 @@ namespace :sneakers do
end
end
end
def
template_sneakers
(
from
,
to
,
role
)
[
File
.
join
(
'lib'
,
'capistrano'
,
'templates'
,
"
#{
from
}
-
#{
role
.
hostname
}
-
#{
fetch
(
:stage
)
}
.rb"
),
File
.
join
(
'lib'
,
'capistrano'
,
'templates'
,
"
#{
from
}
-
#{
role
.
hostname
}
.rb"
),
File
.
join
(
'lib'
,
'capistrano'
,
'templates'
,
"
#{
from
}
-
#{
fetch
(
:stage
)
}
.rb"
),
File
.
join
(
'lib'
,
'capistrano'
,
'templates'
,
"
#{
from
}
.rb.erb"
),
File
.
join
(
'lib'
,
'capistrano'
,
'templates'
,
"
#{
from
}
.rb"
),
File
.
join
(
'lib'
,
'capistrano'
,
'templates'
,
"
#{
from
}
.erb"
),
File
.
expand_path
(
"../../templates/
#{
from
}
.rb.erb"
,
__FILE__
),
File
.
expand_path
(
"../../templates/
#{
from
}
.erb"
,
__FILE__
)
].
each
do
|
path
|
if
File
.
file?
(
path
)
erb
=
File
.
read
(
path
)
upload!
StringIO
.
new
(
ERB
.
new
(
erb
).
result
(
binding
)),
to
break
end
end
end
end
This diff is collapsed.
Click to expand it.
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