muck-services 0.1.10 → 0.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. data/VERSION +1 -1
  2. data/app/controllers/muck/recommendations_controller.rb +21 -6
  3. data/app/models/entry.rb +7 -10
  4. data/app/views/recommendations/get_button.html.erb +5 -0
  5. data/app/views/recommendations/index.pjs.erb +1 -1
  6. data/app/views/recommendations/index.xml.builder +4 -6
  7. data/app/views/recommendations/real_time.html.erb +13 -0
  8. data/app/views/recommendations/{index_real_time.pjs.erb → real_time.pjs.erb} +0 -0
  9. data/app/views/recommendations/{index_real_time.xml.builder → real_time.xml.builder} +1 -1
  10. data/config/muck_services_routes.rb +3 -0
  11. data/locales/en.yml +2 -1
  12. data/muck-services.gemspec +8 -52
  13. data/public/images/folksemantic/logo-folksemantic-gm.gif +0 -0
  14. data/public/javascripts/recommenderextension.user.js +392 -0
  15. data/test/rails_root/config/environment.rb +7 -6
  16. data/test/rails_root/config/environments/test.rb +0 -10
  17. data/test/rails_root/db/migrate/20090602191243_create_muck_raker.rb +4 -19
  18. data/test/rails_root/db/migrate/20090703175825_denormalize_entries_subjects.rb +3 -29
  19. data/test/rails_root/db/migrate/20090717175825_normalize_entries_subjects.rb +3 -32
  20. data/test/rails_root/test/factories.rb +0 -145
  21. data/test/rails_root/test/functional/topics_controller_test.rb +4 -0
  22. data/test/rails_root/test/test_helper.rb +5 -40
  23. data/test/rails_root/test/unit/share_test.rb +3 -0
  24. data/test/rails_root/test/unit/user_test.rb +3 -0
  25. metadata +8 -52
  26. data/app/views/recommendations/index_js.pjs.erb +0 -39
  27. data/config/solr/README.txt +0 -0
  28. data/config/solr/cores/de/conf/protwords.txt +0 -21
  29. data/config/solr/cores/de/conf/schema.xml +0 -81
  30. data/config/solr/cores/de/conf/solrconfig.xml +0 -311
  31. data/config/solr/cores/de/conf/stopwords.txt +0 -341
  32. data/config/solr/cores/de/conf/synonyms.txt +0 -31
  33. data/config/solr/cores/en/conf/protwords.txt +0 -21
  34. data/config/solr/cores/en/conf/schema.xml +0 -83
  35. data/config/solr/cores/en/conf/solrconfig.xml +0 -311
  36. data/config/solr/cores/en/conf/stopwords.txt +0 -341
  37. data/config/solr/cores/en/conf/synonyms.txt +0 -31
  38. data/config/solr/cores/es/conf/protwords.txt +0 -21
  39. data/config/solr/cores/es/conf/schema.xml +0 -81
  40. data/config/solr/cores/es/conf/solrconfig.xml +0 -311
  41. data/config/solr/cores/es/conf/stopwords.txt +0 -206
  42. data/config/solr/cores/es/conf/synonyms.txt +0 -31
  43. data/config/solr/cores/fr/conf/protwords.txt +0 -21
  44. data/config/solr/cores/fr/conf/schema.xml +0 -82
  45. data/config/solr/cores/fr/conf/solrconfig.xml +0 -311
  46. data/config/solr/cores/fr/conf/stopwords.txt +0 -57
  47. data/config/solr/cores/fr/conf/synonyms.txt +0 -31
  48. data/config/solr/cores/ja/conf/protwords.txt +0 -21
  49. data/config/solr/cores/ja/conf/schema.xml +0 -69
  50. data/config/solr/cores/ja/conf/solrconfig.xml +0 -311
  51. data/config/solr/cores/ja/conf/stopwords.txt +0 -341
  52. data/config/solr/cores/ja/conf/synonyms.txt +0 -31
  53. data/config/solr/cores/nl/conf/protwords.txt +0 -21
  54. data/config/solr/cores/nl/conf/schema.xml +0 -78
  55. data/config/solr/cores/nl/conf/solrconfig.xml +0 -311
  56. data/config/solr/cores/nl/conf/stopwords.txt +0 -45691
  57. data/config/solr/cores/nl/conf/synonyms.txt +0 -31
  58. data/config/solr/cores/ru/conf/protwords.txt +0 -21
  59. data/config/solr/cores/ru/conf/schema.xml +0 -78
  60. data/config/solr/cores/ru/conf/solrconfig.xml +0 -311
  61. data/config/solr/cores/ru/conf/stopwords.txt +0 -341
  62. data/config/solr/cores/ru/conf/synonyms.txt +0 -31
  63. data/config/solr/cores/zh/conf/protwords.txt +0 -21
  64. data/config/solr/cores/zh/conf/schema.xml +0 -72
  65. data/config/solr/cores/zh/conf/solrconfig.xml +0 -311
  66. data/config/solr/cores/zh/conf/stopwords.txt +0 -341
  67. data/config/solr/cores/zh/conf/synonyms.txt +0 -31
  68. data/config/solr/solr.xml +0 -50
  69. data/test/rails_root/test/shoulda_macros/controller.rb +0 -49
  70. data/test/rails_root/test/shoulda_macros/forms.rb +0 -32
  71. data/test/rails_root/test/shoulda_macros/models.rb +0 -50
  72. data/test/rails_root/test/shoulda_macros/pagination.rb +0 -53
  73. data/test/rails_root/test/shoulda_macros/plugins.rb +0 -34
