Coder Social home page Coder Social logo

readme_at_repositories's Introduction

README at Repositories

This is redmine plugin for displays contents of file named "README.md" at repository tab.

If you want to understand Redmine,
see the official site .

Installation

Only deploy source code to your redmine plugin directory.

$REDMINE_ROOT means your redmine root directory.

Redmine version 1.x

{$REDMINE_ROOT}/vendor/plugins

Redmine version 2.x and lator(3.x)

{$REDMINE_ROOT}/plugins

Installation is very easy.

cd your_redmine_plugin_directory
git clone git://github.com/simeji/readme_at_repositories.git
bundle exec rake redmine:plugins:migrate RAILS_ENV=production

After that, please restart your redmine.

How to display READMEs

After installation, you can display README content, at the top of your project's "Repository" page. (any directory)

If you installed plugin for supporting Markdown, (for example Redmine Redcarpet Markdown formatter) you cloud display README that is formatted.

To enable this plugin, Please select 'Readme at repository', "Settings" => "Modules" in your project.
RarProjectTab

You click Repository tab.
Top project

You can show content of README.md (.txt, .rdoc, any extension ok. But only .md will be formatted.)
Repository Tab

If you want to change the position of your README, please read "Setting" section.

Setting

If you want to change the position of your README, you can configure the settings easy.
ReadmeProjectSettings

You can give permissionx to configure above settiogs in 'Administration' => 'Roles and permissions' page.
RarAdminRole

Requirements

Redmine version 1.4 or later. (2.x, 3.x is ok)

Licence

This plugin is released under the MIT license.

The MIT License (MIT)

Copyright (c) 2013 simeji

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

readme_at_repositories's People

Contributors

agarciadom avatar jnhmn avatar navlrac avatar rkallensee avatar simeji avatar zsturgess avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

readme_at_repositories's Issues

500 on loading the plugin

After cloning the repository and restarting passenger, I get the following error.

/var/www/html/redmine-2.3.1/plugins/readme_at_repositories/lib/display_readme.rb:11: syntax error, unexpected '>'
    blk = repo_id ? ->(r){ r.identifier == repo_id }...
                      ^
/var/www/html/redmine-2.3.1/plugins/readme_at_repositories/lib/display_readme.rb:11: syntax error, unexpected '{', expecting kEND
    blk = repo_id ? ->(r){ r.identifier == repo_id } : -...
                          ^
/var/www/html/redmine-2.3.1/plugins/readme_at_repositories/lib/display_readme.rb:11: syntax error, unexpected '}', expecting kEND
...(r){ r.identifier == repo_id } : ->(r){ r.is_default }
                              ^
/var/www/html/redmine-2.3.1/plugins/readme_at_repositories/lib/display_readme.rb:11: syntax error, unexpected '{', expecting kEND
...entifier == repo_id } : ->(r){ r.is_default }
                              ^
/var/www/html/redmine-2.3.1/plugins/readme_at_repositories/lib/display_readme.rb:11: syntax error, unexpected '}', expecting kEND (SyntaxError)
  /usr/lib/ruby/gems/1.8/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
  /usr/lib/ruby/gems/1.8/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
  /usr/lib/ruby/gems/1.8/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
  /usr/lib/ruby/gems/1.8/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
  /var/www/html/redmine-2.3.1/plugins/readme_at_repositories/init.rb:1
  /usr/lib/ruby/gems/1.8/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
  /usr/lib/ruby/gems/1.8/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
  /usr/lib/ruby/gems/1.8/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
  /usr/lib/ruby/gems/1.8/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
  /var/www/html/redmine-2.3.1/lib/redmine/plugin.rb:130:in `load'
  /var/www/html/redmine-2.3.1/lib/redmine/plugin.rb:121:in `each'
  /var/www/html/redmine-2.3.1/lib/redmine/plugin.rb:121:in `load'
  /var/www/html/redmine-2.3.1/config/initializers/30-redmine.rb:12
  /usr/lib/ruby/gems/1.8/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:245:in `load'
  /usr/lib/ruby/gems/1.8/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:245:in `load'
  /usr/lib/ruby/gems/1.8/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
  /usr/lib/ruby/gems/1.8/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:245:in `load'
  /usr/lib/ruby/gems/1.8/gems/railties-3.2.13/lib/rails/engine.rb:588
  /usr/lib/ruby/gems/1.8/gems/railties-3.2.13/lib/rails/engine.rb:587:in `each'
  /usr/lib/ruby/gems/1.8/gems/railties-3.2.13/lib/rails/engine.rb:587
  /usr/lib/ruby/gems/1.8/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `instance_exec'
  /usr/lib/ruby/gems/1.8/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `run'
  /usr/lib/ruby/gems/1.8/gems/railties-3.2.13/lib/rails/initializable.rb:55:in `run_initializers'
  /usr/lib/ruby/gems/1.8/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `each'
  /usr/lib/ruby/gems/1.8/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `run_initializers'
  /usr/lib/ruby/gems/1.8/gems/railties-3.2.13/lib/rails/application.rb:136:in `initialize!'
  /usr/lib/ruby/gems/1.8/gems/railties-3.2.13/lib/rails/railtie/configurable.rb:30:in `send'
  /usr/lib/ruby/gems/1.8/gems/railties-3.2.13/lib/rails/railtie/configurable.rb:30:in `method_missing'
  /var/www/html/redmine-2.3.1/config/environment.rb:14
  config.ru:3:in `require'
  config.ru:3
  /usr/lib/ruby/gems/1.8/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
  /usr/lib/ruby/gems/1.8/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
  config.ru:1:in `new'
  config.ru:1

Redmine 5.x support

Hi,

Is it possible to get this plugin working under Redmine 5.x?

After migration to 5.x I'm getting the following error:

image

Version information:
image

Thank you for you time

Compatibility with chiliproject

It does not seems to be compatible with chiliproject (at least with the v3.1.0), nothing in the logs but the README does not gets displayed, either with plaintext README or with README.md

Plugin crashes with SVN repositories

This plugin seems to work only with git repositories.
If I open the repository view of a SVN repository, the server returns an HTTP 500 error.

Following the output of the production log:

Processing by RepositoriesController#show as HTML
  Parameters: {"id"=>"test01", "repository_id"=>"2"}
  Current user: admin (id=1)
  Rendered repositories/show.html.erb within layouts/base (5.1ms)
Completed 500 Internal Server Error in 122ms (ActiveRecord: 5.1ms)

ActionView::Template::Error (undefined method `entry' for nil:NilClass):
    1: <%= call_hook(:view_repositories_show_contextual, { :repository => @repository, :project => @project }) %>
    2: 
    3: <div class="contextual">
    4:   <%= render :partial => 'navigation' %>
  plugins/readme_at_repositories/lib/display_readme.rb:17:in `view_repositories_show_contextual'
  lib/redmine/hook.rb:61:in `block (2 levels) in call_hook'
  lib/redmine/hook.rb:61:in `each'
  lib/redmine/hook.rb:61:in `block in call_hook'
  lib/redmine/hook.rb:58:in `tap'
  lib/redmine/hook.rb:58:in `call_hook'
  lib/redmine/hook.rb:96:in `call_hook'
  app/views/repositories/show.html.erb:1:in `_app_views_repositories_show_html_erb___1144634906139630312_38496960'
  app/controllers/repositories_controller.rb:125:in `show'
  lib/redmine/sudo_mode.rb:63:in `sudo_mode'

Redmine 3.3.4
Ruby 2.0.0
Rails 4.2.7.1
SVN 1.7.14

Install issues with Rednime 4.0

I use this really cool plugin on an old Redmine 3.3.1 installation, which I want to migrate to

  • Redmine version 4.0.7.stable
  • Ruby version 2.5.5-p157 (2019-03-15) [x86_64-linux-gnu]
  • Rails version 5.2.2.1

but unfortunately the installation process failed:

