capistrano-exfel 0.0.18 → 0.0.19

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2239cc98b74cd76785e83ceebe56d8de007fd0f1
4
- data.tar.gz: 3db9e5a1b2423b624d61c36adac4d004bd3e5f26
3
+ metadata.gz: 1e05fc30c23e3b5887d237eee700b30aaf05b3df
4
+ data.tar.gz: c30c3a2a8e7882ce35d998f1c0c6b5b0cfbd3712
5
5
  SHA512:
6
- metadata.gz: bf154b2a1f39069b0266340b8501acf59467099ef3abc77b1f8da053a20c4b7f3bca1b059fb32c6287d9977ff7145a5612576e4c9977997e78a31ea366fdbb9a
7
- data.tar.gz: 72f7d76b5913c3980eddb537cb12d484f0de12d63c67a4d827da592568f6481462786dd821a5bd1e9f05f6465d5e9848be91c40cc02a2dd65e5acb46fad32761
6
+ metadata.gz: 144dc9cb9c832f44c9cb10c6c6b2dedf8a379526888fe13575b68199cdcb232c3d33fa705db240c16475915605f0a06e3f35a4020bda114ae74c2152ea413f61
7
+ data.tar.gz: 5b1400e2d26793fb821e80b0a457bb3f9f4031900e3ffccd33437be00ea0af6b4cb50d838eb4e05c9bfed2a80ab3ad71488d2e92d517fb5a1b1fa633df216b94
data/Gemfile CHANGED
@@ -4,4 +4,4 @@ source 'https://rubygems.org'
4
4
  gemspec
5
5
 
6
6
  # Use Rubocop to validate ruby code syntax
7
- gem 'rubocop', '0.48.0', require: false, group: :development
7
+ gem 'rubocop', '0.49.1', require: false, group: :development
data/README.md CHANGED
@@ -12,7 +12,7 @@ Add these lines to your application's Gemfile:
12
12
  gem 'capistrano', '~> 3.4.0'
13
13
  gem 'capistrano-rails', '~> 1.1.2'
14
14
  gem 'capistrano-rvm', '~> 0.1.2'
15
- gem 'capistrano-exfel', '~> 0.0.18'
15
+ gem 'capistrano-exfel', '~> 0.0.19'
16
16
 
17
17
 
18
18
  And then execute:
@@ -7,11 +7,11 @@ require 'capistrano/exfel/version'
7
7
  Gem::Specification.new do |spec|
8
8
  spec.name = 'capistrano-exfel'
9
9
  spec.version = Capistrano::Exfel::VERSION
10
- spec.authors = ['Luis Maia']
11
- spec.email = ['luisgoncalo.maia@gmail.com']
10
+ spec.authors = ['Luis Maia', 'Maurizio Manetti']
11
+ spec.email = %w[luisgoncalo.maia@gmail.com maurizio.manetti@xfel.eu]
12
12
  spec.summary = 'Deploy Ruby on Rails 4 Applications in EXFEL Virtual Machines'
13
- spec.description = 'Deployment of Ruby on Rails 4 Applications in EXFEL Virtual Machines ' \
14
- '(Scientific Linux + Apache + RVM + Phusion Passenger) using Capistrano3 and Kerberos'
13
+ spec.description = 'Deployment of Ruby on Rails Applications in EXFEL Virtual Machines ' \
14
+ '(Scientific Linux / CentOS 7 + Apache + RVM + Phusion Passenger) using Capistrano3 and LDAP'
15
15
  spec.homepage = ''
16
16
  spec.license = 'MIT'
17
17
 
@@ -7,20 +7,13 @@ require 'capistrano/deploy'
7
7
  # Includes tasks from other gems included in your Gemfile
8
8
  require 'capistrano/rvm'
9
9
 
10
- case fetch(:rails_env).to_s
11
- when 'production', 'test'
12
- # We're going to use the full capistrano/rails since
13
- # it includes the asset compilation, DB migrations and bundler
14
- require 'capistrano/rails'
15
- else # when 'development'
16
- # we avoid asset precompilation in dev environment
17
- require 'capistrano/bundler'
18
- require 'capistrano/rails/migrations'
19
- end
10
+ # Includes tasks for rails
11
+ require 'capistrano/rails'
20
12
 
21
13
  load File.expand_path('../../tasks/apache.rake', __FILE__)
22
14
  load File.expand_path('../../tasks/apache_co7.rake', __FILE__)
23
15
  load File.expand_path('../../tasks/app_home.rake', __FILE__)
