repo
stringlengths
5
92
file_url
stringlengths
80
287
file_path
stringlengths
5
197
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:37:27
2026-01-04 17:58:21
truncated
bool
2 classes
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/db/migrate/20100219194510_create_session_infos.rb
db/migrate/20100219194510_create_session_infos.rb
class CreateSessionInfos < ActiveRecord::Migration def self.up create_table :session_infos do |table| table.string :session_id table.string :ip_addr table.string :user_agent table.string :loc_info, :default => "" table.timestamps end add_index :session_infos, :session_id ...
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/db/migrate/20100308154919_create_visitors.rb
db/migrate/20100308154919_create_visitors.rb
class CreateVisitors < ActiveRecord::Migration def self.up create_table :visitors do |table| table.string :remember_token, :default => "" table.timestamps end add_index :visitors, :remember_token end def self.down drop_table :visitors end end
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/db/migrate/20100219201533_populate_session_info_table.rb
db/migrate/20100219201533_populate_session_info_table.rb
class PopulateSessionInfoTable < ActiveRecord::Migration def self.up add_column :clicks, :session_info_id, :integer clicks = Click.all clicks.each do |c| session = SessionInfo.find_or_create_by_session_id(:session_id => c.sid, :ip_addr => c.ip_addr, :user_agent ...
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/db/migrate/20100805232919_add_google_analytics_code_to_earls.rb
db/migrate/20100805232919_add_google_analytics_code_to_earls.rb
class AddGoogleAnalyticsCodeToEarls < ActiveRecord::Migration def self.up add_column :earls, :ga_code, :string end def self.down remove_column :earls, :ga_code end end
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/db/migrate/20091201175040_add_default_to_users.rb
db/migrate/20091201175040_add_default_to_users.rb
class AddDefaultToUsers < ActiveRecord::Migration def self.up add_column :users, :default, :boolean, :default => false User.create(:password => 'chunkybacon', :password_confirmation => 'chunkybacon', :default => true) end def self.down remove_column :users, :default end end
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/db/migrate/20100126164547_add_user_id_to_earls.rb
db/migrate/20100126164547_add_user_id_to_earls.rb
class AddUserIdToEarls < ActiveRecord::Migration def self.up add_column :earls, :user_id, :integer end def self.down remove_column :earls, :user_id end end
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/db/migrate/20100203182758_add_attachments_logo_to_earl.rb
db/migrate/20100203182758_add_attachments_logo_to_earl.rb
class AddAttachmentsLogoToEarl < ActiveRecord::Migration def self.up add_column :earls, :logo_file_name, :string add_column :earls, :logo_content_type, :string add_column :earls, :logo_file_size, :integer add_column :earls, :logo_updated_at, :datetime remove_column :earls, :logo_url end def s...
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/db/migrate/20101115215200_add_original_filename_to_photo.rb
db/migrate/20101115215200_add_original_filename_to_photo.rb
class AddOriginalFilenameToPhoto < ActiveRecord::Migration def self.up add_column :photos, :original_file_name, :string end def self.down remove_column :photos, :original_file_name end end
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/db/migrate/20130627185712_create_blocked_cookies.rb
db/migrate/20130627185712_create_blocked_cookies.rb
class CreateBlockedCookies < ActiveRecord::Migration def self.up create_table :blocked_cookies do |table| table.string :referrer, :default => "" table.integer :question_id table.string :user_agent, :default => "" table.string :ip_addr, :default => "" table.string :source, :default =>...
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/db/migrate/20100213004908_create_clicks.rb
db/migrate/20100213004908_create_clicks.rb
class CreateClicks < ActiveRecord::Migration def self.up create_table :clicks do |table| table.string :sid table.integer :user_id table.string :ip_addr table.string :controller table.string :action table.string :url table.timestamps end end def self.down dr...
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/db/migrate/20100512162646_drop_remote_user_from_user_model.rb
db/migrate/20100512162646_drop_remote_user_from_user_model.rb
class DropRemoteUserFromUserModel < ActiveRecord::Migration def self.up remove_column :users, :remote_user_id end def self.down add_column :users, :remote_user_id, :integer end end
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/db/migrate/20160219184829_add_verify_code_to_earl.rb
db/migrate/20160219184829_add_verify_code_to_earl.rb
class AddVerifyCodeToEarl < ActiveRecord::Migration def self.up add_column :earls, :verify_code, :string end def self.down remove_column :earls, :verify_code end end
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/db/migrate/20100526143129_add_flag_enabled_to_earls.rb
db/migrate/20100526143129_add_flag_enabled_to_earls.rb
class AddFlagEnabledToEarls < ActiveRecord::Migration def self.up add_column :earls, :flag_enabled, :boolean, :default => false end def self.down remove_column :earls, :flag_enabled end end
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/db/migrate/20100325193840_change_session_info_location_to_geo_ip_city_format.rb
db/migrate/20100325193840_change_session_info_location_to_geo_ip_city_format.rb
class ChangeSessionInfoLocationToGeoIpCityFormat < ActiveRecord::Migration def self.up SessionInfo.find(:all).each do |s| if s.ip_addr s.geolocate!(s.ip_addr) end end end def self.down end end
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/db/migrate/20091120173416_add_remote_user_id_to_users.rb
db/migrate/20091120173416_add_remote_user_id_to_users.rb
class AddRemoteUserIdToUsers < ActiveRecord::Migration def self.up add_column :users, :remote_user_id, :integer end def self.down remove_column :users, :remote_user_id end end
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/db/migrate/20100213195803_add_useragent_and_referrer_to_clicks.rb
db/migrate/20100213195803_add_useragent_and_referrer_to_clicks.rb
class AddUseragentAndReferrerToClicks < ActiveRecord::Migration def self.up add_column :clicks, :referrer, :string add_column :clicks, :user_agent, :string end def self.down remove_column :clicks, :referrer remove_column :clicks, :user_agent end end
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/db/migrate/20100304151013_add_white_label_to_session_info.rb
db/migrate/20100304151013_add_white_label_to_session_info.rb
class AddWhiteLabelToSessionInfo < ActiveRecord::Migration def self.up add_column :session_infos, :white_label_request, :boolean SessionInfo.update_all('white_label_request = 0') end def self.down remove_column :session_infos, :white_label_request end end
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/db/migrate/20100420125212_add_catchup_bool_to_earls.rb
db/migrate/20100420125212_add_catchup_bool_to_earls.rb
class AddCatchupBoolToEarls < ActiveRecord::Migration def self.up add_column :earls, :uses_catchup, :boolean, :default => false end def self.down remove_column :earls, :uses_catchup, :boolean end end
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/db/migrate/20110131154228_convert_last_error_to_text_in_delayed_jobs.rb
db/migrate/20110131154228_convert_last_error_to_text_in_delayed_jobs.rb
class ConvertLastErrorToTextInDelayedJobs < ActiveRecord::Migration def self.up change_column(:delayed_jobs, :last_error, :text) add_index :delayed_jobs, [:priority, :run_at], :name => 'delayed_jobs_priority' end def self.down change_column(:delayed_jobs, :last_error, :string) remove_index :delay...
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/db/migrate/20100126234139_add_active_to_earls.rb
db/migrate/20100126234139_add_active_to_earls.rb
class AddActiveToEarls < ActiveRecord::Migration def self.up add_column :earls, :active, :boolean, :default => true end def self.down remove_column :earls, :active end end
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/db/migrate/20100219212314_drop_refactored_clicks_columns.rb
db/migrate/20100219212314_drop_refactored_clicks_columns.rb
class DropRefactoredClicksColumns < ActiveRecord::Migration def self.up remove_column :clicks, :sid remove_column :clicks, :ip_addr remove_column :clicks, :user_agent end def self.down add_column :clicks, :sid, :string add_column :clicks, :ip_addr, :string add_column :clicks, ...
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/db/migrate/20100804144725_add_photocracy_flag_to_earls.rb
db/migrate/20100804144725_add_photocracy_flag_to_earls.rb
class AddPhotocracyFlagToEarls < ActiveRecord::Migration def self.up add_column :earls, :photocracy, :boolean, :default => false end def self.down remove_column :earls, :photocracy end end
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/db/migrate/20110120215415_add_index_to_question_id_on_earls.rb
db/migrate/20110120215415_add_index_to_question_id_on_earls.rb
class AddIndexToQuestionIdOnEarls < ActiveRecord::Migration def self.up add_index :earls, :question_id end def self.down remove_index :earls, :question_id end end
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/db/migrate/20100222165915_abingo_migration_1_0.rb
db/migrate/20100222165915_abingo_migration_1_0.rb
#Creates the two database tables, plus indexes, you'll need to use A/Bingo. class AbingoMigration10< ActiveRecord::Migration def self.up create_table "experiments", :force => true do |t| t.string "test_name" t.string "status" t.timestamps end add_index "experiments", "test_name" #a...
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/db/migrate/20090701195337_clearance_create_users.rb
db/migrate/20090701195337_clearance_create_users.rb
class ClearanceCreateUsers < ActiveRecord::Migration def self.up create_table(:users) do |t| t.string :email t.string :encrypted_password, :limit => 128 t.string :salt, :limit => 128 t.string :confirmation_token, :limit => 128 t.string :remember_token, :li...
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/db/migrate/20100412192203_add_default_lang_to_earls.rb
db/migrate/20100412192203_add_default_lang_to_earls.rb
class AddDefaultLangToEarls < ActiveRecord::Migration def self.up add_column :earls, :default_lang, :string, :default => "en" end def self.down remove_column :earls, :default_lang end end
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/db/migrate/20100419231428_add_logo_size_to_earls.rb
db/migrate/20100419231428_add_logo_size_to_earls.rb
class AddLogoSizeToEarls < ActiveRecord::Migration def self.up add_column :earls, :logo_size, :string, :default => "medium" end def self.down remove_column :earls, :logo_size, :string end end
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/db/migrate/20100415204537_add_second_loc_info_to_session_info.rb
db/migrate/20100415204537_add_second_loc_info_to_session_info.rb
class AddSecondLocInfoToSessionInfo < ActiveRecord::Migration def self.up add_column :session_infos, :loc_info_2, :string, :default => "" end def self.down remove_column :session_infos, :loc_info_2, :string, :default => "" end end
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/db/migrate/20110217180552_add_compressed_column_to_export.rb
db/migrate/20110217180552_add_compressed_column_to_export.rb
class AddCompressedColumnToExport < ActiveRecord::Migration def self.up add_column :exports, :compressed, :boolean, :default => 0 end def self.down remove_column :exports, :compressed end end
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/db/migrate/20110127215723_create_exports.rb
db/migrate/20110127215723_create_exports.rb
class CreateExports < ActiveRecord::Migration def self.up create_table :exports do |table| table.binary :data table.string :name, :default => "" table.timestamps end add_index :exports, :name end def self.down drop_table :exports end end
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/db/migrate/20091113040300_create_earls.rb
db/migrate/20091113040300_create_earls.rb
class CreateEarls < ActiveRecord::Migration def self.up create_table :earls, :force => true do |t| t.string :name t.integer :question_id t.timestamps end end def self.down drop_table :earls end end
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/db/migrate/20100308175653_update_session_infos_with_existing_userids.rb
db/migrate/20100308175653_update_session_infos_with_existing_userids.rb
class UpdateSessionInfosWithExistingUserids < ActiveRecord::Migration def self.up Click.all.each do |c| session = c.session_info if !session.user && c.user session.user = c.user session.save! end end end def self.down end end
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/db/migrate/20100308173429_add_user_id_to_session_infos.rb
db/migrate/20100308173429_add_user_id_to_session_infos.rb
class AddUserIdToSessionInfos < ActiveRecord::Migration def self.up add_column :session_infos, :user_id, :integer end def self.down remove_column :session_infos, :user_id end end
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/db/migrate/20091113040613_create_slugs.rb
db/migrate/20091113040613_create_slugs.rb
class CreateSlugs < ActiveRecord::Migration def self.up create_table :slugs do |t| t.string :name t.integer :sluggable_id t.integer :sequence, :null => false, :default => 1 t.string :sluggable_type, :limit => 40 t.string :scope, :limit => 40 t.datetime :created_at end a...
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/db/migrate/20100129100851_confirm_existing_user_emails.rb
db/migrate/20100129100851_confirm_existing_user_emails.rb
class ConfirmExistingUserEmails < ActiveRecord::Migration def self.up User.all.each {|u| u.email_confirmed = true; u.save!} end def self.down end end
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/db/migrate/20100128022058_add_httppassword_to_earls.rb
db/migrate/20100128022058_add_httppassword_to_earls.rb
class AddHttppasswordToEarls < ActiveRecord::Migration def self.up add_column :earls, :pass, :string end def self.down remove_column :earls, :pass end end
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/db/migrate/20090702053331_create_delayed_jobs.rb
db/migrate/20090702053331_create_delayed_jobs.rb
class CreateDelayedJobs < ActiveRecord::Migration def self.up create_table :delayed_jobs do |table| # Allows some jobs to jump to the front of the queue table.integer :priority, :default => 0 # Provides for retries, but still fail eventually. table.integer :attempts, :default => 0 ...
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/db/migrate/20100617164530_remove_catchup_from_earls.rb
db/migrate/20100617164530_remove_catchup_from_earls.rb
class RemoveCatchupFromEarls < ActiveRecord::Migration def self.up remove_column :earls, :uses_catchup end def self.down add_column :earls, :uses_catchup, :boolean, :default => false end end
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/db/migrate/20110304211014_add_session_info_index_to_clicks.rb
db/migrate/20110304211014_add_session_info_index_to_clicks.rb
class AddSessionInfoIndexToClicks < ActiveRecord::Migration def self.up add_index :clicks, :session_info_id end def self.down remove_index :clicks, :session_info_id end end
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/db/migrate/20100324175414_add_welcomemsg_to_earl.rb
db/migrate/20100324175414_add_welcomemsg_to_earl.rb
class AddWelcomemsgToEarl < ActiveRecord::Migration def self.up add_column :earls, :welcome_msg, :string end def self.down remove_column :earls, :welcome_msg end end
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/test/test_helper.rb
test/test_helper.rb
ENV["RAILS_ENV"] = "test" require File.expand_path(File.dirname(__FILE__) + "/../config/environment") require 'test_help' require 'action_view/test_case' Mocha::Configuration.warn_when(:stubbing_non_existent_method) Mocha::Configuration.warn_when(:stubbing_non_public_method) class ActiveSupport::TestCase self.use_...
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/test/integration/user_voting_test.rb
test/integration/user_voting_test.rb
require 'test_helper' class UserVotingTest < ActionController::IntegrationTest context "interacting on an existing question" do setup do @earl = Factory.create(:student_government_earl) end should "be able to vote and get feedback on votes" do visit "/#{@earl.name}" @question = @ear...
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/test/factories/export.rb
test/factories/export.rb
Factory.define :export do |export| export.data export.name { 'string' } end
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/test/factories/earl.rb
test/factories/earl.rb
Factory.define :earl do |earl| earl.name { Factory.next :earl_url } earl.question_id 1 # need to add a fixture for this earl.user {|u| u.association(:email_confirmed_user) } end Factory.sequence :earl_url do |n| "test_url_#{n}" end
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/test/factories/clearance.rb
test/factories/clearance.rb
Factory.sequence :email do |n| "test@test.com" if n == 0 # some tests assume this is the email address "user#{n}@example.com" if n > 0 end Factory.define :user do |user| user.email { Factory.next :email } user.password { "password" } user.password_confirmation { "password" } end ...
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/test/factories/density.rb
test/factories/density.rb
Factory.define :density do |density| end
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/test/factories/choice.rb
test/factories/choice.rb
Factory.define :choice do |c| c.created_at Time.now.utc c.updated_at Time.now.utc c.active true c.creator_id 1 c.data { "test choice #{Factory.next :choice_id}" } c.question_id 1 c.loss_count 3 c.losses 3 end Factory.sequence :choice_id do |n| n end
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/test/factories/question.rb
test/factories/question.rb
Factory.define :question do |q| q.name 'What is this?' q.url 'testurl' q.created_at Time.now.utc q.updated_at Time.now.utc q.tracking nil q.prompts_count 90 q.choices_count 10 q.appearance_id "f72da54add43e5ca39cab80f1c72f0e7" q.picked_prompt_id "1" q.it_should_autoactivate_ideas true q.visitor_id...
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/test/factories/prompt.rb
test/factories/prompt.rb
Factory.define :prompt do |p| p.created_at Time.now.utc p.left_choice_id { Factory.next :choice_id } p.left_choice_text {|a| "left choice text #{a.left_choice_id}" } p.updated_at Time.now.utc p.tracking nil p.votes_count 0 p.right_choice_id { Factory.next :choice_id } p.right_choice_text {|a| "right cho...
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/test/factories/visitor.rb
test/factories/visitor.rb
Factory.define :visitor do |visitor| end
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/test/factories/click.rb
test/factories/click.rb
Factory.define :click do |click| end
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/test/factories/trial.rb
test/factories/trial.rb
Factory.define :trial do |trial| end
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/test/factories/session_info.rb
test/factories/session_info.rb
Factory.define :session_info do |session_info| end
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/test/factories/blocked_cookies.rb
test/factories/blocked_cookies.rb
Factory.define :blocked_cookies do |blocked_cookies| blocked_cookies.referrer { 'string' } blocked_cookies.question_id { 1 } blocked_cookies.user_agent { 'string' } blocked_cookies.ip_addr { 'string' } blocked_cookies.source { 'string' } end
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/test/shoulda_macros/pagination.rb
test/shoulda_macros/pagination.rb
class Test::Unit::TestCase # Example: # context "a GET to index signed in as admin" do # setup do # sign_in_as Factory(:admin_user) # get :index # end # should_paginate_collection :users # should_display_pagination # end def self.should_paginate_collection(collection_name) ...
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/test/shoulda_macros/forms.rb
test/shoulda_macros/forms.rb
class Test::Unit::TestCase # assert_form posts_url, :put do # assert_text_field :post, :title # assert_text_area :post, :body # assert_submit # end def assert_form(url, http_method = :post) http_method, hidden_http_method = form_http_method(http_method) assert_select "form[action=?][method=#{...
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/test/unit/user_test.rb
test/unit/user_test.rb
require 'test_helper' class UserTest < ActiveSupport::TestCase should_have_many :earls should_have_many :session_infos should_have_many :clicks should "be valid with factories" do assert_valid Factory.build(:user) assert_valid Factory.create(:user) assert_valid Factory.create(:email_confirmed_use...
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/test/unit/export_test.rb
test/unit/export_test.rb
require 'test_helper' class ExportTest < ActiveSupport::TestCase should "be valid with factory" do assert_valid Factory.build(:export) end end
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/test/unit/survey_session_test.rb
test/unit/survey_session_test.rb
require 'test_helper' class SurveySessionTest < ActiveSupport::TestCase # create verifiable cookie value def c(value) verifier = ActiveSupport::MessageVerifier.new(APP_CONFIG[:SURVEY_SESSION_SECRET]) verifier.generate(value) end context "the appearance_lookup= method" do should "set the appearance...
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/test/unit/visitor_test.rb
test/unit/visitor_test.rb
require 'test_helper' class VisitorTest < ActiveSupport::TestCase should "be valid with factory" do assert_valid Factory.build(:visitor) end should_have_many :session_infos end
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/test/unit/blocked_cookies_test.rb
test/unit/blocked_cookies_test.rb
require 'test_helper' class BlockedCookiesTest < ActiveSupport::TestCase end
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/test/unit/density_test.rb
test/unit/density_test.rb
require 'test_helper' class DensityTest < ActiveSupport::TestCase should "be valid with factory" do assert_valid Factory.build(:density) end end
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/test/unit/click_test.rb
test/unit/click_test.rb
require 'test_helper' class ClickTest < ActiveSupport::TestCase should_belong_to :session_info should_belong_to :user should "be valid with factory" do assert_valid Factory.build(:click) end should "convert tracking to info when first parameter" do click = Click.create( :url => 'http://exam...
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/test/unit/earl_test.rb
test/unit/earl_test.rb
require 'test_helper' class EarlTest < ActiveSupport::TestCase should_belong_to :user should_have_attached_file :logo should "be valid with factories" do assert_valid Factory.build(:earl) assert_valid Factory.create(:earl) end should_allow_values_for :name, "UPPERCASE", "testing", "test12-_" sho...
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/test/unit/session_info_test.rb
test/unit/session_info_test.rb
require 'test_helper' class SessionInfoTest < ActiveSupport::TestCase should_have_many :trials should_have_many :alternatives, :through => :trials should_belong_to :visitor should_have_many :clicks should_belong_to :user should "be valid with factory" do assert_valid Factory.build(:session_info) end...
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/test/unit/question_test.rb
test/unit/question_test.rb
require 'test_helper' class QuestionTest < ActiveSupport::TestCase should "pass along earl validation errors" do invalid_urls = [Earl.reserved_names.first, Earl.reserved_names.last, "test12-_,.", "with space", "", "bals@bla", "test/this", "askdf|", "=sdkjfs", '+'] invalid_urls.each do |url| q = Questi...
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/test/unit/trial_test.rb
test/unit/trial_test.rb
require 'test_helper' class TrialTest < ActiveSupport::TestCase should_belong_to :session_info should_belong_to :alternative should "be valid with factory" do assert_valid Factory.build(:trial) end end
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/test/functional/home_controller_test.rb
test/functional/home_controller_test.rb
require 'test_helper' class HomeControllerTest < ActionController::TestCase context "on GET to :index" do setup do get :index end should_not_set_the_flash should_respond_with :success end should "not let an unauthenticated user access /admin" do get :admin assert_response :redirect ass...
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/test/functional/prompt_controller_test.rb
test/functional/prompt_controller_test.rb
require 'test_helper' class PromptsControllerTest < ActionController::TestCase def test_exception_as_json get :skip, :question_id => 1, :id => 1, :format => 'js' assert_response :error assert_equal @response.body[0], '{' end def test_exception_as_html get :skip, :question_id => 1, :id => 1, :for...
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/public/dispatch.rb
public/dispatch.rb
#!/opt/local/bin/ruby require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT) # If you're using RubyGems and mod_ruby, this require should be changed to an absolute path one, like: # "/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher" -- otherwise performance is severely impai...
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/features/support/hooks.rb
features/support/hooks.rb
Before('@photocracy') do @photocracy_mode = true puts "Changing api credentials to photocracy" set_active_resource_credentials end After('@photocracy') do @photocracy_mode = false #The following is normally done in application_controller to set # the proper api credentials for photocra...
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/features/support/env.rb
features/support/env.rb
# IMPORTANT: This file is generated by cucumber-rails - edit at your own peril. # It is recommended to regenerate this file in the future when you upgrade to a # newer version of cucumber-rails. Consider adding your own code to a new file # instead of editing this one. Cucumber will automatically load all features/**...
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/features/support/paths.rb
features/support/paths.rb
module NavigationHelpers def path_to(page_name) path = case page_name when /the homepage/i root_path when /the sign up page/i new_user_path when /the sign in page/i new_session_path when /the password reset request page/i new_password_path when /the question show page...
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/features/support/pickle.rb
features/support/pickle.rb
# this file generated by script/generate pickle [paths] [email] # # Make sure that you are loading your factory of choice in your cucumber environment # # For machinist add: features/support/machinist.rb # # require 'machinist/active_record' # or your chosen adaptor # require File.dirname(__FILE__) + '/../../spec...
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/features/step_definitions/visitor_steps.rb
features/step_definitions/visitor_steps.rb
Given /^there are no User Sessions$/ do SessionInfo.delete_all end Then /^there should be (\d*) User Sessions?$/ do |num| SessionInfo.count.should == num.to_i end Given /^there are no Visitors$/ do Visitor.delete_all end Then /^there should be (\d*) Visitor$/ do |num| Visitor.count.should == num.to_i end When ...
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/features/step_definitions/fraud_prevention_steps.rb
features/step_definitions/fraud_prevention_steps.rb
Then /^the left choice text should match the saved left choice text$/ do Then "I should see \"#{@left_choice.data}\" within \"#leftside\"" end Then /^the left choice text should not match the saved left choice text$/ do Then "I should not see \"#{@left_choice.data}\" within \"#leftside\"" end Then /^the right ...
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/features/step_definitions/web_steps.rb
features/step_definitions/web_steps.rb
# IMPORTANT: This file is generated by cucumber-rails - edit at your own peril. # It is recommended to regenerate this file in the future when you upgrade to a # newer version of cucumber-rails. Consider adding your own code to a new file # instead of editing this one. Cucumber will automatically load all features/**...
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/features/step_definitions/widget_steps.rb
features/step_definitions/widget_steps.rb
When /^I click the WIDGET (.*) tab$/ do |tab_name| case tab_name when "About" find(".about_tab").click when "View Results" find(".results_tab").click end end # Note: I believe this statement goes unused. When /^I click on (.*) in the footer$/ do |link_name| case link_name when "...
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/features/step_definitions/photocracy_steps.rb
features/step_definitions/photocracy_steps.rb
When /^I upload a photo$/ do photo = "#{Rails.root}/db/seed-images/princeton/#{rand(31)+1}.jpg" When "I click the add new photo button" #And "I press \"choose_file\"" And "I attach the file \"#{photo}\" to \"new_idea\" within \"#add_photo\"" sleep(5) # I'd like to change this to some sort of visual feedb...
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/features/step_definitions/factory_girl_steps.rb
features/step_definitions/factory_girl_steps.rb
Given /^the following (.*) exists?:$/ do |factory, table| factory = factory.singularize.gsub(' ','_') table.hashes.each do |attributes| Factory(factory, attributes) end end Factory.factories.each do |name, factory| Given /^an? #{name} exists$/ do Factory(name) end Given /^(\d+) #{name.to_s.humaniz...
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/features/step_definitions/voting_steps.rb
features/step_definitions/voting_steps.rb
When /^I click on the (left|right) choice$/ do |side| css = ".#{side}side.btn-vote" begin page.has_no_selector?("#{css}.disabled") rescue page.has_no_selector?("#{css}.disabled") end begin has_css?(css) find(css).click rescue has_css?(css) find(css).click end begin page.has_n...
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/features/step_definitions/admin_steps.rb
features/step_definitions/admin_steps.rb
Given /^I am on the the super admin dashboard page$/ do visit '/admin' end Given /^there are no Delayed Jobs$/ do Delayed::Job.delete_all end When /^I click on the link for an idea marketplace creator map$/ do pending # express the regexp above with the code you wish you had end Then /^the map should l...
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/features/step_definitions/idea_marketplace_steps.rb
features/step_definitions/idea_marketplace_steps.rb
Given /^an idea marketplace exists with url '(.*)'$/ do |url| Given "I am on the question create page" When "I fill in all fields with valid data except \"question_url\"" And "I fill in \"question_url\" with \"#{url}\"" And "I press \"Create\"" Capybara.reset_sessions! end Given /^an idea marketplace exists...
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/features/step_definitions/email_steps.rb
features/step_definitions/email_steps.rb
# Commonly used email steps # # To add your own steps make a custom_email_steps.rb # The provided methods are: # # last_email_address # reset_mailer # open_last_email # visit_in_email # unread_emails_for # mailbox_for # current_email # open_email # read_emails_for # find_email # # General form for email scenarios are: ...
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/features/step_definitions/clearance_steps.rb
features/step_definitions/clearance_steps.rb
# General Then /^I should see error messages$/ do if respond_to?(:page) assert_match /error(s)? prohibited/m, page.body else assert_match /error(s)? prohibited/m, response.body end end # Database Given /^no user exists with an email of "(.*)"$/ do |email| assert_nil User.find_by_email(email) end Giv...
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/features/step_definitions/paperclip_steps.rb
features/step_definitions/paperclip_steps.rb
When /^I attach an? "([^\"]*)" "([^\"]*)" file to an? "([^\"]*)" on S3$/ do |filename, extension, klass| filename = filename.to_sym definition = klass.gsub(" ", "_").classify.constantize.attachment_definitions[filename] path = "http://s3.amazonaws.com/:id/#{definition[:path]}" path.gsub!(/:([^\/\.]+)/) do |m...
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/spec/spec_helper.rb
spec/spec_helper.rb
# This file is copied to ~/spec when you run 'ruby script/generate rspec' # from the project root directory. ENV["RAILS_ENV"] ||= 'test' require File.expand_path(File.join(File.dirname(__FILE__),'..','config','environment')) require 'spec/autorun' require 'spec/rails' require 'capybara/rails' include Capybara::DSL requ...
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/spec/support/spec_helpers.rb
spec/support/spec_helpers.rb
module SpecHelper def sign_in_as(user) @controller.current_user = user end def sign_out @controller.current_user = nil end def capybara_sign_in_as(user) visit new_session_path within('.body form') do fill_in "Email", :with => user.email fill_in "Password", :with => user.password ...
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/spec/integration/voting_spec.rb
spec/integration/voting_spec.rb
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') require 'active_resource/http_mock' describe 'A User on the vote page' do before do ActiveResource::HttpMock.respond_to do |mock| question = Factory.build(:question, :id => 1, :picked_prompt_id => 1).attributes.to_xml(:root => 'question')...
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/spec/routing/questions_routing_spec.rb
spec/routing/questions_routing_spec.rb
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe QuestionsController do describe "route generation" do it "maps #index" do route_for(:controller => "questions", :action => "index").should == "/questions" end it "maps #new" do route_for(:controller => "questions",...
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/spec/helpers/questions_helper_spec.rb
spec/helpers/questions_helper_spec.rb
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe QuestionsHelper do #Delete this example and add some real ones or delete this file it "is included in the helper object" do included_modules = (class << helper; self; end).send :included_modules included_modules.should include(Q...
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/spec/helpers/application_helper_spec.rb
spec/helpers/application_helper_spec.rb
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe ApplicationHelper do #Delete this example and add some real ones or delete this file it "should be included in the object returned by #helper" do included_modules = (class << helper; self; end).send :included_modules included_mo...
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/spec/controllers/questions_controller_spec.rb
spec/controllers/questions_controller_spec.rb
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe QuestionsController do def mock_question(stubs={}) @mock_question ||= mock_model(Question, stubs) end describe "GET admin_stats" do context "when not logged in" do it "should redirect to the login page" do get :...
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/spec/controllers/earls_controller_spec.rb
spec/controllers/earls_controller_spec.rb
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') require 'active_resource/http_mock' describe EarlsController do def mock_question(stubs={}) @mock_question ||= mock_model(Question, stubs) end describe "GET :show" do before do ActiveResource::HttpMock.respond_to do |mock| ...
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/spec/controllers/application_controller_spec.rb
spec/controllers/application_controller_spec.rb
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe ApplicationController do #Delete this example and add some real ones it "should use ApplicationController" do controller.should be_an_instance_of(ApplicationController) end it "should autocreate user if necessary" do end ...
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/spec/controllers/prompts_controller_spec.rb
spec/controllers/prompts_controller_spec.rb
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') require 'active_resource/http_mock' describe PromptsController do def mock_question(stubs={}) @mock_question ||= mock_model(Question, stubs) end before do @appearance_lookup = 'f72da54add43e5ca39cab80f1c72f0e7' ActiveResource::Htt...
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/spec/models/visitor_spec.rb
spec/models/visitor_spec.rb
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe Visitor do before(:each) do @valid_attributes = { } end it "should create a new instance given valid attributes" do Visitor.create!(@valid_attributes) end it "should calculate scores accurately" do examples = [ #vo...
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/spec/models/earl_spec.rb
spec/models/earl_spec.rb
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe Earl do before(:each) do @valid_attributes = { :name => "value for name", :question_id => 1 } end it "should create a new instance given valid attributes" do Earl.create!(@valid_attributes) end end
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/spec/models/delayed_job_spec.rb
spec/models/delayed_job_spec.rb
require "spec/spec_helper" class WrongUser def deliver_message raise end end class WrongNotifierJob def perform WrongUser.deliver_message end end describe Delayed do it "should call HoptoadNotifier" do HoptoadNotifier.expects(:notify) @worker = Delayed::Worker.new(:max_priority => nil, :...
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false
allourideas/allourideas.org
https://github.com/allourideas/allourideas.org/blob/3b586bd3fe23b6a341554bc72ef8a39e2f21a672/lib/const.rb
lib/const.rb
module Const ABOUT_QUESTION_ID = 2 TOUR_DEMO_QUESTION_ID = 9 RANK_ALGO_ID = 3 VISIT_STALE_AFTER = 10800 # 3 hours HASH_IP = false MAX_QUESTION_LENGTH = 100 MAX_ITEM_LENGTH = 140 ITEM_LIMIT = 10 end
ruby
BSD-3-Clause
3b586bd3fe23b6a341554bc72ef8a39e2f21a672
2026-01-04T17:27:38.355655Z
false