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 |
|---|---|---|---|---|---|---|---|---|
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/test/components/previews/settings_nav/nav_component_preview.rb | test/components/previews/settings_nav/nav_component_preview.rb | # frozen_string_literal: true
class SettingsNav::NavComponentPreview < Lookbook::Preview
# @param selected toggle
def default(selected: false)
render(SettingsNav::NavComponent.new(title: "Title", subtitle: "Subtitle", url: "#", icon: "menu-icon-settings", selected: selected))
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/test/components/previews/settings_nav/header_component_preview.rb | test/components/previews/settings_nav/header_component_preview.rb | # frozen_string_literal: true
class SettingsNav::HeaderComponentPreview < Lookbook::Preview
def default
render(SettingsNav::HeaderComponent.new) do
"Header"
end
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/test/components/previews/settings_nav/nav_small_component_preview.rb | test/components/previews/settings_nav/nav_small_component_preview.rb | # frozen_string_literal: true
class SettingsNav::NavSmallComponentPreview < Lookbook::Preview
def default
render(SettingsNav::NavSmallComponent.new(url: "#")) do
"Home"
end
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/test/components/previews/form/input_text_component_preview.rb | test/components/previews/form/input_text_component_preview.rb | class Form::InputTextComponentPreview < Lookbook::Preview
# @param leading_accessory toggle
def default(leading_accessory: false)
render_with_template(locals: {
leading_accessory: leading_accessory
})
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/test/components/previews/form/button_primary_component_preview.rb | test/components/previews/form/button_primary_component_preview.rb | class Form::ButtonPrimaryComponentPreview < Lookbook::Preview
def default
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/test/components/previews/form/radio_component_preview.rb | test/components/previews/form/radio_component_preview.rb | class Form::RadioComponentPreview < Lookbook::Preview
def default
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/test/components/previews/form/switch_component_preview.rb | test/components/previews/form/switch_component_preview.rb | class Form::SwitchComponentPreview < Lookbook::Preview
def default
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/test/components/previews/form/button_secondary_component_preview.rb | test/components/previews/form/button_secondary_component_preview.rb | class Form::ButtonSecondaryComponentPreview < Lookbook::Preview
def default
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/test/components/previews/form/checkbox_component_preview.rb | test/components/previews/form/checkbox_component_preview.rb | class Form::CheckboxComponentPreview < Lookbook::Preview
def default
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/test/components/previews/form/select_input_component_preview.rb | test/components/previews/form/select_input_component_preview.rb | class Form::SelectInputComponentPreview < Lookbook::Preview
def default
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/test/models/micropost_test.rb | test/models/micropost_test.rb | require "test_helper"
class MicropostTest < ActiveSupport::TestCase
setup do
@data = {
"id" => "1234",
"author" => {
"name" => "Name",
"url" => "https://example.com",
"avatar" => "https://micro.blog/name/avatar.jpg",
"_microblog" => {"username" => "username"}
}
... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/test/models/image_test.rb | test/models/image_test.rb | require "test_helper"
class ImageTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/test/models/auth_constraint_test.rb | test/models/auth_constraint_test.rb | require "test_helper"
class AuthConstraintTest < ActiveSupport::TestCase
test "should allow existing admins" do
user = users(:ben)
request = request_mock(user.auth_token)
assert AuthConstraint.admin?(request)
end
test "should not allow non-admins" do
user = users(:new)
request = request_mock... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/test/models/coupon_test.rb | test/models/coupon_test.rb | require "test_helper"
class CouponTest < ActiveSupport::TestCase
test "should generate code" do
user = users(:new)
coupon = user.create_coupon!
assert_not_nil coupon.coupon_code
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/test/models/user_test.rb | test/models/user_test.rb | require "test_helper"
class UserTest < ActiveSupport::TestCase
setup do
@user = users(:ben)
@feeds = create_feeds(@user)
@entries = @user.entries
end
test "should filter by subscription" do
@user.inspect
ids = @user.entries.limit(1).pluck(:id)
assert_equal(ids, @user.can_read_filter(ids)... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/test/models/recently_played_entry_test.rb | test/models/recently_played_entry_test.rb | require "test_helper"
class RecentlyPlayedEntryTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/test/models/deleted_user_test.rb | test/models/deleted_user_test.rb | require "test_helper"
class DeletedUserTest < ActiveSupport::TestCase
setup do
@deleted_user = DeletedUser.create(email: "example@example.com", customer_id: "cus_123", original_user_id: 123)
end
test "should search" do
assert_equal(1, DeletedUser.search("example").length)
end
test "should get strip... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/test/models/content_formatter_test.rb | test/models/content_formatter_test.rb | require "test_helper"
class ContentFormatterTest < ActiveSupport::TestCase
setup do
feed = feeds(:kottke)
content = %(<p><a href="/link"><img src="/img.png"></a></p>)
@entry = feed.entries.create!(content: content, public_id: SecureRandom.hex)
end
test "should format content" do
expected = %(<p>... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/test/models/app_store_notification_test.rb | test/models/app_store_notification_test.rb | require "test_helper"
class AppStoreNotificationTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/test/models/conditional_http_test.rb | test/models/conditional_http_test.rb | require "test_helper"
class ConditionalHttpTest < ActiveSupport::TestCase
test "should get http headers with date" do
last_modified = Time.now
etag = SecureRandom.hex
expected = {
"If-None-Match" => etag,
"If-Modified-Since" => last_modified.httpdate
}
assert_equal expected, Condition... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/test/models/oauth_server_test.rb | test/models/oauth_server_test.rb | require "test_helper"
class OauthServerTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/test/models/attribute_change_test.rb | test/models/attribute_change_test.rb | require "test_helper"
class AttributeChangeTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/test/models/discovered_feed_test.rb | test/models/discovered_feed_test.rb | require "test_helper"
class DiscoveredFeedTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/test/models/unread_test.rb | test/models/unread_test.rb | require "test_helper"
class UnreadTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/test/models/billing_event_test.rb | test/models/billing_event_test.rb | require "test_helper"
class BillingEventTest < ActiveSupport::TestCase
setup do
StripeMock.start
@user = users(:ben)
ActionMailer::Base.deliveries.clear
end
teardown do
StripeMock.stop
end
test "charge_succeeded?" do
StripeMock.start
invoice = Stripe::Invoice.create
event = Str... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/test/models/device_test.rb | test/models/device_test.rb | require "test_helper"
class DeviceTest < ActiveSupport::TestCase
setup do
user = users(:ben)
@device = user.devices.build(
token: "token",
model: "model",
device_type: Device.device_types[:notifier],
application: "application",
operating_system: "iOS 10"
)
end
test "sho... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/test/models/crawl_data_test.rb | test/models/crawl_data_test.rb | require "test_helper"
class CrawlDataTest < ActiveSupport::TestCase
def setup
flush_redis
@feed = feeds(:daring_fireball)
end
def test_should_be_ok
feed = CrawlData.new
feed.download_error(Exception.new)
feed = CrawlData.new
feed.download_success(@feed.id)
feed = CrawlData.new
... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/test/models/authentication_token_test.rb | test/models/authentication_token_test.rb | require "test_helper"
class AuthenticationTokenTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/test/models/favicon_test.rb | test/models/favicon_test.rb | require "test_helper"
class FaviconTest < ActiveSupport::TestCase
test "should add to created_at cache" do
assert_raises(ActiveRecord::RecordInvalid) do
Favicon.create!(url: nil)
end
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/test/models/podcast_subscription_test.rb | test/models/podcast_subscription_test.rb | require "test_helper"
class PodcastSubscriptionTest < ActiveSupport::TestCase
test "should not filter if empty" do
podcast_subscription = podcast_subscriptions(:ben_daring_fireball)
refute podcast_subscription.filtered?("subject")
end
test "should filter excluded term" do
podcast_subscription = pod... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/test/models/sparkline_test.rb | test/models/sparkline_test.rb | require "test_helper"
class SparklineTest < ActiveSupport::TestCase
test "should generate line points" do
sparkline = Sparkline.new(width: 10, height: 10, stroke: 2, percentages: [0.5, 0.1])
assert_equal("1,5.0 9.0,9.0", sparkline.line)
assert_equal("0,10.0 0.0,5.0 10.0,9.0 10.0,10.0", sparkline.fill)
... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/test/models/entry_test.rb | test/models/entry_test.rb | require "test_helper"
class EntryTest < ActiveSupport::TestCase
setup do
@user = users(:ben)
feed = @user.feeds.first
@entry = feed.entries.build(
public_id: SecureRandom.hex,
content: "<p>#{Faker::Lorem.paragraph}</p>"
)
end
test "should always have a published date" do
assert_n... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/test/models/account_migration_item_test.rb | test/models/account_migration_item_test.rb | require "test_helper"
class AccountMigrationItemTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/test/models/action_test.rb | test/models/action_test.rb | require "test_helper"
class ActionTest < ActiveSupport::TestCase
def setup
@user = users(:ben)
@action = actions(:ben_one)
end
test "should be valid" do
assert @action.valid?
end
test "feeds should be present" do
action = @user.actions.build(feed_ids: [])
assert_not action.valid?
end
... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/test/models/newsletter_sender_test.rb | test/models/newsletter_sender_test.rb | require "test_helper"
class NewsletterSenderTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/test/models/embed_test.rb | test/models/embed_test.rb | require 'test_helper'
class EmbedTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/test/models/playlist_test.rb | test/models/playlist_test.rb | require "test_helper"
class PlaylistTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/test/models/subscription_test.rb | test/models/subscription_test.rb | require "test_helper"
class SubscriptionTest < ActiveSupport::TestCase
test "should enqueue FaviconCrawler::Finder" do
Sidekiq::Worker.clear_all
user = users(:ben)
host = "example.com"
url = URI::HTTP.build(host: host)
feed = Feed.create(feed_url: url.to_s, site_url: url.to_s)
assert_differen... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/test/models/account_migration_test.rb | test/models/account_migration_test.rb | require "test_helper"
class AccountMigrationTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/test/models/source/guess_test.rb | test/models/source/guess_test.rb | require "test_helper"
class GuessTest < ActiveSupport::TestCase
test "should guess /feed" do
url = "https://example.com"
stub_request(:get, url)
stub_request(:get, "#{url}/rss").to_return(status: 404)
stub_request_file("atom.xml", "#{url}/feed")
response = Feedkit::Request.download(url)
asser... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/test/models/source/known_pattern_test.rb | test/models/source/known_pattern_test.rb | require "test_helper"
class KnownPatternTest < ActiveSupport::TestCase
test "should recognize knows patterns" do
urls = {
"https://www.youtube.com/channel/abc" => "https://www.youtube.com/feeds/videos.xml?channel_id=abc",
"https://www.youtube.com/user/abc" => "https://www.youtube.com/f... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/test/models/source/xml_test.rb | test/models/source/xml_test.rb | require "test_helper"
class XmlTest < ActiveSupport::TestCase
test "should create feed" do
url = "https://example.com/atom.xml"
stub_request_file("atom.xml", url)
response = Feedkit::Request.download(url)
assert_difference "Feed.count", +1 do
Source::Xml.find(response)
end
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/test/models/source/json_feed_test.rb | test/models/source/json_feed_test.rb | require "test_helper"
class JsonFeedTest < ActiveSupport::TestCase
test "should create feed" do
url = "https://example.com/feed.json"
stub_request_file("feed.json", url)
response = Feedkit::Request.download(url)
assert_difference "Feed.count", +1 do
Source::Xml.find(response)
end
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/test/models/source/meta_links_test.rb | test/models/source/meta_links_test.rb | require "test_helper"
class MetaLinksTest < ActiveSupport::TestCase
test "should find atom links" do
url = "https://example.com"
feed_url = "https://example2.com/comments/feed/"
stub_request(:get, url)
.to_return(body: %(<link rel="alternate" type="application/atom+xml" href="#{feed_url}"/>))
s... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/test/models/source/existing_feed_test.rb | test/models/source/existing_feed_test.rb | require "test_helper"
class ExistingFeedTest < ActiveSupport::TestCase
test "should find existing feed" do
url = "http://example.com/atom.xml"
feed = Feed.create!(feed_url: url)
stub_request_file("atom.xml", url)
response = Feedkit::Request.download(url)
feeds = Source::ExistingFeed.find(resp... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/test/models/source/body_links_test.rb | test/models/source/body_links_test.rb | require "test_helper"
class BodyLinksTest < ActiveSupport::TestCase
test "should find candidate links" do
url = "https://example.com"
types = ["feed", "xml", "rss", "atom"]
markup = types.each_with_object([]) do |type, array|
stub_request_file("atom.xml", "#{url}/#{type}")
array.push %(<a hr... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/test/models/iframe_embeds/iframe_embed_test.rb | test/models/iframe_embeds/iframe_embed_test.rb | require "test_helper"
class IframeEmbedTest < ActiveSupport::TestCase
test "should return youtube handler" do
url = "https://youtube.com/embed/1234"
stub_request_file("oembed.json", /www\.youtube\.com/, headers: {"Content-Type" => "application/json; charset=utf-8"})
klass = IframeEmbed.fetch(url)
a... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/test/lib/compressed_request_test.rb | test/lib/compressed_request_test.rb | require "test_helper"
require "zlib"
require "stringio"
class CompressedRequestTest < ActiveSupport::TestCase
def setup
@app = lambda { |env| [200, {}, ["OK"]] }
@middleware = CompressedRequest.new(@app)
end
test "passes through non-extension requests unchanged" do
env = {
"REQUEST_PATH" => "/... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/test/mailers/marketing_mailer_test.rb | test/mailers/marketing_mailer_test.rb | require "test_helper"
class MarketingMailerTest < ActionMailer::TestCase
# test "the truth" do
# assert true
# end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/test/mailers/previews/user_mailer_preview.rb | test/mailers/previews/user_mailer_preview.rb | # Preview all emails at http://localhost:3000/rails/mailers/marketing_mailer
class UserMailerPreview < ActionMailer::Preview
def subscription_reminder
UserMailer.subscription_reminder(BillingEvent.first.id)
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/test/mailers/previews/marketing_mailer_preview.rb | test/mailers/previews/marketing_mailer_preview.rb | # Preview all emails at http://localhost:3000/rails/mailers/marketing_mailer
class MarketingMailerPreview < ActionMailer::Preview
def member_discount
MarketingMailer.member_discount(User.first)
end
def onboarding_1_welcome
MarketingMailer.onboarding_1_welcome(User.first)
end
def onboarding_2_mobile
... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/test/mailers/previews/entry_mailer_preview.rb | test/mailers/previews/entry_mailer_preview.rb | # Preview all emails at http://localhost:3000/rails/mailers/entry_mailer
class EntryMailerPreview < ActionMailer::Preview
def mailer
EntryMailer.mailer(Entry.first.id, "example@example.com", Entry.first.title, nil, "example@example.com", "Your Name", false)
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/lib/clock.rb | lib/clock.rb | require "clockwork"
require_relative "../config/boot"
require_relative "../config/environment"
include Clockwork
# Use locks so multiple clock processes do not schedule dupes
every(10.seconds, "clockwork.very_frequent") do
if RedisLock.acquire("clockwork:cache_entry_views", 8)
CacheEntryViews.perform_async(nil,... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/lib/compressed_request.rb | lib/compressed_request.rb | require "zlib"
class CompressedRequest
MAX_DECOMPRESSED_SIZE = 10 * 1024 * 1024 # 10MB
CHUNK_SIZE = 64 * 1024 # 64KB
def initialize(app)
@app = app
end
def call(env)
if extension?(env) && gzipped?(env)
decompress_body!(env)
end
@app.call(env)
end
private
def extension?(env)
... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/lib/no_compression.rb | lib/no_compression.rb | class NoCompression
def compress(string)
string
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/lib/tld_length.rb | lib/tld_length.rb | class TldLength
def initialize(app)
@app = app
end
def call(env)
if Rails.env.development? && host = env["HTTP_X_FORWARDED_HOST"] || env["HTTP_HOST"]
parts = host.split(".")
if parts[0] == "api"
ActionDispatch::Http::URL.tld_length = parts.length - 2
end
end
@... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/lib/conditional_sass_compressor.rb | lib/conditional_sass_compressor.rb | class ConditionalSassCompressor
def compress(string)
return string if string =~ /tailwindcss/
options = { syntax: :scss, cache: false, read_cache: false, style: :compressed}
begin
Sprockets::Autoload::SassC::Engine.new(string, options).render
rescue => e
puts "Could not compress '#{string[... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/lib/conditional_compression.rb | lib/conditional_compression.rb | class ConditionalCompression
def compress(string)
if string.include? "lib.js"
Uglifier.compile(string)
else
string
end
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/lib/basic_authentication.rb | lib/basic_authentication.rb | class BasicAuthentication
def initialize(app)
@app = app
end
def call(env)
if env["HTTP_AUTHORIZATION"].respond_to?(:include?) && !env["HTTP_AUTHORIZATION"].include?("Basic") && !env["HTTP_AUTHORIZATION"].include?("ApplePushNotifications")
env["HTTP_AUTHORIZATION"] = "Basic #{env["HTTP_AUTHORIZATIO... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/lib/yjit_stats.rb | lib/yjit_stats.rb | class YjitStats
def initialize(app)
@app = app
end
def call(env)
@app.call(env)
ensure
if RubyVM::YJIT.enabled? && Random.rand(100) == 0
RubyVM::YJIT.runtime_stats.each do |name, value|
Librato.measure "yjit.web.#{name}", value, source: Socket.gethostname
end
end
end
end | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/lib/redis_protocol.rb | lib/redis_protocol.rb | #!/usr/bin/env ruby
require "optparse"
require "redis"
ENV["TZ"] = "UTC"
def gen_redis_proto(*cmd)
proto = ""
proto << "*" + cmd.length.to_s + "\r\n"
cmd.each do |arg|
proto << "$" + arg.to_s.bytesize.to_s + "\r\n"
proto << arg.to_s + "\r\n"
end
proto
end
opts = {}
OptionParser.new { |options|
ba... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/lib/job_stat.rb | lib/job_stat.rb | class JobStat
def call(job, item, queue)
title = "job.#{job.class.to_s.underscore.parameterize}"
Librato.increment "#{title}.count"
Librato.increment "job.count"
Librato.timing title, source: Socket.gethostname do
yield
end
end
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/config/application.rb | config/application.rb | require_relative "boot"
require "rails/all"
require_relative "../lib/compressed_request"
require_relative "../lib/basic_authentication"
require_relative "../lib/conditional_sass_compressor"
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.requir... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/config/environment.rb | config/environment.rb | # Load the Rails application.
require_relative "application"
# Initialize the Rails application.
Rails.application.initialize!
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/config/puma.rb | config/puma.rb | # Puma can serve each request in a thread from an internal thread pool.
# The `threads` method setting takes two numbers: a minimum and maximum.
# Any libraries that use thread pools should be configured to match
# the maximum value specified for Puma. Default is set to 5 threads for minimum
# and maximum; this matches... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/config/routes.rb | config/routes.rb | require "sidekiq/web"
Sidekiq::Web.app_url = ENV["FEEDBIN_URL"]
Rails.application.routes.draw do
root to: "site#index"
mount StripeEvent::Engine, at: "/stripe"
constraints lambda { |request| AuthConstraint.admin?(request) } do
mount Lookbook::Engine, at: "/lookbook"
end
constraints lambda { |request| ... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/config/importmap.rb | config/importmap.rb | # Pin npm packages by running ./bin/importmap
pin "application", preload: true
pin "@hotwired/stimulus", to: "stimulus.min.js", preload: true
pin "@hotwired/stimulus-loading", to: "stimulus-loading.js", preload: true
pin_all_from "app/javascript/controllers", under: "controllers"
pin_all_from "app/javascript/helpers",... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/config/unicorn.rb | config/unicorn.rb | require "dotenv"
require "etc"
working_directory File.expand_path("..", __dir__)
shared_directory = File.join(File.expand_path("..", ENV["PWD"]), "shared")
shared_directory = File.directory?(shared_directory) ? shared_directory : ENV["PWD"]
worker_processes Etc.nprocessors
timeout 30
preload_app true
us... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/config/boot.rb | config/boot.rb | ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
Fixnum = Integer
Bignum = Integer
class File
class << self
alias_method :exists?, :exist?
end
end
require "bundler/setup" # Set up gems listed in the Gemfile.
require "bootsnap/setup" # Speed up boot time by caching expensive operations.
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/config/initializers/content_security_policy.rb | config/initializers/content_security_policy.rb | # Be sure to restart your server when you modify this file.
# Define an application-wide content security policy.
# See the Securing Rails Applications Guide for more information:
# https://guides.rubyonrails.org/security.html#content-security-policy-header
# Rails.application.configure do
# config.content_security... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/config/initializers/filter_parameter_logging.rb | config/initializers/filter_parameter_logging.rb | # Be sure to restart your server when you modify this file.
# Configure parameters to be partially matched (e.g. passw matches password) and filtered from the log file.
# Use this to limit dissemination of sensitive information.
# See the ActiveSupport::ParameterFilter documentation for supported notations and behavio... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/config/initializers/extract.rb | config/initializers/extract.rb | ENV["EXTRACT_USER_ALT"] = ENV["EXTRACT_USER_ALT"] || ENV["EXTRACT_USER"] | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/config/initializers/active_job.rb | config/initializers/active_job.rb | Rails.application.configure do
config.active_job.queue_adapter = :sidekiq
config.action_mailer.deliver_later_queue_name = "default_critical"
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/config/initializers/application_controller_renderer.rb | config/initializers/application_controller_renderer.rb | ActiveSupport::Reloader.to_prepare do
ApplicationController.renderer.defaults.merge!(
http_host: ENV["DEFAULT_URL_OPTIONS_HOST"],
https: Feedbin::Application.config.force_ssl
)
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/config/initializers/redis.rb | config/initializers/redis.rb | defaults = {connect_timeout: 5, timeout: 5}
defaults[:url] = ENV["REDIS_URL"] if ENV["REDIS_URL"]
$redis = {}.tap do |hash|
options2 = defaults.dup
if ENV["REDIS_URL_PUBLIC_IDS"] || ENV["REDIS_URL_CACHE"]
options2[:url] = ENV["REDIS_URL_PUBLIC_IDS"] || ENV["REDIS_URL_CACHE"]
end
hash[:refresher] = Connecti... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/config/initializers/sidekiq.rb | config/initializers/sidekiq.rb | require "sidekiq"
require ::File.expand_path("../../../lib/job_stat", __FILE__)
Sidekiq.strict_args!(false)
# Sidekiq::Extensions.enable_delay!
Sidekiq.configure_server do |config|
ActiveRecord::Base.establish_connection
config.server_middleware do |chain|
chain.add JobStat
end
config.redis = {id: "feedb... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/config/initializers/new_framework_defaults_7_0.rb | config/initializers/new_framework_defaults_7_0.rb | # Be sure to restart your server when you modify this file.
#
# This file eases your Rails 7.0 framework defaults upgrade.
#
# Uncomment each configuration one by one to switch to the new default.
# Once your application is ready to run with all new defaults, you can remove
# this file and set the `config.load_defaults... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/config/initializers/transformers.rb | config/initializers/transformers.rb | class Transformers
LISTS = Set.new(%w[ul ol].freeze)
LIST_ITEM = "li".freeze
TABLE_ITEMS = Set.new(%w[tr td th].freeze)
TABLE = "table".freeze
TABLE_SECTIONS = Set.new(%w[thead tbody tfoot].freeze)
VIDEO = "video".freeze
ANCHOR = "a".freeze
def class_allowlist
lambda do |env|
node = env[:node... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/config/initializers/session_store.rb | config/initializers/session_store.rb | # Be sure to restart your server when you modify this file.
Rails.application.config.session_store :cookie_store, key: "_feedbin_session", expire_after: 2.weeks
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/config/initializers/price_tier.rb | config/initializers/price_tier.rb | Feedbin::Application.config.price_tier = 3
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/config/initializers/fonts.rb | config/initializers/fonts.rb | Rails.application.reloader.to_prepare do
Feedbin::Application.config.font_sizes = (1..10).to_a
Feedbin::Application.config.fonts = [
Font.new("System", "default"),
Font.new("System Serif", "serif-3"),
Font.new("Whitney", "sans-serif-1"),
Font.new("Sentinel", "serif-1"),
Font.new("Ideal Sans", "s... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/config/initializers/bcrypt.rb | config/initializers/bcrypt.rb | BCrypt::Engine.cost = ENV["BCRYPT_COST"] ? ENV["BCRYPT_COST"].to_i : 12
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/config/initializers/error_service.rb | config/initializers/error_service.rb | class ErrorService
def self.notify(exception, options = {})
if exception.is_a?(Exception)
Honeybadger.notify(exception)
else
Honeybadger.notify(**exception)
Rails.logger.error exception
exception = exception.respond_to?(:safe_dig) && exception.safe_dig(:parameters, :exception)
end
... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/config/initializers/icons.rb | config/initializers/icons.rb | class SvgIcon
attr_reader :name, :markup, :width, :height
def initialize(name, markup, width, height)
@name = name
@markup = markup
@width = width
@height = height
end
def self.new_from_file(file)
name = File.basename(file, ".svg")
markup = File.read(file)
width, height = extract_d... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/config/initializers/time.rb | config/initializers/time.rb | Time::DATE_FORMATS[:feed] = "%B %d, %Y - %H:%M"
Time::DATE_FORMATS[:full_human] = "%B %-e, %Y at %l:%M %p"
Time::DATE_FORMATS[:datetime] = "%FT%T%:z"
Time::DATE_FORMATS[:date] = "%B %-e, %Y"
Time::DATE_FORMATS[:day_month] = "%b %d"
Time::DATE_FORMATS[:month_year] = "%b %Y"
Time::DATE_FORMATS[:stats] = "%Y/%m/%d %H:%M:%... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/config/initializers/sort.rb | config/initializers/sort.rb | class SmartSort
SCAN = /[$-\/:-?{-~!"^_`\[\]]|[^\d\.]+|[\d\.]+/
DIGITS = /\d+(\.\d+)?/
SYMBOLS = /^[$-\/:-?{-~!"^_`\[\]]/
attr_reader :value
def initialize(value)
@value = value
end
def <=>(other)
other.is_a?(self.class) || raise("Sort error")
left_value = value
right_value = other.valu... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/config/initializers/vapid.rb | config/initializers/vapid.rb | Feedbin::Application.config.vapid_key = if ENV["WEB_PUSH_CERT"] && File.exist?(ENV["WEB_PUSH_CERT"])
WebPush::VapidKey.from_pem(File.read(ENV["WEB_PUSH_CERT"]))
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/config/initializers/down.rb | config/initializers/down.rb | Down.backend :http | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/config/initializers/autotuner.rb | config/initializers/autotuner.rb | Autotuner.enabled = true
Autotuner.reporter = proc do |report|
Rails.logger.info("autotuner--------------------------")
Rails.logger.info(report.to_s)
Rails.logger.info("autotuner--------------------------")
end
Autotuner.metrics_reporter = proc do |metrics|
metrics.each do |key, value|
Librato.measure "a... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/config/initializers/youtube.rb | config/initializers/youtube.rb | Feedbin::Application.config.youtube_embed_urls = [
%r{.*?//(?:www|m)\.youtube-nocookie\.com/embed/(.*?)(\?|$)},
%r{.*?//(?:www|m)\.youtube\.com/embed/(.*?)(\?|$)},
%r{.*?//(?:www|m)\.youtube\.com/shorts/(.*?)(\?|$)},
%r{.*?//(?:www|m)\.youtube\.com/user/.*?#\w/\w/\w/\w/(.+)\b},
%r{.*?//(?:www|m)\.youtube\.com... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/config/initializers/iap.rb | config/initializers/iap.rb | Feedbin::Application.config.iap = {
"com.feedbin.feedbin.one_month" => {
time: 31.days,
amount: 399,
name: "One Month"
},
"com.feedbin.feedbin.six_months" => {
time: 183.days,
amount: 1999,
name: "Six Months"
},
"com.feedbin.feedbin.one_year" => {
time: 365.days,
amount: 3999,
... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/config/initializers/new_framework_defaults_7_2.rb | config/initializers/new_framework_defaults_7_2.rb | # Be sure to restart your server when you modify this file.
#
# This file eases your Rails 7.2 framework defaults upgrade.
#
# Uncomment each configuration one by one to switch to the new default.
# Once your application is ready to run with all new defaults, you can remove
# this file and set the `config.load_defaults... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/config/initializers/error_field.rb | config/initializers/error_field.rb | ActionView::Base.field_error_proc = proc do |html_tag, instance|
html_tag.html_safe
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/config/initializers/wrap_parameters.rb | config/initializers/wrap_parameters.rb | # Be sure to restart your server when you modify this file.
# This file contains settings for ActionController::ParamsWrapper which
# is enabled by default.
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
ActiveSupport.on_load(:action_controller) do
wrap_parameters f... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/config/initializers/s3.rb | config/initializers/s3.rb | STORAGE = {}.tap do |hash|
hash[:provider] = "AWS"
hash[:aws_access_key_id] = ENV["AWS_ACCESS_KEY_ID"]
hash[:aws_secret_access_key] = ENV["AWS_SECRET_ACCESS_KEY"]
hash[:region] = ENV["AWS_S3_REGION"] if ENV["AWS_S3_REGION"]
hash[:host] = ENV["AWS_S3_HOST"] ... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/config/initializers/inflections.rb | config/initializers/inflections.rb | # Be sure to restart your server when you modify this file.
# Add new inflection rules using the following format. Inflections
# are locale specific, and you may define rules for as many different
# locales as you wish. All of these examples are active by default:
# ActiveSupport::Inflector.inflections(:en) do |inflec... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/config/initializers/strong_migrations.rb | config/initializers/strong_migrations.rb | # Mark existing migrations as safe
StrongMigrations.start_after = 20220806153912
# Set timeouts for migrations
# If you use PgBouncer in transaction mode, delete these lines and set timeouts on the database user
StrongMigrations.lock_timeout = 10.seconds
StrongMigrations.statement_timeout = 1.hour
# Analyze tables af... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/config/initializers/themes.rb | config/initializers/themes.rb | Rails.application.reloader.to_prepare do
Feedbin::Application.config.themes = [
Theme.new("Auto", "auto"),
Theme.new("Day", "day"),
Theme.new("Sunset", "sunset"),
Theme.new("Dusk", "dusk"),
Theme.new("Night", "midnight")
]
end
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/config/initializers/database_connection.rb | config/initializers/database_connection.rb | require "etc"
if Rails.env.production?
Rails.application.config.after_initialize do
ActiveRecord::Base.connection_pool.disconnect!
ActiveSupport.on_load(:active_record) do
begin
uri = URI.parse(ENV["DATABASE_URL"])
rescue URI::InvalidURIError
raise "Invalid DATABASE_URL"
end... | ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
feedbin/feedbin | https://github.com/feedbin/feedbin/blob/02911157804301424ec3b1a17e1a9583c09b9e9b/config/initializers/cookies_serializer.rb | config/initializers/cookies_serializer.rb | # Be sure to restart your server when you modify this file.
# Specify a serializer for the signed and encrypted cookie jars.
# Valid options are :json, :marshal, and :hybrid.
Rails.application.config.action_dispatch.cookies_serializer = :json
| ruby | MIT | 02911157804301424ec3b1a17e1a9583c09b9e9b | 2026-01-04T15:49:01.344805Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.