Permalink
Browse files

Added CHANGELOG

Removed/Repplaced enkoder plugin
Fixed specs
  • Loading branch information...
1 parent 2cf9504 commit 2ae800bd393fb98452af4439af4514a6cf605ea1 Dimitrij Denissenko committed Feb 7, 2009
View
@@ -0,0 +1,180 @@
+(2009-02-02) Dimitrij Denissenko
+
+ Updated fix script (included tests for GIT) [2cf950]
+ * script/fix
+
+(2009-02-01) Dimitrij Denissenko
+
+ Minor changes and performance improvement to changeset/changes
+ [01aa0c]
+ * app/models/change.rb
+ * app/models/repository/abstract.rb
+ * app/models/repository/subversion.rb
+ * app/views/changesets/_change.html.erb
+ * app/views/changesets/show.html.erb
+
+ Fixed spec [64c184]
+ * .../spec/controllers/blog_controller_spec.rb
+
+ Fixed ambiguous SQL clause [c4de13]
+ * extensions/retro_blog/lib/blog_controller.rb
+ * extensions/retro_blog/models/blog_post.rb
+
+ Updated migration [b4eae8]
+ * db/migrate/054_create_ticket_properties.rb
+
+ Added requirement for OpenStruct [782abb]
+ * config/initializers/D.libs/libs.rb
+
+ Changed Milestone ranking in Feeds [4f2ff0]
+ * app/models/milestone.rb
+ * ...01170000_add_updated_at_column_to_milestones.rb
+ * db/schema.core.rb
+ * spec/fixtures/milestones.yml
+ * spec/models/milestone_spec.rb
+
+ Added RSS controller / Added Secure-Token password recovery / Added
+ Specs / Revised data model [841111]
+ * 101 files affected
+
+(2009-01-28) Dimitrij Denissenko
+
+ Added duck-typing to Grit node classes / Fixed spec [de6670]
+ * app/models/repository/git/node.rb
+ * config/initializers/A.defaults/repositories.rb
+ * spec/controllers/markup_controller_spec.rb
+
+ Fixed markup preview [a35596]
+ * app/controllers/markup_controller.rb
+ * config/routes.rb
+ * spec/controllers/markup_controller_spec.rb
+
+ Fixed spec [524793]
+ * .../controllers/blog_comments_controller_spec.rb
+ * .../spec/controllers/blog_controller_spec.rb
+ * .../spec/views/blog/show.html.erb_spec.rb
+
+ Fixed rendering of previous blog comments on failed attempts to create
+ new comments [74c9ad]
+ * .../retro_blog/lib/blog_comments_controller.rb
+ * .../retro_blog/views/blog/_comments.html.erb
+
+ Set permission level for search in ticketing [be7011]
+ * app/controllers/tickets_controller.rb
+
+ Set permission level for user-auto-complete in ticketing [842be4]
+ * app/controllers/tickets_controller.rb
+
+(2009-01-27) Dimitrij Denissenko
+
+ Added merging of permissions [623962]
+ * .../access_manager/secure_controller.rb
+
+(2009-01-26) Dimitrij Denissenko
+
+ Removed extension template file [71cc48]
+ * extensions/agile_pm
+
+ Removed GIT's submodule nodes (for now) [810f58]
+ * app/models/repository/git/node.rb
+
+ Fixed typo [e867ea]
+ * app/models/repository/git.rb
+
+ Added additional rescue to Git::Node init [aa28e5]
+ * app/models/repository/git/node.rb
+ * spec/models/repository/git/node_spec.rb
+ * spec/models/repository/subversion/node_spec.rb
+
+ Fixed GIT node-retrieval [42fcff]
+ * app/models/repository/git/node.rb
+
+(2009-01-25) Dimitrij Denissenko
+
+ Added custom environment addition / Fixed spec [badfa0]
+ * config/initializers/A.defaults/custom.rb
+ * vendor/plugins/has_attachment/init.rb
+
+ Fixed migration [c03983]
+ * ...705092553_add_sync_call_back_to_repositories.rb
+
+ Updated user assignment (per text field) in tickets. / Added
+ auto-complete field [5bb3fc]
+ * 9 files affected
+
+ Fixed Attachment model dependency [1576c6]
+ * vendor/plugins/has_attachment/init.rb
+
+ Added default respond_to (to prevent 500 errors on missing templates)
+ [45da99]
+ * 7 files affected
+
+ Fixed page renaming in Wiki / Added spec [b7e7fb]
+ * .../spec/views/wiki/rename.html.erb_spec.rb
+ * extensions/retro_wiki/views/wiki/rename.html.erb
+
+ Fixed Wiki permission [2ed07c]
+ * extensions/retro_wiki/lib/wiki_helper.rb
+
+ Fixed diff browser (for GIT type diffs) / UI improvements [a898e9]
+ * 23 files affected
+
+(2009-01-24) Dimitrij Denissenko
+
+ Added RSS to Blog [43d013]
+ * app/controllers/project_area_controller.rb
+ * extensions/retro_blog/lib/blog_controller.rb
+ * .../spec/controllers/blog_controller_spec.rb
+ * extensions/retro_blog/views/blog/index.html.erb
+ * .../extension_manager/extension_installer.rb
+
+ Fixed RSS/Rails bug [3a0478]
+ * config/initializers/B.patches/time_with_zone.rb
+ * public/stylesheets/res/classes.css
+ * spec/models/ticket_spec.rb
+
+ Added bottom layout marker [a3301c]
+ * app/controllers/application.rb
+ * extensions/.gitignore
+
+ Moved params_keeper to plugins (better compatibility) [297f9c]
+ * lib/params_keeper.rb
+ * vendor/plugins/params_keeper/init.rb
+ * vendor/plugins/params_keeper/lib/params_keeper.rb
+
+ Moved validates_association to plugins (better compatibility) [c6cd7f]
+ * config/initializers/C.extensions/validations.rb
+ * vendor/plugins/validates_association/init.rb
+ * .../lib/validates_association.rb
+
+ Migrated has_attachment to plugin (compatibility) [981279]
+ * 17 files affected
+
+ Changed file permission [90756f]
+
+ Reverted [6d75ecfb0a2e68b908b7779c32da79f25d753bea], extension
+ stylesheets should not be 'kept' [73ec89]
+ * .../extension_manager/core_ext/asset_tag_helper.rb
+ * lib/retrospectiva/extension_manager/routes.rb
+
+ Simplified Blog stylesheet [a1848d]
+ * .../retro_blog/public/stylesheets/retro_blog.css
+ * extensions/retro_blog/views/blog/index.html.erb
+
+ Added Capistrano compatibility / Removed unused files [6d75ec]
+ * .../extension_manager/core_ext/asset_tag_helper.rb
+ * lib/retrospectiva/extension_manager/routes.rb
+ * public/404.html
+ * public/422.html
+ * public/500.html
+ * public/blank_iframe.html
+
+ Removed empty extension folder [c48cb9]
+ * extensions/agile_pm
+
+ Updated README [87c850]
+ * README
+
+ Initial public import [66c170]
+ * 904 files affected
+
@@ -87,7 +87,7 @@ def user_gravatar(user, options = {})
def truncated_author(object, author_method = :author, email_method = :email)
author, email = object.send(author_method), object.send(email_method)
value = h(truncate(author, :length => 20))
- email.blank? ? value : enkode_mail(email, value, h(author))
+ email.blank? ? value : mail_to(email, value, :title => h(author))
end
def will_paginate_per_page(collection, options = {})
@@ -139,13 +139,68 @@ def toggle_pagination(page, term = params[:term])
page << "$$('.pagination').each(function(el) { el.#{term.blank? ? 'show' : 'hide'}() });"
end
+ # Modification of the built-in encryption
+ # Uses modified version of the hivelogic enkoder (original Copyright (c) 2006, Automatic Corp.)
+ def mail_to(email_address, name = nil, html_options = {})
+ html_options.symbolize_keys!
+ html_options.delete(:encode)
+ logic = random_enkode_logic
+
+ result = ''
+ "document.write('#{super}');".each_byte do |c|
+ result << sprintf("%%%x", c)
+ end
+ result = "eval(decodeURIComponent('#{result}'))"
+
+ result = logic[:rb].call(result)
+ result = "kode='#{escape_javascript(result)}';#{logic[:js]}"
+ result = "function hl_enkoder(){var kode='#{escape_javascript(result)}';var i,c,x;while(eval(kode));};hl_enkoder();"
+ "<script type=\"#{Mime::JS}\">#{result}</script>"
+ end
+
protected
def gravatar(email, options = {})
size = options.delete(:size) || 40
options.reverse_merge!(:class => 'frame')
image_tag "http://www.gravatar.com/avatar/#{MD5::md5(email)}.png?s=#{size}", options
end
+
+ private
+
+ def random_enkode_logic
+ kodes = [{
+ :rb => lambda {|s| s.reverse },
+ :js => "kode=kode.split('').reverse().join('')"
+ }, {
+ :rb => lambda {|s|
+ result = ''
+ s.each_byte { |b|
+ b += 3
+ b -= 128 if b > 127
+ result << b.chr
+ }
+ result
+ },
+ :js => (
+ "x='';for(i=0;i<kode.length;i++){c=kode.charCodeAt(i)-3;" +
+ "if(c<0)c+=128;x+=String.fromCharCode(c)}kode=x"
+ )
+ }, {
+ :rb => lambda {|s|
+ for i in (0..s.length/2-1)
+ s[i*2],s[i*2+1] = s[i*2+1],s[i*2]
+ end
+ s
+ },
+ :js => (
+ "x='';for(i=0;i<(kode.length-1);i+=2){" +
+ "x+=kode.charAt(i+1)+kode.charAt(i)};" +
+ "kode=x+(i<kode.length?kode.charAt(kode.length-1):'');"
+ )
+ }]
+ kodes[rand(kodes.size)]
+ end
end
@@ -23,7 +23,7 @@ def previous_revision
def unified_diff
if @unified_diff.nil? && diffable?
node = repository.node(path, revision)
- if node.size < maximum_diff_size
+ if node.size < self.class.maximum_diff_size
@unified_diff = repository.unified_diff(path, previous_revision, revision)
end
end
@@ -26,7 +26,7 @@
<div class="span-5 last">
<strong><%=_ 'Assigned To' %>:</strong><br/>
<% if @ticket.assigned_user -%>
- <em><%= enkode_mail @ticket.assigned_user.email, h(truncate(@ticket.assigned_user.name, :length => 20)), h(@ticket.assigned_user.name) %></em>
+ <em><%= mail_to @ticket.assigned_user.email, h(truncate(@ticket.assigned_user.name, :length => 20)), :title => h(@ticket.assigned_user.name) %></em>
<% else -%>
<em><%=_ 'Unassigned' %></em>
<% end -%>
@@ -4,7 +4,7 @@
# you don't control web/app server and can't set it the proper way
# ENV['RAILS_ENV'] ||= 'production'
-RETROSPECTIVA_VERSION = '1.1-DEV (M3+)'
+RETROSPECTIVA_VERSION = '1.9.207'
# Specifies gem version of Rails to use when vendor/rails is not present
RAILS_GEM_VERSION = '2.2.2' unless defined? RAILS_GEM_VERSION
View
@@ -0,0 +1,93 @@
+#!/usr/bin/env ruby
+
+require 'rubygems'
+require 'activesupport'
+require 'actionmailer'
+
+RAILS_ROOT = File.expand_path(File.dirname(__FILE__) + '/..')
+
+class Commit
+
+ def self.parse(full_log)
+ full_log.split(/^commit /).map do |log|
+ log.blank? ? nil : new("commit #{log}")
+ end.compact
+ end
+
+ attr_reader :id, :author, :date, :files
+
+ def initialize(log)
+ lines = log.split("\n")
+ @message = []
+ @files = []
+
+ while !lines.empty?
+ line = lines.shift
+
+ if line.blank?
+ # skip
+ elsif line =~ /^commit (\w+)$/
+ @id = $1
+ elsif line =~ /^Author\: ([\w ]+)/
+ @author = $1
+ elsif line =~ /^Date\: +([\d-]+)/
+ @date = Date.strptime($1)
+ elsif line =~ /^ {4}(.+)$/
+ @message << line.strip
+ elsif line =~ /^ (.+?) \| /
+ @files << $1.strip
+ end
+ end
+ end
+
+ def message(join_with = ' / ')
+ @message.join(join_with)
+ end
+
+ def short_id
+ id.first(6)
+ end
+
+ def file_info
+ if files.size > 6
+ ["#{files.size} files affected"]
+ else
+ files
+ end.map do |line|
+ format "* #{line}", 4
+ end.join
+ end
+
+ def summary
+ text = "#{message} [#{short_id}]"
+ format(text)
+ end
+
+ protected
+
+ def format(text, indent = 2)
+ Text::Format.new( :columns => 72, :first_indent => indent, :body_indent => indent, :text => text ).format
+ end
+
+end
+
+full_log = `git log --summary --stat --no-merges --date=short -- #{RAILS_ROOT}`
+
+commit_map = Commit.parse(full_log).inject(ActiveSupport::OrderedHash.new) do |result, commit|
+ result[commit.date] ||= ActiveSupport::OrderedHash.new
+ result[commit.date][commit.author] ||= []
+ result[commit.date][commit.author] << commit
+ result
+end
+
+commit_map.each do |date, details|
+ details.each do |author, commits|
+ puts "(#{date}) #{author}"
+
+ commits.each do |commit|
+ puts "\n" + commit.summary + commit.file_info
+ end
+ puts "\n"
+ end
+end
+
@@ -73,7 +73,8 @@
end
it 'should return an empty string as DIFF if DIFF is exceeding the size limit' do
- changes(:r04_m02).unified_diff(0).should == ''
+ Change.stub!(:maximum_diff_size).and_return(0)
+ changes(:r04_m02).unified_diff.should == ''
end
end
Oops, something went wrong.

0 comments on commit 2ae800b

Please sign in to comment.