root@redmine4:/usr/share/redmine/plugins# bundle exec rake redmine:plugins:migrate RAILS_ENV=production
(in /usr/share/redmine)
rake aborted!
NoMethodError: undefined method `to_prepare' for ActionDispatch::Callbacks:Class
Did you mean?  to_param
/usr/share/redmine/plugins/readme_at_repositories/init.rb:17:in `<top (required)>'
/usr/share/rubygems-integration/all/gems/activesupport-5.2.2.1/lib/active_support/dependencies.rb:291:in `require'
/usr/share/rubygems-integration/all/gems/activesupport-5.2.2.1/lib/active_support/dependencies.rb:291:in `block in require'
/usr/share/rubygems-integration/all/gems/activesupport-5.2.2.1/lib/active_support/dependencies.rb:257:in `load_dependency'
/usr/share/rubygems-integration/all/gems/activesupport-5.2.2.1/lib/active_support/dependencies.rb:291:in `require'
/usr/share/redmine/lib/redmine/plugin.rb:175:in `block in load'
/usr/share/redmine/lib/redmine/plugin.rb:166:in `each'
/usr/share/redmine/lib/redmine/plugin.rb:166:in `load'
/usr/share/redmine/config/initializers/30-redmine.rb:21:in `<top (required)>'
/usr/share/rubygems-integration/all/gems/activesupport-5.2.2.1/lib/active_support/dependencies.rb:285:in `load'
/usr/share/rubygems-integration/all/gems/activesupport-5.2.2.1/lib/active_support/dependencies.rb:285:in `block in load'
/usr/share/rubygems-integration/all/gems/activesupport-5.2.2.1/lib/active_support/dependencies.rb:257:in `load_dependency'
/usr/share/rubygems-integration/all/gems/activesupport-5.2.2.1/lib/active_support/dependencies.rb:285:in `load'
/usr/share/rubygems-integration/all/gems/railties-5.2.2.1/lib/rails/engine.rb:657:in `block in load_config_initializer'
/usr/share/rubygems-integration/all/gems/activesupport-5.2.2.1/lib/active_support/notifications.rb:170:in `instrument'
/usr/share/rubygems-integration/all/gems/railties-5.2.2.1/lib/rails/engine.rb:656:in `load_config_initializer'
/usr/share/rubygems-integration/all/gems/railties-5.2.2.1/lib/rails/engine.rb:614:in `block (2 levels) in <class:Engine>'
/usr/share/rubygems-integration/all/gems/railties-5.2.2.1/lib/rails/engine.rb:613:in `each'
/usr/share/rubygems-integration/all/gems/railties-5.2.2.1/lib/rails/engine.rb:613:in `block in <class:Engine>'
/usr/share/rubygems-integration/all/gems/railties-5.2.2.1/lib/rails/initializable.rb:32:in `instance_exec'
/usr/share/rubygems-integration/all/gems/railties-5.2.2.1/lib/rails/initializable.rb:32:in `run'
/usr/share/rubygems-integration/all/gems/railties-5.2.2.1/lib/rails/initializable.rb:61:in `block in run_initializers'
/usr/share/rubygems-integration/all/gems/railties-5.2.2.1/lib/rails/initializable.rb:50:in `each'
/usr/share/rubygems-integration/all/gems/railties-5.2.2.1/lib/rails/initializable.rb:50:in `tsort_each_child'
/usr/share/rubygems-integration/all/gems/railties-5.2.2.1/lib/rails/initializable.rb:60:in `run_initializers'
/usr/share/rubygems-integration/all/gems/railties-5.2.2.1/lib/rails/application.rb:361:in `initialize!'
/usr/share/redmine/config/environment.rb:14:in `<top (required)>'
/usr/share/rubygems-integration/all/gems/activesupport-5.2.2.1/lib/active_support/dependencies.rb:291:in `require'
/usr/share/rubygems-integration/all/gems/activesupport-5.2.2.1/lib/active_support/dependencies.rb:291:in `block in require'
/usr/share/rubygems-integration/all/gems/activesupport-5.2.2.1/lib/active_support/dependencies.rb:257:in `load_dependency'
/usr/share/rubygems-integration/all/gems/activesupport-5.2.2.1/lib/active_support/dependencies.rb:291:in `require'
/usr/share/rubygems-integration/all/gems/railties-5.2.2.1/lib/rails/application.rb:337:in `require_environment!'
/usr/share/rubygems-integration/all/gems/railties-5.2.2.1/lib/rails/application.rb:520:in `block in run_tasks_blocks'
Tasks: TOP => redmine:plugins:migrate => environment
(See full trace by running task with --trace)

Following the hint in a similar bug report, I ran

sed -e 's/ActionDispatch::Callbacks.to_prepare/ActiveSupport::Reloader.to_prepare/g' -i readme_at_repositories/init.rb

which “replaced” the error by a different one:

root@redmine4:/usr/share/redmine/plugins# bundle exec rake redmine:plugins:migrate RAILS_ENV=production
(in /usr/share/redmine)
rake aborted!
NoMethodError: undefined method `alias_method_chain' for ProjectsHelper:Module
Did you mean?  alias_method
/usr/share/redmine/plugins/readme_at_repositories/lib/extend_project_setting.rb:9:in `block in included'
/usr/share/redmine/plugins/readme_at_repositories/lib/extend_project_setting.rb:7:in `class_eval'
/usr/share/redmine/plugins/readme_at_repositories/lib/extend_project_setting.rb:7:in `included'
/usr/share/redmine/plugins/readme_at_repositories/init.rb:20:in `include'
/usr/share/redmine/plugins/readme_at_repositories/init.rb:20:in `block in <top (required)>'
/usr/share/rubygems-integration/all/gems/activesupport-5.2.2.1/lib/active_support/callbacks.rb:426:in `instance_exec'
/usr/share/rubygems-integration/all/gems/activesupport-5.2.2.1/lib/active_support/callbacks.rb:426:in `block in make_lambda'
/usr/share/rubygems-integration/all/gems/activesupport-5.2.2.1/lib/active_support/callbacks.rb:198:in `block (2 levels) in halting'
/usr/share/rubygems-integration/all/gems/activesupport-5.2.2.1/lib/active_support/callbacks.rb:606:in `block (2 levels) in default_terminator'
/usr/share/rubygems-integration/all/gems/activesupport-5.2.2.1/lib/active_support/callbacks.rb:605:in `catch'
/usr/share/rubygems-integration/all/gems/activesupport-5.2.2.1/lib/active_support/callbacks.rb:605:in `block in default_terminator'
/usr/share/rubygems-integration/all/gems/activesupport-5.2.2.1/lib/active_support/callbacks.rb:199:in `block in halting'
/usr/share/rubygems-integration/all/gems/activesupport-5.2.2.1/lib/active_support/callbacks.rb:513:in `block in invoke_before'
/usr/share/rubygems-integration/all/gems/activesupport-5.2.2.1/lib/active_support/callbacks.rb:513:in `each'
/usr/share/rubygems-integration/all/gems/activesupport-5.2.2.1/lib/active_support/callbacks.rb:513:in `invoke_before'
/usr/share/rubygems-integration/all/gems/activesupport-5.2.2.1/lib/active_support/callbacks.rb:131:in `run_callbacks'
/usr/share/rubygems-integration/all/gems/activesupport-5.2.2.1/lib/active_support/reloader.rb:89:in `prepare!'
/usr/share/rubygems-integration/all/gems/railties-5.2.2.1/lib/rails/application/finisher.rb:63:in `block in <module:Finisher>'
/usr/share/rubygems-integration/all/gems/railties-5.2.2.1/lib/rails/initializable.rb:32:in `instance_exec'
/usr/share/rubygems-integration/all/gems/railties-5.2.2.1/lib/rails/initializable.rb:32:in `run'
/usr/share/rubygems-integration/all/gems/railties-5.2.2.1/lib/rails/initializable.rb:61:in `block in run_initializers'
/usr/share/rubygems-integration/all/gems/railties-5.2.2.1/lib/rails/initializable.rb:60:in `run_initializers'
/usr/share/rubygems-integration/all/gems/railties-5.2.2.1/lib/rails/application.rb:361:in `initialize!'
/usr/share/redmine/config/environment.rb:14:in `<top (required)>'
/usr/share/rubygems-integration/all/gems/activesupport-5.2.2.1/lib/active_support/dependencies.rb:291:in `require'
/usr/share/rubygems-integration/all/gems/activesupport-5.2.2.1/lib/active_support/dependencies.rb:291:in `block in require'
/usr/share/rubygems-integration/all/gems/activesupport-5.2.2.1/lib/active_support/dependencies.rb:257:in `load_dependency'
/usr/share/rubygems-integration/all/gems/activesupport-5.2.2.1/lib/active_support/dependencies.rb:291:in `require'
/usr/share/rubygems-integration/all/gems/railties-5.2.2.1/lib/rails/application.rb:337:in `require_environment!'
/usr/share/rubygems-integration/all/gems/railties-5.2.2.1/lib/rails/application.rb:520:in `block in run_tasks_blocks'
Tasks: TOP => redmine:plugins:migrate => environment
(See full trace by running task with --trace)

Any chance to install the plugin on Redmine 4 (and maybe 4.1)?

settings to allow adjust the position of the readme content

hi, simeij

this exactly is the plugin i'm looking for, have a quick play around, quite nice.

however, i think it'd be better if we (as the user) can specify the position of the content on the repository page. currently it's on top of the page, i'd like to put it at the bottom, and even nice, if there is a clear separator between repository file list and the readme content (e.g. a horizontal separator, or add border to the readme body)

thanks

Tab Readme at Repository not showing

I activated the plugin but Readme is not showing the Tab "Readme ad Repository" in modules options, as the image:

There is some trick to solve this?

Follow my environment info

Environment:
  Redmine version                3.4.6.stable
  Ruby version                   2.3.3-p222 (2016-11-21) [i386-mingw32]
  Rails version                  4.2.8
  Environment                    production
  Database adapter               Mysql2
SCM:
  Subversion                     1.12.2
  Mercurial                      5.1
  Git                            2.19.1
  Filesystem                     
Redmine plugins:
  clipboard_image_paste          1.13
  readme_at_repositories         0.3.0
  redmine_agile                  1.4.12
  redmine_checklists             3.1.16
  redmine_ckeditor               1.1.7
  redmine_cms                    1.2.1
  redmine_contacts               4.2.5
  redmine_custom_css             0.1.7
  redmine_knowledgebase          3.3.1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.