Skip to content
Snippets Groups Projects

More fixes for supporting Relative URL

Merged gitlab-qa-bot requested to merge github/fork/anezi/relative-url-patch into master

Created by: amouhzi

  • Fixes HTTP(S) clone
  • Fixes assets (javascript/css)
  1. Apply fix:

Change the necessary files.

  1. Update config/application.rb
$ sudo -u git -H vim config/application.rb

Uncomment the line nr: 73

Change assets version in line nr: 69

config.assets.version = '1.0.1'
  1. Update assets:
$ sudo -u git -H RAILS_ENV=production bundle exec rake assets:precompile
  1. Restart gitlab:
$ sudo service gitlab restart
  1. Clean browser cache

Finally clean your browser cache.

Site demonstration:

See: https://anezi.net/git for demonstration User: demo Password: demodemo

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Created by: dblessing

    hi @amouhzi. GitLab is no longer supporting relative URLs. The developer has stated that he will not address any issues relating to this feature any longer. You can see comments in this thread by randx - https://github.com/gitlabhq/gitlabhq/issues/3788#issuecomment-19044568

    By Administrator on 2013-07-30T15:13:55 (imported from GitLab project)

    By Administrator on 2013-07-30T15:13:55 (imported from GitLab)

  • Created by: coveralls

    Coverage Status

    Coverage decreased (-0%) when pulling 2ea432fd0ee74791735330941d1c0cb2db4ac51e on anezi:relative-url-patch into c5add8fe on gitlabhq:master.

    By Administrator on 2013-07-30T15:30:27 (imported from GitLab project)

    By Administrator on 2013-07-30T15:30:27 (imported from GitLab)

  • Created by: coveralls

    Coverage Status

    Coverage decreased (-0%) when pulling 2ea432fd0ee74791735330941d1c0cb2db4ac51e on anezi:relative-url-patch into c5add8fe on gitlabhq:master.

    By Administrator on 2013-07-30T15:26:53 (imported from GitLab project)

    By Administrator on 2013-07-30T15:26:53 (imported from GitLab)

  • Created by: dblessing

    It appears that the devs will entertain PRs if they're well put together. Do tests pass with these changes? I'll link this PR in the feedback page - http://feedback.gitlab.com/forums/176466-general/suggestions/4102121-relative-url-support

    By Administrator on 2013-07-30T15:59:00 (imported from GitLab project)

    By Administrator on 2013-07-30T15:59:00 (imported from GitLab)

  • Created by: amouhzi

    Can we just adding a gitlab variable in attachement upload without if-else?

    By Administrator on 2013-07-31T04:06:00 (imported from GitLab project)

    By Administrator on 2013-07-31T04:06:00 (imported from GitLab)

  • Created by: coveralls

    Coverage Status

    Coverage decreased (-0%) when pulling a08feb4290a6a9cc886df180a6b36e927b07680b on anezi:relative-url-patch into c5add8fe on gitlabhq:master.

    By Administrator on 2013-07-31T04:20:23 (imported from GitLab project)

    By Administrator on 2013-07-31T04:20:23 (imported from GitLab)

  • Created by: coveralls

    Coverage Status

    Coverage decreased (-0%) when pulling f2550cfaf06de54890d35f1fe3b62f1b80e71fa9 on anezi:relative-url-patch into c4856e6f on gitlabhq:master.

    By Administrator on 2013-07-31T13:55:25 (imported from GitLab project)

    By Administrator on 2013-07-31T13:55:25 (imported from GitLab)

  • Created by: coveralls

    Coverage Status

    Coverage decreased (-0%) when pulling d0e9f45ac786c6eea88d2a1d0479e8731f874aa8 on anezi:relative-url-patch into e6affad9 on gitlabhq:master.

    By Administrator on 2013-08-01T00:21:30 (imported from GitLab project)

    By Administrator on 2013-08-01T00:21:30 (imported from GitLab)

  • Created by: coveralls

    Coverage Status

    Coverage decreased (-0%) when pulling e08f95e64cf7faa56801c314d4aca972af87cb56 on anezi:relative-url-patch into e6affad9 on gitlabhq:master.

    By Administrator on 2013-08-01T05:02:05 (imported from GitLab project)

    By Administrator on 2013-08-01T05:02:05 (imported from GitLab)

  • Created by: jacobvosmaer

    Are you planning to add tests to this PR @amouhzi?

    By Administrator on 2013-08-01T14:52:58 (imported from GitLab project)

    By Administrator on 2013-08-01T14:52:58 (imported from GitLab)

  • Created by: amouhzi

    I need some documentation to how add tests.

    By Administrator on 2013-08-01T15:23:59 (imported from GitLab project)

    By Administrator on 2013-08-01T15:23:59 (imported from GitLab)

  • gitlab-qa-bot
