muck-services 0.1.42 → 0.1.43

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.42
1
+ 0.1.43
data/VERSION.orig ADDED
@@ -0,0 +1,5 @@
1
+ <<<<<<< HEAD
2
+ 0.1.40
3
+ =======
4
+ 0.1.42
5
+ >>>>>>> 97d29b7a4de0792aa8744d745f5f6774266b01c8
@@ -98,7 +98,7 @@ class Muck::IdentityFeedsController < ApplicationController
98
98
  protected
99
99
 
100
100
  def get_owner
101
- setup_parent('service')
101
+ setup_parent(:ignore => ['service'])
102
102
  end
103
103
 
104
104
  def get_identity_feed
@@ -13,10 +13,14 @@
13
13
  #
14
14
 
15
15
  class PersonalRecommendation < ActiveRecord::Base
16
-
16
+ unloadable
17
+
17
18
  belongs_to :personal_recommendable, :polymorphic => true
18
19
  belongs_to :destination, :polymorphic => true
19
-
20
+
21
+ belongs_to :entry, :class_name => 'Entry', :foreign_key => 'destination_id', :include => :feed
22
+ belongs_to :user, :class_name => 'User', :foreign_key => 'destination_id'
23
+
20
24
  named_scope :limit, lambda { |num| { :limit => num } }
21
25
  named_scope :recent, lambda { { :conditions => ['created_at > ?', 1.week.ago] } }
22
26
  named_scope :newest, :order => "created_at DESC"
@@ -55,7 +55,7 @@ jQuery(document).ready(function() {
55
55
  if(json.success && json.feeds.length > 0){
56
56
  jQuery('#aggregation-feeds').prepend(json.html);
57
57
  } else {
58
- <%= jquery_message('#ajax-messages') %>
58
+ <%= jquery_json_message('#ajax-messages') %>
59
59
  }
60
60
  jQuery('#add-feed-waiting').hide();
61
61
  });
@@ -12,7 +12,7 @@
12
12
  <td><%= render :partial => 'entries/related_entry', :locals => {:related_entry => r} %></td>
13
13
  <td class="centered"><%= round(r["relevance"]) %></td>
14
14
  <td class="centered"><%= r["clicks"] %></td>
15
- <td class="centered"><%= r["avg_time_on_target"] %></td>
15
+ <td class="centered"><%= r["average_time_at_dest"] %></td>
16
16
  </tr>
17
17
  <% end%>
18
18
  </table>
@@ -11,6 +11,8 @@ module ActiveRecord
11
11
  # +has_muck_recommendations+ gives the class it is called on personalized recommendations
12
12
  def has_muck_recommendations
13
13
  has_many :personal_recommendations, :as => :personal_recommendable
14
+ has_many :recommended_entries, :through => :personal_recommendations, :source => :entry,
15
+ :conditions => "personal_recommendations.destination_type = 'Entry'"
14
16
  end
15
17
 
16
18
  def acts_as_muck_recommendation
@@ -1,15 +1,15 @@
1
1
  # Generated by jeweler
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
3
+ # Instead, edit Jeweler::Tasks in rakefile, and run the gemspec command
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{muck-services}
8
- s.version = "0.1.42"
8
+ s.version = "0.1.43"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Joel Duffin", "Justin Ball"]
12
- s.date = %q{2010-03-12}
12
+ s.date = %q{2010-04-29}
13
13
  s.description = %q{This gem contains the rails specific code for dealing with feeds, aggregations and recommendations. It is meant to work with the muck-raker gem.}
14
14
  s.email = %q{justin@tatemae.com}
15
15
  s.extra_rdoc_files = [
@@ -23,6 +23,7 @@ Gem::Specification.new do |s|
23
23
  "README.rdoc",
24
24
  "Rakefile",
25
25
  "VERSION",
26
+ "VERSION.orig",
26
27
  "app/controllers/admin/muck/feeds_controller.rb",
27
28
  "app/controllers/admin/muck/oai_endpoints_controller.rb",
28
29
  "app/controllers/muck/aggregation_feeds_controller.rb",
@@ -135,7 +136,6 @@ Gem::Specification.new do |s|
135
136
  "app/views/service_templates/_zotero_group.html.erb",
136
137
  "app/views/services/_edit_service.html.erb",
137
138
  "app/views/services/_new_service.html.erb",
138
- "app/views/services/_personal_recommendations.html.erb",
139
139
  "app/views/services/_summary.html.erb",
140
140
  "app/views/services/_view_service.html.erb",
141
141
  "app/views/services_mailer/notification_feed_added.text.ar.html.erb",
@@ -433,7 +433,7 @@ Gem::Specification.new do |s|
433
433
  s.rdoc_options = ["--charset=UTF-8"]
434
434
  s.require_paths = ["lib"]
435
435
  s.rubyforge_project = %q{muck-services}
436
- s.rubygems_version = %q{1.3.6}
436
+ s.rubygems_version = %q{1.3.5}
437
437
  s.summary = %q{Feeds, aggregations and services for muck}
438
438
  s.test_files = [
439
439
  "test/rails_root/app/controllers/application_controller.rb",
@@ -529,6 +529,7 @@ Gem::Specification.new do |s|
529
529
  "test/rails_root/test/unit/feed_test.rb",
530
530
  "test/rails_root/test/unit/identity_feed_test.rb",
531
531
  "test/rails_root/test/unit/oai_endpoint_test.rb",
532
+ "test/rails_root/test/unit/one_test.rb",
532
533
  "test/rails_root/test/unit/personal_recommendation_test.rb",
533
534
  "test/rails_root/test/unit/recommendation_test.rb",
534
535
  "test/rails_root/test/unit/service_category_test.rb",
@@ -0,0 +1,13 @@
1
+ require File.dirname(__FILE__) + '/../test_helper'
2
+
3
+ class OneTest < ActiveSupport::TestCase
4
+ context "entry instance" do
5
+ setup do
6
+ @entry = Factory(:entry)
7
+ end
8
+
9
+ subject { @entry }
10
+
11
+
12
+ end
13
+ end
metadata CHANGED
@@ -1,12 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: muck-services
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 1
8
- - 42
9
- version: 0.1.42
4
+ version: 0.1.43
10
5
  platform: ruby
11
6
  authors:
12
7
  - Joel Duffin
@@ -15,153 +10,129 @@ autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
12
 
18
- date: 2010-03-12 00:00:00 -07:00
13
+ date: 2010-04-29 00:00:00 -06:00
19
14
  default_executable:
20
15
  dependencies:
21
16
  - !ruby/object:Gem::Dependency
22
17
  name: acts-as-taggable-on
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
18
+ type: :runtime
19
+ version_requirement:
20
+ version_requirements: !ruby/object:Gem::Requirement
25
21
  requirements:
26
22
  - - ">="
27
23
  - !ruby/object:Gem::Version
28
- segments:
29
- - 0
30
24
  version: "0"
31
- type: :runtime
32
- version_requirements: *id001
25
+ version:
33
26
  - !ruby/object:Gem::Dependency
34
27
  name: will_paginate
35
- prerelease: false
36
- requirement: &id002 !ruby/object:Gem::Requirement
28
+ type: :runtime
29
+ version_requirement:
30
+ version_requirements: !ruby/object:Gem::Requirement
37
31
  requirements:
38
32
  - - ">="
39
33
  - !ruby/object:Gem::Version
40
- segments:
41
- - 0
42
34
  version: "0"
43
- type: :runtime
44
- version_requirements: *id002
35
+ version:
45
36
  - !ruby/object:Gem::Dependency
46
37
  name: httparty
47
- prerelease: false
48
- requirement: &id003 !ruby/object:Gem::Requirement
38
+ type: :runtime
39
+ version_requirement:
40
+ version_requirements: !ruby/object:Gem::Requirement
49
41
  requirements:
50
42
  - - ">="
51
43
  - !ruby/object:Gem::Version
52
- segments:
53
- - 0
54
44
  version: "0"
55
- type: :runtime
56
- version_requirements: *id003
45
+ version:
57
46
  - !ruby/object:Gem::Dependency
58
47
  name: nokogiri
59
- prerelease: false
60
- requirement: &id004 !ruby/object:Gem::Requirement
48
+ type: :runtime
49
+ version_requirement:
50
+ version_requirements: !ruby/object:Gem::Requirement
61
51
  requirements:
62
52
  - - ">="
63
53
  - !ruby/object:Gem::Version
64
- segments:
65
- - 0
66
54
  version: "0"
67
- type: :runtime
68
- version_requirements: *id004
55
+ version:
69
56
  - !ruby/object:Gem::Dependency
70
57
  name: muck-feedbag
71
- prerelease: false
72
- requirement: &id005 !ruby/object:Gem::Requirement
58
+ type: :runtime
59
+ version_requirement:
60
+ version_requirements: !ruby/object:Gem::Requirement
73
61
  requirements:
74
62
  - - ">="
75
63
  - !ruby/object:Gem::Version
76
- segments:
77
- - 0
78
64
  version: "0"
79
- type: :runtime
80
- version_requirements: *id005
65
+ version:
81
66
  - !ruby/object:Gem::Dependency
82
67
  name: river
83
- prerelease: false
84
- requirement: &id006 !ruby/object:Gem::Requirement
68
+ type: :runtime
69
+ version_requirement:
70
+ version_requirements: !ruby/object:Gem::Requirement
85
71
  requirements:
86
72
  - - ">="
87
73
  - !ruby/object:Gem::Version
88
- segments:
89
- - 0
90
74
  version: "0"
91
- type: :runtime
92
- version_requirements: *id006
75
+ version:
93
76
  - !ruby/object:Gem::Dependency
94
77
  name: overlord
95
- prerelease: false
96
- requirement: &id007 !ruby/object:Gem::Requirement
78
+ type: :runtime
79
+ version_requirement:
80
+ version_requirements: !ruby/object:Gem::Requirement
97
81
  requirements:
98
82
  - - ">="
99
83
  - !ruby/object:Gem::Version
100
- segments:
101
- - 0
102
84
  version: "0"
103
- type: :runtime
104
- version_requirements: *id007
85
+ version:
105
86
  - !ruby/object:Gem::Dependency
106
87
  name: feedzirra
107
- prerelease: false
108
- requirement: &id008 !ruby/object:Gem::Requirement
88
+ type: :runtime
89
+ version_requirement:
90
+ version_requirements: !ruby/object:Gem::Requirement
109
91
  requirements:
110
92
  - - ">="
111
93
  - !ruby/object:Gem::Version
112
- segments:
113
- - 0
114
94
  version: "0"
115
- type: :runtime
116
- version_requirements: *id008
95
+ version:
117
96
  - !ruby/object:Gem::Dependency
118
97
  name: muck-engine
119
- prerelease: false
120
- requirement: &id009 !ruby/object:Gem::Requirement
98
+ type: :runtime
99
+ version_requirement:
100
+ version_requirements: !ruby/object:Gem::Requirement
121
101
  requirements:
122
102
  - - ">="
123
103
  - !ruby/object:Gem::Version
124
- segments:
125
- - 0
126
104
  version: "0"
127
- type: :runtime
128
- version_requirements: *id009
105
+ version:
129
106
  - !ruby/object:Gem::Dependency
130
107
  name: muck-users
131
- prerelease: false
132
- requirement: &id010 !ruby/object:Gem::Requirement
108
+ type: :runtime
109
+ version_requirement:
110
+ version_requirements: !ruby/object:Gem::Requirement
133
111
  requirements:
134
112
  - - ">="
135
113
  - !ruby/object:Gem::Version
136
- segments:
137
- - 0
138
114
  version: "0"
139
- type: :runtime
140
- version_requirements: *id010
115
+ version:
141
116
  - !ruby/object:Gem::Dependency
142
117
  name: muck-comments
143
- prerelease: false
144
- requirement: &id011 !ruby/object:Gem::Requirement
118
+ type: :runtime
119
+ version_requirement:
120
+ version_requirements: !ruby/object:Gem::Requirement
145
121
  requirements:
146
122
  - - ">="
147
123
  - !ruby/object:Gem::Version
148
- segments:
149
- - 0
150
124
  version: "0"
151
- type: :runtime
152
- version_requirements: *id011
125
+ version:
153
126
  - !ruby/object:Gem::Dependency
154
127
  name: shoulda
155
- prerelease: false
156
- requirement: &id012 !ruby/object:Gem::Requirement
128
+ type: :development
129
+ version_requirement:
130
+ version_requirements: !ruby/object:Gem::Requirement
157
131
  requirements:
158
132
  - - ">="
159
133
  - !ruby/object:Gem::Version
160
- segments:
161
- - 0
162
134
  version: "0"
163
- type: :development
164
- version_requirements: *id012
135
+ version:
165
136
  description: This gem contains the rails specific code for dealing with feeds, aggregations and recommendations. It is meant to work with the muck-raker gem.
166
137
  email: justin@tatemae.com
167
138
  executables: []
@@ -178,6 +149,7 @@ files:
178
149
  - README.rdoc
179
150
  - Rakefile
180
151
  - VERSION
152
+ - VERSION.orig
181
153
  - app/controllers/admin/muck/feeds_controller.rb
182
154
  - app/controllers/admin/muck/oai_endpoints_controller.rb
183
155
  - app/controllers/muck/aggregation_feeds_controller.rb
@@ -290,7 +262,6 @@ files:
290
262
  - app/views/service_templates/_zotero_group.html.erb
291
263
  - app/views/services/_edit_service.html.erb
292
264
  - app/views/services/_new_service.html.erb
293
- - app/views/services/_personal_recommendations.html.erb
294
265
  - app/views/services/_summary.html.erb
295
266
  - app/views/services/_view_service.html.erb
296
267
  - app/views/services_mailer/notification_feed_added.text.ar.html.erb
@@ -596,20 +567,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
596
567
  requirements:
597
568
  - - ">="
598
569
  - !ruby/object:Gem::Version
599
- segments:
600
- - 0
601
570
  version: "0"
571
+ version:
602
572
  required_rubygems_version: !ruby/object:Gem::Requirement
603
573
  requirements:
604
574
  - - ">="
605
575
  - !ruby/object:Gem::Version
606
- segments:
607
- - 0
608
576
  version: "0"
577
+ version:
609
578
  requirements: []
610
579
 
611
580
  rubyforge_project: muck-services
612
- rubygems_version: 1.3.6
581
+ rubygems_version: 1.3.5
613
582
  signing_key:
614
583
  specification_version: 3
615
584
  summary: Feeds, aggregations and services for muck
@@ -707,6 +676,7 @@ test_files:
707
676
  - test/rails_root/test/unit/feed_test.rb
708
677
  - test/rails_root/test/unit/identity_feed_test.rb
709
678
  - test/rails_root/test/unit/oai_endpoint_test.rb
679
+ - test/rails_root/test/unit/one_test.rb
710
680
  - test/rails_root/test/unit/personal_recommendation_test.rb
711
681
  - test/rails_root/test/unit/recommendation_test.rb
712
682
  - test/rails_root/test/unit/service_category_test.rb
@@ -1,5 +0,0 @@
1
- <ul>
2
- <% recommendations.each do |r| -%>
3
- <li><%= link_to r.destination.title, r.destination %></li>
4
- <% end -%>
5
- </ul>