16
+ load File.expand_path('../../tasks/assets.rake', __FILE__)
24
17
  load File.expand_path('../../tasks/application.rake', __FILE__)
25
18
  load File.expand_path('../../tasks/database.rake', __FILE__)
26
19
  load File.expand_path('../../tasks/secrets.rake', __FILE__)
@@ -7,20 +7,13 @@ require 'capistrano/deploy'
7
7
  # Includes tasks from other gems included in your Gemfile
8
8
  require 'capistrano/rvm'
9
9
 
10
- case fetch(:rails_env).to_s
11
- when 'production', 'test'
12
- # We're going to use the full capistrano/rails since
13
- # it includes the asset compilation, DB migrations and bundler
14
- require 'capistrano/rails'
15
- else # when 'development'
16
- # we avoid asset precompilation in dev environment
17
- require 'capistrano/bundler'
18
- require 'capistrano/rails/migrations'
19
- end
10
+ # Includes tasks for rails
11
+ require 'capistrano/rails'
20
12
 
21
13
  load File.expand_path('../../tasks/apache.rake', __FILE__)
22
14
  load File.expand_path('../../tasks/apache_sl6.rake', __FILE__)
23
15
  load File.expand_path('../../tasks/app_home.rake', __FILE__)
16
+ load File.expand_path('../../tasks/assets.rake', __FILE__)
24
17
  load File.expand_path('../../tasks/application.rake', __FILE__)
25
18
  load File.expand_path('../../tasks/database.rake', __FILE__)
26
19
  load File.expand_path('../../tasks/secrets.rake', __FILE__)
@@ -1,6 +1,6 @@
1
1
  module Capistrano
2
2
  # Capistrano::Exfel version information
3
3
  module Exfel
4
- VERSION = '0.0.18'.freeze
4
+ VERSION = '0.0.19'.freeze
5
5
  end
6
6
  end
@@ -77,7 +77,7 @@ defaults: &defaults
77
77
  # 2) It's API and SECRET (or TITLE) is not Blank
78
78
  #
79
79
  # active_providers: ['kerberos', 'twitter', 'google_oauth2', 'linkedin', 'facebook', 'github']
80
- active_providers: ['kerberos']
80
+ active_providers: ['ldap']
81
81
  #
82
82
  twitter_app_id: ""
83
83
  twitter_app_secret: ""
@@ -90,6 +90,17 @@ defaults: &defaults
90
90
  github_app_id: ""
91
91
  github_app_secret: ""
92
92
  kerberos_title: 'XFEL'
93
+ ldap_title: 'European-XFEL (LDAP)'
94
+ ldap:
95
+ host: 'it-ldap-slave.desy.de'
96
+ port: 1636
97
+ users_base_dn: 'ou=people,ou=RGY,o=DESY,c=DE'
98
+ groups_base_dn: 'ou=group,ou=RGY,o=DESY,c=DE'
99
+ user_id: 'uid'
100
+ ssl: true
101
+ encryption: # This configuration is only taken into account if 'ssl' is true!
102
+ method: :simple_tls # Default if nil: simple_tls
103
+ tls_options: '' # Default if nil: nil
93
104
 
94
105
  #
95
106
  development:
@@ -42,7 +42,7 @@ namespace :apache do
42
42
 
43
43
  debug '#' * 50
44
44
  debug 'Deactivate unnecessary Apache modules'
45
- %w(00-dav.conf 00-lua.conf 00-proxy.conf 01-cgi.conf).each do |file|
45
+ %w[00-dav.conf 00-lua.conf 00-proxy.conf 01-cgi.conf].each do |file|
46
46
  if remote_file_exists?("/etc/httpd/conf.modules.d/#{file}")
47
47
  execute "#{sudo_cmd} mv /etc/httpd/conf.modules.d/#{file} /etc/httpd/conf.modules.d/#{file}_bck"
48
48
  end
@@ -102,7 +102,7 @@ namespace :apache do
102
102
 
103
103
  else
104
104
  set :num_replacements, 0
105
- %w(On Off EMail).each do |option|
105
+ %w[On Off EMail].each do |option|
106
106
  set :server_signature_option,
107
107
  get_num_occurrences_in_file(fetch(:httpd_conf_file), "ServerSignature #{option}")
108
108
 
@@ -125,7 +125,7 @@ namespace :apache do
125
125
  info 'ServerTokens Prod is already set'
126
126
  else
127
127
  set :num_replacements, 0
