Giter Club home page Giter Club logo

redmine_pastebin's Introduction

redmine_pastebin

A real pastebin plugin for Redmine.

For Redmine versions prior to 2.x, check out the pre-2.x branch.

Installation Notes

Use git to clone to plugins/, then run the DB migrations:

$ rake db:migrate_plugins

Don’t forget to setup roles permissions in the Pastes section.

redmine_pastebin's People

Contributors

a1exsh avatar ashcmd avatar jwalkerbg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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

redmine_pastebin's Issues

errors when running plugin in redmine 2.3..

I get the following errors when running this plugin in redmine 2.3.2, ruby 1.8.7 (2011-06-30 patchlevel 352) [i386-linux]

Started GET "/projects/imsa/pastes" for 10.111.1.3 at Thu Nov 07 16:14:31 -0500 2013
Processing by PastesController#index as HTML
Parameters: {"project_id"=>"imsa"}
Current user: admin (id=1)
Completed 500 Internal Server Error in 7ms

SyntaxError (/var/www/redmine/plugins/redmine_pastebin/app/models/paste.rb:50: syntax error, unexpected '=', expecting '|'
scope :visible, lambda{ |user=User.current, *args|
^
/var/www/redmine/plugins/redmine_pastebin/app/models/paste.rb:50: syntax error, unexpected '|', expecting '='
/var/www/redmine/plugins/redmine_pastebin/app/models/paste.rb:60: syntax error, unexpected '}', expecting kEND):
activesupport (3.2.13) lib/active_support/dependencies.rb:251:in require' activesupport (3.2.13) lib/active_support/dependencies.rb:251:inrequire'
activesupport (3.2.13) lib/active_support/dependencies.rb:236:in load_dependency' activesupport (3.2.13) lib/active_support/dependencies.rb:251:inrequire'
activesupport (3.2.13) lib/active_support/dependencies.rb:359:in require_or_load' activesupport (3.2.13) lib/active_support/dependencies.rb:502:inload_missing_constant'
activesupport (3.2.13) lib/active_support/dependencies.rb:192:in const_missing' activesupport (3.2.13) lib/active_support/dependencies.rb:190:ineach'
activesupport (3.2.13) lib/active_support/dependencies.rb:190:in const_missing' activesupport (3.2.13) lib/active_support/dependencies.rb:514:inload_missing_constant'
activesupport (3.2.13) lib/active_support/dependencies.rb:192:in const_missing' activesupport (3.2.13) lib/active_support/dependencies.rb:190:ineach'
activesupport (3.2.13) lib/active_support/dependencies.rb:190:in const_missing' plugins/redmine_pastebin/app/controllers/pastes_controller.rb:98:infind_paste_and_project'

Route issue when trying to view a Paste - Redmine 1.3.0

When clicking on the title of a Paste from the index page, a route error is thrown.
Redmine version 1.3.0

Here is the log :

Processing PastesController#index (for 192.168.12.254 at 2012-01-31 08:26:17) [GET]
  Parameters: {"project_id"=>"ocitech-interne", "action"=>"index", "controller"=>"pastes"}
Rendering template within layouts/base
Rendering pastes/index
Completed in 61ms (View: 49, DB: 1) | 200 OK [http://xxx.com/projects/ocitech-interne/pastes]


Processing PastesController#show (for 192.168.12.254 at 2012-01-31 08:26:19) [GET]
  Parameters: {"action"=>"show", "id"=>"1", "controller"=>"pastes"}
Rendering template within layouts/base
Rendering pastes/show

ActionView::TemplateError (No route matches {:id=>#<Paste id: 1, text: "<?php\r\n/**\r\n * Ce script permet de crawler des urls...", lang: "PHP", author_id: 4, project_id: 40, created_on: "2012-01-31 08:25:03", updated_on: "2012-01-31 08:25:03", title: "Sitemap crawler">, :action=>"edit"}) on line #34 of vendor/plugins/redmine_pastebin/app/views/pastes/show.html.erb:
31: </div>
32: 
33: <p>
34: <%= manage_paste_links(@paste) %>
35: </p>
36: 
37: <%= render "sidebar" %>

    /usr/lib/ruby/vendor_ruby/action_controller/routing/route_set.rb:420:in `generate'
    /usr/lib/ruby/vendor_ruby/action_controller/url_rewriter.rb:218:in `rewrite_path'
    /usr/lib/ruby/vendor_ruby/action_controller/url_rewriter.rb:197:in `rewrite_url'
    /usr/lib/ruby/vendor_ruby/action_controller/url_rewriter.rb:175:in `rewrite'
    /usr/lib/ruby/vendor_ruby/action_controller/base.rb:625:in `url_for'
    /usr/lib/ruby/vendor_ruby/action_view/helpers/url_helper.rb:85:in `send'
    /usr/lib/ruby/vendor_ruby/action_view/helpers/url_helper.rb:85:in `url_for'
    /usr/lib/ruby/vendor_ruby/action_view/helpers/url_helper.rb:228:in `link_to'
    app/helpers/application_helper.rb:43:in `link_to_if_authorized'
    vendor/plugins/redmine_pastebin/app/helpers/pastes_helper.rb:93:in `edit_paste_link'
    vendor/plugins/redmine_pastebin/app/helpers/pastes_helper.rb:109:in `manage_paste_links'
    vendor/plugins/redmine_pastebin/app/views/pastes/show.html.erb:34

Error with Chiliproject 3.3.0

After migrating from chiliproject 1.2 to 3.3.0, we were encoutering the following error :

NoMethodError (undefined method `find_paste_and_project' for #<PastesController:0x7f3a70e46fe0>):
  /usr/lib/ruby/1.8/phusion_passenger/rack/request_handler.rb:92:in `process_request'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'
  /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:418:in `start_request_handler'
  /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:358:in `handle_spawn_application'
  /usr/lib/ruby/1.8/phusion_passenger/utils.rb:184:in `safe_fork'
  /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:354:in `handle_spawn_application'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `__send__'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `main_loop'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:163:in `start'
  /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:213:in `start'
  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:262:in `spawn_rails_application'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'
  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:256:in `spawn_rails_application'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:80:in `synchronize'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:255:in `spawn_rails_application'
  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:154:in `spawn_application'
  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:287:in `handle_spawn_application'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `__send__'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `main_loop'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
  /usr/lib/phusion_passenger/passenger-spawn-server:61

Rendering /srv/www/chiliproject/public/500.html (500 Internal Server Error)

We fixed by modifying the app/controllers/pastes_controller.rb file :

- before_filter :find_paste_and_project, :authorize
- accept_rss_auth :index
+ before_filter :find_paste_and_project

Global pastes

Is there possibility to add functionality to create global Redmine-wide pastes along with per-project pastes?

Not so important issue but if it were there it would be welcome.

Redmine 2.1.2

Hey, when using redmine version 2.1.2 and trying to install your Plugin, I get the following error:
rake aborted!
no such file to load -- dispatcher

Add Italian translation

I added the Italian translation.

Thanks for the plugin!

Italian strings go here for Rails i18n

it:
label_paste_plural: Paste
label_paste_all: Tutti i Paste
label_paste_view_all: Visualizza tutti i paste
label_paste_link_here: "Collegamento a questo paste: %{link}"
label_paste_syntax: "Sintassi: %{lang}"
label_paste_new: Nuovo Paste
label_paste_edit: Modifica %{link}
field_title: Titolo (opzionale)
field_lang: Sintassi
field_text: Testo
button_paste_submit: Paste!
text_paste_update_or_make_new: %{update} o %{make_new}
button_paste_update: Aggiorna
button_paste_make_new: Salva come nuovo paste
notice_paste_created: Creazione effettuata con successo
notice_paste_updated: Aggiornamento effettuato con successo
notice_paste_destroyed: Paste rimosso
text_paste_delete_confirmation: Sei sicuro di voler eliminare questo paste?

Redmine 2.x problem

Hello,

In Redmine 2.5.1.stable.13174 we get this error message;

rake aborted!
cannot load such file -- dispatcher
/usr/local/rvm/gems/ruby-2.0.0-p481/gems/activesupport-3.2.18/lib/active_support/dependencies.rb:251:in require' /usr/local/rvm/gems/ruby-2.0.0-p481/gems/activesupport-3.2.18/lib/active_support/dependencies.rb:251:inblock in require'
/usr/local/rvm/gems/ruby-2.0.0-p481/gems/activesupport-3.2.18/lib/active_support/dependencies.rb:236:in load_dependency' /usr/local/rvm/gems/ruby-2.0.0-p481/gems/activesupport-3.2.18/lib/active_support/dependencies.rb:251:inrequire'
/srv/redmine/plugins/redmine_pastebin/init.rb:20:in <top (required)>' /usr/local/rvm/gems/ruby-2.0.0-p481/gems/activesupport-3.2.18/lib/active_support/dependencies.rb:251:inrequire'
/usr/local/rvm/gems/ruby-2.0.0-p481/gems/activesupport-3.2.18/lib/active_support/dependencies.rb:251:in block in require' /usr/local/rvm/gems/ruby-2.0.0-p481/gems/activesupport-3.2.18/lib/active_support/dependencies.rb:236:inload_dependency'
/usr/local/rvm/gems/ruby-2.0.0-p481/gems/activesupport-3.2.18/lib/active_support/dependencies.rb:251:in require' /srv/redmine/lib/redmine/plugin.rb:133:inblock in load'
/srv/redmine/lib/redmine/plugin.rb:124:in each' /srv/redmine/lib/redmine/plugin.rb:124:inload'
/srv/redmine/config/initializers/30-redmine.rb:19:in <top (required)>' /usr/local/rvm/gems/ruby-2.0.0-p481/gems/activesupport-3.2.18/lib/active_support/dependencies.rb:245:inload'
/usr/local/rvm/gems/ruby-2.0.0-p481/gems/activesupport-3.2.18/lib/active_support/dependencies.rb:245:in block in load' /usr/local/rvm/gems/ruby-2.0.0-p481/gems/activesupport-3.2.18/lib/active_support/dependencies.rb:236:inload_dependency'
/usr/local/rvm/gems/ruby-2.0.0-p481/gems/activesupport-3.2.18/lib/active_support/dependencies.rb:245:in load' /usr/local/rvm/gems/ruby-2.0.0-p481/gems/railties-3.2.18/lib/rails/engine.rb:593:inblock (2 levels) in class:Engine'
/usr/local/rvm/gems/ruby-2.0.0-p481/gems/railties-3.2.18/lib/rails/engine.rb:592:in each' /usr/local/rvm/gems/ruby-2.0.0-p481/gems/railties-3.2.18/lib/rails/engine.rb:592:inblock in class:Engine'
/usr/local/rvm/gems/ruby-2.0.0-p481/gems/railties-3.2.18/lib/rails/initializable.rb:30:in instance_exec' /usr/local/rvm/gems/ruby-2.0.0-p481/gems/railties-3.2.18/lib/rails/initializable.rb:30:inrun'
/usr/local/rvm/gems/ruby-2.0.0-p481/gems/railties-3.2.18/lib/rails/initializable.rb:55:in block in run_initializers' /usr/local/rvm/gems/ruby-2.0.0-p481/gems/railties-3.2.18/lib/rails/initializable.rb:54:ineach'
/usr/local/rvm/gems/ruby-2.0.0-p481/gems/railties-3.2.18/lib/rails/initializable.rb:54:in run_initializers' /usr/local/rvm/gems/ruby-2.0.0-p481/gems/railties-3.2.18/lib/rails/application.rb:136:ininitialize!'
/usr/local/rvm/gems/ruby-2.0.0-p481/gems/railties-3.2.18/lib/rails/railtie/configurable.rb:30:in method_missing' /srv/redmine/config/environment.rb:14:in<top (required)>'
/usr/local/rvm/gems/ruby-2.0.0-p481/gems/activesupport-3.2.18/lib/active_support/dependencies.rb:251:in require' /usr/local/rvm/gems/ruby-2.0.0-p481/gems/activesupport-3.2.18/lib/active_support/dependencies.rb:251:inblock in require'
/usr/local/rvm/gems/ruby-2.0.0-p481/gems/activesupport-3.2.18/lib/active_support/dependencies.rb:236:in load_dependency' /usr/local/rvm/gems/ruby-2.0.0-p481/gems/activesupport-3.2.18/lib/active_support/dependencies.rb:251:inrequire'
/usr/local/rvm/gems/ruby-2.0.0-p481/gems/railties-3.2.18/lib/rails/application.rb:103:in require_environment!' /usr/local/rvm/gems/ruby-2.0.0-p481/gems/railties-3.2.18/lib/rails/application.rb:305:inblock (2 levels) in initialize_tasks'
/usr/local/rvm/gems/ruby-2.0.0-p481/bin/ruby_executable_hooks:15:in eval' /usr/local/rvm/gems/ruby-2.0.0-p481/bin/ruby_executable_hooks:15:in

'
Tasks: TOP => db:migrate_plugins => redmine:plugins:migrate => environment
(See full trace by running task with --trace)

admin-only?

Hey,

I've installed redmine_pastebin but it is only accessible when logged in as admin. I hope, that's not the intention? As registered user (manager, reporter) I am unable to add snippets because I get 403.

Asking for support of Ultraviolet

It's not an issue, sorry, I just didn't find "wishlist" button here. :)
Can you add support of Ultraviolet syntax highlighting instead of CodeRay? Unfortunately, CodeRay doesn't support too many programming languages. :(

Problem in Redmine 1.4.0

Hi,

Following error arises in Redmine 1.4.0:

=================start log=====================
Processing ApplicationController#index (for 192.168.1.5 at 2012-04-14 22:58:02) [GET]
Parameters: {"project_id"=>"first", "action"=>"index", "controller"=>"pastes"}

NoMethodError (undefined method accept_key_auth' for PastesController:Class): vendor/plugins/redmine_pastebin/app/controllers/pastes_controller.rb:26 d:/Ruby187/lib/ruby/1.8/webrick/httpserver.rb:104:inservice'
d:/Ruby187/lib/ruby/1.8/webrick/httpserver.rb:65:in run' d:/Ruby187/lib/ruby/1.8/webrick/server.rb:173:instart_thread'
d:/Ruby187/lib/ruby/1.8/webrick/server.rb:162:in start' d:/Ruby187/lib/ruby/1.8/webrick/server.rb:162:instart_thread'
d:/Ruby187/lib/ruby/1.8/webrick/server.rb:95:in start' d:/Ruby187/lib/ruby/1.8/webrick/server.rb:92:ineach'
d:/Ruby187/lib/ruby/1.8/webrick/server.rb:92:in start' d:/Ruby187/lib/ruby/1.8/webrick/server.rb:23:instart'
d:/Ruby187/lib/ruby/1.8/webrick/server.rb:82:in `start'

Rendering D:/biz/apps/redmine_trunk/public/500.html (500 Internal Server Error)
rnal Server Error)
=================end log======================

French translate

Hello,

I transtate your plugin to french.

Bye

Traduction par Adrien Jeser [email protected]

fr:
label_paste_plural: Pastes
label_paste_all: Toutes les Pastes
label_paste_view_all: Voir toutes les pastes
label_paste_link_here: "Lien vers vette paste: %{link}"
label_paste_syntax: "Syntaxe: %{lang}"
label_paste_new: Nouvelle Paste
label_paste_edit: Edition %{link}
field_title: Title (option)
field_lang: Syntaxe
field_text: Texte
button_paste_submit: Paste!
text_paste_update_or_make_new: %{update} ou %{make_new}
button_paste_update: Mise à jour de la paste
button_paste_make_new: Marquer cette paste comme non lu
notice_paste_created: Pasted réuissi
notice_paste_updated: Paste mise à jour réussi
notice_paste_destroyed: Paste supprimer
text_paste_delete_confirmation: Êtes vous sur de vouloir supprimer cette paste ?

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.