Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarius Mathiesen <marius@gitorious.org>2012-12-06 09:44:10 (GMT)
committer Marius Mathiesen <marius@gitorious.org>2012-12-06 09:44:10 (GMT)
commit66fead9c0bf452594128bf2ccbe5ff2122562ace (patch)
tree114508e7eb783192d6f08303919a03d36e7286bb
parentcc9cc9512e3276128db5f8bd7ac299d1b1e48f42 (diff)
parentdf448d30b6d1cba1524d93f7f1bf1a0f97e43b33 (diff)
Merge branch 'release/2.4.3'
-rw-r--r--app/controllers/admin/repositories_controller.rb2
-rw-r--r--app/controllers/searches_controller.rb3
-rw-r--r--app/views/searches/show.html.erb20
-rw-r--r--data/hooks/messaging.rb7
-rw-r--r--db/migrate/20121130094633_add_event_id_index_to_feed_items.rb9
-rw-r--r--db/schema.rb3
-rw-r--r--lib/gitorious.rb2
-rw-r--r--test/functional/admin/repositories_controller_test.rb1
-rw-r--r--test/functional/searches_controller_test.rb3
9 files changed, 34 insertions, 16 deletions
diff --git a/app/controllers/admin/repositories_controller.rb b/app/controllers/admin/repositories_controller.rb
index 35b0d06..c232ca8 100644
--- a/app/controllers/admin/repositories_controller.rb
+++ b/app/controllers/admin/repositories_controller.rb
@@ -26,7 +26,7 @@ class Admin::RepositoriesController < AdminController
def recreate
@repository = Repository.find(params[:id])
- @repository.post_repo_creation_message
+ RepositoryBuilder.new(@repository).post_repo_creation_message
flash[:notice] = "Recreation message posted"
redirect_to :action => :index
end
diff --git a/app/controllers/searches_controller.rb b/app/controllers/searches_controller.rb
index b13f479..59a2c0b 100644
--- a/app/controllers/searches_controller.rb
+++ b/app/controllers/searches_controller.rb
@@ -32,7 +32,8 @@ class SearchesController < ApplicationController
@all_results = ThinkingSphinx.search(params[:q],{
:page => page,
:per_page => PER_PAGE,
- :classes => [Project, Repository, MergeRequest]})
+ :classes => [Project, Repository, MergeRequest],
+ :match_mode => :extended})
@all_results.to_a
end
diff --git a/app/views/searches/show.html.erb b/app/views/searches/show.html.erb
index 267d47d..8941420 100644
--- a/app/views/searches/show.html.erb
+++ b/app/views/searches/show.html.erb
@@ -57,23 +57,23 @@
<ul class="search-tips">
<h4>Projects</h4>
- <li><code>title:</code> Project title</li>
- <li><code>description:</code> Project description</li>
- <li><code>slug:</code> Project slug</li>
- <li><code>category:</code> Project label</li>
- <li><code>user:</code> Project creator username</li>
+ <li><code>@title</code> Project title</li>
+ <li><code>@description</code> Project description</li>
+ <li><code>@slug</code> Project slug</li>
+ <li><code>@category</code> Project label</li>
+ <li><code>@user</code> Project creator username</li>
</ul>
<ul class="search-tips">
<h4>Repositories</h4>
- <li><code>name:</code> Repository name</li>
- <li><code>description:</code> Repository description</li>
+ <li><code>@name</code> Repository name</li>
+ <li><code>@description</code> Repository description</li>
</ul>
<ul class="search-tips">
<h4>Merge Requests</h4>
- <li><code>proposal:</code> Merge request proposal body</li>
- <li><code>proposed_by:</code> Merge request creator username</li>
- <li><code>status: </code> Merge request status</li>
+ <li><code>@proposal</code> Merge request proposal body</li>
+ <li><code>@proposed_by</code> Merge request creator username</li>
+ <li><code>@status </code> Merge request status</li>
</ul>
<% end %>
diff --git a/data/hooks/messaging.rb b/data/hooks/messaging.rb
index 8077ee6..b4b3491 100644
--- a/data/hooks/messaging.rb
+++ b/data/hooks/messaging.rb
@@ -53,6 +53,13 @@ if !defined?(GitoriousConfig)
Bundler.require adapter.to_sym
Gitorious::Messaging.load_adapter(adapter)
Gitorious::Messaging.configure_publisher(adapter)
+ if adapter == "resque"
+ resque_config = Rails.root + "config/resque.yml"
+ if resque_config.exist?
+ settings = YAML::load_file(resque_config)[Rails.env.to_s]
+ Resque.redis = settings if settings
+ end
+ end
end
class Publisher
diff --git a/db/migrate/20121130094633_add_event_id_index_to_feed_items.rb b/db/migrate/20121130094633_add_event_id_index_to_feed_items.rb
new file mode 100644
index 0000000..097eaf0
--- /dev/null
+++ b/db/migrate/20121130094633_add_event_id_index_to_feed_items.rb
@@ -0,0 +1,9 @@
+class AddEventIdIndexToFeedItems < ActiveRecord::Migration
+ def self.up
+ add_index :feed_items, :event_id
+ end
+
+ def self.down
+ remove_index :feed_items, :event_id
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index e932f99..349a384 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -9,7 +9,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20120629102742) do
+ActiveRecord::Schema.define(:version => 20121130094633) do
create_table "archived_events", :force => true do |t|
t.integer "user_id"
@@ -138,6 +138,7 @@ ActiveRecord::Schema.define(:version => 20120629102742) do
t.datetime "updated_at"
end
+ add_index "feed_items", ["event_id"], :name => "index_feed_items_on_event_id"
add_index "feed_items", ["watcher_id", "created_at"], :name => "index_feed_items_on_watcher_id_and_created_at"
create_table "groups", :force => true do |t|
diff --git a/lib/gitorious.rb b/lib/gitorious.rb
index b55bafa..73f8641 100644
--- a/lib/gitorious.rb
+++ b/lib/gitorious.rb
@@ -16,5 +16,5 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#++
module Gitorious
- VERSION = "2.4.2"
+ VERSION = "2.4.3"
end
diff --git a/test/functional/admin/repositories_controller_test.rb b/test/functional/admin/repositories_controller_test.rb
index ab02903..ff18b6b 100644
--- a/test/functional/admin/repositories_controller_test.rb
+++ b/test/functional/admin/repositories_controller_test.rb
@@ -42,7 +42,6 @@ class Admin::RepositoriesControllerTest < ActionController::TestCase
login_as :johan
@repo = repositories(:johans)
Repository.expects(:find).with("2").returns(@repo)
- @repo.expects(:post_repo_creation_message)
put :recreate, :id => 2
assert_response :redirect
end
diff --git a/test/functional/searches_controller_test.rb b/test/functional/searches_controller_test.rb
index f6b4833..8045c7c 100644
--- a/test/functional/searches_controller_test.rb
+++ b/test/functional/searches_controller_test.rb
@@ -29,7 +29,8 @@ class SearchesControllerTest < ActionController::TestCase
ThinkingSphinx.expects(:search).with("foo",{
:page => 1, :per_page => 30,
- :classes => [Project, Repository, MergeRequest]
+ :classes => [Project, Repository, MergeRequest],
+ :match_mode => :extended
}).returns(search_result)
search_result.expects(:total_entries).returns(1)