kstrano 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/kumafy +14 -13
- data/lib/kstrano.rb +4 -1
- data/resources/deploy.rb +0 -3
- data/resources/deploy_production.rb +1 -1
- metadata +2 -2
data/bin/kumafy
CHANGED
@@ -72,18 +72,6 @@ def update_deploy_config(ui, base, context, force)
|
|
72
72
|
deploy_config_file.gsub!(/(:admin_runner,\s)(\"\")/, '\1' + "\"#{app_name}\"")
|
73
73
|
deploy_config_file.gsub!(/(:stage_dir,\s)(\"\")/, '\1' + "\"#{RECIPES[context['recipe']]['config_path']}/deploy\"")
|
74
74
|
|
75
|
-
newrelic_appname = ui.ask("What's the name of the application in new relic?")
|
76
|
-
if !newrelic_appname.nil? && !newrelic_appname.empty?
|
77
|
-
deploy_config_file.gsub!(/(:newrelic_appname,\s)(\"\")/, '\1' + "\"#{newrelic_appname}\"")
|
78
|
-
context["newrelic_appname"] = newrelic_appname
|
79
|
-
end
|
80
|
-
|
81
|
-
newrelic_license_key = ui.ask("What's the license key of your newrelic account (can be found under 'Account settings')?")
|
82
|
-
if !newrelic_license_key.nil? && !newrelic_license_key.empty?
|
83
|
-
deploy_config_file.gsub!(/(:newrelic_license_key,\s)(\"\")/, '\1' + "\"#{newrelic_license_key}\"")
|
84
|
-
context["newrelic_license_key"] = newrelic_license_key
|
85
|
-
end
|
86
|
-
|
87
75
|
extra_config_file = "#{RESOURCES_BASE_PATH}/#{context["recipe"]}/deploy.rb"
|
88
76
|
if File.exists? extra_config_file
|
89
77
|
deploy_config_file << "\n\n"
|
@@ -123,13 +111,26 @@ def update_deploy_config(ui, base, context, force)
|
|
123
111
|
|
124
112
|
if write
|
125
113
|
content = read_resource_file(source_file)
|
114
|
+
|
126
115
|
server = ui.ask("On which server is the #{env} environment deployed?")
|
127
116
|
if !server.match(/^.*\.kunstmaan\.be$/) && !server.match(/^.*\.kunstmaan\.com$/)
|
128
117
|
server = "#{server}.cloud.kunstmaan.com"
|
129
118
|
end
|
130
|
-
|
131
119
|
content.gsub!(/(:domain,\s)(\"\")/, '\1' + "\"#{server}\"")
|
132
120
|
|
121
|
+
configure_newrelic = ui.ask("Do you want to configure newrelic for the #{env} environment? ") { |q| q.default = 'n' }
|
122
|
+
if configure_newrelic.match(/^y/)
|
123
|
+
content << "\n\n"
|
124
|
+
newrelic_appname = ui.ask("What's the name of the application in new relic? ") { |q| q.default = context["app_name"] }
|
125
|
+
content << "set :newrelic_appname, '#{newrelic_appname}' # The name of the application in newrelic"
|
126
|
+
context["newrelic_appname"] = newrelic_appname
|
127
|
+
|
128
|
+
newrelic_license_key = ui.ask("What's the license key of your newrelic account (can be found under 'Account settings')?")
|
129
|
+
content << "\n"
|
130
|
+
content << "set :newrelic_license_key, '#{newrelic_license_key}' # The license key can be found under 'Account settings'"
|
131
|
+
context["newrelic_license_key"] = newrelic_license_key
|
132
|
+
end
|
133
|
+
|
133
134
|
File.open(file, "w") do |f|
|
134
135
|
content.each_line do |line|
|
135
136
|
f.print line
|
data/lib/kstrano.rb
CHANGED
@@ -14,6 +14,9 @@ set :shared_children, false
|
|
14
14
|
set :copy_node_modules, true
|
15
15
|
set :copy_bower_vendors, true
|
16
16
|
|
17
|
+
set :newrelic_appname, ''
|
18
|
+
set :newrelic_license_key, ''
|
19
|
+
|
17
20
|
namespace :files do
|
18
21
|
namespace :move do
|
19
22
|
|
@@ -262,7 +265,7 @@ end
|
|
262
265
|
after :deploy do
|
263
266
|
kuma.fix.cron
|
264
267
|
|
265
|
-
if
|
268
|
+
if !newrelic_appname.nil? && !newrelic_appname.empty? && !newrelic_license_key.nil? && !newrelic_appname.empty?
|
266
269
|
::NewRelic::Agent.config.apply_config({:license_key => newrelic_license_key}, 1)
|
267
270
|
set :newrelic_rails_env, env
|
268
271
|
newrelic.notice_deployment
|
data/resources/deploy.rb
CHANGED
@@ -25,9 +25,6 @@ ssh_options[:forward_agent] = true # http://help.github.com/deploy-with-capistra
|
|
25
25
|
set :deploy_via, :remote_cache #only keeps an online cache
|
26
26
|
set :branch, "master"
|
27
27
|
|
28
|
-
set :newrelic_appname, "" # The name of the application in newrelic
|
29
|
-
set :newrelic_license_key, "" # The license key can be found under 'Account settings'
|
30
|
-
|
31
28
|
# Logging
|
32
29
|
# - IMPORTANT = 0
|
33
30
|
# - INFO = 1
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kstrano
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-07-
|
12
|
+
date: 2013-07-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: capifony
|