@@ -15,23 +15,24 @@ end
15
15
 
16
16
  Rails::Initializer.run do |config|
17
17
  config.time_zone = 'UTC'
18
- config.gem 'mislav-will_paginate', :lib => 'will_paginate', :source => 'http://gems.github.com'
19
- config.gem "binarylogic-authlogic", :lib => 'authlogic', :source => 'http://gems.github.com', :version => ">=2.1.0"
20
- config.gem "binarylogic-searchlogic", :lib => 'searchlogic', :source => 'http://gems.github.com', :version => '~> 2.1.1'
18
+ config.gem "will_paginate"
19
+ config.gem "authlogic"
20
+ config.gem "searchlogic"
21
21
  config.gem "bcrypt-ruby", :lib => "bcrypt", :version => ">=2.0.5"
22
- config.gem 'mbleigh-acts-as-taggable-on', :lib => "acts-as-taggable-on", :source => "http://gems.github.com"
23
- config.gem "collectiveidea-awesome_nested_set", :lib => 'awesome_nested_set', :source => "http://gems.github.com"
22
+ config.gem "acts-as-taggable-on"
23
+ config.gem "awesome_nested_set"
24
24
  config.gem "muck-feedbag", :lib => "feedbag", :source => "http://gems.github.com"
25
25
  config.gem "pauldix-feedzirra", :lib => 'feedzirra', :source => "http://gems.github.com"
26
26
  config.gem "httparty"
27
27
  config.gem "river"
28
28
  config.gem "overlord"
29
- config.gem "friendly_id", :version => '>=2.1.3'
29
+ config.gem "friendly_id"
30
30
  config.gem 'muck-engine', :lib => 'muck_engine'
31
31
  config.gem 'muck-users', :lib => 'muck_users'
32
32
  config.gem 'muck-comments', :lib => 'muck_comments'
33
33
  config.gem 'muck-activities', :lib => 'muck_activities'
34
34
  config.gem 'muck-shares', :lib => 'muck_shares'
35
35
  config.gem 'muck-solr', :lib => 'acts_as_solr'
36
+ config.gem 'muck-raker', :lib => 'muck-raker'
36
37
  config.plugin_locators << TestGemLocator
37
38
  end
@@ -22,13 +22,3 @@ config.action_controller.allow_forgery_protection = false
22
22
  config.action_mailer.delivery_method = :test
23
23
 
24
24
  HOST = "localhost"
