Commit Graph

401 Commits

Author SHA1 Message Date
Azul 4e634b0c8a update: repo location to liberate group
Did not update translations yet.
Also looks like the source url on transifex needs to be updated.
2021-12-17 19:52:19 +01:00
Azul 07eab68946 cleanup: unused helper functions, add tests or start using them again 2019-08-23 11:42:15 +02:00
dgt 2ab42b3bac Cleanup: remove unused helpers 2019-08-23 11:42:15 +02:00
dgt a767a44a70 Remove obslolete prototype_rails files
Go back to schema.rb after last migration (and do not dump schema with
rails 5, because field sizes for varchars would be erased)
2019-08-23 11:42:15 +02:00
dgt 03a80251b5 Upgrade to Rails 5.1
and fixed wiki versioning test

Rails 5.1 last steps

crabgrass_media from rubygems
remove controller test for task sorting - not possible to test xhr request without route in new parameter syntax
remove new framework defaults initializer file

Final step of upgrade to rails 5.1

we only test on stretch, because we need ruby >= 2.2.2
update dependencies by running bundle update
and fix gallery_image_controller_test

Also write db/schema.rb with rails 5
2019-08-23 11:42:12 +02:00
dgt 2c064d0d4c Rewrite xhr requests
with the help of a nice gem https://github.com/appfolio/rails5_xhr_update
and start replacing true by reload for association reload (deprecated in rails 5.1)
2019-08-23 10:43:01 +02:00
dgt 939fa3d1d1 Some preparations for rails 5.1
update some gems, replace before_filter / after_filter by before_action / after_action
and some more config changes (mostly commented out) and scripts generated by rails app:update task
2019-08-23 10:43:01 +02:00
dgt eee8c84178 Preparation for Rails 5
first make everything work locally with rails 5.0
test do not pass on CI yet because the test task has to be rewritten

- update dependecies
- run rails app:update task: update config, generate intitializers etc.
- the method hide_action is not available in rails anymore
- ActionController::Parameters have to be converted to a hash
- protect_from_forgery now defaults to prepend:false
2019-08-23 10:43:01 +02:00
azul ec86e9f3cf fix: symlink fix - this time with a test 2019-05-31 05:19:46 -07:00
Azul de2d0cddfa fix: follow symlinks to find dir for theme 2019-05-30 22:35:13 +02:00
dgt 635f96b732 Fix: allow mulitline headings in tocs
we have to check if this breaks existing Tocs
2019-04-26 11:36:04 +02:00
dgt 6c88dfbc21 Remove database tables and colums for tracking
remove tables hourlies, dalies, trackings
remove column views_count from pages and page_terms
remove views_count from fixtures and a test
remove views_count from sphinx index
2018-04-26 23:02:49 +02:00
dgt fbc3e194f4 Remove old path_finder which also relates to tracking 2018-04-26 17:13:30 +02:00
dgt f9466233c4 Refactor: remove page stats and tracking for views, stars and edits
remove tracking
remove aggregation of tracking data as hourlies and dailies
remove search filters for most_views
remove all tests dealing with tracking for views, stars and edits
remove commented out code
2018-04-26 17:11:02 +02:00
Azul 6a0897453f
refactor: clean up link_to extension
We used to have two different ways of adding confirm
dialogs to links. Either by including it in the url_option
or the html_options.

There is no point to this. Simplified by removing
the former option which also introduced a different
link_to signature.
2018-02-12 11:24:59 +01:00
Azul 34c15d5a8f
refactor: split up link_to_modal
One function for handling plain html content,
one for ajax modal boxes.

They hopefully can be converted into sth. more
ujs like.

This will probably be easier if we tackle them one
by one instead of trying to come up with a grand unified
solution.
2018-02-11 20:54:58 +01:00
dgt 960e797d44 WIP: start fixing remote icon links
@azuls fix for data-with.js which makes the sharing popup work
sharing pages at creation is not working yet because path contains no valid Id

Some refactoring of helper classes
2018-02-06 10:51:32 +01:00
dgt 8014c12979 WIP: try to get remote icon links to work by creating an ajax call in plain JS
still has several problems: breaks the share widget at page creation and the JS for the onComplete callback stopped working
2018-02-06 10:47:46 +01:00
dgt 2ca136224a Replace a bunch of alias_method_chains by module prepend
use alias_method to deal with ambiguity
2017-12-31 14:48:35 +01:00
dgt 3b1f74fd82 Merge branch 'test/controllers' into 'master'
Test controllers with integration tests