64 64 template = template.replace('{{text}}', simpleFormat(note.body))
65 65
66 66 if note.attachment
67 file = '<i class="icon-paper-clip"/><a href="/files/note/' + note.id + '/' + note.attachment + '">' + note.attachment + '</a>'
67 file = '<i class="icon-paper-clip"/><a href="' + gon.relative_url_root + '/files/note/' + note.id + '/' + note.attachment + '">' + note.attachment + '</a>'
  • Created by: amouhzi

    Here, I don't see what test I can add? I added just a gitlab variable. If it is empty so it's like when we don't use a relative url.

    By Administrator on 2013-08-15T19:26:18 (imported from GitLab project)

    By Administrator on 2013-08-15T19:26:18 (imported from GitLab)

  • gitlab-qa-bot
  • 21 21 end
    22 22
    23 23 def secure_url
    24 "/files/#{model.class.to_s.underscore}/#{model.id}/#{file.filename}"
    24 Gitlab.config.gitlab.relative_url_root + "/files/#{model.class.to_s.underscore}/#{model.id}/#{file.filename}"
    • Created by: amouhzi

      same here.

      By Administrator on 2013-08-15T19:26:18 (imported from GitLab project)

      By Administrator on 2013-08-15T19:26:18 (imported from GitLab)

  • Created by: coveralls

    Coverage Status

    Coverage decreased (-0%) when pulling d54f07466343904eedeed5cadcba34519da60c85 on anezi:relative-url-patch into 0be06215 on gitlabhq:master.

    By Administrator on 2013-08-01T17:23:24 (imported from GitLab project)

    By Administrator on 2013-08-01T17:23:24 (imported from GitLab)

  • Created by: coveralls

    Coverage Status

    Coverage remained the same when pulling d1b97e929b631f455bcd3509b65d9e7dc388a884 on anezi:relative-url-patch into e36baadd on gitlabhq:master.

    By Administrator on 2013-08-02T05:38:40 (imported from GitLab project)

    By Administrator on 2013-08-02T05:38:40 (imported from GitLab)

  • Created by: coveralls

    Coverage Status

    Coverage decreased (-0%) when pulling 0d63fcb388773aded72cb1f4ab3e8301ee59a0a2 on anezi:relative-url-patch into 7683efc6 on gitlabhq:master.

    By Administrator on 2013-08-02T12:31:12 (imported from GitLab project)

    By Administrator on 2013-08-02T12:31:12 (imported from GitLab)

  • Created by: preparationh67

    @amouhzi It looks like you fix is the preferred method and that the if/else is overkill. Although I'm not sure why I got a comment from @randx on my PR, yet he has not on this one.

    By Administrator on 2013-08-02T20:00:34 (imported from GitLab project)

    By Administrator on 2013-08-02T20:00:34 (imported from GitLab)

  • Created by: amouhzi

    Yes, we don't need if/else to concatenate a variable. If it is empty the concatenation doesn't change anything. relative_url_root is initialized to empty.

    By Administrator on 2013-08-02T21:20:17 (imported from GitLab project)

    By Administrator on 2013-08-02T21:20:17 (imported from GitLab)

  • Created by: coveralls

    Coverage Status

    Coverage decreased (-0%) when pulling acf0ce394784b498b2f6209dbaa00b99ff956e90 on anezi:relative-url-patch into 0ef0150d on gitlabhq:master.

    By Administrator on 2013-08-02T21:32:03 (imported from GitLab project)

    By Administrator on 2013-08-02T21:32:03 (imported from GitLab)

  • Created by: coveralls

    Coverage Status

    Coverage decreased (-0%) when pulling 8f419e84a74b25462a1efffef9e9e01fef40c31c on anezi:relative-url-patch into 8886b900 on gitlabhq:master.

    By Administrator on 2013-08-03T10:04:13 (imported from GitLab project)

    By Administrator on 2013-08-03T10:04:13 (imported from GitLab)

  • Created by: coveralls

    Coverage Status

    Coverage decreased (-0%) when pulling 952bfb47084e0f1463271daa69865739a330f79e on anezi:relative-url-patch into d602d5b1 on gitlabhq:master.

    By Administrator on 2013-08-05T12:16:35 (imported from GitLab project)

    By Administrator on 2013-08-05T12:16:35 (imported from GitLab)

  • Created by: coveralls

    Coverage Status

    Coverage decreased (-0%) when pulling 917c2c5063af2bd007596cb3bee5abc52efbec39 on anezi:relative-url-patch into b58eeeaf on gitlabhq:master.

    By Administrator on 2013-08-07T11:06:45 (imported from GitLab project)

    By Administrator on 2013-08-07T11:06:45 (imported from GitLab)

  • Created by: coveralls

    Coverage Status

    Coverage decreased (-0%) when pulling 49284406d60df785ff773d46172f2b8381f94d0b on anezi:relative-url-patch into 2e0a3734 on gitlabhq:master.

    By Administrator on 2013-08-08T01:38:36 (imported from GitLab project)

    By Administrator on 2013-08-08T01:38:36 (imported from GitLab)

  • Created by: coveralls

    Coverage Status

    Coverage decreased (-0%) when pulling 0a86e84b57d91b65d612bc88e2c866bd891a3ad1 on anezi:relative-url-patch into 0a53e47b on gitlabhq:master.

    By Administrator on 2013-08-09T13:49:42 (imported from GitLab project)

    By Administrator on 2013-08-09T13:49:42 (imported from GitLab)

  • Created by: coveralls

    Coverage Status

    Coverage decreased (-0%) when pulling c70a44422a00e6271e440a8a2f64fc30a7ba04f9 on anezi:relative-url-patch into 0175e665 on gitlabhq:master.

    By Administrator on 2013-08-11T03:47:20 (imported from GitLab project)

    By Administrator on 2013-08-11T03:47:20 (imported from GitLab)

  • Created by: coveralls

    Coverage Status

    Coverage decreased (-0%) when pulling 1c643a9ce416ccc6760383ab1d0d12c764772d7f on anezi:relative-url-patch into 7984d3ca on gitlabhq:master.

    By Administrator on 2013-08-12T12:27:55 (imported from GitLab project)

    By Administrator on 2013-08-12T12:27:55 (imported from GitLab)

  • Created by: dzaporozhets

    @amouhzi it looks ok. I can accept it if you get rid of this merge commits. Squash all this in one commit so I can easily revert it if something is broken

    more fixes for supporting relative url by amouhzi pull request 4670 gitlabhq gitlabhq

    By Administrator on 2013-08-15T09:10:34 (imported from GitLab project)

    By Administrator on 2013-08-15T09:10:34 (imported from GitLab)

  • Created by: coveralls

    Coverage Status

    Coverage decreased (-0%) when pulling 1a78e013c9a4e8be683f6e2ef5e95d64df729132 on anezi:relative-url-patch into 55582047 on gitlabhq:master.

    By Administrator on 2013-08-15T17:53:42 (imported from GitLab project)

    By Administrator on 2013-08-15T17:53:42 (imported from GitLab)

  • Created by: amouhzi

    Hello @randx, I squashed them into one commit.

    By Administrator on 2013-08-15T19:27:16 (imported from GitLab project)

    By Administrator on 2013-08-15T19:27:16 (imported from GitLab)

  • Created by: coveralls

    Coverage Status

    Coverage decreased (-0%) when pulling 39d8a64d on anezi:relative-url-patch into 55582047 on gitlabhq:master.

    By Administrator on 2013-08-15T19:47:14 (imported from GitLab project)

    By Administrator on 2013-08-15T19:47:14 (imported from GitLab)

  • Created by: coveralls

    Coverage Status

    Coverage decreased (-0%) when pulling 39d8a64d on anezi:relative-url-patch into 55582047 on gitlabhq:master.

    By Administrator on 2013-08-15T20:05:03 (imported from GitLab project)

    By Administrator on 2013-08-15T20:05:03 (imported from GitLab)

  • Created by: dzaporozhets

    Merged. Thank you

    By Administrator on 2013-08-19T12:42:50 (imported from GitLab project)

    By Administrator on 2013-08-19T12:42:50 (imported from GitLab)

  • Please register or sign in to reply
    Loading