Commit graph

59 commits

Author SHA1 Message Date
Henne Vogelsang
04b45adbe5
Merge pull request #3096 from AndrewKvalheim/api-urls
Add URLs to API responses
2023-04-19 13:26:44 +02:00
Henne Vogelsang
21ce273520
Introduces lograge
for more terse logging
2023-04-11 13:49:22 +02:00
Andrew Kvalheim
5b89f64eaf Set default URL host
Setting the default host resolves:

    Missing host to link to! Please provide the :host parameter, set
    default_url_options[:host], or set :only_path to true

Configuring RSpec to use the default host resolves:

    Expected response to be a redirect to <http://test.host/…>
    but was a redirect to <http://localhost/…>.
2023-02-28 11:06:24 -08:00
Henne Vogelsang
14ca3b761a
Return the rest of the dropped production env
Lost during the rails 7 update in 10c6edcf8c
2022-05-23 13:08:25 +02:00
Sasi Olin
a95b151a50
Set the default values for env 2022-05-20 15:13:41 +02:00
Sasi Olin
ac0459e8a7
Use env.fetch instead of env 2022-05-20 14:58:10 +02:00
Sasi Olin
3980125872
Return the missing mailer setup 2022-05-20 14:53:43 +02:00
Henne Vogelsang
36b23ce25d
Make use of ENV.fetch 2022-05-06 14:53:57 +02:00
Henne Vogelsang
10c6edcf8c
Update to Rails 7 2022-02-22 19:22:25 +01:00
Henne Vogelsang
66e61190a5
Fix force_ssl environment handling
Fixes docker production example.
2021-11-09 22:59:48 +01:00
Henne Vogelsang
7c1d3ce1c4
Run rails upgrade task
next bundle exec rails app:update
2021-08-18 15:36:54 +02:00
Andrew Kvalheim
266fdbabea
Omit nil SMTP settings
Allows leaving `smtp_settings[:domain]` unspecified. Explicitly setting
it to `nil` (as when `OSEM_SMTP_DOMAIN` is unset) overrides the default
value of `'localhost.localdomain'` and caused SMTP connections to fail
with `EOFError`.
2021-03-06 21:10:36 +01:00
Espartaco Palma
2d17ce2667
Using Native ActiveRecord Logger
Starting in Rails 5.2 there's a new setting to log ActiveRecord
queries making the LogQuerySource not needed anymore
2021-03-06 19:03:47 +01:00
Henne Vogelsang
7b56370e90
Disable X-Sendfile default
There are people deploying this in heroku, on nginx, standalone etc. etc.
Do not set web server specific defaults in the code...
2019-03-22 11:29:25 +01:00
Henne Vogelsang
959d5af1e4
Drop rails_12factor gem
Use the proposed rails 5 environment variables instead.
2019-03-11 17:42:54 +01:00
Ana María Martínez Gómez
0aa49e9c64 Get rid of vagrant
We are using Docker now instead.

Closes https://github.com/openSUSE/osem/issues/1213
2019-02-26 16:30:56 +01:00
Henne Vogelsang
4bf0c02763 Use our env naming convention for memcached
Also do not set memore_store in the production environment if
there is no memcached. File based cache is default for a reason,
it even works for most normal traffic pages
2019-02-16 01:00:22 +01:00
James Mason
43bef689fc Rubocop autocorrections 2018-11-16 09:06:05 -08:00
James Mason
f22afe0644 Add ENV variable for production log level
(cherry picked from commit f8856da0fd3c9e41330fdd09c407eb7f61b078dc)
2018-06-07 10:58:00 +02:00
James Mason
26b6902af3 Explicity compress assets 2018-01-12 08:01:45 -08:00
James Mason
7f2346650f Configure cache stores
rely on RAM caching for devel, and optionally a memcached server in production
2017-12-22 10:48:55 -08:00
AEtherC0r3
efaf07178f Upgrade to Rails 5
Update config with rails app:update
Update schema.rb rails db:migrate
Add puma
Make jobs and models inherit from ApplicationJob and ApplicationRecord
Update acts_as_list to 0.9.7 in order to fix
"undefined method `sanitize_sql_hash_for_conditions'" error
Update web-console to 2.3.0 to fix a 500 internal server error
Replace before_filter with before_action
Add rails-controller-testing gem
Add prepend: :true to protect_from_forgery in ApplicationController to
avoid ActionController::InvalidAuthenticityToken exceptions
Remove activeuuid
Update formtastic to 3.1.5 to fix deprecation warnings and issues
with the Input class
Update ahoy_matey to 1.6.0
Update cancancan to 2.0.0 to fix issues with malformed sql queries
Fix program spec
Fix issue with the picture being nil in admin/Organizations#new and #edit
and Organizations#show
Fix ActiveRecord::Base.raise_in_transactional_callbacks= deprecation
warning by removing an unnecessary line in application.rb
Fix failing versions specs
2017-12-11 20:58:04 +02:00
James Mason
207319ae57 Control config.force_ssl with an ENV variable 2017-11-14 14:12:23 -08:00
Tobias Brunner
f14d5926e1 explicitely set log_level for production
Without this setting there is a warning displayed:

DEPRECATION WARNING: You did not specify a `log_level`
in `production.rb`
2017-08-29 09:06:51 +02:00
Wexpo Lyu
88e31ad902 Expose enable_starttls_auto & openssl_verify_mode.
And align `ENV` calls to keep up with codes above.

My fault for using tabs.

which caused a real misalignment.
2017-08-11 12:03:02 +03:00
AEtherC0r3
9341edd9cb Change mock accounts credentials
The names and usernames don't follow a canonical pattern
And the emails point to a valid domain not owned by osem and not
reserved for illustration purposes

Normalize the users' names and usernames and change the domain of the
email addresses to example.com

Fix #1365
2017-05-06 10:37:58 +03:00
Chaitanya
123c9f6a6f Add mock_auth config for Github 2017-03-13 18:48:41 +05:30
Christian Bruckmayer
7844554817 Merge pull request #1193 from kormoc/contributing_updates
Minor Contributing documentation updates.
2017-03-02 14:07:19 +01:00
Rob Smith
0dba45909f Minor Contributing documentation updates.
These are small things I had to change to have the vagrant environtment work
correctly.
2016-09-17 19:31:59 -07:00
shlok007
9ace40d9fc using sprockets-rails instead of quiet-assets 2016-08-27 19:40:53 -04:00
Henne Vogelsang
14a9d701f7 If operating on a env variable make sure its there
Fix booting the app without OSEM_SMTP_AUTHENTICATION set
2016-04-29 16:37:48 +02:00
Henne Vogelsang
5b0202c052 Expand and document SMTP configuration 2016-04-29 16:37:48 +02:00
Henne Vogelsang
beac27405e Use the environment for ActionMailer configuration 2016-04-29 16:37:48 +02:00
Henne Vogelsang
fee8adba4b Also set a default secret_key_base in test env 2016-04-29 16:36:47 +02:00
Henne Vogelsang
ebcb2780cd Configure OSEM via environment variables
Instead of reading a yaml file we get configuration from the
environment.
2016-04-29 16:36:47 +02:00
Aditya Prakash
9abda59b0d Add configuration and documentation smtp setting 2016-04-07 13:49:28 +05:30
Christian Bruckmayer
2f23ba2fd3 Remove duplicate delivery_method config option 2016-03-10 15:06:59 +01:00
Christian Bruckmayer
2dad051ab9 Add letter_opener_web
to present emails in the browser in development mode.
Using letter_opener in combination with Vagrant does not work
because it's not possible to launch a web browser in your
Vagrant box. Fixes #817.
2016-03-05 14:09:42 +01:00
Aditya Prakash
cac3f817ef Remove deprecation warnings due to update of rails
* `config.serve_static_assets` has been renamed to `config.serve_static_files`
  and former will be removed in rails 5
* propagate errors raised within `after_rollback`/`after_commit` callbacks.
  Read more at: http://edgeguides.rubyonrails.org/upgrading_ruby_on_rails.html#error-handling-in-transaction-callbacks
2016-02-19 08:06:14 +05:30
Henne Vogelsang
75b4143bc4 Update factory_girl, silence deprecation warnings 2016-02-08 13:35:31 +01:00
Stella Rouzi
355ecc0ac6 Introduce strong parameters 2015-12-23 11:36:50 +02:00
Henne Vogelsang
132fe6f98c Disable registration/event submission without sign in with ichain 2015-04-23 11:50:22 +02:00
Stella
0a58301b66 add username for mock credentials of openid in development 2014-11-30 00:08:56 +02:00
Stella Rouzi
b7c45718d8 apply StringLiterals cop (remove double quotes, unless there is string interpolation) 2014-09-02 21:45:07 +03:00
Stella Rouzi
f91467a00a remove trailing spaces and blank lines 2014-09-02 21:41:25 +03:00
Stella Rouzi
a8379081b4 enable openids in development by default, do not show openID header unless keys are set. 2014-08-01 16:49:05 +03:00
Stella Rouzi
4184396ca7 user omniauth with mock credentials in development 2014-07-25 18:48:04 +03:00
Christian Bruckmayer
35c5116051 Merge pull request #347 from ChrisBr/fix_test_dates
Implements timecop to make tests independent from DateTime
2014-07-23 15:20:44 +02:00
Chrisbr
7c51d1a42f Implements timecop to make tests independent from DateTime (close #327) 2014-07-23 10:28:15 +02:00
Artem Chernikov
5289f41eb5 Use only new hash syntax 2014-07-21 15:05:58 +02:00