iqvoc 3.2.5 → 3.2.6
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +7 -1
- data/config/initializers/secret_token.rb +30 -0
- data/lib/iqvoc/version.rb +1 -1
- metadata +18 -23
- data/config/deploy/bian.rb +0 -37
- data/config/deploy/common.rb +0 -79
- data/config/deploy/ec2.rb +0 -43
- data/config/deploy/history.rb +0 -29
- data/config/deploy/innoq.rb +0 -37
- data/config/deploy.rb +0 -72
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# iQvoc
|
2
2
|
|
3
|
+
[![Build Status](https://secure.travis-ci.org/innoq/iqvoc.png)](http://travis-ci.org/innoq/iqvoc)
|
4
|
+
|
3
5
|
iQvoc is a vocabulary management tool that combines easy-to-use human interfaces with Semantic Web interoperability.
|
4
6
|
|
5
7
|
iQvoc supports vocabularies that are common to many knowledge organization systems, such as:
|
@@ -42,6 +44,10 @@ There are many hooks providing support for your own classes and configuration. T
|
|
42
44
|
also works as a Rails Engine. The config residing in `lib/iqvoc.rb` provides a basic
|
43
45
|
overview of the possibilities.
|
44
46
|
|
47
|
+
## Documentation
|
48
|
+
|
49
|
+
Documentation resources can be found in the [wiki](https://github.com/innoq/iqvoc/wiki/_pages).
|
50
|
+
|
45
51
|
## Contributing
|
46
52
|
|
47
53
|
If you want to help out there are several options:
|
@@ -52,7 +58,7 @@ If you want to help out there are several options:
|
|
52
58
|
|
53
59
|
If you make changes to existing code please make sure that the test suite stays green. Please include tests to your additional contributions.
|
54
60
|
|
55
|
-
Tests can be run via `rake test`. We're using capybara-webkit for integration tests with JavaScript support.
|
61
|
+
Tests can be run via `bundle exec rake test`. We're using capybara-webkit for integration tests with JavaScript support.
|
56
62
|
|
57
63
|
## Maintainer & Contributors
|
58
64
|
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
|
3
|
+
# Copyright 2011 innoQ Deutschland GmbH
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Be sure to restart your server when you modify this file.
|
18
|
+
|
19
|
+
if Iqvoc.const_defined?(:Application)
|
20
|
+
|
21
|
+
# Your secret key for verifying the integrity of signed cookies.
|
22
|
+
# If you change this key, all old signed cookies will become invalid!
|
23
|
+
# Make sure the secret is at least 30 characters and all random,
|
24
|
+
# no regular words or you'll be exposed to dictionary attacks.
|
25
|
+
|
26
|
+
# Run `rake secret` and uncomment the following line
|
27
|
+
# Replace the secret-placeholder with your generated token
|
28
|
+
Iqvoc::Application.config.secret_token = 'b8d90f50515345071ea3a8fced203bfac91c734afda36bbe4a51a630cc11f1d7b99d6d6da19d6bc0aa2c636d46da87159cd53661ed6d98bbc5af30d72410e1a6'
|
29
|
+
|
30
|
+
end
|
data/lib/iqvoc/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: iqvoc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,11 +11,11 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date:
|
14
|
+
date: 2012-01-10 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rails
|
18
|
-
requirement: &
|
18
|
+
requirement: &70256698528960 !ruby/object:Gem::Requirement
|
19
19
|
none: false
|
20
20
|
requirements:
|
21
21
|
- - ~>
|
@@ -23,10 +23,10 @@ dependencies:
|
|
23
23
|
version: 3.0.9
|
24
24
|
type: :runtime
|
25
25
|
prerelease: false
|
26
|
-
version_requirements: *
|
26
|
+
version_requirements: *70256698528960
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
|
-
requirement: &
|
29
|
+
requirement: &70256698528380 !ruby/object:Gem::Requirement
|
30
30
|
none: false
|
31
31
|
requirements:
|
32
32
|
- - ! '>='
|
@@ -34,10 +34,10 @@ dependencies:
|
|
34
34
|
version: '0'
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
|
-
version_requirements: *
|
37
|
+
version_requirements: *70256698528380
|
38
38
|
- !ruby/object:Gem::Dependency
|
39
39
|
name: kaminari
|
40
|
-
requirement: &
|
40
|
+
requirement: &70256698526920 !ruby/object:Gem::Requirement
|
41
41
|
none: false
|
42
42
|
requirements:
|
43
43
|
- - ! '>='
|
@@ -45,10 +45,10 @@ dependencies:
|
|
45
45
|
version: '0'
|
46
46
|
type: :runtime
|
47
47
|
prerelease: false
|
48
|
-
version_requirements: *
|
48
|
+
version_requirements: *70256698526920
|
49
49
|
- !ruby/object:Gem::Dependency
|
50
50
|
name: authlogic
|
51
|
-
requirement: &
|
51
|
+
requirement: &70256698526060 !ruby/object:Gem::Requirement
|
52
52
|
none: false
|
53
53
|
requirements:
|
54
54
|
- - ! '>='
|
@@ -56,10 +56,10 @@ dependencies:
|
|
56
56
|
version: '0'
|
57
57
|
type: :runtime
|
58
58
|
prerelease: false
|
59
|
-
version_requirements: *
|
59
|
+
version_requirements: *70256698526060
|
60
60
|
- !ruby/object:Gem::Dependency
|
61
61
|
name: cancan
|
62
|
-
requirement: &
|
62
|
+
requirement: &70256699937680 !ruby/object:Gem::Requirement
|
63
63
|
none: false
|
64
64
|
requirements:
|
65
65
|
- - ! '>='
|
@@ -67,10 +67,10 @@ dependencies:
|
|
67
67
|
version: '0'
|
68
68
|
type: :runtime
|
69
69
|
prerelease: false
|
70
|
-
version_requirements: *
|
70
|
+
version_requirements: *70256699937680
|
71
71
|
- !ruby/object:Gem::Dependency
|
72
72
|
name: iq_rdf
|
73
|
-
requirement: &
|
73
|
+
requirement: &70256699937180 !ruby/object:Gem::Requirement
|
74
74
|
none: false
|
75
75
|
requirements:
|
76
76
|
- - ~>
|
@@ -78,10 +78,10 @@ dependencies:
|
|
78
78
|
version: 0.0.14
|
79
79
|
type: :runtime
|
80
80
|
prerelease: false
|
81
|
-
version_requirements: *
|
81
|
+
version_requirements: *70256699937180
|
82
82
|
- !ruby/object:Gem::Dependency
|
83
83
|
name: json
|
84
|
-
requirement: &
|
84
|
+
requirement: &70256699936760 !ruby/object:Gem::Requirement
|
85
85
|
none: false
|
86
86
|
requirements:
|
87
87
|
- - ! '>='
|
@@ -89,7 +89,7 @@ dependencies:
|
|
89
89
|
version: '0'
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
|
-
version_requirements: *
|
92
|
+
version_requirements: *70256699936760
|
93
93
|
description: iQvoc - a SKOS(-XL) vocabulary management system built on the Semantic
|
94
94
|
Web
|
95
95
|
email:
|
@@ -242,12 +242,6 @@ files:
|
|
242
242
|
- config/database.yml
|
243
243
|
- config/database.yml.mysql
|
244
244
|
- config/database.yml.sqlite
|
245
|
-
- config/deploy/bian.rb
|
246
|
-
- config/deploy/common.rb
|
247
|
-
- config/deploy/ec2.rb
|
248
|
-
- config/deploy/history.rb
|
249
|
-
- config/deploy/innoq.rb
|
250
|
-
- config/deploy.rb
|
251
245
|
- config/engine.rb
|
252
246
|
- config/environment.rb
|
253
247
|
- config/environments/development.rb
|
@@ -262,6 +256,7 @@ files:
|
|
262
256
|
- config/initializers/kaminari_config.rb
|
263
257
|
- config/initializers/language.rb
|
264
258
|
- config/initializers/mime_types.rb
|
259
|
+
- config/initializers/secret_token.rb
|
265
260
|
- config/initializers/secret_token.rb.template
|
266
261
|
- config/initializers/session_store.rb
|
267
262
|
- config/locales/activerecord.de.yml
|
@@ -486,7 +481,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
486
481
|
version: '0'
|
487
482
|
requirements: []
|
488
483
|
rubyforge_project:
|
489
|
-
rubygems_version: 1.8.
|
484
|
+
rubygems_version: 1.8.10
|
490
485
|
signing_key:
|
491
486
|
specification_version: 3
|
492
487
|
summary: iQvoc
|
data/config/deploy/bian.rb
DELETED
@@ -1,37 +0,0 @@
|
|
1
|
-
# encoding: UTF-8
|
2
|
-
|
3
|
-
# Copyright 2011 innoQ Deutschland GmbH
|
4
|
-
#
|
5
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
-
# you may not use this file except in compliance with the License.
|
7
|
-
# You may obtain a copy of the License at
|
8
|
-
#
|
9
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
-
#
|
11
|
-
# Unless required by applicable law or agreed to in writing, software
|
12
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
-
# See the License for the specific language governing permissions and
|
15
|
-
# limitations under the License.
|
16
|
-
|
17
|
-
@capistrano_history ||= {}
|
18
|
-
|
19
|
-
# main details
|
20
|
-
servername = "iqvoc-bian.innoq.com"
|
21
|
-
role :web, servername
|
22
|
-
role :app, servername
|
23
|
-
role :db, servername, :primary => true
|
24
|
-
|
25
|
-
username = Capistrano::CLI.ui.ask("Please enter a ssh username for #{servername} [#{@capistrano_history['last_user']}]: ")
|
26
|
-
username = @capistrano_history['last_user'] if username == ""
|
27
|
-
@capistrano_history['last_user'] = username
|
28
|
-
|
29
|
-
# server details
|
30
|
-
default_run_options[:pty] = true
|
31
|
-
ssh_options[:forward_agent] = true
|
32
|
-
set :deploy_to, "/var/www/iqvoc_bian"
|
33
|
-
set :deploy_via, :remote_cache
|
34
|
-
set :user, username
|
35
|
-
set :use_sudo, false
|
36
|
-
|
37
|
-
save_history if defined?(save_history)
|
data/config/deploy/common.rb
DELETED
@@ -1,79 +0,0 @@
|
|
1
|
-
# encoding: UTF-8
|
2
|
-
|
3
|
-
# Copyright 2011 innoQ Deutschland GmbH
|
4
|
-
#
|
5
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
-
# you may not use this file except in compliance with the License.
|
7
|
-
# You may obtain a copy of the License at
|
8
|
-
#
|
9
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
-
#
|
11
|
-
# Unless required by applicable law or agreed to in writing, software
|
12
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
-
# See the License for the specific language governing permissions and
|
15
|
-
# limitations under the License.
|
16
|
-
|
17
|
-
desc "Runs a rake task on the remote system. Use TASK'<taskname + parameters>' to specify the task."
|
18
|
-
task :invoke_task do
|
19
|
-
prefix = fetch(:invokeable_task_prefix, "")
|
20
|
-
if ENV['TASK'] and ENV['TASK'] =~ /^#{prefix}/
|
21
|
-
run("cd #{deploy_to}/current; rake --trace #{ENV['TASK']} RAILS_ENV=production")
|
22
|
-
else
|
23
|
-
run("cd #{deploy_to}/current; rake -T #{prefix} --trace RAILS_ENV=production")
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
|
-
desc "Tail production log files"
|
28
|
-
task :tail_logs, :roles => :app do
|
29
|
-
run "tail -f #{shared_path}/log/production.log" do |channel, stream, data|
|
30
|
-
puts # for an extra line break before the host name
|
31
|
-
puts "#{channel[:host]}: #{data}"
|
32
|
-
break if stream == :err
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
namespace :deploy do
|
37
|
-
|
38
|
-
desc "Generate a secret for the server"
|
39
|
-
task :generate_secret, :roles => :app do
|
40
|
-
require 'securerandom'
|
41
|
-
|
42
|
-
template = File.expand_path("config/initializers/secret_token.rb.template")
|
43
|
-
raise "File not found: #{template}" unless File.exist?(template)
|
44
|
-
|
45
|
-
path = "#{shared_path}/config/initializers"
|
46
|
-
file_name = "#{path}/secret_token.rb"
|
47
|
-
|
48
|
-
token = SecureRandom.hex(64)
|
49
|
-
txt = File.read(template)
|
50
|
-
txt.gsub!("S-E-C-R-E-T", token)
|
51
|
-
|
52
|
-
run "mkdir -p #{path}"
|
53
|
-
put txt, file_name
|
54
|
-
end
|
55
|
-
|
56
|
-
desc "Copy your current config/database.yml to the server"
|
57
|
-
task :database_config_copy, :roles => :app do
|
58
|
-
file_name = File.expand_path("config/database.yml")
|
59
|
-
raise "File not found: #{file_name}" unless File.exist?(file_name)
|
60
|
-
run "mkdir -p #{shared_path}/config/"
|
61
|
-
put File.open(file_name).read, "#{shared_path}/config/database.yml"
|
62
|
-
end
|
63
|
-
|
64
|
-
desc "Create default SQLite3 config/database.yml"
|
65
|
-
task :database_config_sqlite3, :roles => :app do
|
66
|
-
config = {
|
67
|
-
'production' => {
|
68
|
-
"adapter" => "sqlite3",
|
69
|
-
"database" => "#{shared_path}/db/production.sqlite3",
|
70
|
-
"pool" => 5,
|
71
|
-
"timeout" => 5000,
|
72
|
-
}
|
73
|
-
}
|
74
|
-
run "mkdir -p #{shared_path}/config/"
|
75
|
-
run "mkdir -p #{shared_path}/db/"
|
76
|
-
put config.to_yaml, "#{shared_path}/config/database.yml"
|
77
|
-
end
|
78
|
-
|
79
|
-
end
|
data/config/deploy/ec2.rb
DELETED
@@ -1,43 +0,0 @@
|
|
1
|
-
# encoding: UTF-8
|
2
|
-
|
3
|
-
# Copyright 2011 innoQ Deutschland GmbH
|
4
|
-
#
|
5
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
-
# you may not use this file except in compliance with the License.
|
7
|
-
# You may obtain a copy of the License at
|
8
|
-
#
|
9
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
-
#
|
11
|
-
# Unless required by applicable law or agreed to in writing, software
|
12
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
-
# See the License for the specific language governing permissions and
|
15
|
-
# limitations under the License.
|
16
|
-
|
17
|
-
@capistrano_history ||= {}
|
18
|
-
|
19
|
-
# main details
|
20
|
-
servername = Capistrano::CLI.ui.ask("Please enter the IP or Hostname of the ec2 instance to deploy to [#{@capistrano_history['last_servername']}]: ")
|
21
|
-
servername = @capistrano_history['last_servername'] if servername == ""
|
22
|
-
@capistrano_history['last_servername'] = servername
|
23
|
-
role :web, servername
|
24
|
-
role :app, servername
|
25
|
-
role :db, servername, :primary => true
|
26
|
-
|
27
|
-
keyfile = 'doesnt_exist'
|
28
|
-
while !File.exist?(File.expand_path(keyfile))
|
29
|
-
keyfile = Capistrano::CLI.ui.ask("Please enter the file holding the ssh key for user 'passenger' [#{@capistrano_history['last_keyfile']}]: ")
|
30
|
-
keyfile = @capistrano_history['last_keyfile'] if keyfile == ""
|
31
|
-
@capistrano_history['last_keyfile'] = keyfile
|
32
|
-
end
|
33
|
-
ssh_options[:keys] = [File.expand_path(keyfile)]
|
34
|
-
|
35
|
-
# server details
|
36
|
-
default_run_options[:pty] = true
|
37
|
-
ssh_options[:forward_agent] = true
|
38
|
-
set :deploy_to, "/var/www/default"
|
39
|
-
set :deploy_via, :remote_cache
|
40
|
-
set :user, "passenger"
|
41
|
-
set :use_sudo, false
|
42
|
-
|
43
|
-
save_history if defined?(save_history)
|
data/config/deploy/history.rb
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
# encoding: UTF-8
|
2
|
-
|
3
|
-
# Copyright 2011 innoQ Deutschland GmbH
|
4
|
-
#
|
5
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
-
# you may not use this file except in compliance with the License.
|
7
|
-
# You may obtain a copy of the License at
|
8
|
-
#
|
9
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
-
#
|
11
|
-
# Unless required by applicable law or agreed to in writing, software
|
12
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
-
# See the License for the specific language governing permissions and
|
15
|
-
# limitations under the License.
|
16
|
-
|
17
|
-
# load .capistrano_history.yml to @capistrano_history
|
18
|
-
def load_history
|
19
|
-
@capistrano_history = {}
|
20
|
-
@capistrano_history = YAML::load(File.open(".capistrano_history.yml")) if File.exist?(".capistrano_history.yml")
|
21
|
-
end
|
22
|
-
|
23
|
-
# Write history file to prevent too much typing the next time :-)
|
24
|
-
def save_history
|
25
|
-
File.open(".capistrano_history.yml", 'w') do |f|
|
26
|
-
f.write(@capistrano_history.to_yaml)
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
data/config/deploy/innoq.rb
DELETED
@@ -1,37 +0,0 @@
|
|
1
|
-
# encoding: UTF-8
|
2
|
-
|
3
|
-
# Copyright 2011 innoQ Deutschland GmbH
|
4
|
-
#
|
5
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
-
# you may not use this file except in compliance with the License.
|
7
|
-
# You may obtain a copy of the License at
|
8
|
-
#
|
9
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
-
#
|
11
|
-
# Unless required by applicable law or agreed to in writing, software
|
12
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
-
# See the License for the specific language governing permissions and
|
15
|
-
# limitations under the License.
|
16
|
-
|
17
|
-
@capistrano_history ||= {}
|
18
|
-
|
19
|
-
# main details
|
20
|
-
servername = "iqvoc.innoq.com"
|
21
|
-
role :web, servername
|
22
|
-
role :app, servername
|
23
|
-
role :db, servername, :primary => true
|
24
|
-
|
25
|
-
username = Capistrano::CLI.ui.ask("Please enter a ssh username for #{servername} [#{@capistrano_history['last_user']}]: ")
|
26
|
-
username = @capistrano_history['last_user'] if username == ""
|
27
|
-
@capistrano_history['last_user'] = username
|
28
|
-
|
29
|
-
# server details
|
30
|
-
default_run_options[:pty] = true
|
31
|
-
ssh_options[:forward_agent] = true
|
32
|
-
set :deploy_to, "/var/www/iqvoc"
|
33
|
-
set :deploy_via, :remote_cache
|
34
|
-
set :user, username
|
35
|
-
set :use_sudo, false
|
36
|
-
|
37
|
-
save_history if defined?(save_history)
|
data/config/deploy.rb
DELETED
@@ -1,72 +0,0 @@
|
|
1
|
-
# encoding: UTF-8
|
2
|
-
|
3
|
-
# Copyright 2011 innoQ Deutschland GmbH
|
4
|
-
#
|
5
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
-
# you may not use this file except in compliance with the License.
|
7
|
-
# You may obtain a copy of the License at
|
8
|
-
#
|
9
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
-
#
|
11
|
-
# Unless required by applicable law or agreed to in writing, software
|
12
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
-
# See the License for the specific language governing permissions and
|
15
|
-
# limitations under the License.
|
16
|
-
|
17
|
-
require "#{File.dirname(__FILE__)}/deploy/history"
|
18
|
-
load_history
|
19
|
-
|
20
|
-
load "#{File.dirname(__FILE__)}/deploy/common.rb"
|
21
|
-
|
22
|
-
set :default_stage, "innoq"
|
23
|
-
set :stages, %w(ec2 innoq bian)
|
24
|
-
require 'capistrano/ext/multistage'
|
25
|
-
|
26
|
-
# RVM bootstrap
|
27
|
-
$:.unshift(File.expand_path('./lib', ENV['rvm_path']))
|
28
|
-
require 'rvm/capistrano'
|
29
|
-
set :rvm_ruby_string, '1.9.2'
|
30
|
-
# set :rvm_type, :user
|
31
|
-
|
32
|
-
# bundler bootstrap
|
33
|
-
require 'bundler/capistrano'
|
34
|
-
|
35
|
-
# main details
|
36
|
-
set :application, "iqvoc"
|
37
|
-
|
38
|
-
# repo details
|
39
|
-
set :scm, :git
|
40
|
-
set :git_enable_submodules, 1
|
41
|
-
# set :scm_username, "passenger"
|
42
|
-
set :repository, "git@github.com:innoq/iqvoc.git"
|
43
|
-
@capistrano_history['last_branch'] = "master" if @capistrano_history['last_branch'].nil? || @capistrano_history['last_branch'] == ""
|
44
|
-
set :branch, Capistrano::CLI.ui.ask("Please enter the branch or tag we should use [#{@capistrano_history['last_branch']}]: ")
|
45
|
-
set :branch, @capistrano_history['last_branch'] if fetch(:branch) == ""
|
46
|
-
@capistrano_history['last_branch'] = fetch(:branch)
|
47
|
-
|
48
|
-
save_history
|
49
|
-
|
50
|
-
# tasks
|
51
|
-
namespace :deploy do
|
52
|
-
task :start, :roles => :app do
|
53
|
-
run "touch #{current_path}/tmp/restart.txt"
|
54
|
-
end
|
55
|
-
|
56
|
-
task :stop, :roles => :app do
|
57
|
-
# Do nothing.
|
58
|
-
end
|
59
|
-
|
60
|
-
desc "Restart Application"
|
61
|
-
task :restart, :roles => :app do
|
62
|
-
run "touch #{current_path}/tmp/restart.txt"
|
63
|
-
end
|
64
|
-
|
65
|
-
desc "Symlink shared resources on each release"
|
66
|
-
task :symlink_shared, :roles => :app do
|
67
|
-
run "ln -nfs #{shared_path}/config/database.yml #{release_path}/config/database.yml"
|
68
|
-
run "ln -nfs #{shared_path}/config/initializers/secret_token.rb #{release_path}/config/initializers/secret_token.rb"
|
69
|
-
end
|
70
|
-
end
|
71
|
-
|
72
|
-
after 'deploy:update_code', 'deploy:symlink_shared'
|