See merge request riseuplabs/crabgrass!64
2017-11-30 09:06:13 -08:00
Azul 1826dbfc51
minor: reformat comments to match line width 2017-11-20 11:59:57 +01:00
Cognata 4935849edd Replace key: 'cancel' for 'cancel_button' 2017-11-17 14:43:10 +01:00
Cognata c3f04cb94b Deletes commented code in yml & fix typo thanks to @dgt! 2017-11-17 13:31:15 +01:00
dgt f3f260b2e3 fix: search for tags containing dots 2017-09-30 22:08:46 +02:00
Azul cf21b9311b
style: rubocop autocorrect 2017-09-12 10:00:46 +02:00
Azul fc2af86a74
cleanup: remove User#current - bad practice 2017-02-01 08:06:37 +01:00
Azul 30285afc4c
cleanup: old unused code in castle_gates 2017-01-31 21:28:04 +01:00
Azul cb3063eda5
bugfix: owner_ids need to be ints in sphinx 2017-01-31 18:03:55 +01:00
Azul 3c4f65fbf5
upgrade: use Arels new aggregate function for BIT_OR 2016-09-01 10:22:14 +02:00
Azul 439f029b84
cleanup: use logger for theme debug info 2016-09-01 10:22:13 +02:00
Azul 2a5ec9df29
move acts_as_castle into model definition
This way it does not get reloaded if config/permissions.rb get reloaded.
This caused warnings because associations were getting redefined.
2016-09-01 10:22:11 +02:00
Azul ed726cf34b
upgrade: default select broke count in path_finder
Now we only apply .select to the relation if needed.
I also dropped the @selects array entirely as it was not being used.
2016-09-01 10:22:10 +02:00
Azul 07c298f445
upgrade: remove unused custom gems 2016-09-01 10:22:08 +02:00
Azul 0eeaaa16a0
upgrade: cleanup pre rails4 workarounds with .distinct
We did all kinds of funny things with with_access in order to work
around the lack of a .distinct in AR. Now it's there. So let's remove
the workarounds.

Also adopted the test for group members with a given access accordingly.
2016-09-01 10:22:03 +02:00
Azul d9cdb719e0
upgrade: rails4 style path_finder for mysql 2016-09-01 10:22:02 +02:00
Azul 1509b7ec43
cleanup: deprecated finders 2016-09-01 10:22:01 +02:00
Azul f47d837cfe
upgrade: adopt BIT_OR arel extension to AREL 4.0.n 2016-09-01 10:21:59 +02:00
Azul b11e913c8e
Page namespace for extensions, terms and history 2016-09-01 09:40:22 +02:00
Azul 9a89abb06c
UnauthenticatedUser -> User::Unknown 2016-09-01 09:40:20 +02:00
Azul cc5e0ac5ae bugfix: gemspec works with latest version of bundler
We had a nested array for the list of files
2016-01-12 12:11:07 +01:00
Azul 79ccdc8477 bugfix: escape search terms for sphinx 2015-11-29 18:31:14 +01:00
Azul 2307fab34a make use of 304 - not modified for css 2015-11-03 14:50:40 +01:00
Azul c9b6d0c8f3 Upgrade Thinking Sphinx to 3.1.4 - requires sphinx > 2.1.4
There we go. Finally the upgrade of thinking sphinx.

In order to deploy this we will need a fairly recent version of Sphinx.
I suggest we jump right to the latest of the 2.2 series.

Thinking Sphinx now uses app/indices for its index definitions.
It also requires some options to search to be hashes.

There's a nice upgrade documentation that i followed:
http://freelancing-gods.com/thinking-sphinx/upgrading.html
Most of it does not affect us though.

The main change was to use with_all instead of with in sphinx queries.
This way we can still have multiple constraints on the same field:
So for example to search '(1 OR 2 OR 3) AND (4 OR 5 OR 6)'

[Here](http://freelancing-gods.com/thinking-sphinx/searching.html#filters)'s
the new way of doing this:

> You can also perform combination AND and OR matches with
> :with_all using nested arrays:
>
> ```ruby
> # All pancackes belonging to tag 3 and belonging to one of tag 1 or tag 2
> Article.search 'pancakes',
>   :with_all => {:tag_ids => [[1,2], 3]}
> ```

So now we build @with in the sphinx query to be an array of arrays that
can be feed into with_all.

Before we used to send an array to thinking sphinx instead of a hash.

```ruby
Page.search 'text', :with =>
  [[:access_ids, '1 2 3'], [:access_ids, '4 5 6']]
```
2015-08-21 16:49:37 +02:00
Azul e284624b18 fix umlaut issues in page titles and anchors
Moving from ruby 1.8 to 1.9 \w does not include non ascii chars anymore.
Now we need to use [[:word:]] to account for utf-8 chars in the String#nameize.

This came up in wiki section anchors but also affected page titles.
I added an integration test for the page title.

The test failed due to invalid url errors when capybara handed the url to
URI.parse. So now we URI.encode the page_path. While this does change the
string in the test iceweasel still displays the umlaut characters nicely.
2015-07-30 11:40:21 +02:00
Azul 439cfe2439 turn greencloth test into real test
failures should cause the test to fail so we can git bisect
2015-07-30 10:20:58 +02:00
Azul a7765bf533 refactor: separate crabgrass_media repository
crabgrass_media depends on a number of packages to be installed.
We don't install them on travis right now because that makes test
runs much faster.

But we still need to test crabgrass_media with these packages properly.
So this will now live in a different repo and be tested on its own.
2015-07-27 08:51:44 +02:00
Azul 920dab5a78 Revert "wiki toc - handle multiline headings better"
This reverts commit 6e276648cb.
2015-07-23 09:39:49 +02:00
azul 7cc2eda04b Merge pull request #282 from azul/bugfix/multiline-headings-in-toc
Fix multiline headings with special chars in toc
2015-07-21 10:56:28 +02:00
Azul 6e276648cb wiki toc - handle multiline headings better
special characters at the start of the following lines would break
the heading parser. Here's an example:

h3. heading
*spans* two lines
2015-07-21 10:27:35 +02:00
Azul 8659feec73 pop up toc heading error on wiki save 2015-07-21 10:25:37 +02:00