25
-
26
- config.gem 'thoughtbot-shoulda',
27
- :lib => 'shoulda',
28
- :source => "http://gems.github.com",
29
- :version => '>= 2.9.1'
30
- config.gem 'thoughtbot-factory_girl',
31
- :lib => 'factory_girl',
32
- :source => "http://gems.github.com",
33
- :version => '>= 1.2.0'
34
- config.gem "rcov", :version => '>=0.8.1.2.0'
@@ -1,10 +1,7 @@
1
1
  class CreateMuckRaker < ActiveRecord::Migration
2
2
 
3
3
  def self.up
4
-
5
- # Gets the database adapter info defined in the database.yml file
6
- adapter = User.connection.instance_variable_get("@config")[:adapter]
7
-
4
+
8
5
  create_table "action_types", :force => true do |t|
9
6
  t.string "action_type"
10
7
  t.integer "weight"
@@ -257,13 +254,7 @@ class CreateMuckRaker < ActiveRecord::Migration
257
254
  t.integer "entry_id"
258
255
  t.boolean "autogenerated", :default => false
259
256
  end
260
-
261
- if adapter == 'mysql'
262
- execute "ALTER TABLE entries_subjects DROP COLUMN id, DROP PRIMARY KEY, ADD PRIMARY KEY USING BTREE(subject_id, entry_id);"
263
- elsif adapter == 'postgresql'
264
- execute "CREATE UNIQUE INDEX entries_subjects_subject_id_entry_id ON entries_subjects USING btree(subject_id, entry_id); "
265
- execute "ALTER TABLE entries_subjects CLUSTER ON entries_subjects_subject_id_entry_id; "
266
- end
257
+ execute "ALTER TABLE entries_subjects DROP COLUMN id, DROP PRIMARY KEY, ADD PRIMARY KEY USING BTREE(subject_id, entry_id);"
267
258
  add_index "entries_subjects", ["subject_id"]
268
259
  add_index "entries_subjects", ["entry_id"]
269
260
  add_index "entries_subjects", ["autogenerated"]
@@ -273,14 +264,8 @@ class CreateMuckRaker < ActiveRecord::Migration
273
264
  t.string "filter"
274
265
  t.string "tag_list", :limit => 2500
275
266
  end
276
-
277
- if adapter == 'mysql'
278
- execute "ALTER TABLE cloud_caches DROP COLUMN id, DROP PRIMARY KEY, ADD PRIMARY KEY USING BTREE(language_id, filter);"
279
- elsif adapter == 'postgresql'
280
- execute "CREATE UNIQUE INDEX cloud_caches_language_id_filter ON cloud_caches USING btree(language_id, filter); "
281
- execute "ALTER TABLE cloud_caches CLUSTER ON cloud_caches_language_id_filter; "
282
- end
283
-
267
+ execute "ALTER TABLE cloud_caches DROP COLUMN id, DROP PRIMARY KEY, ADD PRIMARY KEY USING BTREE(language_id, filter);"
268
+
284
269
  # add a flag to the languages table to flag languages we support
285
270
  add_column :languages, :muck_raker_supported, :boolean, :default => false
286
271
  add_column :languages, :indexed_records, :integer, :default => 0
@@ -1,41 +1,15 @@
1
1
  class DenormalizeEntriesSubjects < ActiveRecord::Migration
2
2
  def self.up
3
-
4
- # Gets the database adapter info defined in the database.yml file
5
- adapter = User.connection.instance_variable_get("@config")[:adapter]
6
-
7
3
  add_column :entries_subjects, :language_id, :integer
8
4
  add_column :entries_subjects, :grain_size, :string
9
5
  add_index "entries_subjects", ["language_id"]
10
6
  add_index "entries_subjects", ["grain_size"]
11
-
12
- if adapter == 'mysql'
13
- execute "ALTER TABLE entries_subjects DROP PRIMARY KEY, ADD PRIMARY KEY USING BTREE(subject_id, language_id, grain_size, entry_id);"
14
- execute "UPDATE entries_subjects AS es INNER JOIN entries AS e ON e.id = es.entry_id SET es.language_id = e.language_id, es.grain_size = e.grain_size"
15
- elsif adapter == 'postgresql'
16
- execute "DROP INDEX entries_subjects_subject_id_entry_id"
17
- execute "CREATE UNIQUE INDEX entries_subjects_subject_id_entry_id ON entries_subjects USING btree(subject_id, language_id, grain_size, entry_id); "
18
- execute "ALTER TABLE entries_subjects CLUSTER ON entries_subjects_subject_id_entry_id; "
19
- execute "UPDATE entries_subjects es SET language_id = e.language_id, grain_size = e.grain_size FROM entries e WHERE es.entry_id = e.id"
20
- else
21
- raise 'Migration not implemented for this DB adapter'
22
- end
23
-
7
+ execute "ALTER TABLE entries_subjects DROP PRIMARY KEY, ADD PRIMARY KEY USING BTREE(subject_id, language_id, grain_size, entry_id);"
8
+ execute "UPDATE entries_subjects AS es INNER JOIN entries AS e ON e.id = es.entry_id SET es.language_id = e.language_id, es.grain_size = e.grain_size"
24
9
  end
25
10
 
26
11
  def self.down
27
-
28
- # Gets the database adapter info defined in the database.yml file
29
- adapter = User.connection.instance_variable_get("@config")[:adapter]
30
-
31
- if adapter == 'mysql'
32
- execute "ALTER TABLE entries_subjects DROP PRIMARY KEY, ADD PRIMARY KEY USING BTREE(subject_id, entry_id);"
33
- elsif adapter == 'postgresql'
34
- execute "DROP INDEX entries_subjects_subject_id_entry_id"
35
- execute "CREATE UNIQUE INDEX entries_subjects_subject_id_entry_id ON entries_subjects USING btree(subject_id, entry_id); "
36
- execute "ALTER TABLE entries_subjects CLUSTER ON entries_subjects_subject_id_entry_id; "
37
- end
38
-
12
+ execute "ALTER TABLE entries_subjects DROP PRIMARY KEY, ADD PRIMARY KEY USING BTREE(subject_id, entry_id);"
39
13
  remove_column :entries_subjects, :language_id
40
14
  remove_column :entries_subjects, :grain_size
41
15
  end
@@ -1,19 +1,6 @@
1
1
  class NormalizeEntriesSubjects < ActiveRecord::Migration
2
2
  def self.up
3
-
4
- # Gets the database adapter info defined in the database.yml file
5
- adapter = User.connection.instance_variable_get("@config")[:adapter]
6
-
7
- if adapter == 'mysql'
8
- execute "ALTER TABLE entries_subjects DROP PRIMARY KEY, ADD PRIMARY KEY USING BTREE(subject_id, entry_id);"
9
- elsif adapter == 'postgresql'
10
- execute "DROP INDEX entries_subjects_subject_id_entry_id"
11
- execute "CREATE UNIQUE INDEX entries_subjects_subject_id_entry_id ON entries_subjects USING btree(subject_id, entry_id); "
12
- execute "ALTER TABLE entries_subjects CLUSTER ON entries_subjects_subject_id_entry_id; "
13
- else
14
- raise 'Migration not implemented for this data adapter'
15
- end
16
-
3
+ execute "ALTER TABLE entries_subjects DROP PRIMARY KEY, ADD PRIMARY KEY USING BTREE(subject_id, entry_id);"
17
4
  remove_column :entries_subjects, :language_id
18
5
  remove_column :entries_subjects, :grain_size
19
6
  execute "delete from entries_subjects where entry_id IN (select entries.id from entries inner join feeds ON feeds.id = entries.feed_id where feeds.uri = 'http://ndr.nsdl.org/oai?verb=ListRecords&metadataPrefix=nsdl_dc&set=439869');"
@@ -21,27 +8,11 @@ class NormalizeEntriesSubjects < ActiveRecord::Migration
21
8
  end
22
9
 
23
10
  def self.down
24
-
25
- # Gets the database adapter info defined in the database.yml file
26
- adapter = User.connection.instance_variable_get("@config")[:adapter]
27
-
28
11
  add_column :entries_subjects, :language_id, :integer
29
12
  add_column :entries_subjects, :grain_size, :string
30
13
  add_index "entries_subjects", ["language_id"]
31
14
  add_index "entries_subjects", ["grain_size"]
32
-
33
- if adapter == 'mysql'
34
- execute "ALTER TABLE entries_subjects DROP PRIMARY KEY, ADD PRIMARY KEY USING BTREE(subject_id, language_id, grain_size, entry_id);"
35
- execute "UPDATE entries_subjects AS es INNER JOIN entries AS e ON e.id = es.entry_id SET es.language_id = e.language_id, es.grain_size = e.grain_size"
36
- elsif adapter == 'postgresql'
37
- execute "DROP INDEX entries_subjects_subject_id_entry_id"
38
- execute "CREATE UNIQUE INDEX entries_subjects_subject_id_entry_id ON entries_subjects USING btree(subject_id, language_id, grain_size, entry_id); "
39
- execute "ALTER TABLE entries_subjects CLUSTER ON entries_subjects_subject_id_entry_id; "
40
- execute "UPDATE entries_subjects es SET language_id = e.language_id, grain_size = e.grain_size FROM entries e WHERE es.entry_id = e.id"
41
- else
42
- raise 'Migration not implemented for this data adapter'
43
- end
44
-
45
-
15
+ execute "ALTER TABLE entries_subjects DROP PRIMARY KEY, ADD PRIMARY KEY USING BTREE(subject_id, language_id, grain_size, entry_id);"
16
+ execute "UPDATE entries_subjects AS es INNER JOIN entries AS e ON e.id = es.entry_id SET es.language_id = e.language_id, es.grain_size = e.grain_size"
46
17
  end
47
18
  end
@@ -1,151 +1,6 @@
1
- Factory.sequence :email do |n|
2
- "somebody#{n}@example.com"
3
- end
4
-
5
- Factory.sequence :uri do |n|
6
- "www#{n}.example.com"
7
- end
8
-
9
- Factory.sequence :login do |n|
10
- "inquire#{n}"
11
- end
12
-
13
- Factory.sequence :name do |n|
14
- "a_name#{n}"
15
- end
16
-
17
- Factory.sequence :abbr do |n|
18
- "abbr#{n}"
19
- end
20
-
21
- Factory.sequence :locale do |n|
22
- "a#{n}"
23
- end
24
-
25
- Factory.sequence :description do |n|
26
- "This is the description: #{n}"
27
- end
28
-
29
- Factory.sequence :title do |n|
30
- "This is the title: #{n}"
31
- end
32
-
33
- Factory.define :state do |f|
34
- f.name { Factory.next(:name) }
35
- f.abbreviation { Factory.next(:abbr) }
36
- f.country {|a| a.association(:country) }
37
- end
38
-
39
- Factory.define :country do |f|
40
- f.name { Factory.next(:name) }
41
- f.abbreviation { Factory.next(:abbr) }
42
- end
43
-
44
- Factory.define :language do |f|
45
- f.name { Factory.next(:name) }
46
- f.english_name { Factory.next(:name) }
47
- f.locale { Factory.next(:locale) }
48
- f.supported true
49
- f.muck_raker_supported true
50
- end
51
-
52
- Factory.define :user do |f|
53
- f.login { Factory.next(:login) }
54
- f.email { Factory.next(:email) }
55
- f.password 'inquire_pass'
56
- f.password_confirmation 'inquire_pass'
57
- f.first_name 'test'
58
- f.last_name 'guy'
59
- f.terms_of_service true
60
- f.activated_at DateTime.now
61
- end
62
-
63
- Factory.define :permission do |f|
64
- f.role {|a| a.association(:role)}
65
- f.user {|a| a.association(:user)}
66
- end
67
-
68
- Factory.define :role do |f|
69
- f.rolename 'administrator'
70
- end
71
-
72
- Factory.define :comment do |f|
73
- f.body 'test comment'
74
- f.user {|a| a.association(:user)}
75
- end
76
-
77
- Factory.define :aggregation do |f|
78
- f.title { Factory.next(:name) }
79
- f.terms { Factory.next(:name) }
80
- f.description { Factory.next(:description) }
81
- f.ownable {|a| a.association(:user)}
82
- end
83
-
84
- Factory.define :aggregation_feed do |f|
85
- f.feed {|a| a.association(:feed)}
86
- f.aggregation {|a| a.association(:aggregation)}
87
- end
88
-
89
- Factory.define :oai_endpoint do |f|
90
- f.contributor { |a| a.association(:user) }
91
- f.uri { Factory.next(:uri) }
92
- f.display_uri { Factory.next(:uri) }
93
- f.title { Factory.next(:title) }
94
- f.short_title { Factory.next(:title) }
95
- f.status 1
96
- end
97
-
98
- Factory.define :feed do |f|
99
- f.contributor { |a| a.association(:user) }
100
- f.uri { Factory.next(:uri) }
101
- f.display_uri { Factory.next(:uri) }
102
- f.title { Factory.next(:title) }
103
- f.short_title { Factory.next(:title) }
104
- f.description { Factory.next(:description) }
105
- f.top_tags { Factory.next(:name) }
106
- f.priority 1
107
- f.status 1
108
- f.last_requested_at DateTime.now
109
- f.last_harvested_at DateTime.now
110
- f.harvest_interval 86400
111
- f.failed_requests 0
112
- f.harvested_from_display_uri { Factory.next(:uri) }
113
- f.harvested_from_title { Factory.next(:title) }
114
- f.harvested_from_short_title { Factory.next(:title) }
115
- f.entries_count 0
116
- f.default_language { |a| a.association(:language) }
117
- f.default_grain_size 'unknown'
118
- end
119
-
120
- Factory.define :entry do |f|
121
- f.feed { |a| a.association(:feed) }
122
- f.permalink { Factory.next(:uri) }
123
- f.author { Factory.next(:name) }
124
- f.title { Factory.next(:title) }
125
- f.description { Factory.next(:description) }
126
- f.content { Factory.next(:description) }
127
- f.unique_content { Factory.next(:description) }
128
- f.published_at DateTime.now
129
- f.entry_updated_at DateTime.now
130
- f.harvested_at DateTime.now
131
- f.language { |a| a.association(:language) }
132
- f.direct_link { Factory.next(:uri) }
133
- f.grain_size 'unknown'
134
- end
135
-
136
1
  Factory.define :share do |f|
137
2
  f.uri { Factory.next(:uri) }
138
3
  f.title { Factory.next(:title) }
139
4
  f.shared_by {|a| a.association(:user)}
140
5
  f.entry {|a| a.association(:entry)}
141
- end
142
-
143
- Factory.define :service do |f|
144
- f.uri { Factory.next(:uri) }
145
- f.name { Factory.next(:name) }
146
- f.service_category { |a| a.association(:service_category) }
147
- end
148
-
149
- Factory.define :service_category do |f|
150
- f.name { Factory.next(:name) }
151
6
  end
@@ -6,6 +6,10 @@ class Muck::TopicsControllerTest < ActionController::TestCase
6
6
 
7
7
  context "topics controller" do
8
8
 
9
+ setup do
10
+ bootstrap_services
11
+ end
12
+
9
13
  context "GET new" do
10
14
  setup do
11
15
  get :new
@@ -1,19 +1,15 @@
1
1
  $:.reject! { |e| e.include? 'TextMate' }
2
2
  ENV["RAILS_ENV"] = "test"
3
3
  require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
4
- require 'test_help'
5
- require 'ruby-debug'
6
- gem 'thoughtbot-factory_girl' # from github
7
- require 'factory_girl'
8
- require 'mocha'
4
+ gem 'muck-engine'
5
+ require 'muck_test_helper'
9
6
  require 'authlogic/test_case'
10
7
  require 'active_record/fixtures'
11
- require 'redgreen' rescue LoadError
12
8
  require File.expand_path(File.dirname(__FILE__) + '/factories')
13
- require File.join(File.dirname(__FILE__), 'shoulda_macros', 'controller')
14
- require File.join(File.dirname(__FILE__), 'shoulda_macros', 'models')
15
9
 
16
- class ActiveSupport::TestCase
10
+ class ActiveSupport::TestCase
11
+ include MuckTestMethods
12
+ include Authlogic::TestCase
17
13
  self.use_transactional_fixtures = true
18
14
  self.use_instantiated_fixtures = true
19
15
 
@@ -21,41 +17,10 @@ class ActiveSupport::TestCase
21
17
  TEST_RSS_URI = 'http://www.engadget.com/rss.xml'
22
18
  TEST_USERNAME_TEMPLATE = 'http://feeds.delicious.com/v2/rss/{username}?count=100'
23
19
 
24
- include Authlogic::TestCase
25
-
26
- def login_as(user)
27
- success = UserSession.create(user)
28
- if !success
29
- errors = user.errors.full_messages.to_sentence
30
- message = 'User has not been activated' if !user.active?
31
- raise "could not login as #{user.to_param}. Please make sure the user is valid. #{message} #{errors}"
32
- end
33
- UserSession.find
34
- end
35
-
36
- def assure_logout
37
- user_session = UserSession.find
38
- user_session.destroy if user_session
39
- end
40
-
41
20
  def ensure_flash(val)
42
21
  assert_contains flash.values, val, ", Flash: #{flash.inspect}"
43
22
  end
44
23
 
45
- def ensure_flash_contains(val)
46
- flash.values.each do |flv|
47
- return true if flv.include?(val)
48
- end
49
- false
50
- end
51
-
52
- end
53
-
54
- # turn off solr for tests
55
- class ActsAsSolr::Post
56
- def self.execute(request)
57
- true
58
- end
59
24
  end
60
25
 
61
26
 
@@ -21,6 +21,9 @@ class ShareTest < ActiveSupport::TestCase
21
21
  setup do
22
22
  @share = Factory(:share)
23
23
  end
24
+
25
+ subject { @share }
26
+
24
27
  should_belong_to :entry
25
28
  should "return entry for discover_attach_to" do
26
29
  assert_equal @share.entry, @share.discover_attach_to
@@ -34,6 +34,9 @@ class UserTest < ActiveSupport::TestCase
34
34
  setup do
35
35
  @user = Factory(:user)
36
36
  end
37
+
38
+ subject { @user }
39
+
37
40
  should_have_many :feed_parents
38
41
  should_have_many :aggregations
39
42
  should_have_many :feeds
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: muck-services
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.10
4
+ version: 0.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joel Duffin
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2009-11-10 00:00:00 -07:00
13
+ date: 2009-11-13 00:00:00 -07:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -237,13 +237,14 @@ files:
237
237
  - app/views/oai_endpoints/show.html.erb
238
238
  - app/views/parts/_add_feed.html.erb
239
239
  - app/views/parts/_select_feed.html.erb
240
+ - app/views/recommendations/get_button.html.erb
240
241
  - app/views/recommendations/index.html.erb
241
242
  - app/views/recommendations/index.pjs.erb
242
243
  - app/views/recommendations/index.rss.builder
243
244
  - app/views/recommendations/index.xml.builder
244
- - app/views/recommendations/index_js.pjs.erb
245
- - app/views/recommendations/index_real_time.pjs.erb
246
- - app/views/recommendations/index_real_time.xml.builder
245
+ - app/views/recommendations/real_time.html.erb
246
+ - app/views/recommendations/real_time.pjs.erb
247
+ - app/views/recommendations/real_time.xml.builder
247
248
  - app/views/search/_languages.html.erb
248
249
  - app/views/search/_result.html.erb
249
250
  - app/views/search/_search_box.html.erb
@@ -458,48 +459,6 @@ files:
458
459
  - app/views/visits/_toolbar.html.erb
459
460
  - app/views/visits/show.html.erb
460
461
  - config/muck_services_routes.rb
461
- - config/solr/README.txt
462
- - config/solr/cores/de/conf/protwords.txt
463
- - config/solr/cores/de/conf/schema.xml
464
- - config/solr/cores/de/conf/solrconfig.xml
465
- - config/solr/cores/de/conf/stopwords.txt
466
- - config/solr/cores/de/conf/synonyms.txt
467
- - config/solr/cores/en/conf/protwords.txt
468
- - config/solr/cores/en/conf/schema.xml
469
- - config/solr/cores/en/conf/solrconfig.xml
470
- - config/solr/cores/en/conf/stopwords.txt
471
- - config/solr/cores/en/conf/synonyms.txt
472
- - config/solr/cores/es/conf/protwords.txt
473
- - config/solr/cores/es/conf/schema.xml
474
- - config/solr/cores/es/conf/solrconfig.xml
475
- - config/solr/cores/es/conf/stopwords.txt
476
- - config/solr/cores/es/conf/synonyms.txt
477
- - config/solr/cores/fr/conf/protwords.txt
478
- - config/solr/cores/fr/conf/schema.xml
479
- - config/solr/cores/fr/conf/solrconfig.xml
480
- - config/solr/cores/fr/conf/stopwords.txt
481
- - config/solr/cores/fr/conf/synonyms.txt
482
- - config/solr/cores/ja/conf/protwords.txt
483
- - config/solr/cores/ja/conf/schema.xml
484
- - config/solr/cores/ja/conf/solrconfig.xml
485
- - config/solr/cores/ja/conf/stopwords.txt
486
- - config/solr/cores/ja/conf/synonyms.txt
487
- - config/solr/cores/nl/conf/protwords.txt
488
- - config/solr/cores/nl/conf/schema.xml
489
- - config/solr/cores/nl/conf/solrconfig.xml
490
- - config/solr/cores/nl/conf/stopwords.txt
491
- - config/solr/cores/nl/conf/synonyms.txt
492
- - config/solr/cores/ru/conf/protwords.txt
493
- - config/solr/cores/ru/conf/schema.xml
494
- - config/solr/cores/ru/conf/solrconfig.xml
495
- - config/solr/cores/ru/conf/stopwords.txt
496
- - config/solr/cores/ru/conf/synonyms.txt
497
- - config/solr/cores/zh/conf/protwords.txt
498
- - config/solr/cores/zh/conf/schema.xml
499
- - config/solr/cores/zh/conf/solrconfig.xml
500
- - config/solr/cores/zh/conf/stopwords.txt
501
- - config/solr/cores/zh/conf/synonyms.txt
502
- - config/solr/solr.xml
503
462
  - db/bootstrap/attention.yml
504
463
  - db/bootstrap/feeds.yml
505
464
  - db/bootstrap/oai_endpoints.yml
@@ -589,6 +548,7 @@ files:
589
548
  - locales/zh-TW.yml
590
549
  - locales/zh.yml
591
550
  - muck-services.gemspec
551
+ - public/images/folksemantic/logo-folksemantic-gm.gif
592
552
  - public/images/service_icons/16/amazon.png
593
553
  - public/images/service_icons/16/ask.png
594
554
  - public/images/service_icons/16/bibsonomy.png
@@ -852,6 +812,7 @@ files:
852
812
  - public/images/service_icons/facebook_friend_links.jpg
853
813
  - public/images/service_icons/facebook_my_links.jpg
854
814
  - public/javascripts/muck_services.js
815
+ - public/javascripts/recommenderextension.user.js
855
816
  - public/stylesheets/frame.css
856
817
  - public/stylesheets/muck_services.css
857
818
  - rails/init.rb
@@ -963,11 +924,6 @@ test_files:
963
924
  - test/rails_root/test/functional/oai_endpoints_controller_test.rb
964
925
  - test/rails_root/test/functional/topics_controller_test.rb
965
926
  - test/rails_root/test/functional/visits_controller_test.rb
966
- - test/rails_root/test/shoulda_macros/controller.rb
967
- - test/rails_root/test/shoulda_macros/forms.rb
968
- - test/rails_root/test/shoulda_macros/models.rb
969
- - test/rails_root/test/shoulda_macros/pagination.rb
970
- - test/rails_root/test/shoulda_macros/plugins.rb
971
927
  - test/rails_root/test/test_helper.rb
972
928
  - test/rails_root/test/unit/aggregation_feed_test.rb
973
929
  - test/rails_root/test/unit/aggregation_test.rb