128
- %w(Major Minor Minimal Min ProductOnly Prod OS Full).each do |option|
128
+ %w[Major Minor Minimal Min ProductOnly Prod OS Full].each do |option|
129
129
  set :server_token_option, get_num_occurrences_in_file(fetch(:httpd_conf_file), "ServerTokens #{option}")
130
130
 
131
131
  next unless fetch(:server_token_option) == 1
@@ -135,10 +135,10 @@ namespace :load do
135
135
  set :pty, -> { true }
136
136
 
137
137
  # Default value for :linked_files is []
138
- set :linked_files, -> { %w(config/database.yml config/secrets.yml) }
138
+ set :linked_files, -> { %w[config/database.yml config/secrets.yml] }
139
139
 
140
140
  # Default value for linked_dirs is []
141
- set :linked_dirs, -> { %w(log tmp/pids tmp/sockets vendor/bundle public/system) }
141
+ set :linked_dirs, -> { %w[log tmp/pids tmp/sockets vendor/bundle public/system] }
142
142
 
143
143
  # Default value for keep_releases is 5
144
144
  set :keep_releases, -> { 5 }
@@ -163,7 +163,7 @@ namespace :load do
163
163
  # RVM related information
164
164
  set :rvm_type, -> { :system }
165
165
  set :rvm_ruby_version, -> { ask('the Ruby version (i.e. 2.4.0)', '') }
166
- set :rvm_roles, %i(app web)
166
+ set :rvm_roles, %i[app web]
167
167
  # set :rvm_custom_path, '~/.myveryownrvm' # only needed if not detected
168
168
 
169
169
  # Apache related information
@@ -0,0 +1,20 @@
1
+ # avoid asset precompilation in dev environment
2
+
3
+ Rake::Task['deploy:assets:precompile'].clear_actions
4
+ namespace :deploy do
5
+ namespace :assets do
6
+ task :precompile do
7
+ on release_roles(fetch(:assets_roles)) do
8
+ within release_path do
9
+ with rails_env: fetch(:rails_env), rails_groups: fetch(:rails_assets_groups) do
10
+ if %w[production test].include?(fetch(:rails_env).to_s)
11
+ execute :rake, 'assets:precompile'
12
+ else
13
+ info 'Skipping asset pre-compilation in dev environment'
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
@@ -1,5 +1,5 @@
1
1
  def remote_file_exists?(full_path)
2
- 'true' == get_command_output("if [ -e #{full_path} ]; then echo 'true'; fi")
2
+ get_command_output("if [ -e #{full_path} ]; then echo 'true'; fi") == 'true'
3
3
  end
4
4
 
5
5
  def get_num_occurrences_in_file(file_path, string)
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-exfel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.18
4
+ version: 0.0.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luis Maia
8
+ - Maurizio Manetti
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2017-04-27 00:00:00.000000000 Z
12
+ date: 2017-06-24 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: bundler
@@ -38,10 +39,11 @@ dependencies:
38
39
  - - ">"
39
40
  - !ruby/object:Gem::Version
40
41
  version: '10.0'
41
- description: Deployment of Ruby on Rails 4 Applications in EXFEL Virtual Machines
42
- (Scientific Linux + Apache + RVM + Phusion Passenger) using Capistrano3 and Kerberos
42
+ description: Deployment of Ruby on Rails Applications in EXFEL Virtual Machines (Scientific
43
+ Linux / CentOS 7 + Apache + RVM + Phusion Passenger) using Capistrano3 and LDAP
43
44
  email:
44
45
  - luisgoncalo.maia@gmail.com
46
+ - maurizio.manetti@xfel.eu
45
47
  executables: []
46
48
  extensions: []
47
49
  extra_rdoc_files: []
@@ -72,6 +74,7 @@ files:
72
74
  - lib/capistrano/tasks/apache_sl6.rake
73
75
  - lib/capistrano/tasks/app_home.rake
74
76
  - lib/capistrano/tasks/application.rake
77
+ - lib/capistrano/tasks/assets.rake
75
78
  - lib/capistrano/tasks/database.rake
76
79
  - lib/capistrano/tasks/secrets.rake
77
80
  - lib/capistrano/tasks/util.rake
@@ -95,7 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
95
98
  version: '0'
96
99
  requirements: []
97
100
  rubyforge_project:
98
- rubygems_version: 2.6.10
101
+ rubygems_version: 2.6.12
99
102
  signing_key:
100
103
  specification_version: 4
101
104
  summary: Deploy Ruby on Rails 4 Applications in EXFEL Virtual Machines