Merge branch 'master' of bitbucket.org:signum/debshots
Conflicts: README.Developer app/views/packages/details.slim bin/get-data-from-old-live-server.sh
This commit is contained in:
commit
4abfb29599
10 changed files with 63 additions and 12 deletions
2
Gemfile
2
Gemfile
|
|
@ -43,7 +43,7 @@ end
|
||||||
# gem 'capistrano', group: :development
|
# gem 'capistrano', group: :development
|
||||||
|
|
||||||
# Use debugger
|
# Use debugger
|
||||||
# gem 'debugger', group: [:development, :test]
|
gem 'debugger', group: [:development, :test]
|
||||||
|
|
||||||
# PostgreSQL support
|
# PostgreSQL support
|
||||||
gem 'pg'
|
gem 'pg'
|
||||||
|
|
|
||||||
|
|
@ -72,6 +72,12 @@ GEM
|
||||||
jquery-cookie-rails
|
jquery-cookie-rails
|
||||||
jquery-rails
|
jquery-rails
|
||||||
debug_inspector (0.0.2)
|
debug_inspector (0.0.2)
|
||||||
|
debugger (1.6.8)
|
||||||
|
columnize (>= 0.3.1)
|
||||||
|
debugger-linecache (~> 1.2.0)
|
||||||
|
debugger-ruby_core_source (~> 1.3.5)
|
||||||
|
debugger-linecache (1.2.0)
|
||||||
|
debugger-ruby_core_source (1.3.8)
|
||||||
erubis (2.7.0)
|
erubis (2.7.0)
|
||||||
execjs (2.5.2)
|
execjs (2.5.2)
|
||||||
fancybox2-rails (0.2.8)
|
fancybox2-rails (0.2.8)
|
||||||
|
|
@ -250,6 +256,7 @@ DEPENDENCIES
|
||||||
bzip2-ruby!
|
bzip2-ruby!
|
||||||
coffee-rails (~> 4.1.0)
|
coffee-rails (~> 4.1.0)
|
||||||
cookies_eu
|
cookies_eu
|
||||||
|
debugger
|
||||||
fancybox2-rails (~> 0.2.8)
|
fancybox2-rails (~> 0.2.8)
|
||||||
foundation-rails
|
foundation-rails
|
||||||
guard-minitest
|
guard-minitest
|
||||||
|
|
|
||||||
|
|
@ -82,4 +82,41 @@ properly unless the separate model validation is in place.
|
||||||
|
|
||||||
Deployment
|
Deployment
|
||||||
----------
|
----------
|
||||||
sudo apt-get install libyaml-dev libbz2-dev
|
To prepare your computer to run Debshots 2.x either for development
|
||||||
|
or production you need to…
|
||||||
|
|
||||||
|
- unpack the project onto your disk somewhere
|
||||||
|
- install Ruby 2.0.0 via rvm (see http://rvm.io/)
|
||||||
|
- install the library header packages so that the required Ruby gems
|
||||||
|
can be compiled:
|
||||||
|
sudo apt-get install libbz2-dev libpq-dev libyaml-dev
|
||||||
|
- install a PostgreSQL database:
|
||||||
|
sudo apt-get install postgresql
|
||||||
|
- edit the PostgreSQL authentication configuration at
|
||||||
|
/etc/postgres/.../pg_hba.conf to allow password-based logins
|
||||||
|
from localhost. Change the line starting with *local* to read:
|
||||||
|
local all all md5
|
||||||
|
- create a user and databases
|
||||||
|
- sudo su - postgres
|
||||||
|
- createuser -s -P debshots
|
||||||
|
- createdb debshots
|
||||||
|
- for development only:
|
||||||
|
- sudo su - postgres
|
||||||
|
- createdb debshots_dev
|
||||||
|
- migrate the data from the Debshots 1.x based production server:
|
||||||
|
- bin/get-data-from-old-live-server.sh
|
||||||
|
- install all Ruby gems required to run the application:
|
||||||
|
- gem install bundle
|
||||||
|
- bundler
|
||||||
|
- run database migrations for development
|
||||||
|
- RAILS_ENV=development rake db:migrate
|
||||||
|
- import long description information for the packages into development database
|
||||||
|
- RAILS_ENV=development rake debshots:update_longdescription_from_deb_repos
|
||||||
|
- run database migrations for production
|
||||||
|
- RAILS_ENV=production rake db:migrate
|
||||||
|
- RAILS_ENV=production rake debshots:update_longdescription_from_deb_repos
|
||||||
|
- import long description information for the packages into production database
|
||||||
|
- prepare the static assets (CSS, JS) for production
|
||||||
|
- RAILS_ENV=production rake assets:precompile
|
||||||
|
- run the production web server
|
||||||
|
- RAILS_ENV=production rails s
|
||||||
|
|
|
||||||
|
|
@ -151,7 +151,7 @@ html, body {
|
||||||
|
|
||||||
img
|
img
|
||||||
{
|
{
|
||||||
box-shadow: 0 0 10px 0px #888888;
|
filter: drop-shadow( 0px 0px 5px #888888 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ class Screenshot < ActiveRecord::Base
|
||||||
|
|
||||||
# Return Debshots 1.x path to allow migration of images into Paperclip filesystem schema
|
# Return Debshots 1.x path to allow migration of images into Paperclip filesystem schema
|
||||||
def image_url(size)
|
def image_url(size)
|
||||||
'#{Rails.configuration.images_path_prefix}/#{self.package.name[0]}/#{self.package.name}/#{self.id}_#{size}.png'
|
"#{Rails.configuration.images_path_prefix}/#{self.package.name[0]}/#{self.package.name}/#{self.id}_#{size}.png"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,8 @@ html
|
||||||
body
|
body
|
||||||
// TODO: move topbar somewhere else than packages
|
// TODO: move topbar somewhere else than packages
|
||||||
= render 'layouts/topbar'
|
= render 'layouts/topbar'
|
||||||
|
#messages
|
||||||
|
= render 'layouts/messages'
|
||||||
#content
|
#content
|
||||||
= yield
|
= yield
|
||||||
= render 'layouts/footer'
|
= render 'layouts/footer'
|
||||||
|
|
|
||||||
|
|
@ -19,13 +19,13 @@
|
||||||
onclick="return confirm('Really delete the screenshot?');"
|
onclick="return confirm('Really delete the screenshot?');"
|
||||||
] Delete screenshot
|
] Delete screenshot
|
||||||
- else
|
- else
|
||||||
img src='/images/dummy/no-screenshots-available.svg' width='100%'
|
.row.listview
|
||||||
|
img src='/images/dummy/no-screenshots-available.svg' width='100%'
|
||||||
|
|
||||||
// TODO: Enable comments in a later version
|
// TODO: Enable comments in a later version
|
||||||
// = partial '/package/comments'
|
// = partial '/package/comments'
|
||||||
|
|
||||||
.small-5.medium-5.columns
|
.small-5.medium-5.columns
|
||||||
= render 'layouts/messages'
|
|
||||||
.bigpanel
|
.bigpanel
|
||||||
p.subtitle Details
|
p.subtitle Details
|
||||||
// TODO: split long_description by <p> tags
|
// TODO: split long_description by <p> tags
|
||||||
|
|
|
||||||
|
|
@ -101,8 +101,7 @@
|
||||||
p
|
p
|
||||||
' Whether you are a developer or not - we appreciate if you upload screenshots.
|
' Whether you are a developer or not - we appreciate if you upload screenshots.
|
||||||
' See if your favorite package does not yet have a screenshot and
|
' See if your favorite package does not yet have a screenshot and
|
||||||
a href=upload_package_path upload one
|
' upload one.
|
||||||
' .
|
|
||||||
|
|
||||||
h2 Statistics
|
h2 Statistics
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,13 +15,19 @@ rsync -v root@screenshots.debian.net:/home/debshots/debshots.sql /tmp
|
||||||
echo Dropping existing database
|
echo Dropping existing database
|
||||||
set +e
|
set +e
|
||||||
psql -h $DB_HOST postgres debshots -c 'drop database debshots'
|
psql -h $DB_HOST postgres debshots -c 'drop database debshots'
|
||||||
|
psql -h $DB_HOST postgres debshots -c 'drop database debshots_dev'
|
||||||
|
psql -h $DB_HOST postgres debshots -c 'drop database debshots_test'
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
echo Creating new database
|
echo Creating new database
|
||||||
psql -h $DB_HOST postgres debshots -c 'create database debshots owner debshots'
|
psql -h $DB_HOST postgres debshots -c 'create database debshots owner debshots'
|
||||||
|
psql -h $DB_HOST postgres debshots -c 'create database debshots_dev owner debshots'
|
||||||
|
psql -h $DB_HOST postgres debshots -c 'create database debshots_test owner debshots'
|
||||||
|
|
||||||
echo Restoring PostgreSQL dump
|
echo Restoring PostgreSQL dump
|
||||||
psql -h $DB_HOST debshots debshots < /tmp/debshots.sql
|
psql -h $DB_HOST debshots debshots < /tmp/debshots.sql
|
||||||
|
psql -h $DB_HOST debshots_dev debshots < /tmp/debshots.sql
|
||||||
|
psql -h $DB_HOST debshots_test debshots < /tmp/debshots.sql
|
||||||
|
|
||||||
echo Unpacking screenshots tarball
|
echo Unpacking screenshots tarball
|
||||||
#cd ../public
|
#cd ../public
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,8 @@ development:
|
||||||
adapter: postgresql
|
adapter: postgresql
|
||||||
database: debshots_dev
|
database: debshots_dev
|
||||||
username: debshots
|
username: debshots
|
||||||
password: GonwannEn0
|
password: shootme
|
||||||
host: localhost
|
host: torf
|
||||||
pool: 5
|
pool: 5
|
||||||
timeout: 5000
|
timeout: 5000
|
||||||
|
|
||||||
|
|
@ -21,8 +21,8 @@ test:
|
||||||
adapter: postgresql
|
adapter: postgresql
|
||||||
database: debshots_test
|
database: debshots_test
|
||||||
username: debshots
|
username: debshots
|
||||||
password: GonwannEn0
|
password: shootme
|
||||||
host: localhost
|
host: torf
|
||||||
pool: 5
|
pool: 5
|
||||||
timeout: 5000
|
timeout: 5000
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue