mirror of
https://github.com/internetee/registry.git
synced 2025-05-16 09:27:19 +02:00
Merge branch 'master' of github.com:internetee/registry
This commit is contained in:
commit
9cc6fed5f2
15 changed files with 217 additions and 56 deletions
0
.dockerignore
Normal file
0
.dockerignore
Normal file
45
Dockerfile
Normal file
45
Dockerfile
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
# FROM gitlab/registry
|
||||||
|
FROM slimmed
|
||||||
|
MAINTAINER Gitlab <info@gitlab.eu>
|
||||||
|
|
||||||
|
# Initial build
|
||||||
|
# SSH authorized keys setup
|
||||||
|
# ADD ./doc/docker/ssh/authorized_keys /root/.ssh/authorized_keys
|
||||||
|
#
|
||||||
|
# Apache2 setup
|
||||||
|
# ADD ./doc/docker/apache2/ /etc/apache2/sites-enabled
|
||||||
|
|
||||||
|
# Use baseimage-docker's init process.
|
||||||
|
CMD ["/sbin/my_init"]
|
||||||
|
|
||||||
|
# Set correct environment variables.
|
||||||
|
ENV RAILS_ENV production
|
||||||
|
ENV HOME /home/app
|
||||||
|
|
||||||
|
# Registry
|
||||||
|
WORKDIR /home/app/registry
|
||||||
|
ADD . /home/app/registry
|
||||||
|
RUN chown -R app:www-data .; chmod -R 750 .; chmod g+s .; umask 027
|
||||||
|
RUN setuser app ls -la /home/app/registry/vendor/
|
||||||
|
# RUN setuser app ls -la /home/app/registry/vendor/bundle
|
||||||
|
RUN rm /home/app/registry/vendor/bundle -rf
|
||||||
|
RUN setuser app bundle install --deployment
|
||||||
|
RUN setuser app rake assets:precompile
|
||||||
|
|
||||||
|
# Registry test
|
||||||
|
WORKDIR /home/app/registry-test
|
||||||
|
ADD . /home/app/registry-test
|
||||||
|
RUN chown -R app:www-data .; chmod -R 750 .; chmod g+s .; umask 027
|
||||||
|
RUN setuser app bundle install
|
||||||
|
|
||||||
|
# Ports
|
||||||
|
# Registry admin:
|
||||||
|
EXPOSE 80
|
||||||
|
# EPP:
|
||||||
|
EXPOSE 700
|
||||||
|
# Test env what jenkins uses
|
||||||
|
# for debugging only:
|
||||||
|
# EXPOSE 81
|
||||||
|
|
||||||
|
# Clean up when done.
|
||||||
|
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
2
Gemfile
2
Gemfile
|
@ -80,6 +80,7 @@ group :development, :test do
|
||||||
gem 'capybara', '~> 2.4.1'
|
gem 'capybara', '~> 2.4.1'
|
||||||
# For feature testing
|
# For feature testing
|
||||||
# gem 'capybara-webkit', '1.2.0' # Webkit driver didn't work with turbolinks
|
# gem 'capybara-webkit', '1.2.0' # Webkit driver didn't work with turbolinks
|
||||||
|
gem 'phantomjs-binaries', '~> 1.9.2.4'
|
||||||
gem 'phantomjs', '~> 1.9.7.1', require: 'phantomjs/poltergeist'
|
gem 'phantomjs', '~> 1.9.7.1', require: 'phantomjs/poltergeist'
|
||||||
gem 'poltergeist', '~> 1.5.1' # We are using PhantomJS instead
|
gem 'poltergeist', '~> 1.5.1' # We are using PhantomJS instead
|
||||||
|
|
||||||
|
@ -108,3 +109,4 @@ group :development, :test do
|
||||||
# For unique IDs (used by the epp gem)
|
# For unique IDs (used by the epp gem)
|
||||||
gem 'uuidtools', '~> 2.1.4'
|
gem 'uuidtools', '~> 2.1.4'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
52
Gemfile.lock
52
Gemfile.lock
|
@ -29,7 +29,9 @@ GEM
|
||||||
tzinfo (~> 1.1)
|
tzinfo (~> 1.1)
|
||||||
arel (5.0.1.20140414130214)
|
arel (5.0.1.20140414130214)
|
||||||
ast (2.0.0)
|
ast (2.0.0)
|
||||||
bootstrap-sass (3.2.0.1)
|
astrolabe (1.3.0)
|
||||||
|
parser (>= 2.2.0.pre.3, < 3.0)
|
||||||
|
bootstrap-sass (3.2.0.2)
|
||||||
sass (~> 3.2)
|
sass (~> 3.2)
|
||||||
builder (3.2.2)
|
builder (3.2.2)
|
||||||
byebug (2.7.0)
|
byebug (2.7.0)
|
||||||
|
@ -41,17 +43,17 @@ GEM
|
||||||
rack (>= 1.0.0)
|
rack (>= 1.0.0)
|
||||||
rack-test (>= 0.5.4)
|
rack-test (>= 0.5.4)
|
||||||
xpath (~> 2.0)
|
xpath (~> 2.0)
|
||||||
celluloid (0.15.2)
|
celluloid (0.16.0)
|
||||||
timers (~> 1.1.0)
|
timers (~> 4.0.0)
|
||||||
cliver (0.3.2)
|
cliver (0.3.2)
|
||||||
coderay (1.1.0)
|
coderay (1.1.0)
|
||||||
coffee-rails (4.0.1)
|
coffee-rails (4.0.1)
|
||||||
coffee-script (>= 2.2.0)
|
coffee-script (>= 2.2.0)
|
||||||
railties (>= 4.0.0, < 5.0)
|
railties (>= 4.0.0, < 5.0)
|
||||||
coffee-script (2.2.0)
|
coffee-script (2.3.0)
|
||||||
coffee-script-source
|
coffee-script-source
|
||||||
execjs
|
execjs
|
||||||
coffee-script-source (1.7.0)
|
coffee-script-source (1.8.0)
|
||||||
columnize (0.8.9)
|
columnize (0.8.9)
|
||||||
database_cleaner (1.3.0)
|
database_cleaner (1.3.0)
|
||||||
debugger-linecache (1.2.0)
|
debugger-linecache (1.2.0)
|
||||||
|
@ -60,7 +62,7 @@ GEM
|
||||||
hpricot
|
hpricot
|
||||||
libxml-ruby
|
libxml-ruby
|
||||||
erubis (2.7.0)
|
erubis (2.7.0)
|
||||||
execjs (2.2.0)
|
execjs (2.2.1)
|
||||||
fabrication (2.11.3)
|
fabrication (2.11.3)
|
||||||
faker (1.3.0)
|
faker (1.3.0)
|
||||||
i18n (~> 0.5)
|
i18n (~> 0.5)
|
||||||
|
@ -86,13 +88,14 @@ GEM
|
||||||
haml (>= 3.1, < 5.0)
|
haml (>= 3.1, < 5.0)
|
||||||
railties (>= 4.0.1)
|
railties (>= 4.0.1)
|
||||||
hike (1.2.3)
|
hike (1.2.3)
|
||||||
|
hitimes (1.2.2)
|
||||||
hpricot (0.8.6)
|
hpricot (0.8.6)
|
||||||
i18n (0.6.11)
|
i18n (0.6.11)
|
||||||
isikukood (0.1.2)
|
isikukood (0.1.2)
|
||||||
jbuilder (2.1.1)
|
jbuilder (2.1.3)
|
||||||
activesupport (>= 3.0.0, < 5)
|
activesupport (>= 3.0.0, < 5)
|
||||||
multi_json (~> 1.2)
|
multi_json (~> 1.2)
|
||||||
jquery-rails (3.1.0)
|
jquery-rails (3.1.2)
|
||||||
railties (>= 3.0, < 5.0)
|
railties (>= 3.0, < 5.0)
|
||||||
thor (>= 0.14, < 2.0)
|
thor (>= 0.14, < 2.0)
|
||||||
json (1.8.1)
|
json (1.8.1)
|
||||||
|
@ -100,7 +103,7 @@ GEM
|
||||||
actionpack (>= 3.0.0)
|
actionpack (>= 3.0.0)
|
||||||
activesupport (>= 3.0.0)
|
activesupport (>= 3.0.0)
|
||||||
kgio (2.9.2)
|
kgio (2.9.2)
|
||||||
libv8 (3.16.14.3)
|
libv8 (3.16.14.5)
|
||||||
libxml-ruby (2.7.0)
|
libxml-ruby (2.7.0)
|
||||||
listen (2.7.9)
|
listen (2.7.9)
|
||||||
celluloid (>= 0.15.2)
|
celluloid (>= 0.15.2)
|
||||||
|
@ -113,7 +116,7 @@ GEM
|
||||||
method_source (0.8.2)
|
method_source (0.8.2)
|
||||||
mime-types (1.25.1)
|
mime-types (1.25.1)
|
||||||
mini_portile (0.6.0)
|
mini_portile (0.6.0)
|
||||||
minitest (5.4.0)
|
minitest (5.4.1)
|
||||||
multi_json (1.10.1)
|
multi_json (1.10.1)
|
||||||
nokogiri (1.6.2.1)
|
nokogiri (1.6.2.1)
|
||||||
mini_portile (= 0.6.0)
|
mini_portile (= 0.6.0)
|
||||||
|
@ -123,6 +126,8 @@ GEM
|
||||||
slop (~> 3.4, >= 3.4.5)
|
slop (~> 3.4, >= 3.4.5)
|
||||||
pg (0.17.1)
|
pg (0.17.1)
|
||||||
phantomjs (1.9.7.1)
|
phantomjs (1.9.7.1)
|
||||||
|
phantomjs-binaries (1.9.2.4)
|
||||||
|
sys-uname (= 0.9.0)
|
||||||
poltergeist (1.5.1)
|
poltergeist (1.5.1)
|
||||||
capybara (~> 2.1)
|
capybara (~> 2.1)
|
||||||
cliver (~> 0.3.1)
|
cliver (~> 0.3.1)
|
||||||
|
@ -169,7 +174,7 @@ GEM
|
||||||
rb-fsevent (0.9.4)
|
rb-fsevent (0.9.4)
|
||||||
rb-inotify (0.9.5)
|
rb-inotify (0.9.5)
|
||||||
ffi (>= 0.5.0)
|
ffi (>= 0.5.0)
|
||||||
rdoc (4.1.1)
|
rdoc (4.1.2)
|
||||||
json (~> 1.4)
|
json (~> 1.4)
|
||||||
ref (1.0.5)
|
ref (1.0.5)
|
||||||
rspec (3.0.0)
|
rspec (3.0.0)
|
||||||
|
@ -192,7 +197,8 @@ GEM
|
||||||
rspec-mocks (~> 3.0.0)
|
rspec-mocks (~> 3.0.0)
|
||||||
rspec-support (~> 3.0.0)
|
rspec-support (~> 3.0.0)
|
||||||
rspec-support (3.0.4)
|
rspec-support (3.0.4)
|
||||||
rubocop (0.25.0)
|
rubocop (0.26.0)
|
||||||
|
astrolabe (~> 1.3)
|
||||||
parser (>= 2.2.0.pre.4, < 3.0)
|
parser (>= 2.2.0.pre.4, < 3.0)
|
||||||
powerpack (~> 0.0.6)
|
powerpack (~> 0.0.6)
|
||||||
rainbow (>= 1.99.1, < 3.0)
|
rainbow (>= 1.99.1, < 3.0)
|
||||||
|
@ -204,10 +210,10 @@ GEM
|
||||||
sass (~> 3.2.0)
|
sass (~> 3.2.0)
|
||||||
sprockets (~> 2.8, <= 2.11.0)
|
sprockets (~> 2.8, <= 2.11.0)
|
||||||
sprockets-rails (~> 2.0)
|
sprockets-rails (~> 2.0)
|
||||||
sdoc (0.4.0)
|
sdoc (0.4.1)
|
||||||
json (~> 1.8)
|
json (~> 1.7, >= 1.7.7)
|
||||||
rdoc (~> 4.0, < 5.0)
|
rdoc (~> 4.0)
|
||||||
shoulda-matchers (2.6.1)
|
shoulda-matchers (2.6.2)
|
||||||
activesupport (>= 3.0.0)
|
activesupport (>= 3.0.0)
|
||||||
simpleidn (0.0.5)
|
simpleidn (0.0.5)
|
||||||
slop (3.6.0)
|
slop (3.6.0)
|
||||||
|
@ -217,32 +223,35 @@ GEM
|
||||||
multi_json (~> 1.0)
|
multi_json (~> 1.0)
|
||||||
rack (~> 1.0)
|
rack (~> 1.0)
|
||||||
tilt (~> 1.1, != 1.3.0)
|
tilt (~> 1.1, != 1.3.0)
|
||||||
sprockets-rails (2.1.3)
|
sprockets-rails (2.1.4)
|
||||||
actionpack (>= 3.0)
|
actionpack (>= 3.0)
|
||||||
activesupport (>= 3.0)
|
activesupport (>= 3.0)
|
||||||
sprockets (~> 2.8)
|
sprockets (~> 2.8)
|
||||||
|
sys-uname (0.9.0)
|
||||||
|
ffi (>= 1.0.0)
|
||||||
therubyracer (0.12.1)
|
therubyracer (0.12.1)
|
||||||
libv8 (~> 3.16.14.0)
|
libv8 (~> 3.16.14.0)
|
||||||
ref
|
ref
|
||||||
thor (0.19.1)
|
thor (0.19.1)
|
||||||
thread_safe (0.3.4)
|
thread_safe (0.3.4)
|
||||||
tilt (1.4.1)
|
tilt (1.4.1)
|
||||||
timers (1.1.0)
|
timers (4.0.1)
|
||||||
|
hitimes
|
||||||
treetop (1.4.15)
|
treetop (1.4.15)
|
||||||
polyglot
|
polyglot
|
||||||
polyglot (>= 0.3.1)
|
polyglot (>= 0.3.1)
|
||||||
turbolinks (2.2.2)
|
turbolinks (2.3.0)
|
||||||
coffee-rails
|
coffee-rails
|
||||||
tzinfo (1.2.2)
|
tzinfo (1.2.2)
|
||||||
thread_safe (~> 0.1)
|
thread_safe (~> 0.1)
|
||||||
uglifier (2.5.1)
|
uglifier (2.5.3)
|
||||||
execjs (>= 0.3.0)
|
execjs (>= 0.3.0)
|
||||||
json (>= 1.8.0)
|
json (>= 1.8.0)
|
||||||
unicorn (4.8.3)
|
unicorn (4.8.3)
|
||||||
kgio (~> 2.6)
|
kgio (~> 2.6)
|
||||||
rack
|
rack
|
||||||
raindrops (~> 0.7)
|
raindrops (~> 0.7)
|
||||||
uuidtools (2.1.4)
|
uuidtools (2.1.5)
|
||||||
websocket-driver (0.3.4)
|
websocket-driver (0.3.4)
|
||||||
xpath (2.0.0)
|
xpath (2.0.0)
|
||||||
nokogiri (~> 1.3)
|
nokogiri (~> 1.3)
|
||||||
|
@ -270,6 +279,7 @@ DEPENDENCIES
|
||||||
nprogress-rails (~> 0.1.3.1)
|
nprogress-rails (~> 0.1.3.1)
|
||||||
pg
|
pg
|
||||||
phantomjs (~> 1.9.7.1)
|
phantomjs (~> 1.9.7.1)
|
||||||
|
phantomjs-binaries (~> 1.9.2.4)
|
||||||
poltergeist (~> 1.5.1)
|
poltergeist (~> 1.5.1)
|
||||||
pry (~> 0.10.1)
|
pry (~> 0.10.1)
|
||||||
pry-byebug (~> 1.3.3)
|
pry-byebug (~> 1.3.3)
|
||||||
|
|
|
@ -13,7 +13,7 @@ require 'sprockets/railtie'
|
||||||
# you've limited to :test, :development, or :production.
|
# you've limited to :test, :development, or :production.
|
||||||
Bundler.require(*Rails.groups)
|
Bundler.require(*Rails.groups)
|
||||||
|
|
||||||
module Internetee
|
module Registry
|
||||||
class Application < Rails::Application
|
class Application < Rails::Application
|
||||||
# Settings in config/environments/* take precedence over those specified here.
|
# Settings in config/environments/* take precedence over those specified here.
|
||||||
# Application configuration should go into files in config/initializers
|
# Application configuration should go into files in config/initializers
|
||||||
|
|
|
@ -3,13 +3,17 @@ default: &default
|
||||||
adapter: postgresql
|
adapter: postgresql
|
||||||
encoding: unicode
|
encoding: unicode
|
||||||
pool: 5
|
pool: 5
|
||||||
username: internetee
|
username: registry
|
||||||
password: internetee_pwd
|
password: registry_pwd
|
||||||
|
|
||||||
development:
|
development:
|
||||||
<<: *default
|
<<: *default
|
||||||
database: internetee_development
|
database: registry_development
|
||||||
|
|
||||||
test:
|
test:
|
||||||
<<: *default
|
<<: *default
|
||||||
database: internetee_test
|
database: registry_test
|
||||||
|
|
||||||
|
production:
|
||||||
|
<<: *default
|
||||||
|
database: registry_production
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Internetee::Application.config.autoload_paths += %W(#{Internetee::Application.config.root}/app/validators/)
|
Registry::Application.config.autoload_paths += %W(#{Registry::Application.config.root}/app/validators/)
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
# Be sure to restart your server when you modify this file.
|
# Be sure to restart your server when you modify this file.
|
||||||
|
|
||||||
Rails.application.config.session_store :cookie_store, key: '_internetee_session'
|
Rails.application.config.session_store :cookie_store, key: '_registry_session'
|
||||||
|
|
|
@ -5,4 +5,4 @@ test:
|
||||||
secret_key_base: generate-your-secret-key-by-rake-secret
|
secret_key_base: generate-your-secret-key-by-rake-secret
|
||||||
|
|
||||||
production:
|
production:
|
||||||
secret_key_base:
|
secret_key_base: please-change
|
||||||
|
|
18
doc/docker/apache2/epp-tester.conf
Normal file
18
doc/docker/apache2/epp-tester.conf
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
Listen 8888
|
||||||
|
<VirtualHost *:8888>
|
||||||
|
ServerName registry.gitlab.eu
|
||||||
|
ServerAdmin info@gitlab.eu
|
||||||
|
|
||||||
|
PassengerEnabled on
|
||||||
|
RailsEnv production
|
||||||
|
DocumentRoot /home/app/epp-tester/public
|
||||||
|
|
||||||
|
ErrorLog /var/log/apache2/epp-tester.error.log
|
||||||
|
LogLevel info ssl:warn
|
||||||
|
CustomLog /var/log/apache2/epp-tester.access.log combined
|
||||||
|
|
||||||
|
<Directory /home/app/epp-tester/public>
|
||||||
|
Require all granted
|
||||||
|
Options -MultiViews
|
||||||
|
</Directory>
|
||||||
|
</VirtualHost>
|
21
doc/docker/apache2/epp.conf
Normal file
21
doc/docker/apache2/epp.conf
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
<IfModule mod_epp.c>
|
||||||
|
Listen 700
|
||||||
|
<VirtualHost *:700>
|
||||||
|
SSLEngine on
|
||||||
|
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
|
||||||
|
SSLCertificateFile /etc/apache2/ssl/apache.crt
|
||||||
|
SSLCertificateKeyFile /etc/apache2/ssl/apache.key
|
||||||
|
|
||||||
|
SSLVerifyClient optional_no_ca
|
||||||
|
|
||||||
|
EPPEngine On
|
||||||
|
EPPCommandRoot /proxy/command
|
||||||
|
EPPSessionRoot /proxy/session
|
||||||
|
EPPErrorRoot /proxy/error
|
||||||
|
|
||||||
|
ProxyPass /proxy/ http://localhost:80/epp/
|
||||||
|
|
||||||
|
EPPAuthURI implicit
|
||||||
|
EPPReturncodeHeader X-EPP-Returncode
|
||||||
|
</VirtualHost>
|
||||||
|
</IfModule>
|
39
doc/docker/apache2/registry-test.conf
Normal file
39
doc/docker/apache2/registry-test.conf
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
Listen 81
|
||||||
|
<VirtualHost *:81>
|
||||||
|
ServerAdmin info@gitlab.eu
|
||||||
|
|
||||||
|
PassengerEnabled on
|
||||||
|
RailsEnv test
|
||||||
|
DocumentRoot /home/app/registry-test/public
|
||||||
|
|
||||||
|
ErrorLog /var/log/apache2/registry-test.error.log
|
||||||
|
LogLevel info ssl:warn
|
||||||
|
CustomLog /var/log/apache2/registry-test.access.log combined
|
||||||
|
|
||||||
|
<Directory /home/app/registry-test/public>
|
||||||
|
Require all granted
|
||||||
|
Options -MultiViews
|
||||||
|
</Directory>
|
||||||
|
</VirtualHost>
|
||||||
|
|
||||||
|
<IfModule mod_epp.c>
|
||||||
|
Listen 701
|
||||||
|
<VirtualHost *:701>
|
||||||
|
SSLEngine on
|
||||||
|
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
|
||||||
|
SSLCertificateFile /etc/apache2/ssl/apache.crt
|
||||||
|
SSLCertificateKeyFile /etc/apache2/ssl/apache.key
|
||||||
|
|
||||||
|
SSLVerifyClient optional_no_ca
|
||||||
|
|
||||||
|
EPPEngine On
|
||||||
|
EPPCommandRoot /proxy/command
|
||||||
|
EPPSessionRoot /proxy/session
|
||||||
|
EPPErrorRoot /proxy/error
|
||||||
|
|
||||||
|
ProxyPass /proxy/ http://localhost:81/epp/
|
||||||
|
|
||||||
|
EPPAuthURI implicit
|
||||||
|
EPPReturncodeHeader X-EPP-Returncode
|
||||||
|
</VirtualHost>
|
||||||
|
</IfModule>
|
17
doc/docker/apache2/registry.conf
Normal file
17
doc/docker/apache2/registry.conf
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
<VirtualHost *:80>
|
||||||
|
ServerName registry.gitlab.eu
|
||||||
|
ServerAdmin info@gitlab.eu
|
||||||
|
|
||||||
|
PassengerEnabled on
|
||||||
|
RailsEnv production
|
||||||
|
DocumentRoot /home/app/registry/public
|
||||||
|
|
||||||
|
ErrorLog /var/log/apache2/registry.error.log
|
||||||
|
LogLevel info ssl:warn
|
||||||
|
CustomLog /var/log/apache2/registry.access.log combined
|
||||||
|
|
||||||
|
<Directory /home/app/registry/public>
|
||||||
|
Require all granted
|
||||||
|
Options -MultiViews
|
||||||
|
</Directory>
|
||||||
|
</VirtualHost>
|
3
doc/docker/ssh/authorized_keys
Executable file
3
doc/docker/ssh/authorized_keys
Executable file
|
@ -0,0 +1,3 @@
|
||||||
|
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAz+n4Sln0oxme+9hyrgPud9k0C00Nm0T2YufHcQUAdtJssCfeKp2qo/gy0LmOXTB8efyavFn4NW2GZs8gxJ0BV5GoHLmnERAWDOi/wg3KLl4r/ei+HQX6Po/V7WOMHWzKPSSGtqW7cZc1g0y2ci571ZUmgEBoGoGPfoQToGEn2yV4hQmHIjbwtfNNCHx/i12DCoJnD+3cIvhHf4FbZRBW9Wu0I24iqLcxLOAwGWVsnzi0OqN+rj3DenPQfjcPhSsmTu+8mn2AIwMxWeLZSslEYfyBeo9dLBntj3dnxWpw/MJEfMmWgWKGqMaVGB731ZWDOrRrzgl5+s24YBv9LyYWyQ==
|
||||||
|
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDXF8qkkQg8We6c2eCRQTuQUAffuDcYijlnVNAH0V7eUMxKC/9aPIhHaM9JVY4exXDVEQOK0+KsF6twTtewK8XBFfHXcOV3k+11KOJ1LsfphQIbwS9Qufw2maxCWJHxQwKGViGLqePuecQhfQ3UAVXZ1ZO7qGrLB9JBlRimbItJsG3F2o1T7pJAMucf+zCv5KmMeeddDyhAg2ufQHnuPKIMAgr4XH/TD4mg5tqORXCdk/2apuqUz35WqAyRNt/J66bTJOJ39QJv50cyT6/Bb74MNfJSejsM5EUnKF4Nq7edR8F8tlnXmL/wvvVs81oHywCnMqP8eEISLumy1nhNpgbn martin@gitlab.eu
|
||||||
|
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC13V94raEKiCzg4sACsIFxiHPcRSUryUHxXpcyHMi7OJvTtszOPR3hZnB36c0NxnznD0t3rH2n5vIX+tBmX+JND7bvM+YKgTGcGN+HvS08nSsvwHLie/UAHkWy/4xFvyKnq8MIZtYxkPdIGph6hFMr5LljJu05V08hZF09HutBsjXw5wmZRUJoD/Jl0FO/pf6WxH1VHjhz0kGuM8VREU2SC8uzV1AIZ86zsaxJld1m0doyt+arnJkPYgjXHHpu/IWzIHYjbVo5W8JmYagDCYxaPHN7EesHAEzFi1LDtq1aIrqWrczKaJGSryxSba6pnYiK69MTojF/SAXMsJ1u5q1P andres.kesk@gmail.com
|
|
@ -1,35 +1,37 @@
|
||||||
require 'rspec/core/rake_task'
|
if Rails.env.test?
|
||||||
require 'open3'
|
require 'rspec/core/rake_task'
|
||||||
|
require 'open3'
|
||||||
|
|
||||||
desc 'Run all specs against server'
|
desc 'Run all specs against server'
|
||||||
task 'test' do
|
task 'test' do
|
||||||
test_against_server { Rake::Task['spec'].invoke }
|
test_against_server { Rake::Task['spec'].invoke }
|
||||||
end
|
end
|
||||||
|
|
||||||
desc 'Run EPP specs against server'
|
desc 'Run EPP specs against server'
|
||||||
task 'test:epp' do
|
task 'test:epp' do
|
||||||
test_against_server { Rake::Task['spec:epp'].invoke }
|
test_against_server { Rake::Task['spec:epp'].invoke }
|
||||||
end
|
end
|
||||||
|
|
||||||
desc 'Run all but EPP specs'
|
desc 'Run all but EPP specs'
|
||||||
RSpec::Core::RakeTask.new('test:other') do |t|
|
RSpec::Core::RakeTask.new('test:other') do |t|
|
||||||
t.rspec_opts = '--tag ~epp'
|
t.rspec_opts = '--tag ~epp'
|
||||||
end
|
end
|
||||||
|
|
||||||
desc 'Run all but EPP specs'
|
desc 'Run all but EPP specs'
|
||||||
RSpec::Core::RakeTask.new('test:all_but_features') do |t|
|
RSpec::Core::RakeTask.new('test:all_but_features') do |t|
|
||||||
t.rspec_opts = '--tag ~feature'
|
t.rspec_opts = '--tag ~feature'
|
||||||
end
|
end
|
||||||
|
|
||||||
Rake::Task[:default].prerequisites.clear
|
Rake::Task[:default].prerequisites.clear
|
||||||
task default: :test
|
task default: :test
|
||||||
|
|
||||||
def test_against_server
|
def test_against_server
|
||||||
stdin, stdout, stderr, wait_thr = Open3.popen3('unicorn -E test -p 8989')
|
stdin, stdout, stderr, wait_thr = Open3.popen3('unicorn -E test -p 8989')
|
||||||
pid = wait_thr.pid
|
pid = wait_thr.pid
|
||||||
begin
|
begin
|
||||||
yield
|
yield
|
||||||
ensure
|
ensure
|
||||||
`kill #{pid}`
|
`kill #{pid}`
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue