muck-raker 3.0.0 → 3.1.0

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 (76) hide show
  1. data/Rakefile +14 -13
  2. data/VERSION +1 -1
  3. data/muck-raker.gemspec +137 -213
  4. metadata +9 -151
  5. data/.gitignore +0 -30
  6. data/test/rails_test/app/controllers/application_controller.rb +0 -21
  7. data/test/rails_test/app/controllers/default_controller.rb +0 -7
  8. data/test/rails_test/app/helpers/application_helper.rb +0 -3
  9. data/test/rails_test/app/models/comment.rb +0 -3
  10. data/test/rails_test/app/models/profile.rb +0 -3
  11. data/test/rails_test/app/models/user.rb +0 -9
  12. data/test/rails_test/app/models/user_session.rb +0 -2
  13. data/test/rails_test/config/application.rb +0 -42
  14. data/test/rails_test/config/boot.rb +0 -13
  15. data/test/rails_test/config/environment.rb +0 -5
  16. data/test/rails_test/config/environments/development.rb +0 -26
  17. data/test/rails_test/config/environments/production.rb +0 -49
  18. data/test/rails_test/config/environments/test.rb +0 -35
  19. data/test/rails_test/config/initializers/backtrace_silencers.rb +0 -7
  20. data/test/rails_test/config/initializers/inflections.rb +0 -10
  21. data/test/rails_test/config/initializers/mime_types.rb +0 -5
  22. data/test/rails_test/config/initializers/muck_raker.rb +0 -13
  23. data/test/rails_test/config/initializers/secret_token.rb +0 -7
  24. data/test/rails_test/config/initializers/session_store.rb +0 -8
  25. data/test/rails_test/config/routes.rb +0 -5
  26. data/test/rails_test/db/migrate/20090320174818_create_muck_permissions_and_roles.rb +0 -16
  27. data/test/rails_test/db/migrate/20090402033319_add_muck_activities.rb +0 -36
  28. data/test/rails_test/db/migrate/20090402234137_create_languages.rb +0 -18
  29. data/test/rails_test/db/migrate/20090426041056_create_countries.rb +0 -15
  30. data/test/rails_test/db/migrate/20090426041103_create_states.rb +0 -18
  31. data/test/rails_test/db/migrate/20090602041838_create_users.rb +0 -39
  32. data/test/rails_test/db/migrate/20090602191243_create_muck_raker.rb +0 -307
  33. data/test/rails_test/db/migrate/20090613173314_create_comments.rb +0 -24
  34. data/test/rails_test/db/migrate/20090619211125_create_tag_clouds.rb +0 -19
  35. data/test/rails_test/db/migrate/20090623181458_add_grain_size_to_entries.rb +0 -16
  36. data/test/rails_test/db/migrate/20090623193525_add_grain_size_to_tag_clouds.rb +0 -12
  37. data/test/rails_test/db/migrate/20090703175825_denormalize_entries_subjects.rb +0 -16
  38. data/test/rails_test/db/migrate/20090704220055_create_slugs.rb +0 -18
  39. data/test/rails_test/db/migrate/20090704220120_acts_as_taggable_on_migration.rb +0 -29
  40. data/test/rails_test/db/migrate/20090716035935_change_tag_cloud_grain_sizes.rb +0 -9
  41. data/test/rails_test/db/migrate/20090717173900_add_contributor_to_feeds.rb +0 -9
  42. data/test/rails_test/db/migrate/20090717175825_normalize_entries_subjects.rb +0 -18
  43. data/test/rails_test/db/migrate/20090721043213_change_services_title_to_name.rb +0 -9
  44. data/test/rails_test/db/migrate/20090721054927_remove_services_not_null_from_feeds.rb +0 -9
  45. data/test/rails_test/db/migrate/20090723050510_create_feed_parents.rb +0 -17
  46. data/test/rails_test/db/migrate/20090728165716_add_etag_to_feeds.rb +0 -9
  47. data/test/rails_test/db/migrate/20090730044139_add_comment_cache.rb +0 -9
  48. data/test/rails_test/db/migrate/20090730045848_add_comment_cache_to_entries.rb +0 -9
  49. data/test/rails_test/db/migrate/20090730154102_allow_null_user.rb +0 -9
  50. data/test/rails_test/db/migrate/20090803185323_create_shares.rb +0 -16
  51. data/test/rails_test/db/migrate/20090804184247_add_comment_count_to_shares.rb +0 -9
  52. data/test/rails_test/db/migrate/20090804211240_add_entry_id_to_shares.rb +0 -9
  53. data/test/rails_test/db/migrate/20090804231857_add_shares_uri_index.rb +0 -9
  54. data/test/rails_test/db/migrate/20090818204527_add_activity_indexes.rb +0 -9
  55. data/test/rails_test/db/migrate/20090819030523_add_attachable_to_activities.rb +0 -13
  56. data/test/rails_test/db/migrate/20090826220530_change_services_sequence_to_sort.rb +0 -9
  57. data/test/rails_test/db/migrate/20090826225652_create_identity_feeds.rb +0 -14
  58. data/test/rails_test/db/migrate/20090827005105_add_identity_fields_to_services.rb +0 -13
  59. data/test/rails_test/db/migrate/20090827015308_create_service_categories.rb +0 -12
  60. data/test/rails_test/db/migrate/20090827221502_add_prompt_and_template_to_services.rb +0 -11
  61. data/test/rails_test/db/migrate/20090915041650_aggregations_to_polymorphic.rb +0 -15
  62. data/test/rails_test/db/migrate/20090922174200_update_oai_endpoints.rb +0 -13
  63. data/test/rails_test/db/migrate/20090922231552_add_dates_to_oai_endpoints.rb +0 -11
  64. data/test/rails_test/db/migrate/20090923150807_rename_name_in_aggregation.rb +0 -9
  65. data/test/rails_test/db/migrate/20090924200750_add_uri_data_template_to_services.rb +0 -9
  66. data/test/rails_test/db/migrate/20091006183742_add_feed_count_to_aggregation.rb +0 -9
  67. data/test/rails_test/db/migrate/20091022150615_add_uri_key_to_services.rb +0 -9
  68. data/test/rails_test/features/step_definitions/comment_steps.rb +0 -11
  69. data/test/rails_test/features/step_definitions/common_steps.rb +0 -93
  70. data/test/rails_test/features/step_definitions/web_steps.rb +0 -219
  71. data/test/rails_test/features/step_definitions/webrat_steps.rb +0 -128
  72. data/test/rails_test/features/support/custom_env.rb +0 -19
  73. data/test/rails_test/features/support/env.rb +0 -58
  74. data/test/rails_test/features/support/paths.rb +0 -33
  75. data/test/rails_test/public/dispatch.rb +0 -10
  76. data/test/rails_test/spec/spec_helper.rb +0 -5
@@ -1,29 +0,0 @@
1
- class ActsAsTaggableOnMigration < ActiveRecord::Migration
2
- def self.up
3
- create_table :tags do |t|
4
- t.column :name, :string
5
- end
6
-
7
- create_table :taggings do |t|
8
- t.column :tag_id, :integer
9
- t.column :taggable_id, :integer
10
- t.column :tagger_id, :integer
11
- t.column :tagger_type, :string
12
-
13
- # You should make sure that the column created is
14
- # long enough to store the required class names.
15
- t.column :taggable_type, :string
16
- t.column :context, :string
17
-
18
- t.column :created_at, :datetime
19
- end
20
-
21
- add_index :taggings, :tag_id
22
- add_index :taggings, [:taggable_id, :taggable_type, :context]
23
- end
24
-
25
- def self.down
26
- drop_table :taggings
27
- drop_table :tags
28
- end
29
- end
@@ -1,9 +0,0 @@
1
- class ChangeTagCloudGrainSizes < ActiveRecord::Migration
2
- def self.up
3
- execute "update tag_clouds set grain_size = 'all' where grain_size = 'unknown'"
4
- end
5
-
6
- def self.down
7
- execute "update tag_clouds set grain_size = 'unknown' where grain_size = 'all'"
8
- end
9
- end
@@ -1,9 +0,0 @@
1
- class AddContributorToFeeds < ActiveRecord::Migration
2
- def self.up
3
- add_column :feeds, :contributor_id, :integer
4
- end
5
-
6
- def self.down
7
- remove_column :feeds, :contributor_id
8
- end
9
- end
@@ -1,18 +0,0 @@
1
- class NormalizeEntriesSubjects < ActiveRecord::Migration
2
- def self.up
3
- execute "ALTER TABLE entries_subjects DROP PRIMARY KEY, ADD PRIMARY KEY USING BTREE(subject_id, entry_id);"
4
- remove_column :entries_subjects, :language_id
5
- remove_column :entries_subjects, :grain_size
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');"
7
- execute "update feeds set last_harvested_at = '1969-01-01' where feeds.uri = 'http://ndr.nsdl.org/oai?verb=ListRecords&metadataPrefix=nsdl_dc&set=439869'"
8
- end
9
-
10
- def self.down
11
- add_column :entries_subjects, :language_id, :integer
12
- add_column :entries_subjects, :grain_size, :string
13
- add_index "entries_subjects", ["language_id"]
14
- add_index "entries_subjects", ["grain_size"]
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"
17
- end
18
- end
@@ -1,9 +0,0 @@
1
- class ChangeServicesTitleToName < ActiveRecord::Migration
2
- def self.up
3
- rename_column :services, :title, :name
4
- end
5
-
6
- def self.down
7
- rename_column :services, :name, :title
8
- end
9
- end
@@ -1,9 +0,0 @@
1
- class RemoveServicesNotNullFromFeeds < ActiveRecord::Migration
2
- def self.up
3
- change_column :feeds, :service_id, :integer, :null => true
4
- end
5
-
6
- def self.down
7
- change_column :feeds, :service_id, :integer, :null => false
8
- end
9
- end
@@ -1,17 +0,0 @@
1
- class CreateFeedParents < ActiveRecord::Migration
2
- def self.up
3
- create_table :feed_parents, :force => true do |t|
4
- t.integer :feed_id
5
- t.integer :ownable_id
6
- t.string :ownable_type
7
- t.timestamps
8
- end
9
-
10
- add_index :feed_parents, ["feed_id"]
11
- add_index :feed_parents, ["ownable_id", "ownable_type"]
12
- end
13
-
14
- def self.down
15
- drop_table :feed_parents
16
- end
17
- end
@@ -1,9 +0,0 @@
1
- class AddEtagToFeeds < ActiveRecord::Migration
2
- def self.up
3
- add_column :feeds, :etag, :string
4
- end
5
-
6
- def self.down
7
- remove_column :feeds, :etag
8
- end
9
- end
@@ -1,9 +0,0 @@
1
- class AddCommentCache < ActiveRecord::Migration
2
- def self.up
3
- add_column :activities, :comment_count, :integer, :default => 0
4
- end
5
-
6
- def self.down
7
- remove_column :activities, :comment_count
8
- end
9
- end
@@ -1,9 +0,0 @@
1
- class AddCommentCacheToEntries < ActiveRecord::Migration
2
- def self.up
3
- add_column :entries, :comment_count, :integer, :default => 0
4
- end
5
-
6
- def self.down
7
- remove_column :entries, :comment_count
8
- end
9
- end
@@ -1,9 +0,0 @@
1
- class AllowNullUser < ActiveRecord::Migration
2
- def self.up
3
- change_column :comments, :user_id, :integer, :null => true, :default => nil
4
- end
5
-
6
- def self.down
7
- change_column :comments, :user_id, :integer, :null => false, :default => 0
8
- end
9
- end
@@ -1,16 +0,0 @@
1
- class CreateShares < ActiveRecord::Migration
2
- def self.up
3
- create_table :shares, :force => true do |t|
4
- t.string :uri, :limit => 2083, :default => "", :null => false
5
- t.string :title
6
- t.text :message
7
- t.integer :shared_by_id, :null => false
8
- t.timestamps
9
- end
10
- add_index :shares, :shared_by_id
11
- end
12
-
13
- def self.down
14
- drop_table :shares
15
- end
16
- end
@@ -1,9 +0,0 @@
1
- class AddCommentCountToShares < ActiveRecord::Migration
2
- def self.up
3
- add_column :shares, :comment_count, :integer, :default => 0
4
- end
5
-
6
- def self.down
7
- remove_column :shares, :comment_count
8
- end
9
- end
@@ -1,9 +0,0 @@
1
- class AddEntryIdToShares < ActiveRecord::Migration
2
- def self.up
3
- add_column :shares, :entry_id, :integer
4
- end
5
-
6
- def self.down
7
- remove_column :shares, :entry_id
8
- end
9
- end
@@ -1,9 +0,0 @@
1
- class AddSharesUriIndex < ActiveRecord::Migration
2
- def self.up
3
- add_index :shares, :uri
4
- end
5
-
6
- def self.down
7
- remove_index :shares, :uri
8
- end
9
- end
@@ -1,9 +0,0 @@
1
- class AddActivityIndexes < ActiveRecord::Migration
2
- def self.up
3
- add_index :activities, ["source_id", "source_type"]
4
- end
5
-
6
- def self.down
7
- remove_index :activities, ["source_id", "source_type"]
8
- end
9
- end
@@ -1,13 +0,0 @@
1
- class AddAttachableToActivities < ActiveRecord::Migration
2
- def self.up
3
- add_column :activities, :attachable_id, :integer
4
- add_column :activities, :attachable_type, :string
5
- add_index :activities, ["attachable_id", "attachable_type"]
6
- end
7
-
8
- def self.down
9
- remove_column :activities, :attachable_id
10
- remove_column :activities, :attachable_type
11
- remove_index :activities, ["attachable_id", "attachable_type"]
12
- end
13
- end
@@ -1,9 +0,0 @@
1
- class ChangeServicesSequenceToSort < ActiveRecord::Migration
2
- def self.up
3
- rename_column :services, 'sequence', 'sort'
4
- end
5
-
6
- def self.down
7
- rename_column :services, 'sort', 'sequence'
8
- end
9
- end
@@ -1,14 +0,0 @@
1
- class CreateIdentityFeeds < ActiveRecord::Migration
2
- def self.up
3
- create_table :identity_feeds, :force => true do |t|
4
- t.integer "feed_id", :null => false
5
- t.integer "ownable_id", :null => false
6
- t.string "ownable_type", :null => false
7
- end
8
- add_index :identity_feeds, ["ownable_id", "ownable_type"]
9
- end
10
-
11
- def self.down
12
- drop_table :identity_feeds
13
- end
14
- end
@@ -1,13 +0,0 @@
1
- class AddIdentityFieldsToServices < ActiveRecord::Migration
2
- def self.up
3
- add_column :services, :use_for, :string
4
- add_column :services, :service_category_id, :integer
5
- add_column :services, :active, :boolean, :default => true
6
- end
7
-
8
- def self.down
9
- remove_column :services, :use_for
10
- remove_column :services, :service_category_id
11
- remove_column :services, :active
12
- end
13
- end
@@ -1,12 +0,0 @@
1
- class CreateServiceCategories < ActiveRecord::Migration
2
- def self.up
3
- create_table :service_categories, :force => true do |t|
4
- t.string 'name', :null => false
5
- t.integer 'sort', :default => 0
6
- end
7
- end
8
-
9
- def self.down
10
- drop_table :service_categories
11
- end
12
- end
@@ -1,11 +0,0 @@
1
- class AddPromptAndTemplateToServices < ActiveRecord::Migration
2
- def self.up
3
- add_column :services, :prompt, :string
4
- add_column :services, :template, :string
5
- end
6
-
7
- def self.down
8
- remove_column :services, :prompt
9
- remove_column :services, :template
10
- end
11
- end
@@ -1,15 +0,0 @@
1
- class AggregationsToPolymorphic < ActiveRecord::Migration
2
- def self.up
3
- remove_column :aggregations, :user_id
4
- add_column :aggregations, :ownable_id, :integer
5
- add_column :aggregations, :ownable_type, :string
6
- add_index :aggregations, [:ownable_id, :ownable_type]
7
- end
8
-
9
- def self.down
10
- add_column :aggregations, :user_id, :integer
11
- remove_column :aggregations, :ownable_id
12
- remove_column :aggregations, :ownable_type
13
- remove_index :aggregations, [:ownable_id, :ownable_type]
14
- end
15
- end
@@ -1,13 +0,0 @@
1
- class UpdateOaiEndpoints < ActiveRecord::Migration
2
- def self.up
3
- add_column :oai_endpoints, :contributor_id, :integer
4
- add_column :oai_endpoints, :status, :integer
5
- add_column :oai_endpoints, :default_language_id, :integer
6
- end
7
-
8
- def self.down
9
- remove_column :oai_endpoints, :contributor_id
10
- remove_column :oai_endpoints, :status
11
- remove_column :oai_endpoints, :default_language_id
12
- end
13
- end
@@ -1,11 +0,0 @@
1
- class AddDatesToOaiEndpoints < ActiveRecord::Migration
2
- def self.up
3
- add_column :oai_endpoints, :created_at, :datetime
4
- add_column :oai_endpoints, :updated_at, :datetime
5
- end
6
-
7
- def self.down
8
- remove_column :oai_endpoints, :created_at
9
- remove_column :oai_endpoints, :updated_at
10
- end
11
- end
@@ -1,9 +0,0 @@
1
- class RenameNameInAggregation < ActiveRecord::Migration
2
- def self.up
3
- rename_column :aggregations, :name, :terms
4
- end
5
-
6
- def self.down
7
- rename_column :aggregations, :terms, :name
8
- end
9
- end
@@ -1,9 +0,0 @@
1
- class AddUriDataTemplateToServices < ActiveRecord::Migration
2
- def self.up
3
- add_column :services, :uri_data_template, :string, :limit => 2083, :default => ""
4
- end
5
-
6
- def self.down
7
- remove_column :services, :uri_data_template
8
- end
9
- end
@@ -1,9 +0,0 @@
1
- class AddFeedCountToAggregation < ActiveRecord::Migration
2
- def self.up
3
- add_column :aggregations, :feed_count, :integer, :default => 0
4
- end
5
-
6
- def self.down
7
- remove_column :aggregations, :feed_count
8
- end
9
- end
@@ -1,9 +0,0 @@
1
- class AddUriKeyToServices < ActiveRecord::Migration
2
- def self.up
3
- add_column :services, :uri_key, :string
4
- end
5
-
6
- def self.down
7
- remove_column :services, :uri_key
8
- end
9
- end
@@ -1,11 +0,0 @@
1
- Given /^There are comments$/ do
2
- create_comments
3
- end
4
-
5
- def create_comments(commentable = nil)
6
- commentable ||= Factory(:user)
7
- comment = Factory(:comment, :commentable => commentable)
8
- child = Factory(:comment, :commentable => commentable)
9
- child.move_to_child_of(comment)
10
- comment
11
- end
@@ -1,93 +0,0 @@
1
- PASSWORD = "asdfasdf"
2
-
3
- def log_in_user(user, password)
4
- visit(login_url)
5
- fill_in("user_session_login", :with => user.login)
6
- fill_in("user_session_password", :with => PASSWORD)
7
- click_button("Sign In")
8
- end
9
-
10
- def log_in_with_login_and_role(login, role)
11
- @user = Factory(:user, :login => login, :password => PASSWORD, :password_confirmation => PASSWORD)
12
- @user.add_to_role(role)
13
- log_in_user(@user, PASSWORD)
14
- end
15
-
16
- def log_in_with_role(role)
17
- @user = Factory(:user, :password => PASSWORD, :password_confirmation => PASSWORD)
18
- @user.add_to_role(role)
19
- log_in_user(@user, PASSWORD)
20
- end
21
-
22
-
23
- Before do
24
- ActionMailer::Base.deliveries = []
25
- end
26
-
27
-
28
- # Assumes password is 'asdfasdf'
29
- Given /I log in as "(.*)"/ do |login|
30
- @user = User.find_by_login(login)
31
- log_in_user(@user, PASSWORD)
32
- end
33
-
34
- Given /I log in as new user "(.*)" with password "(.*)"/ do |login, password|
35
- @user = Factory(:user, :login => login, :password => password, :password_confirmation => password)
36
- log_in_user(@user, password)
37
- end
38
-
39
- Given /I log in as new user/ do
40
- @user = Factory(:user, :password => PASSWORD, :password_confirmation => PASSWORD)
41
- log_in_user(@user, PASSWORD)
42
- end
43
-
44
- Given /^I log in with role "(.*)"$/ do |role|
45
- log_in_with_role(role)
46
- end
47
-
48
- Given /^I am not logged in$/ do
49
- post '/logout'
50
- end
51
-
52
- Then /^I should see the login$/ do
53
- response.body.should =~ /sign_in/m
54
- response.body.should =~ /user_session_login/m
55
- response.body.should =~ /user_session_password/m
56
- end
57
-
58
-
59
- #features/step_definitions/common_steps.rb
60
- # On page/record
61
- Given /^I am on "([^"]*)"$/ do |path|
62
- visit path
63
- end
64
-
65
- Then /^I should be on "([^"]*)"$/ do |path|
66
- current_path.should == path
67
- end
68
-
69
- Given /^I am on "([^"]*)" "([^"]*)"$/ do |model,number|
70
- visit polymorphic_path(record_from_strings(model,number))
71
- end
72
-
73
- Then /^I should be on "([^"]*)" "([^"]*)"$/ do |model,number|
74
- current_path.should == polymorphic_path(record_from_strings(model,number))
75
- end
76
-
77
- # Existing
78
- Given /^a "([^"]*)" exists for "([^"]*)" "([^"]*)"$/ do |associated,model,number|
79
- record = record_from_strings(model,number)
80
- record.send(associated.underscore+'=',valid(associated))
81
- record.save!
82
- end
83
-
84
- # Support
85
- def current_path
86
- response.request.request_uri
87
- end
88
-
89
- def record_from_strings(model,number)
90
- model.constantize.find(:first,:offset=>number.to_i-1)
91
- end
92
-
93
-