mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Don't read config.yml anymore
add some heroku support gems and document all the new variables
This commit is contained in:
parent
ebcb2780cd
commit
64830e9cff
4 changed files with 44 additions and 7 deletions
5
Gemfile
5
Gemfile
|
|
@ -8,6 +8,11 @@ end
|
|||
# as web framework
|
||||
gem 'rails', '~> 4.2'
|
||||
|
||||
# enables serving assets in production and setting your logger to standard out
|
||||
# both of which are required to run an application on a twelve-factor provider
|
||||
# like heroku.com
|
||||
gem 'rails_12factor', group: :production
|
||||
|
||||
# respond_to methods have been extracted to the responders gem
|
||||
# http://edgeguides.rubyonrails.org/upgrading_ruby_on_rails.html#responders
|
||||
gem 'responders', '~> 2.0'
|
||||
|
|
|
|||
|
|
@ -372,6 +372,11 @@ GEM
|
|||
railties (~> 4.0)
|
||||
rails-observers (0.1.2)
|
||||
activemodel (~> 4.0)
|
||||
rails_12factor (0.0.3)
|
||||
rails_serve_static_assets
|
||||
rails_stdout_logging
|
||||
rails_serve_static_assets (0.0.4)
|
||||
rails_stdout_logging (0.0.3)
|
||||
railties (4.2.5.2)
|
||||
actionpack (= 4.2.5.2)
|
||||
activesupport (= 4.2.5.2)
|
||||
|
|
@ -581,6 +586,7 @@ DEPENDENCIES
|
|||
rails-assets-waypoints!
|
||||
rails-i18n (~> 4.0.0)
|
||||
rails-observers
|
||||
rails_12factor
|
||||
rdoc-generator-fivefish
|
||||
redcarpet
|
||||
responders (~> 2.0)
|
||||
|
|
|
|||
23
INSTALL.md
23
INSTALL.md
|
|
@ -5,7 +5,26 @@ base operating systems. [Check Google](https://encrypted.google.com/search?hl=en
|
|||
|
||||
For more information about rails and what it can do, see the [rails guides.](http://guides.rubyonrails.org/getting_started.html)
|
||||
|
||||
## Dependency for ImageMagick
|
||||
## Configuring OSEM
|
||||
There are a couple of environment variables you can set to configure OSEM.
|
||||
|
||||
| Variable | Content | Purpose |
|
||||
|---------- |--------- |--------- |
|
||||
| OSEM_NAME | openSUSE Events | The name of your page |
|
||||
| OSEM_HOSTNAME | events.opensuse.org | The host this OSEM instance runs on |
|
||||
| OSEM_EMAIL_ADDRESS | events@opensuse.org | The address OSEM uses for sending mails |
|
||||
| OSEM_ICHAIN_ENABLED | true/false | Enable the usage of [devise_ichain_authenticatable](https://github.com/openSUSE/devise_ichain_authenticatable) |
|
||||
| OSEM_TRANSIFEX_APIKEY | *string* | Use this api key for [transifex](https://www.transifex.com/). See TRANSLATION.md for details. |
|
||||
| OSEM_ERRBIT_HOST | errbit.opensuse.org | The [errbit](https://github.com/errbit/errbit) host to post exceptions to |
|
||||
| OSEM_ERRBIT_APIKEY | *string* | The api key for the errbit host |
|
||||
| OSEM_FACTORY_LINT | *boolean* (true/false) | Setting this to false will disable linting of factories before running spec
|
||||
| OSEM_GOOGLE_KEY/OSEM_GOOGLE_SECRET | *string* | OMNIAUTH Developer Keys/Secrets for GOOGLE
|
||||
| OSEM_FACEBOOK_KEY/OSEM_FACEBOOK_SECRET | *string* | OMNIAUTH Developer Keys/Secrets for Facebook
|
||||
| OSEM_GITHUB_KEY/OSEM_GITHUB_SECRET |*string* | OMNIAUTH Developer Keys/Secrets for GitHub
|
||||
|
||||
## Dependences
|
||||
|
||||
### ImageMagick
|
||||
We use [ImageMagick](http://imagemagick.org/) for image manipulation so it needs to be available in your installation.
|
||||
If you would like to resize exisiting logos in your OSEM installation you can do so by running the following rake task:
|
||||
|
||||
|
|
@ -13,7 +32,7 @@ If you would like to resize exisiting logos in your OSEM installation you can do
|
|||
$ bundle exec rake logo:reprocess
|
||||
```
|
||||
|
||||
## Using openID
|
||||
### openID
|
||||
In order to use [openID](http://openid.net/) logins for your OSEM installation you need to register your application with the providers ([Google](https://code.google.com/apis/console#:access), [GitHub](https://github.com/settings/applications/new) or [Facebook](https://developers.facebook.com/)) and enter their API keys in `config/secrets.yml` file, changing the existing sample values.
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -3,11 +3,18 @@ require File.expand_path('../application', __FILE__)
|
|||
|
||||
# Load the configuration file
|
||||
path = Rails.root.join('config', 'config.yml')
|
||||
begin
|
||||
CONFIG = YAML.load_file(path)[Rails.env]
|
||||
rescue
|
||||
puts "Error while parsing config file #{path}"
|
||||
CONFIG = {}
|
||||
if File.exist?(path)
|
||||
puts "
|
||||
|
||||
WARNING: The OSEM configuration file
|
||||
|
||||
#{path}
|
||||
|
||||
is deprecated. Please use the environment environment variables
|
||||
explained in INSTALL.md instead.
|
||||
|
||||
|
||||
"
|
||||
end
|
||||
|
||||
# Initialize the rails application
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue