Skip to content

Instantly share code, notes, and snippets.

View meineerde's full-sized avatar

Holger Just meineerde

View GitHub Profile
desc "Dump enviromnent information"
task :dump_env do
dump = lambda do |f|
f.puts "$ ruby -v"
f.puts `ruby -v`
f.puts
f.puts "$ gem -v"
f.puts `gem -v`
f.puts
f.puts "$ gem list"
HTTP/1.1 404 Not Found
Content-Type: text/html
Content-Length: 10
Not found!
#!/usr/bin/env ruby
# run me like ruby binary.rb /PATH/TO/FILE
# this scripts checks if the file contains binary or textual data.
require 'yaml'
FILENAME = ARGV[0]
binary = File.read(FILENAME).is_binary_data?
About your Redmine's environment
================================
Checklist
---------
Default administrator account changed No
Attachments directory writable Yes
Plugin assets directory writable Yes
RMagick available (optional) No
require 'redmine'
# Patches to the Redmine core.
require 'dispatcher'
Dispatcher.to_prepare do
require_dependency 'attachment'
Attachment.storage_path = ENV['RAILS_FILES'] || "#{RAILS_ROOT}/files"
end
[core]
repositoryformatversion = 0
filemode = true
bare = true
[remote "origin"]
fetch = +refs/*:refs/*
mirror = true
url = git://github.com/edavis10/redmine.git
#!/usr/bin/env ruby
# We use the actual id's here
dod_id = IssueCustomField.find_by_name('Akzeptanzkriterien').id
timespan_id = IssueCustomField.find_by_name('Zeitaufwand').id
precond_id = IssueCustomField.find_by_name('Vorbedingungen').id
lane_id = IssueCustomField.find_by_name('Lane').id
rows.each do |row|
Index: app/models/project.rb
===================================================================
--- app/models/project.rb (revision 4265)
+++ app/models/project.rb (working copy)
@@ -411,7 +411,14 @@
# Returns a short description of the projects (first lines)
def short_description(length = 255)
- description.gsub(/^(.{#{length}}[^\n\r]*).*$/m, '\1...').strip if description
+ case
# try to load plugins from vendor/plugins first and then from this path
config.plugin_paths << "/path/to/my/plugins"
#!/usr/bin/env ruby /path/to/redmine/script/runner
login = ARGV[0]
if User.find_by_login(login)
puts "User #{login} already exists"
exit(1)
end
# Try all LDAP auth sources