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
dependabot/dependabot-core
https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/rust_toolchain/lib/dependabot/rust_toolchain/channel.rb
rust_toolchain/lib/dependabot/rust_toolchain/channel.rb
# typed: strict # frozen_string_literal: true require "sorbet-runtime" require "dependabot/rust_toolchain/channel_type" module Dependabot module RustToolchain class Channel extend T::Sig include Comparable sig { returns(T.nilable(String)) } attr_reader :stability sig { returns(...
ruby
MIT
5f5d8b92c51eefa3ec78a9e208f664e439134d76
2026-01-04T15:43:10.347999Z
false
dependabot/dependabot-core
https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/rust_toolchain/lib/dependabot/rust_toolchain/requirement.rb
rust_toolchain/lib/dependabot/rust_toolchain/requirement.rb
# typed: strong # frozen_string_literal: true require "dependabot/requirement" require "dependabot/utils" require "dependabot/rust_toolchain" require "dependabot/rust_toolchain/version" require "dependabot/rust_toolchain/channel_parser" require "dependabot/rust_toolchain/channel_type" module Dependabot module Rust...
ruby
MIT
5f5d8b92c51eefa3ec78a9e208f664e439134d76
2026-01-04T15:43:10.347999Z
false
dependabot/dependabot-core
https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/rust_toolchain/lib/dependabot/rust_toolchain/package_manager.rb
rust_toolchain/lib/dependabot/rust_toolchain/package_manager.rb
# typed: strong # frozen_string_literal: true require "sorbet-runtime" require "dependabot/ecosystem" require "dependabot/rust_toolchain/requirement" require "dependabot/rust_toolchain/version" module Dependabot module RustToolchain class RustToolchainPackageManager < Dependabot::Ecosystem::VersionManager ...
ruby
MIT
5f5d8b92c51eefa3ec78a9e208f664e439134d76
2026-01-04T15:43:10.347999Z
false
dependabot/dependabot-core
https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/rust_toolchain/lib/dependabot/rust_toolchain/update_checker.rb
rust_toolchain/lib/dependabot/rust_toolchain/update_checker.rb
# typed: strong # frozen_string_literal: true require "sorbet-runtime" require "dependabot/errors" require "dependabot/update_checkers" require "dependabot/update_checkers/base" module Dependabot module RustToolchain class UpdateChecker < Dependabot::UpdateCheckers::Base extend T::Sig require_rela...
ruby
MIT
5f5d8b92c51eefa3ec78a9e208f664e439134d76
2026-01-04T15:43:10.347999Z
false
dependabot/dependabot-core
https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/rust_toolchain/lib/dependabot/rust_toolchain/channel_type.rb
rust_toolchain/lib/dependabot/rust_toolchain/channel_type.rb
# typed: strong # frozen_string_literal: true require "sorbet-runtime" module Dependabot module RustToolchain class ChannelType < T::Enum enums do # Represents a version with a specific version number Version = new("Version") # Represents a channel with a date, e.g., "nightly-2023...
ruby
MIT
5f5d8b92c51eefa3ec78a9e208f664e439134d76
2026-01-04T15:43:10.347999Z
false
dependabot/dependabot-core
https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/rust_toolchain/lib/dependabot/rust_toolchain/channel_parser.rb
rust_toolchain/lib/dependabot/rust_toolchain/channel_parser.rb
# typed: strong # frozen_string_literal: true require "sorbet-runtime" require "dependabot/rust_toolchain" require "dependabot/rust_toolchain/channel" module Dependabot module RustToolchain class ChannelParser extend T::Sig sig { params(toolchain: String).void } def initialize(toolchain) ...
ruby
MIT
5f5d8b92c51eefa3ec78a9e208f664e439134d76
2026-01-04T15:43:10.347999Z
false
dependabot/dependabot-core
https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/rust_toolchain/lib/dependabot/rust_toolchain/metadata_finder.rb
rust_toolchain/lib/dependabot/rust_toolchain/metadata_finder.rb
# typed: strong # frozen_string_literal: true require "nokogiri" require "sorbet-runtime" require "dependabot/metadata_finders" require "dependabot/metadata_finders/base" require "dependabot/registry_client" require "dependabot/rust_toolchain" module Dependabot module RustToolchain class MetadataFinder < Depe...
ruby
MIT
5f5d8b92c51eefa3ec78a9e208f664e439134d76
2026-01-04T15:43:10.347999Z
false
dependabot/dependabot-core
https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/rust_toolchain/lib/dependabot/rust_toolchain/file_parser.rb
rust_toolchain/lib/dependabot/rust_toolchain/file_parser.rb
# typed: strong # frozen_string_literal: true require "sorbet-runtime" require "toml-rb" require "dependabot/dependency" require "dependabot/errors" require "dependabot/file_parsers" require "dependabot/file_parsers/base" require "dependabot/file_parsers/base/dependency_set" require "dependabot/rust_toolchain/models...
ruby
MIT
5f5d8b92c51eefa3ec78a9e208f664e439134d76
2026-01-04T15:43:10.347999Z
false
dependabot/dependabot-core
https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/rust_toolchain/lib/dependabot/rust_toolchain/models/rust_toolchain_toml.rb
rust_toolchain/lib/dependabot/rust_toolchain/models/rust_toolchain_toml.rb
# typed: strong # frozen_string_literal: true require "sorbet-runtime" require "toml-rb" require "dependabot/errors" require "dependabot/rust_toolchain/models/rust_toolchain_config" module Dependabot module RustToolchain module Models # Typed struct for rust-toolchain.toml file structure # https://...
ruby
MIT
5f5d8b92c51eefa3ec78a9e208f664e439134d76
2026-01-04T15:43:10.347999Z
false
dependabot/dependabot-core
https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/rust_toolchain/lib/dependabot/rust_toolchain/models/rust_toolchain_config.rb
rust_toolchain/lib/dependabot/rust_toolchain/models/rust_toolchain_config.rb
# typed: strong # frozen_string_literal: true require "sorbet-runtime" module Dependabot module RustToolchain module Models # Typed struct for the [toolchain] section of rust-toolchain.toml files # https://rust-lang.github.io/rustup/overrides.html#the-toolchain-file class RustToolchainConfig <...
ruby
MIT
5f5d8b92c51eefa3ec78a9e208f664e439134d76
2026-01-04T15:43:10.347999Z
false
dependabot/dependabot-core
https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/rust_toolchain/lib/dependabot/rust_toolchain/package/package_details_fetcher.rb
rust_toolchain/lib/dependabot/rust_toolchain/package/package_details_fetcher.rb
# typed: strong # frozen_string_literal: true require "sorbet-runtime" require "uri" require "dependabot/package/package_details" require "dependabot/registry_client" require "dependabot/update_checkers/base" require "dependabot/rust_toolchain" require "dependabot/rust_toolchain/channel" require "dependabot/rust_too...
ruby
MIT
5f5d8b92c51eefa3ec78a9e208f664e439134d76
2026-01-04T15:43:10.347999Z
false
dependabot/dependabot-core
https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/rust_toolchain/lib/dependabot/rust_toolchain/update_checker/latest_version_finder.rb
rust_toolchain/lib/dependabot/rust_toolchain/update_checker/latest_version_finder.rb
# typed: strict # frozen_string_literal: true require "sorbet-runtime" require "dependabot/update_checkers/base" require "dependabot/package/package_latest_version_finder" require "dependabot/rust_toolchain/channel_type" require "dependabot/rust_toolchain/package/package_details_fetcher" require "dependabot/rust_too...
ruby
MIT
5f5d8b92c51eefa3ec78a9e208f664e439134d76
2026-01-04T15:43:10.347999Z
false
collectiveidea/audited
https://github.com/collectiveidea/audited/blob/dbf8432604ec97734bcfb3dc6df61f4faa0d1b84/test/upgrade_generator_test.rb
test/upgrade_generator_test.rb
require "test_helper" require "generators/audited/upgrade_generator" class UpgradeGeneratorTest < Rails::Generators::TestCase destination File.expand_path("../../tmp", __FILE__) setup :prepare_destination tests Audited::Generators::UpgradeGenerator self.use_transactional_tests = false test "should add 'com...
ruby
MIT
dbf8432604ec97734bcfb3dc6df61f4faa0d1b84
2026-01-04T15:50:14.687107Z
false
collectiveidea/audited
https://github.com/collectiveidea/audited/blob/dbf8432604ec97734bcfb3dc6df61f4faa0d1b84/test/install_generator_test.rb
test/install_generator_test.rb
require "test_helper" require "generators/audited/install_generator" class InstallGeneratorTest < Rails::Generators::TestCase destination File.expand_path("../../tmp", __FILE__) setup :prepare_destination tests Audited::Generators::InstallGenerator test "generate migration with 'text' type for audited_change...
ruby
MIT
dbf8432604ec97734bcfb3dc6df61f4faa0d1b84
2026-01-04T15:50:14.687107Z
false
collectiveidea/audited
https://github.com/collectiveidea/audited/blob/dbf8432604ec97734bcfb3dc6df61f4faa0d1b84/test/test_helper.rb
test/test_helper.rb
ENV["RAILS_ENV"] = "test" $LOAD_PATH.unshift File.dirname(__FILE__) require File.expand_path("../../spec/rails_app/config/environment", __FILE__) require "rails/test_help" require "audited" class ActiveSupport::TestCase setup do ActiveRecord::Migration.verbose = false end def load_schema(version) loa...
ruby
MIT
dbf8432604ec97734bcfb3dc6df61f4faa0d1b84
2026-01-04T15:50:14.687107Z
false
collectiveidea/audited
https://github.com/collectiveidea/audited/blob/dbf8432604ec97734bcfb3dc6df61f4faa0d1b84/test/db/version_1.rb
test/db/version_1.rb
ActiveRecord::Schema.define do create_table :audits, force: true do |t| t.column :auditable_id, :integer t.column :auditable_type, :string t.column :user_id, :integer t.column :user_type, :string t.column :username, :string t.column :action, :string t.column :changes, :text t.column :v...
ruby
MIT
dbf8432604ec97734bcfb3dc6df61f4faa0d1b84
2026-01-04T15:50:14.687107Z
false
collectiveidea/audited
https://github.com/collectiveidea/audited/blob/dbf8432604ec97734bcfb3dc6df61f4faa0d1b84/test/db/version_3.rb
test/db/version_3.rb
ActiveRecord::Schema.define do create_table :audits, force: true do |t| t.column :auditable_id, :integer t.column :auditable_type, :string t.column :user_id, :integer t.column :user_type, :string t.column :username, :string t.column :action, :string t.column :audited_changes, :text t.c...
ruby
MIT
dbf8432604ec97734bcfb3dc6df61f4faa0d1b84
2026-01-04T15:50:14.687107Z
false
collectiveidea/audited
https://github.com/collectiveidea/audited/blob/dbf8432604ec97734bcfb3dc6df61f4faa0d1b84/test/db/version_4.rb
test/db/version_4.rb
ActiveRecord::Schema.define do create_table :audits, force: true do |t| t.column :auditable_id, :integer t.column :auditable_type, :string t.column :user_id, :integer t.column :user_type, :string t.column :username, :string t.column :action, :string t.column :audited_changes, :text t.c...
ruby
MIT
dbf8432604ec97734bcfb3dc6df61f4faa0d1b84
2026-01-04T15:50:14.687107Z
false
collectiveidea/audited
https://github.com/collectiveidea/audited/blob/dbf8432604ec97734bcfb3dc6df61f4faa0d1b84/test/db/version_5.rb
test/db/version_5.rb
ActiveRecord::Schema.define do create_table :audits, force: true do |t| t.column :auditable_id, :integer t.column :auditable_type, :string t.column :user_id, :integer t.column :user_type, :string t.column :username, :string t.column :action, :string t.column :audited_changes, :text t.c...
ruby
MIT
dbf8432604ec97734bcfb3dc6df61f4faa0d1b84
2026-01-04T15:50:14.687107Z
false
collectiveidea/audited
https://github.com/collectiveidea/audited/blob/dbf8432604ec97734bcfb3dc6df61f4faa0d1b84/test/db/version_6.rb
test/db/version_6.rb
ActiveRecord::Schema.define do create_table :audits, force: true do |t| t.column :auditable_id, :integer t.column :auditable_type, :string t.column :user_id, :integer t.column :user_type, :string t.column :username, :string t.column :action, :string t.column :audited_changes, :text t.c...
ruby
MIT
dbf8432604ec97734bcfb3dc6df61f4faa0d1b84
2026-01-04T15:50:14.687107Z
false
collectiveidea/audited
https://github.com/collectiveidea/audited/blob/dbf8432604ec97734bcfb3dc6df61f4faa0d1b84/test/db/version_2.rb
test/db/version_2.rb
ActiveRecord::Schema.define do create_table :audits, force: true do |t| t.column :auditable_id, :integer t.column :auditable_type, :string t.column :user_id, :integer t.column :user_type, :string t.column :username, :string t.column :action, :string t.column :changes, :text t.column :v...
ruby
MIT
dbf8432604ec97734bcfb3dc6df61f4faa0d1b84
2026-01-04T15:50:14.687107Z
false
collectiveidea/audited
https://github.com/collectiveidea/audited/blob/dbf8432604ec97734bcfb3dc6df61f4faa0d1b84/spec/audited_spec.rb
spec/audited_spec.rb
require "spec_helper" describe Audited do describe "#store" do describe "maintains state of store" do let(:current_user) { Models::ActiveRecord::User.new(name: 'Some User', username: 'some_username') } it "can store and retrieve current_user" do expect(Audited.store[:current_user]).to be_nil...
ruby
MIT
dbf8432604ec97734bcfb3dc6df61f4faa0d1b84
2026-01-04T15:50:14.687107Z
false
collectiveidea/audited
https://github.com/collectiveidea/audited/blob/dbf8432604ec97734bcfb3dc6df61f4faa0d1b84/spec/audited_spec_helpers.rb
spec/audited_spec_helpers.rb
module AuditedSpecHelpers def create_user(attrs = {}) Models::ActiveRecord::User.create({name: "Brandon", username: "brandon", password: "password", favourite_device: "Android Phone"}.merge(attrs)) end def create_user_with_readonly_attrs(attrs = {}) Models::ActiveRecord::UserWithReadOnlyAttrs.create({nam...
ruby
MIT
dbf8432604ec97734bcfb3dc6df61f4faa0d1b84
2026-01-04T15:50:14.687107Z
false
collectiveidea/audited
https://github.com/collectiveidea/audited/blob/dbf8432604ec97734bcfb3dc6df61f4faa0d1b84/spec/spec_helper.rb
spec/spec_helper.rb
ENV["RAILS_ENV"] = "test" require "bundler/setup" require "single_cov" SingleCov.setup :rspec if Bundler.definition.dependencies.map(&:name).include?("protected_attributes") require "protected_attributes" end require "rails_app/config/environment" require "rspec/rails" require "audited" require "audited-rspec" requi...
ruby
MIT
dbf8432604ec97734bcfb3dc6df61f4faa0d1b84
2026-01-04T15:50:14.687107Z
false
collectiveidea/audited
https://github.com/collectiveidea/audited/blob/dbf8432604ec97734bcfb3dc6df61f4faa0d1b84/spec/support/active_record/models.rb
spec/support/active_record/models.rb
require "cgi" require File.expand_path("../schema", __FILE__) module Models module ActiveRecord class User < ::ActiveRecord::Base audited except: :password attribute :non_column_attr if ::ActiveRecord.version >= Gem::Version.new("5.1") attr_protected :logins if respond_to?(:attr_protected) ...
ruby
MIT
dbf8432604ec97734bcfb3dc6df61f4faa0d1b84
2026-01-04T15:50:14.687107Z
false
collectiveidea/audited
https://github.com/collectiveidea/audited/blob/dbf8432604ec97734bcfb3dc6df61f4faa0d1b84/spec/support/active_record/schema.rb
spec/support/active_record/schema.rb
require "active_record" require "logger" begin if ::ActiveRecord.version >= Gem::Version.new("6.1.0") db_config = ActiveRecord::Base.configurations.configs_for(env_name: Rails.env).first ActiveRecord::Tasks::DatabaseTasks.create(db_config) else db_config = ActiveRecord::Base.configurations[Rails.env].c...
ruby
MIT
dbf8432604ec97734bcfb3dc6df61f4faa0d1b84
2026-01-04T15:50:14.687107Z
false
collectiveidea/audited
https://github.com/collectiveidea/audited/blob/dbf8432604ec97734bcfb3dc6df61f4faa0d1b84/spec/support/active_record/postgres/2_change_audited_changes_type_to_jsonb.rb
spec/support/active_record/postgres/2_change_audited_changes_type_to_jsonb.rb
class ChangeAuditedChangesTypeToJsonb < ActiveRecord::Migration[5.0] def self.up remove_column :audits, :audited_changes add_column :audits, :audited_changes, :jsonb end def self.down remove_column :audits, :audited_changes add_column :audits, :audited_changes, :text end end
ruby
MIT
dbf8432604ec97734bcfb3dc6df61f4faa0d1b84
2026-01-04T15:50:14.687107Z
false
collectiveidea/audited
https://github.com/collectiveidea/audited/blob/dbf8432604ec97734bcfb3dc6df61f4faa0d1b84/spec/support/active_record/postgres/1_change_audited_changes_type_to_json.rb
spec/support/active_record/postgres/1_change_audited_changes_type_to_json.rb
class ChangeAuditedChangesTypeToJson < ActiveRecord::Migration[5.0] def self.up remove_column :audits, :audited_changes add_column :audits, :audited_changes, :json end def self.down remove_column :audits, :audited_changes add_column :audits, :audited_changes, :text end end
ruby
MIT
dbf8432604ec97734bcfb3dc6df61f4faa0d1b84
2026-01-04T15:50:14.687107Z
false
collectiveidea/audited
https://github.com/collectiveidea/audited/blob/dbf8432604ec97734bcfb3dc6df61f4faa0d1b84/spec/audited/rspec_matchers_spec.rb
spec/audited/rspec_matchers_spec.rb
require "spec_helper" describe Models::ActiveRecord::UserExceptPassword do let(:non_audited_columns) { subject.class.non_audited_columns } it { should_not be_audited.only(non_audited_columns) } it { should be_audited.except(:password) } it { should_not be_audited.requires_comment } it { should be_audited.on...
ruby
MIT
dbf8432604ec97734bcfb3dc6df61f4faa0d1b84
2026-01-04T15:50:14.687107Z
false
collectiveidea/audited
https://github.com/collectiveidea/audited/blob/dbf8432604ec97734bcfb3dc6df61f4faa0d1b84/spec/audited/audit_spec.rb
spec/audited/audit_spec.rb
require "spec_helper" SingleCov.covered! uncovered: 2 # Rails version check class CustomAudit < Audited::Audit def custom_method "I'm custom!" end end class TempModel1 < ::ActiveRecord::Base self.table_name = :companies end class TempModel2 < ::ActiveRecord::Base self.table_name = :companies end class ...
ruby
MIT
dbf8432604ec97734bcfb3dc6df61f4faa0d1b84
2026-01-04T15:50:14.687107Z
false
collectiveidea/audited
https://github.com/collectiveidea/audited/blob/dbf8432604ec97734bcfb3dc6df61f4faa0d1b84/spec/audited/sweeper_spec.rb
spec/audited/sweeper_spec.rb
require "spec_helper" SingleCov.covered! class AuditsController < ActionController::Base before_action :populate_user attr_reader :company def create @company = Models::ActiveRecord::Company.create head :ok end def update current_user.update!(password: "foo") head :ok end private ...
ruby
MIT
dbf8432604ec97734bcfb3dc6df61f4faa0d1b84
2026-01-04T15:50:14.687107Z
false
collectiveidea/audited
https://github.com/collectiveidea/audited/blob/dbf8432604ec97734bcfb3dc6df61f4faa0d1b84/spec/audited/auditor_spec.rb
spec/audited/auditor_spec.rb
require "spec_helper" # not testing proxy_respond_to? hack / 2 methods / deprecation of `version` # also, an additional 6 around `after_touch` for Versions before 6. # Increased to 17/10 to get to green CI as a new baseline, August 2024. uncovered = (ActiveRecord::VERSION::MAJOR < 6) ? 17 : 10 SingleCov.covered! uncov...
ruby
MIT
dbf8432604ec97734bcfb3dc6df61f4faa0d1b84
2026-01-04T15:50:14.687107Z
true
collectiveidea/audited
https://github.com/collectiveidea/audited/blob/dbf8432604ec97734bcfb3dc6df61f4faa0d1b84/spec/rails_app/config/application.rb
spec/rails_app/config/application.rb
require "active_record/railtie" module RailsApp class Application < Rails::Application config.root = File.expand_path("../../", __FILE__) config.i18n.enforce_available_locales = true if Rails.gem_version >= Gem::Version.new("7.1") && config.active_record.respond_to?(:yaml_column_permitted_classes=) ...
ruby
MIT
dbf8432604ec97734bcfb3dc6df61f4faa0d1b84
2026-01-04T15:50:14.687107Z
false
collectiveidea/audited
https://github.com/collectiveidea/audited/blob/dbf8432604ec97734bcfb3dc6df61f4faa0d1b84/spec/rails_app/config/environment.rb
spec/rails_app/config/environment.rb
# Load the rails application require File.expand_path("../application", __FILE__) # Initialize the rails application RailsApp::Application.initialize!
ruby
MIT
dbf8432604ec97734bcfb3dc6df61f4faa0d1b84
2026-01-04T15:50:14.687107Z
false
collectiveidea/audited
https://github.com/collectiveidea/audited/blob/dbf8432604ec97734bcfb3dc6df61f4faa0d1b84/spec/rails_app/config/routes.rb
spec/rails_app/config/routes.rb
Rails.application.routes.draw do resources :audits end
ruby
MIT
dbf8432604ec97734bcfb3dc6df61f4faa0d1b84
2026-01-04T15:50:14.687107Z
false
collectiveidea/audited
https://github.com/collectiveidea/audited/blob/dbf8432604ec97734bcfb3dc6df61f4faa0d1b84/spec/rails_app/config/initializers/inflections.rb
spec/rails_app/config/initializers/inflections.rb
ActiveSupport::Inflector.inflections do |inflect| end
ruby
MIT
dbf8432604ec97734bcfb3dc6df61f4faa0d1b84
2026-01-04T15:50:14.687107Z
false
collectiveidea/audited
https://github.com/collectiveidea/audited/blob/dbf8432604ec97734bcfb3dc6df61f4faa0d1b84/spec/rails_app/config/initializers/backtrace_silencers.rb
spec/rails_app/config/initializers/backtrace_silencers.rb
# Be sure to restart your server when you modify this file. # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } # You can also remove all the silencers if you're trying to debug a probl...
ruby
MIT
dbf8432604ec97734bcfb3dc6df61f4faa0d1b84
2026-01-04T15:50:14.687107Z
false
collectiveidea/audited
https://github.com/collectiveidea/audited/blob/dbf8432604ec97734bcfb3dc6df61f4faa0d1b84/spec/rails_app/config/initializers/secret_token.rb
spec/rails_app/config/initializers/secret_token.rb
Rails.application.config.secret_token = "ea942c41850d502f2c8283e26bdc57829f471bb18224ddff0a192c4f32cdf6cb5aa0d82b3a7a7adbeb640c4b06f3aa1cd5f098162d8240f669b39d6b49680571" Rails.application.config.session_store :cookie_store, key: "_my_app" Rails.application.config.secret_key_base = "secret value"
ruby
MIT
dbf8432604ec97734bcfb3dc6df61f4faa0d1b84
2026-01-04T15:50:14.687107Z
false
collectiveidea/audited
https://github.com/collectiveidea/audited/blob/dbf8432604ec97734bcfb3dc6df61f4faa0d1b84/spec/rails_app/config/environments/test.rb
spec/rails_app/config/environments/test.rb
RailsApp::Application.configure do # Settings specified here will take precedence over those in config/application.rb. # The test environment is used exclusively to run your application's # test suite. You never need to work with it otherwise. Remember that # your test database is "scratch space" for the test ...
ruby
MIT
dbf8432604ec97734bcfb3dc6df61f4faa0d1b84
2026-01-04T15:50:14.687107Z
false
collectiveidea/audited
https://github.com/collectiveidea/audited/blob/dbf8432604ec97734bcfb3dc6df61f4faa0d1b84/lib/audited.rb
lib/audited.rb
# frozen_string_literal: true require "active_record" module Audited # Wrapper around ActiveSupport::CurrentAttributes class RequestStore < ActiveSupport::CurrentAttributes attribute :audited_store end class << self attr_accessor \ :auditing_enabled, :current_user_method, :ignored_a...
ruby
MIT
dbf8432604ec97734bcfb3dc6df61f4faa0d1b84
2026-01-04T15:50:14.687107Z
false
collectiveidea/audited
https://github.com/collectiveidea/audited/blob/dbf8432604ec97734bcfb3dc6df61f4faa0d1b84/lib/audited-rspec.rb
lib/audited-rspec.rb
# frozen_string_literal: true require "audited/rspec_matchers" module RSpec::Matchers include Audited::RspecMatchers end
ruby
MIT
dbf8432604ec97734bcfb3dc6df61f4faa0d1b84
2026-01-04T15:50:14.687107Z
false
collectiveidea/audited
https://github.com/collectiveidea/audited/blob/dbf8432604ec97734bcfb3dc6df61f4faa0d1b84/lib/audited/version.rb
lib/audited/version.rb
# frozen_string_literal: true module Audited VERSION = "5.8.0" end
ruby
MIT
dbf8432604ec97734bcfb3dc6df61f4faa0d1b84
2026-01-04T15:50:14.687107Z
false
collectiveidea/audited
https://github.com/collectiveidea/audited/blob/dbf8432604ec97734bcfb3dc6df61f4faa0d1b84/lib/audited/railtie.rb
lib/audited/railtie.rb
# frozen_string_literal: true module Audited class Railtie < Rails::Railtie initializer "audited.sweeper" do ActiveSupport.on_load(:action_controller) do if defined?(ActionController::Base) ActionController::Base.around_action Audited::Sweeper.new end if defined?(ActionCon...
ruby
MIT
dbf8432604ec97734bcfb3dc6df61f4faa0d1b84
2026-01-04T15:50:14.687107Z
false
collectiveidea/audited
https://github.com/collectiveidea/audited/blob/dbf8432604ec97734bcfb3dc6df61f4faa0d1b84/lib/audited/audit.rb
lib/audited/audit.rb
# frozen_string_literal: true require "set" module Audited # Audit saves the changes to ActiveRecord models. It has the following attributes: # # * <tt>auditable</tt>: the ActiveRecord model that was changed # * <tt>user</tt>: the user that performed the change; a string or an ActiveRecord model # * <tt>ac...
ruby
MIT
dbf8432604ec97734bcfb3dc6df61f4faa0d1b84
2026-01-04T15:50:14.687107Z
false
collectiveidea/audited
https://github.com/collectiveidea/audited/blob/dbf8432604ec97734bcfb3dc6df61f4faa0d1b84/lib/audited/auditor.rb
lib/audited/auditor.rb
# frozen_string_literal: true module Audited # Specify this act if you want changes to your model to be saved in an # audit table. This assumes there is an audits table ready. # # class User < ActiveRecord::Base # audited # end # # To store an audit comment set model.audit_comment to your comm...
ruby
MIT
dbf8432604ec97734bcfb3dc6df61f4faa0d1b84
2026-01-04T15:50:14.687107Z
false
collectiveidea/audited
https://github.com/collectiveidea/audited/blob/dbf8432604ec97734bcfb3dc6df61f4faa0d1b84/lib/audited/sweeper.rb
lib/audited/sweeper.rb
# frozen_string_literal: true module Audited class Sweeper STORED_DATA = { current_remote_address: :remote_ip, current_request_uuid: :request_uuid, current_user: :current_user } delegate :store, to: ::Audited def around(controller) self.controller = controller STORED_D...
ruby
MIT
dbf8432604ec97734bcfb3dc6df61f4faa0d1b84
2026-01-04T15:50:14.687107Z
false
collectiveidea/audited
https://github.com/collectiveidea/audited/blob/dbf8432604ec97734bcfb3dc6df61f4faa0d1b84/lib/audited/rspec_matchers.rb
lib/audited/rspec_matchers.rb
# frozen_string_literal: true module Audited module RspecMatchers # Ensure that the model is audited. # # Options: # * <tt>associated_with</tt> - tests that the audit makes use of the associated_with option # * <tt>only</tt> - tests that the audit makes use of the only option *Overrides <tt>excep...
ruby
MIT
dbf8432604ec97734bcfb3dc6df61f4faa0d1b84
2026-01-04T15:50:14.687107Z
false
collectiveidea/audited
https://github.com/collectiveidea/audited/blob/dbf8432604ec97734bcfb3dc6df61f4faa0d1b84/lib/generators/audited/upgrade_generator.rb
lib/generators/audited/upgrade_generator.rb
# frozen_string_literal: true require "rails/generators" require "rails/generators/migration" require "active_record" require "rails/generators/active_record" require "generators/audited/migration" require "generators/audited/migration_helper" module Audited module Generators class UpgradeGenerator < Rails::Gen...
ruby
MIT
dbf8432604ec97734bcfb3dc6df61f4faa0d1b84
2026-01-04T15:50:14.687107Z
false
collectiveidea/audited
https://github.com/collectiveidea/audited/blob/dbf8432604ec97734bcfb3dc6df61f4faa0d1b84/lib/generators/audited/install_generator.rb
lib/generators/audited/install_generator.rb
# frozen_string_literal: true require "rails/generators" require "rails/generators/migration" require "active_record" require "rails/generators/active_record" require "generators/audited/migration" require "generators/audited/migration_helper" module Audited module Generators class InstallGenerator < Rails::Gen...
ruby
MIT
dbf8432604ec97734bcfb3dc6df61f4faa0d1b84
2026-01-04T15:50:14.687107Z
false
collectiveidea/audited
https://github.com/collectiveidea/audited/blob/dbf8432604ec97734bcfb3dc6df61f4faa0d1b84/lib/generators/audited/migration.rb
lib/generators/audited/migration.rb
# frozen_string_literal: true module Audited module Generators module Migration # Implement the required interface for Rails::Generators::Migration. def next_migration_number(dirname) # :nodoc: next_migration_number = current_migration_number(dirname) + 1 if timestamped_migrations? ...
ruby
MIT
dbf8432604ec97734bcfb3dc6df61f4faa0d1b84
2026-01-04T15:50:14.687107Z
false
collectiveidea/audited
https://github.com/collectiveidea/audited/blob/dbf8432604ec97734bcfb3dc6df61f4faa0d1b84/lib/generators/audited/migration_helper.rb
lib/generators/audited/migration_helper.rb
# frozen_string_literal: true module Audited module Generators module MigrationHelper def migration_parent "ActiveRecord::Migration[#{ActiveRecord::Migration.current_version}]" end end end end
ruby
MIT
dbf8432604ec97734bcfb3dc6df61f4faa0d1b84
2026-01-04T15:50:14.687107Z
false
collectiveidea/audited
https://github.com/collectiveidea/audited/blob/dbf8432604ec97734bcfb3dc6df61f4faa0d1b84/lib/generators/audited/templates/add_version_to_auditable_index.rb
lib/generators/audited/templates/add_version_to_auditable_index.rb
# frozen_string_literal: true class <%= migration_class_name %> < <%= migration_parent %> def self.up if index_exists?(:audits, [:auditable_type, :auditable_id], name: index_name) remove_index :audits, name: index_name add_index :audits, [:auditable_type, :auditable_id, :version], name: index_name ...
ruby
MIT
dbf8432604ec97734bcfb3dc6df61f4faa0d1b84
2026-01-04T15:50:14.687107Z
false
collectiveidea/audited
https://github.com/collectiveidea/audited/blob/dbf8432604ec97734bcfb3dc6df61f4faa0d1b84/lib/generators/audited/templates/add_request_uuid_to_audits.rb
lib/generators/audited/templates/add_request_uuid_to_audits.rb
# frozen_string_literal: true class <%= migration_class_name %> < <%= migration_parent %> def self.up add_column :audits, :request_uuid, :string add_index :audits, :request_uuid end def self.down remove_column :audits, :request_uuid end end
ruby
MIT
dbf8432604ec97734bcfb3dc6df61f4faa0d1b84
2026-01-04T15:50:14.687107Z
false
collectiveidea/audited
https://github.com/collectiveidea/audited/blob/dbf8432604ec97734bcfb3dc6df61f4faa0d1b84/lib/generators/audited/templates/add_comment_to_audits.rb
lib/generators/audited/templates/add_comment_to_audits.rb
# frozen_string_literal: true class <%= migration_class_name %> < <%= migration_parent %> def self.up add_column :audits, :comment, :string end def self.down remove_column :audits, :comment end end
ruby
MIT
dbf8432604ec97734bcfb3dc6df61f4faa0d1b84
2026-01-04T15:50:14.687107Z
false
collectiveidea/audited
https://github.com/collectiveidea/audited/blob/dbf8432604ec97734bcfb3dc6df61f4faa0d1b84/lib/generators/audited/templates/add_association_to_audits.rb
lib/generators/audited/templates/add_association_to_audits.rb
# frozen_string_literal: true class <%= migration_class_name %> < <%= migration_parent %> def self.up add_column :audits, :association_id, :integer add_column :audits, :association_type, :string end def self.down remove_column :audits, :association_type remove_column :audits, :association_id e...
ruby
MIT
dbf8432604ec97734bcfb3dc6df61f4faa0d1b84
2026-01-04T15:50:14.687107Z
false
collectiveidea/audited
https://github.com/collectiveidea/audited/blob/dbf8432604ec97734bcfb3dc6df61f4faa0d1b84/lib/generators/audited/templates/rename_parent_to_association.rb
lib/generators/audited/templates/rename_parent_to_association.rb
# frozen_string_literal: true class <%= migration_class_name %> < <%= migration_parent %> def self.up rename_column :audits, :auditable_parent_id, :association_id rename_column :audits, :auditable_parent_type, :association_type end def self.down rename_column :audits, :association_type, :auditable_p...
ruby
MIT
dbf8432604ec97734bcfb3dc6df61f4faa0d1b84
2026-01-04T15:50:14.687107Z
false
collectiveidea/audited
https://github.com/collectiveidea/audited/blob/dbf8432604ec97734bcfb3dc6df61f4faa0d1b84/lib/generators/audited/templates/rename_association_to_associated.rb
lib/generators/audited/templates/rename_association_to_associated.rb
# frozen_string_literal: true class <%= migration_class_name %> < <%= migration_parent %> def self.up if index_exists? :audits, [:association_id, :association_type], :name => 'association_index' remove_index :audits, :name => 'association_index' end rename_column :audits, :association_id, :associa...
ruby
MIT
dbf8432604ec97734bcfb3dc6df61f4faa0d1b84
2026-01-04T15:50:14.687107Z
false
collectiveidea/audited
https://github.com/collectiveidea/audited/blob/dbf8432604ec97734bcfb3dc6df61f4faa0d1b84/lib/generators/audited/templates/add_remote_address_to_audits.rb
lib/generators/audited/templates/add_remote_address_to_audits.rb
# frozen_string_literal: true class <%= migration_class_name %> < <%= migration_parent %> def self.up add_column :audits, :remote_address, :string end def self.down remove_column :audits, :remote_address end end
ruby
MIT
dbf8432604ec97734bcfb3dc6df61f4faa0d1b84
2026-01-04T15:50:14.687107Z
false
collectiveidea/audited
https://github.com/collectiveidea/audited/blob/dbf8432604ec97734bcfb3dc6df61f4faa0d1b84/lib/generators/audited/templates/rename_changes_to_audited_changes.rb
lib/generators/audited/templates/rename_changes_to_audited_changes.rb
# frozen_string_literal: true class <%= migration_class_name %> < <%= migration_parent %> def self.up rename_column :audits, :changes, :audited_changes end def self.down rename_column :audits, :audited_changes, :changes end end
ruby
MIT
dbf8432604ec97734bcfb3dc6df61f4faa0d1b84
2026-01-04T15:50:14.687107Z
false
collectiveidea/audited
https://github.com/collectiveidea/audited/blob/dbf8432604ec97734bcfb3dc6df61f4faa0d1b84/lib/generators/audited/templates/install.rb
lib/generators/audited/templates/install.rb
# frozen_string_literal: true class <%= migration_class_name %> < <%= migration_parent %> def self.up create_table :audits, :force => true do |t| t.column :auditable_id, :integer t.column :auditable_type, :string t.column :associated_id, :integer t.column :associated_type, :string t...
ruby
MIT
dbf8432604ec97734bcfb3dc6df61f4faa0d1b84
2026-01-04T15:50:14.687107Z
false
collectiveidea/audited
https://github.com/collectiveidea/audited/blob/dbf8432604ec97734bcfb3dc6df61f4faa0d1b84/lib/generators/audited/templates/revert_polymorphic_indexes_order.rb
lib/generators/audited/templates/revert_polymorphic_indexes_order.rb
# frozen_string_literal: true class <%= migration_class_name %> < <%= migration_parent %> def self.up fix_index_order_for [:associated_id, :associated_type], 'associated_index' fix_index_order_for [:auditable_id, :auditable_type], 'auditable_index' end def self.down fix_index_order_for [:associated_...
ruby
MIT
dbf8432604ec97734bcfb3dc6df61f4faa0d1b84
2026-01-04T15:50:14.687107Z
false
collectiveidea/interactor
https://github.com/collectiveidea/interactor/blob/c0e0079375e8d447eadcd062d7bb3b550fcb60bb/spec/interactor_spec.rb
spec/interactor_spec.rb
describe Interactor do include_examples :lint end
ruby
MIT
c0e0079375e8d447eadcd062d7bb3b550fcb60bb
2026-01-04T15:50:22.672670Z
false
collectiveidea/interactor
https://github.com/collectiveidea/interactor/blob/c0e0079375e8d447eadcd062d7bb3b550fcb60bb/spec/integration_spec.rb
spec/integration_spec.rb
describe "Integration" do def build_interactor(&block) interactor = Class.new.send(:include, Interactor) interactor.class_eval(&block) if block interactor end def build_organizer(options = {}, &block) organizer = Class.new.send(:include, Interactor::Organizer) organizer.organize(options[:orga...
ruby
MIT
c0e0079375e8d447eadcd062d7bb3b550fcb60bb
2026-01-04T15:50:22.672670Z
true
collectiveidea/interactor
https://github.com/collectiveidea/interactor/blob/c0e0079375e8d447eadcd062d7bb3b550fcb60bb/spec/spec_helper.rb
spec/spec_helper.rb
if ENV["CODECLIMATE_REPO_TOKEN"] require "simplecov" SimpleCov.start end require "interactor" Dir[File.expand_path("../support/*.rb", __FILE__)].sort.each { |f| require f }
ruby
MIT
c0e0079375e8d447eadcd062d7bb3b550fcb60bb
2026-01-04T15:50:22.672670Z
false
collectiveidea/interactor
https://github.com/collectiveidea/interactor/blob/c0e0079375e8d447eadcd062d7bb3b550fcb60bb/spec/support/lint.rb
spec/support/lint.rb
shared_examples :lint do let(:interactor) { Class.new.send(:include, described_class) } describe ".call" do let(:context) { double(:context) } let(:instance) { double(:instance, context: context) } it "calls an instance with the given context" do expect(interactor).to receive(:new).once.with({fo...
ruby
MIT
c0e0079375e8d447eadcd062d7bb3b550fcb60bb
2026-01-04T15:50:22.672670Z
false
collectiveidea/interactor
https://github.com/collectiveidea/interactor/blob/c0e0079375e8d447eadcd062d7bb3b550fcb60bb/spec/interactor/hooks_spec.rb
spec/interactor/hooks_spec.rb
module Interactor describe Hooks do describe "#with_hooks" do def build_hooked(&block) hooked = Class.new.send(:include, Interactor::Hooks) hooked.class_eval do attr_reader :steps def self.process new.tap(&:process).steps end def initial...
ruby
MIT
c0e0079375e8d447eadcd062d7bb3b550fcb60bb
2026-01-04T15:50:22.672670Z
false
collectiveidea/interactor
https://github.com/collectiveidea/interactor/blob/c0e0079375e8d447eadcd062d7bb3b550fcb60bb/spec/interactor/context_spec.rb
spec/interactor/context_spec.rb
module Interactor describe Context do describe ".build" do it "converts the given hash to a context" do context = Context.build(foo: "bar") expect(context).to be_a(Context) expect(context.foo).to eq("bar") end it "builds an empty context if no hash is given" do ...
ruby
MIT
c0e0079375e8d447eadcd062d7bb3b550fcb60bb
2026-01-04T15:50:22.672670Z
false
collectiveidea/interactor
https://github.com/collectiveidea/interactor/blob/c0e0079375e8d447eadcd062d7bb3b550fcb60bb/spec/interactor/organizer_spec.rb
spec/interactor/organizer_spec.rb
module Interactor describe Organizer do include_examples :lint let(:organizer) { Class.new.send(:include, Organizer) } describe ".organize" do let(:interactor2) { double(:interactor2) } let(:interactor3) { double(:interactor3) } it "sets interactors given class arguments" do e...
ruby
MIT
c0e0079375e8d447eadcd062d7bb3b550fcb60bb
2026-01-04T15:50:22.672670Z
false
collectiveidea/interactor
https://github.com/collectiveidea/interactor/blob/c0e0079375e8d447eadcd062d7bb3b550fcb60bb/lib/interactor.rb
lib/interactor.rb
require "interactor/context" require "interactor/error" require "interactor/hooks" require "interactor/organizer" # Public: Interactor methods. Because Interactor is a module, custom Interactor # classes should include Interactor rather than inherit from it. # # Examples # # class MyInteractor # include Interact...
ruby
MIT
c0e0079375e8d447eadcd062d7bb3b550fcb60bb
2026-01-04T15:50:22.672670Z
false
collectiveidea/interactor
https://github.com/collectiveidea/interactor/blob/c0e0079375e8d447eadcd062d7bb3b550fcb60bb/lib/interactor/hooks.rb
lib/interactor/hooks.rb
module Interactor # Internal: Methods relating to supporting hooks around Interactor invocation. module Hooks # Internal: Install Interactor's behavior in the given class. def self.included(base) base.class_eval do extend ClassMethods end end # Internal: Interactor::Hooks class ...
ruby
MIT
c0e0079375e8d447eadcd062d7bb3b550fcb60bb
2026-01-04T15:50:22.672670Z
false
collectiveidea/interactor
https://github.com/collectiveidea/interactor/blob/c0e0079375e8d447eadcd062d7bb3b550fcb60bb/lib/interactor/organizer.rb
lib/interactor/organizer.rb
module Interactor # Public: Interactor::Organizer methods. Because Interactor::Organizer is a # module, custom Interactor::Organizer classes should include # Interactor::Organizer rather than inherit from it. # # Examples # # class MyOrganizer # include Interactor::Organizer # # organize I...
ruby
MIT
c0e0079375e8d447eadcd062d7bb3b550fcb60bb
2026-01-04T15:50:22.672670Z
false
collectiveidea/interactor
https://github.com/collectiveidea/interactor/blob/c0e0079375e8d447eadcd062d7bb3b550fcb60bb/lib/interactor/context.rb
lib/interactor/context.rb
require "ostruct" module Interactor # Public: The object for tracking state of an Interactor's invocation. The # context is used to initialize the interactor with the information required # for invocation. The interactor manipulates the context to produce the result # of invocation. # # The context is the ...
ruby
MIT
c0e0079375e8d447eadcd062d7bb3b550fcb60bb
2026-01-04T15:50:22.672670Z
false
collectiveidea/interactor
https://github.com/collectiveidea/interactor/blob/c0e0079375e8d447eadcd062d7bb3b550fcb60bb/lib/interactor/error.rb
lib/interactor/error.rb
module Interactor # Internal: Error raised during Interactor::Context failure. The error stores # a copy of the failed context for debugging purposes. class Failure < StandardError # Internal: Gets the Interactor::Context of the Interactor::Failure # instance. attr_reader :context # Internal: Ini...
ruby
MIT
c0e0079375e8d447eadcd062d7bb3b550fcb60bb
2026-01-04T15:50:22.672670Z
false
arsduo/koala
https://github.com/arsduo/koala/blob/47d052063ef8b5644fb59e279da0b52687999f55/spec/spec_helper.rb
spec/spec_helper.rb
# Quantify coverage require 'simplecov' SimpleCov.start # load the library require 'koala' # Support files Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f } # set up our testing environment # load testing data and (if needed) create test users or validate real users KoalaTest.setup_test_environ...
ruby
MIT
47d052063ef8b5644fb59e279da0b52687999f55
2026-01-04T15:50:07.037818Z
false
arsduo/koala
https://github.com/arsduo/koala/blob/47d052063ef8b5644fb59e279da0b52687999f55/spec/support/koala_test.rb
spec/support/koala_test.rb
# small helper method for live testing module KoalaTest class << self attr_accessor :oauth_token, :app_id, :secret, :app_access_token, :code, :session_key attr_accessor :oauth_test_data, :subscription_test_data, :search_time attr_accessor :test_user_api attr_accessor :vcr_oauth_token end # Test ...
ruby
MIT
47d052063ef8b5644fb59e279da0b52687999f55
2026-01-04T15:50:07.037818Z
false
arsduo/koala
https://github.com/arsduo/koala/blob/47d052063ef8b5644fb59e279da0b52687999f55/spec/support/uploadable_io_shared_examples.rb
spec/support/uploadable_io_shared_examples.rb
shared_examples_for "MIME::Types can't return results" do { "jpg" => "image/jpeg", "jpeg" => "image/jpeg", "png" => "image/png", "gif" => "image/gif" }.each_pair do |extension, mime_type| it "should properly get content types for #{extension} using basic analysis" do path = "filename.#{ext...
ruby
MIT
47d052063ef8b5644fb59e279da0b52687999f55
2026-01-04T15:50:07.037818Z
false
arsduo/koala
https://github.com/arsduo/koala/blob/47d052063ef8b5644fb59e279da0b52687999f55/spec/support/graph_api_shared_examples.rb
spec/support/graph_api_shared_examples.rb
shared_examples_for "Koala GraphAPI" do # all Graph API instances should pass these tests, regardless of configuration let(:dummy_response) { double("fake response", data: {}, status: 200, body: "", headers: {}) } # API it "never uses the rest api server" do expect(Koala).to receive(:make_request).with( ...
ruby
MIT
47d052063ef8b5644fb59e279da0b52687999f55
2026-01-04T15:50:07.037818Z
false
arsduo/koala
https://github.com/arsduo/koala/blob/47d052063ef8b5644fb59e279da0b52687999f55/spec/support/mock_http_service.rb
spec/support/mock_http_service.rb
require 'erb' require 'yaml' module Koala module MockHTTPService include Koala::HTTPService # Mocks all HTTP requests for with koala_spec_with_mocks.rb # Mocked values to be included in TEST_DATA used in specs ACCESS_TOKEN = '*' APP_ACCESS_TOKEN = "********************" OAUTH_CODE = 'OAUTHCO...
ruby
MIT
47d052063ef8b5644fb59e279da0b52687999f55
2026-01-04T15:50:07.037818Z
false
arsduo/koala
https://github.com/arsduo/koala/blob/47d052063ef8b5644fb59e279da0b52687999f55/spec/support/custom_matchers.rb
spec/support/custom_matchers.rb
# Verifies that two URLs are equal, ignoring the order of the query string parameters RSpec::Matchers.define :match_url do |url| match do |original_url| base, query_string = url.split("?") original_base, original_query_string = original_url.split("?") query_hash = query_to_params(query_string) origina...
ruby
MIT
47d052063ef8b5644fb59e279da0b52687999f55
2026-01-04T15:50:07.037818Z
false
arsduo/koala
https://github.com/arsduo/koala/blob/47d052063ef8b5644fb59e279da0b52687999f55/spec/integration/graph_collection_spec.rb
spec/integration/graph_collection_spec.rb
require 'spec_helper' module Koala RSpec.describe "requests using GraphCollections" do let(:api) { Facebook::API.new(KoalaTest.app_access_token) } before :each do # use the right version of the API as of the writing of this test Koala.config.api_version = "v2.8" end it "can access the n...
ruby
MIT
47d052063ef8b5644fb59e279da0b52687999f55
2026-01-04T15:50:07.037818Z
false
arsduo/koala
https://github.com/arsduo/koala/blob/47d052063ef8b5644fb59e279da0b52687999f55/spec/cases/koala_test_spec.rb
spec/cases/koala_test_spec.rb
require 'spec_helper' describe KoalaTest do pending "should have tests, because the test suite depends on it" end
ruby
MIT
47d052063ef8b5644fb59e279da0b52687999f55
2026-01-04T15:50:07.037818Z
false
arsduo/koala
https://github.com/arsduo/koala/blob/47d052063ef8b5644fb59e279da0b52687999f55/spec/cases/koala_spec.rb
spec/cases/koala_spec.rb
require 'spec_helper' describe Koala do it "has an http_service accessor" do expect(Koala).to respond_to(:http_service) expect(Koala).to respond_to(:http_service=) end describe "constants" do it "has a version" do expect(Koala.const_defined?("VERSION")).to be_truthy end end describe "...
ruby
MIT
47d052063ef8b5644fb59e279da0b52687999f55
2026-01-04T15:50:07.037818Z
false
arsduo/koala
https://github.com/arsduo/koala/blob/47d052063ef8b5644fb59e279da0b52687999f55/spec/cases/api_spec.rb
spec/cases/api_spec.rb
require 'spec_helper' describe "Koala::Facebook::API" do before :each do @service = Koala::Facebook::API.new end let(:dummy_response) { double("fake response", data: {}, status: 200, body: "", headers: {}) } it "defaults to the globally configured token if one's provided" do token = "Foo" Koala.c...
ruby
MIT
47d052063ef8b5644fb59e279da0b52687999f55
2026-01-04T15:50:07.037818Z
false
arsduo/koala
https://github.com/arsduo/koala/blob/47d052063ef8b5644fb59e279da0b52687999f55/spec/cases/graph_collection_spec.rb
spec/cases/graph_collection_spec.rb
require 'spec_helper' describe Koala::Facebook::API::GraphCollection do let(:paging){ {"paging" => true} } before(:each) do @headers = {'Content-Type' => 'application/json'} @data = { "data" => [1, 2, 'three'], "paging" => paging, "summary" => [3] } @result = Koala::HTTPService::...
ruby
MIT
47d052063ef8b5644fb59e279da0b52687999f55
2026-01-04T15:50:07.037818Z
false
arsduo/koala
https://github.com/arsduo/koala/blob/47d052063ef8b5644fb59e279da0b52687999f55/spec/cases/configuration_spec.rb
spec/cases/configuration_spec.rb
require "spec_helper" RSpec.describe Koala::Configuration do let(:config) { Koala::Configuration.new } it "defaults the HTTPService's DEFAULT_SERVERS" do Koala::HTTPService::DEFAULT_SERVERS.each_pair do |key, value| expect(config.public_send(key)).to eq(value) end end end
ruby
MIT
47d052063ef8b5644fb59e279da0b52687999f55
2026-01-04T15:50:07.037818Z
false
arsduo/koala
https://github.com/arsduo/koala/blob/47d052063ef8b5644fb59e279da0b52687999f55/spec/cases/uploadable_io_spec.rb
spec/cases/uploadable_io_spec.rb
# fake MIME::Types module Koala::MIME module Types def self.type_for(type) # this should be faked out in tests nil end end end describe "Koala::HTTPService::UploadableIO" do def rails_3_mocks tempfile = double('Tempfile', :path => "foo") uploaded_file = double('ActionDispatch::Http::U...
ruby
MIT
47d052063ef8b5644fb59e279da0b52687999f55
2026-01-04T15:50:07.037818Z
false
arsduo/koala
https://github.com/arsduo/koala/blob/47d052063ef8b5644fb59e279da0b52687999f55/spec/cases/graph_api_batch_spec.rb
spec/cases/graph_api_batch_spec.rb
require 'spec_helper' require 'json' unless Hash.respond_to?(:to_json) describe "Koala::Facebook::GraphAPI in batch mode" do before :each do @api = Koala::Facebook::API.new(@token) # app API @app_id = KoalaTest.app_id @app_access_token = KoalaTest.app_access_token @app_api = Koala::Facebook::API...
ruby
MIT
47d052063ef8b5644fb59e279da0b52687999f55
2026-01-04T15:50:07.037818Z
true
arsduo/koala
https://github.com/arsduo/koala/blob/47d052063ef8b5644fb59e279da0b52687999f55/spec/cases/utils_spec.rb
spec/cases/utils_spec.rb
require 'spec_helper' describe Koala::Utils do describe ".deprecate" do before :each do # unstub deprecate so we can test it allow(Koala::Utils).to receive(:deprecate).and_call_original end it "has a deprecation prefix that includes the words Koala and deprecation" do expect(K...
ruby
MIT
47d052063ef8b5644fb59e279da0b52687999f55
2026-01-04T15:50:07.037818Z
false
arsduo/koala
https://github.com/arsduo/koala/blob/47d052063ef8b5644fb59e279da0b52687999f55/spec/cases/graph_api_spec.rb
spec/cases/graph_api_spec.rb
require 'spec_helper' describe 'Koala::Facebook::GraphAPIMethods' do before do @api = Koala::Facebook::API.new(@token) # app API @app_id = KoalaTest.app_id @app_access_token = KoalaTest.app_access_token @app_api = Koala::Facebook::API.new(@app_access_token) end let(:dummy_response) { double(...
ruby
MIT
47d052063ef8b5644fb59e279da0b52687999f55
2026-01-04T15:50:07.037818Z
false
arsduo/koala
https://github.com/arsduo/koala/blob/47d052063ef8b5644fb59e279da0b52687999f55/spec/cases/test_users_spec.rb
spec/cases/test_users_spec.rb
require 'spec_helper' describe "Koala::Facebook::TestUsers" do before :all do # get oauth data @app_id = KoalaTest.app_id @secret = KoalaTest.secret @app_access_token = KoalaTest.app_access_token @test_users = Koala::Facebook::TestUsers.new({:app_access_token => @app_access_token, :app_id => @ap...
ruby
MIT
47d052063ef8b5644fb59e279da0b52687999f55
2026-01-04T15:50:07.037818Z
false
arsduo/koala
https://github.com/arsduo/koala/blob/47d052063ef8b5644fb59e279da0b52687999f55/spec/cases/error_spec.rb
spec/cases/error_spec.rb
require 'spec_helper' BUC_USAGE_JSON = "{\"123456789012345\":[{\"type\":\"messenger\",\"call_count\":1,\"total_cputime\":1,\"total_time\":1,\"estimated_time_to_regain_access\":0}]}" ADA_USAGE_JSON = "{\"acc_id_util_pct\":9.67}" APP_USAGE_JSON = "{\"call_count\":0,\"total_cputime\":0,\"total_time\":0}" describe Koala:...
ruby
MIT
47d052063ef8b5644fb59e279da0b52687999f55
2026-01-04T15:50:07.037818Z
false
arsduo/koala
https://github.com/arsduo/koala/blob/47d052063ef8b5644fb59e279da0b52687999f55/spec/cases/oauth_spec.rb
spec/cases/oauth_spec.rb
require 'spec_helper' describe "Koala::Facebook::OAuth" do before :all do # make the relevant test data easily accessible @app_id = KoalaTest.app_id @secret = KoalaTest.secret @code = KoalaTest.code @callback_url = KoalaTest.oauth_test_data["callback_url"] @access_token = KoalaTest.oauth_test...
ruby
MIT
47d052063ef8b5644fb59e279da0b52687999f55
2026-01-04T15:50:07.037818Z
false
arsduo/koala
https://github.com/arsduo/koala/blob/47d052063ef8b5644fb59e279da0b52687999f55/spec/cases/graph_error_checker_spec.rb
spec/cases/graph_error_checker_spec.rb
require 'spec_helper' module Koala module Facebook RSpec.describe GraphErrorChecker do it "defines a set of AUTHENTICATION_ERROR_CODES" do expect(GraphErrorChecker::AUTHENTICATION_ERROR_CODES).to match_array([102, 190, 450, 452, 2500]) end it "defines a set of DEBUG_HEADERS" do ...
ruby
MIT
47d052063ef8b5644fb59e279da0b52687999f55
2026-01-04T15:50:07.037818Z
false
arsduo/koala
https://github.com/arsduo/koala/blob/47d052063ef8b5644fb59e279da0b52687999f55/spec/cases/http_service_spec.rb
spec/cases/http_service_spec.rb
require 'spec_helper' describe Koala::HTTPService do it "has a faraday_middleware accessor" do expect(Koala::HTTPService.methods.map(&:to_sym)).to include(:faraday_middleware) expect(Koala::HTTPService.methods.map(&:to_sym)).to include(:faraday_middleware=) end it "has an http_options accessor" do e...
ruby
MIT
47d052063ef8b5644fb59e279da0b52687999f55
2026-01-04T15:50:07.037818Z
false
arsduo/koala
https://github.com/arsduo/koala/blob/47d052063ef8b5644fb59e279da0b52687999f55/spec/cases/realtime_updates_spec.rb
spec/cases/realtime_updates_spec.rb
require 'spec_helper' require 'base64' describe "Koala::Facebook::RealtimeUpdates" do before :all do # get oauth data @app_id = KoalaTest.app_id @secret = KoalaTest.secret @callback_url = KoalaTest.oauth_test_data["callback_url"] @app_access_token = KoalaTest.app_access_token # check OAuth d...
ruby
MIT
47d052063ef8b5644fb59e279da0b52687999f55
2026-01-04T15:50:07.037818Z
false
arsduo/koala
https://github.com/arsduo/koala/blob/47d052063ef8b5644fb59e279da0b52687999f55/spec/cases/http_service/response_spec.rb
spec/cases/http_service/response_spec.rb
require "spec_helper" module Koala::HTTPService RSpec.describe Response do describe "#data" do it "returns nothing if the body is empty" do expect(Response.new(200, "", {}).data).to be_nil end it "parses the JSON if there's a body" do result = {"foo" => "bar"} expect(Re...
ruby
MIT
47d052063ef8b5644fb59e279da0b52687999f55
2026-01-04T15:50:07.037818Z
false
arsduo/koala
https://github.com/arsduo/koala/blob/47d052063ef8b5644fb59e279da0b52687999f55/spec/cases/http_service/request_spec.rb
spec/cases/http_service/request_spec.rb
require "spec_helper" module Koala module HTTPService RSpec.describe Request do let(:path) { "/foo" } let(:args) { {"a" => 2, "b" => 3, "access_token" => "a_token"} } let(:verb) { "get" } let(:options) { {an: :option} } let(:request) { Request.new(path: path, args: args, verb: verb,...
ruby
MIT
47d052063ef8b5644fb59e279da0b52687999f55
2026-01-04T15:50:07.037818Z
false
arsduo/koala
https://github.com/arsduo/koala/blob/47d052063ef8b5644fb59e279da0b52687999f55/lib/koala.rb
lib/koala.rb
# useful tools require 'digest/md5' require 'json' # include koala modules require 'koala/errors' require 'koala/api' require 'koala/api/graph_batch_api' require 'koala/oauth' require 'koala/realtime_updates' require 'koala/test_users' # HTTP module so we can communicate with Facebook require 'koala/http_service' # ...
ruby
MIT
47d052063ef8b5644fb59e279da0b52687999f55
2026-01-04T15:50:07.037818Z
false
arsduo/koala
https://github.com/arsduo/koala/blob/47d052063ef8b5644fb59e279da0b52687999f55/lib/koala/http_service.rb
lib/koala/http_service.rb
require 'faraday' require 'faraday/multipart' unless defined? Faraday::FilePart # hack for faraday < 1.9 to avoid warnings require 'koala/http_service/uploadable_io' require 'koala/http_service/response' require 'koala/http_service/request' module Koala module HTTPService class << self # A customized stack...
ruby
MIT
47d052063ef8b5644fb59e279da0b52687999f55
2026-01-04T15:50:07.037818Z
false
arsduo/koala
https://github.com/arsduo/koala/blob/47d052063ef8b5644fb59e279da0b52687999f55/lib/koala/version.rb
lib/koala/version.rb
module Koala VERSION = "3.7.0" end
ruby
MIT
47d052063ef8b5644fb59e279da0b52687999f55
2026-01-04T15:50:07.037818Z
false