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
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/db/migrate/20141106115946_add_avatar_url_to_authorization.rb
db/migrate/20141106115946_add_avatar_url_to_authorization.rb
class AddAvatarUrlToAuthorization < ActiveRecord::Migration def change add_column :authorizations, :avatar_url, :string end end
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/db/migrate/20140824152305_create_scores.rb
db/migrate/20140824152305_create_scores.rb
class CreateScores < ActiveRecord::Migration def change create_table :scores do |t| t.references :user, index: true t.integer :value, null: false t.string :description t.timestamps end end end
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/db/migrate/20140813020613_create_profiles.rb
db/migrate/20140813020613_create_profiles.rb
class CreateProfiles < ActiveRecord::Migration def up create_table :profiles do |t| t.string :first_name t.string :last_name t.references :user, index: true t.timestamps end User.all.each do |u| u.create_profile end end def down drop_table :profiles end end
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/db/migrate/20140810140327_create_casts.rb
db/migrate/20140810140327_create_casts.rb
class CreateCasts < ActiveRecord::Migration def change create_table :casts do |t| t.string :name t.text :description t.string :url t.references :user, index: true t.timestamps end end end
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/db/migrate/20140811224912_create_links.rb
db/migrate/20140811224912_create_links.rb
class CreateLinks < ActiveRecord::Migration def change create_table :links do |t| t.string :url t.string :name t.timestamps end end end
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/db/migrate/20140604230209_create_authorizations.rb
db/migrate/20140604230209_create_authorizations.rb
class CreateAuthorizations < ActiveRecord::Migration def change create_table :authorizations do |t| t.references :user t.string :nick_name t.string :provider t.string :uid t.string :token t.string :secret t.string :profile_page t.timestamps end end end
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/db/migrate/20140908221903_add_role_to_level.rb
db/migrate/20140908221903_add_role_to_level.rb
class AddRoleToLevel < ActiveRecord::Migration def up add_reference :levels, :role end def down remove_reference :levels, :role end end
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/db/migrate/20150104150328_add_notes_to_casts.rb
db/migrate/20150104150328_add_notes_to_casts.rb
class AddNotesToCasts < ActiveRecord::Migration def up add_column :casts, :notes, :text end def down remove_column :casts, :notes end end
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/db/migrate/20140813020850_add_profile_to_link.rb
db/migrate/20140813020850_add_profile_to_link.rb
class AddProfileToLink < ActiveRecord::Migration def change add_reference :links, :profile, index: true end end
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/db/migrate/20160819194330_add_most_recent_to_cast_transitions.rb
db/migrate/20160819194330_add_most_recent_to_cast_transitions.rb
class AddMostRecentToCastTransitions < ActiveRecord::Migration def change add_column :cast_transitions, :most_recent, :boolean add_index(:cast_transitions, [:cast_id, :most_recent], unique: true, where: 'most_recent', name: "index_order_transitions_pare...
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/db/migrate/20140810130832_create_tag_relationships.rb
db/migrate/20140810130832_create_tag_relationships.rb
class CreateTagRelationships < ActiveRecord::Migration def change create_table :tag_relationships do |t| t.references :taggable, polymorphic: true, index: true, counter_cache: :taggables_count t.references :tag, index: true t.timestamps end end end
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/db/migrate/20141216012209_drop_tag_relationships.rb
db/migrate/20141216012209_drop_tag_relationships.rb
class DropTagRelationships < ActiveRecord::Migration def up drop_table :tag_relationships end def down create_table(:tag_relationships) do |t| t.integer :taggable_id t.string :taggable_type t.integer :tag_id t.datetime :created_at t.datetime :updated_at end end end
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/db/migrate/20140824171532_create_levels.rb
db/migrate/20140824171532_create_levels.rb
class CreateLevels < ActiveRecord::Migration def change create_table :levels do |t| t.string :name t.integer :required_score t.timestamps end end end
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/db/migrate/20150622042841_add_slug_to_casts.rb
db/migrate/20150622042841_add_slug_to_casts.rb
class AddSlugToCasts < ActiveRecord::Migration def change add_column :casts, :slug, :string end end
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/db/migrate/20140810125600_create_tags.rb
db/migrate/20140810125600_create_tags.rb
class CreateTags < ActiveRecord::Migration def change create_table :tags do |t| t.string :name t.integer :taggables_count, default: 0 t.timestamps end end end
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/db/migrate/20140609022713_rolify_create_roles.rb
db/migrate/20140609022713_rolify_create_roles.rb
class RolifyCreateRoles < ActiveRecord::Migration def change create_table(:roles) do |t| t.string :name t.references :resource, polymorphic: true t.timestamps end create_table(:users_roles, id: false) do |t| t.references :user t.references :role end add_index(:role...
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/db/migrate/20140604223003_devise_create_users.rb
db/migrate/20140604223003_devise_create_users.rb
class DeviseCreateUsers < ActiveRecord::Migration def change create_table(:users) do |t| ## Database authenticatable t.string :email, null: false, default: "" t.string :encrypted_password, null: false, default: "" ## Recoverable t.string :reset_password_token t....
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/db/migrate/20140923001253_create_cast_transitions.rb
db/migrate/20140923001253_create_cast_transitions.rb
class CreateCastTransitions < ActiveRecord::Migration def change create_table :cast_transitions do |t| t.string :to_state t.text :metadata, default: "{}" t.integer :sort_key t.integer :cast_id t.timestamps end add_index :cast_transitions, :cast_id add_index :cast_transit...
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/db/migrate/20140824135605_create_points.rb
db/migrate/20140824135605_create_points.rb
class CreatePoints < ActiveRecord::Migration def change create_table :points do |t| t.references :user, index: true t.integer :value, null: false t.string :description t.timestamps end end end
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/db/migrate/20140916222939_create_categories.rb
db/migrate/20140916222939_create_categories.rb
class CreateCategories < ActiveRecord::Migration def change create_table :categories do |t| t.string :name t.timestamps end end end
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/db/migrate/20140901204242_add_level_to_user.rb
db/migrate/20140901204242_add_level_to_user.rb
class AddLevelToUser < ActiveRecord::Migration def up add_reference :users, :level end def down remove_reference :users, :level end end
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/db/migrate/20150623025512_add_description_to_profiles.rb
db/migrate/20150623025512_add_description_to_profiles.rb
class AddDescriptionToProfiles < ActiveRecord::Migration def change add_column :profiles, :description, :text end end
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/db/migrate/20141216012446_create_casts_tags.rb
db/migrate/20141216012446_create_casts_tags.rb
class CreateCastsTags < ActiveRecord::Migration def change create_table(:casts_tags, id: false) do |t| t.references :cast t.references :tag end add_index :casts_tags, %i(cast_id tag_id), unique: true end end
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/spec/rails_helper.rb
spec/rails_helper.rb
# This file is copied to spec/ when you run 'rails generate rspec:install' ENV["RAILS_ENV"] ||= 'test' require File.expand_path("../../config/environment", __FILE__) require 'spec_helper' require 'rspec/rails' require 'capybara/rspec' require 'capybara/rails' require 'capybara/poltergeist' require 'shoulda/matchers' C...
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/spec/oauth_helper.rb
spec/oauth_helper.rb
require 'rails_helper' OmniAuth.config.test_mode = true OmniAuth.config.mock_auth[:github] = OmniAuth::AuthHash.new({ credentials: { token: "big_token" ...
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/spec/spec_helper.rb
spec/spec_helper.rb
# This file was generated by the `rails generate rspec:install` command. Conventionally, all # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`. # The generated `.rspec` file contains `--require spec_helper` which will cause this # file to always be loaded, without a need to explicitly require ...
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/spec/support/controller_helpers.rb
spec/support/controller_helpers.rb
module ControllerHelpers def sign_in(user = double('user')) if user.nil? allow(request.env['warden']).to receive(:authenticate!).and_throw(:warden, scope: :user) allow(controller).to receive(:current_user).and_return(nil) else allow(request.env['warden']).to receive(:authenticate!).and_retur...
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/spec/helpers/application_helper_spec.rb
spec/helpers/application_helper_spec.rb
require 'rails_helper' describe ApplicationHelper do describe '.show_avatar' do let(:current_user) { create(:user) } let(:profile) { create(:profile, user_id: current_user.id) } context 'with an avatar' do before :each do allow_any_instance_of(Gravatar).to receive(:image_url).and_return('w...
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/spec/factories/users.rb
spec/factories/users.rb
FactoryGirl.define do factory :user do email 'test@test.com' password 'password' profile end end
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/spec/factories/profiles.rb
spec/factories/profiles.rb
FactoryGirl.define do factory :profile do first_name 'John' last_name 'Doe' user nil end end
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/spec/factories/tag_relationships.rb
spec/factories/tag_relationships.rb
FactoryGirl.define do factory :tag_relationship do taggable nil tag nil end end
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/spec/factories/casts.rb
spec/factories/casts.rb
FactoryGirl.define do factory :cast do name "MyString" description "MyText" url "MyString" user nil end end
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/spec/factories/categories.rb
spec/factories/categories.rb
FactoryGirl.define do factory :category do name "Advanced" end end
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/spec/factories/levels.rb
spec/factories/levels.rb
FactoryGirl.define do factory :level do sequence(:name, (1..10).cycle) { |n| "Nível #{n}" } sequence(:required_score, (1..10).cycle) { |n| (n - 1) * 100 } end end
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/spec/factories/authorization.rb
spec/factories/authorization.rb
FactoryGirl.define do factory :authorization do user nick_name 'Nick Name' uid '123123123' token '123123123' secret '123123123' profile_page 'http://pudim.com.br' avatar_url 'http://lorempixel.com/26/26' end trait :github do provider 'github' end end
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/spec/factories/scores.rb
spec/factories/scores.rb
FactoryGirl.define do factory :score do value 100 description 'Motivo que fez ganhar os pontos' end end
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/spec/factories/tags.rb
spec/factories/tags.rb
FactoryGirl.define do factory :tag do name 'MyString' end end
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/spec/factories/links.rb
spec/factories/links.rb
FactoryGirl.define do factory :link do name 'name' url 'http://www.test.com' profile nil end end
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/spec/controllers/casts_controller_spec.rb
spec/controllers/casts_controller_spec.rb
require 'rails_helper' describe CastsController do describe "POST create" do context "unlogged user" do it "redirects to login page" do sign_in nil post :create, cast: attributes_for(:cast) expect(subject).to redirect_to(new_user_session_path) end end context "logged ...
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/spec/controllers/categories_controller_spec.rb
spec/controllers/categories_controller_spec.rb
require 'rails_helper' describe CategoriesController do describe "POST create" do context "unlogged user" do it "redirects to login page" do sign_in nil post :create, category: attributes_for(:category) expect(response).to redirect_to(new_user_session_path) end end co...
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/spec/controllers/profiles_controller_spec.rb
spec/controllers/profiles_controller_spec.rb
require 'rails_helper' RSpec.describe ProfilesController, :type => :controller do describe "#resource" do it "should return current user" do user = create(:user) sign_in user expect(subject.send('resource')).to eq(user) end end describe "#resource_class" do it "should return curren...
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/spec/models/category_spec.rb
spec/models/category_spec.rb
require 'rails_helper' describe Category do it { expect(subject).to validate_presence_of(:name) } end
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/spec/models/authorization_spec.rb
spec/models/authorization_spec.rb
require 'rails_helper' describe Authorization do let(:authorization) { Authorization.new } let(:attributes) { Authorization::Attributes.new(authorization) } let(:associate) { Authorization::Associate.new(authorization) } it { expect(subject).to belong_to(:user) } describe '#values' do it 'should return...
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/spec/models/ability_spec.rb
spec/models/ability_spec.rb
require 'rails_helper' require 'cancan/matchers' describe Ability do let(:user) { User.new } let(:ability) { Ability.new(user) } context 'on admin' do before :each do user.add_role :admin end it { expect(ability).to be_able_to(:update, Profile, id: user.id) } it { expect(ability).to be_ab...
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/spec/models/cast_spec.rb
spec/models/cast_spec.rb
require 'rails_helper' describe Cast do let(:cast) { create(:cast) } it { expect(subject).to belong_to(:user) } it { expect(subject).to have_and_belong_to_many(:tags) } it { expect(subject).to have_many(:cast_transitions) } describe '.find_by_param(param)' do # it 'should find cast by to_param' do ...
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/spec/models/role_spec.rb
spec/models/role_spec.rb
require 'rails_helper' describe Role do it { expect(subject).to have_and_belong_to_many(:users) } it { expect(subject).to belong_to(:resource) } end
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/spec/models/level_spec.rb
spec/models/level_spec.rb
require 'rails_helper' describe Level do it { expect(subject).to validate_numericality_of(:required_score).only_integer } it { expect(subject).to validate_uniqueness_of(:name) } describe '.by_score(score)' do before { create(:level) } it 'should find level by pontution' do expect(Level.first_by_s...
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/spec/models/profile_spec.rb
spec/models/profile_spec.rb
require 'rails_helper' describe Profile do let(:profile) { Profile.new } let(:attributes) { Profile::Attributes.new(profile) } it { expect(subject).to belong_to(:user) } it { expect(subject).to have_many(:links).dependent(:destroy) } it { expect(subject).to validate_presence_of(:first_name) } it { expect(...
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/spec/models/link_spec.rb
spec/models/link_spec.rb
require 'rails_helper' require 'validates_host/require_a_valid_domain_name_matcher' describe Link do it { expect(subject).to belong_to(:profile) } it { expect(subject).to validate_presence_of(:name) } it { expect(subject).to validate_presence_of(:url) } it { expect(subject).to require_a_valid_domain_name(:url)...
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/spec/models/tag_spec.rb
spec/models/tag_spec.rb
require 'rails_helper' describe Tag do it { expect(subject).to have_and_belong_to_many(:casts) } end
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/spec/models/score_spec.rb
spec/models/score_spec.rb
require 'rails_helper' describe Score do it { expect(subject).to belong_to(:user) } it { expect(subject).to validate_numericality_of(:value).only_integer } it { expect(subject).to validate_presence_of(:value) } end
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/spec/models/user_spec.rb
spec/models/user_spec.rb
require 'rails_helper' describe User do let(:user) { User.new } let(:attributes) { User::Attributes.new(user) } let(:profile) { Profile.new } it 'SOCIALS should return a list of social networks' do expect(User::SOCIALS).to be == [:github] end it 'should have many roles' do expect(user).to respond...
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/spec/models/user/gamefication_spec.rb
spec/models/user/gamefication_spec.rb
require 'rails_helper' describe User do let(:user) { create(:user) } before do create_list(:level, 10) end context 'after create' do it 'should have zero points' do expect(user.total_score).to be(0) end it 'should have one level' do expect(user.level).to_not be(nil) end end...
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/spec/models/user/attributes_spec.rb
spec/models/user/attributes_spec.rb
require 'rails_helper' describe User::Attributes do let(:user) { User.new } let(:attributes) { User::Attributes.new(user) } describe '#initialize' do it 'should save an user in an instance variable' do expect(User::Attributes.new(user).user).to be == user end end describe '#set_from_oauth' do...
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/spec/models/authorization/associate_spec.rb
spec/models/authorization/associate_spec.rb
require 'rails_helper' describe Authorization::Associate do let(:authorization) { Authorization.new } let(:associate) { Authorization::Associate.new(authorization) } describe '#initialize' do it 'should save an authorization in an instance variable' do expect(Authorization::Associate.new(authorization...
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/spec/models/authorization/attributes_spec.rb
spec/models/authorization/attributes_spec.rb
require 'rails_helper' describe Authorization::Attributes do let(:authorization) { Authorization.new } let(:attributes) { Authorization::Attributes.new(authorization) } describe '#initialize' do it 'should save an authorization in an instance variable' do expect(Authorization::Attributes.new(authoriza...
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/spec/models/authorization/oauth_spec.rb
spec/models/authorization/oauth_spec.rb
require 'rails_helper' describe Authorization::Oauth do let(:user) { User.new } let(:authorization) { Authorization.new } let(:oauth) { Authorization::Oauth.new } describe '.find_or_initialize_by' do before :each do @oauth = double allow(Authorization).to receive_message_chain(:find_from_oauth...
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/spec/models/profile/attributes_spec.rb
spec/models/profile/attributes_spec.rb
require 'rails_helper' describe Profile::Attributes do let(:profile) { Profile.new } let(:attributes) { Profile::Attributes.new(profile) } describe '#initialize' do it 'should save an profile in an instance variable' do expect(Profile::Attributes.new(profile).profile).to be == profile end end ...
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/spec/features/visitor_signs_up_spec.rb
spec/features/visitor_signs_up_spec.rb
require 'oauth_helper' feature 'Visitor should be able to signs up' do scenario 'with github' do visit(new_user_session_path) click_link('Entrar com Github') expect(page).to have_content('Autorizado com sucesso de uma conta do Github.') end end feature "Visitor shouldn't be able to sign up" do scen...
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/spec/features/visitor_signs_up_with_email_spec.rb
spec/features/visitor_signs_up_with_email_spec.rb
require 'rails_helper' feature 'Visitor should be able to signs up' do scenario 'with email' do visit(new_user_registration_path) within('#new_user') do fill_in 'Email', with: 'user@example.com' fill_in 'Senha', with: 'password' fill_in 'Confirmação de Senha', with: 'password' fill_in...
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/config/application.rb
config/application.rb
require File.expand_path('../boot', __FILE__) require 'rails/all' require "rails" # Pick the frameworks you want: require "active_model/railtie" require "active_job/railtie" require "active_record/railtie" require "action_controller/railtie" require "action_mailer/railtie" require "action_view/railtie" require "sprock...
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/config/environment.rb
config/environment.rb
# Load the Rails application. require_relative "application" # Initialize the Rails application. Rails.application.initialize!
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/config/puma.rb
config/puma.rb
# frozen_string_literal: true # 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 minimu...
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/config/routes.rb
config/routes.rb
Rails.application.routes.draw do resources :categories resource :profiles, only: %i(update) resources :profiles, only: %i(show) resources :casts devise_for :users, controllers: { omniauth_callbacks: "users/omniauth_callbacks" }, skip: :registrations devise_scope :user do resource :registration, ...
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/config/spring.rb
config/spring.rb
# frozen_string_literal: true %w( .ruby-version .rbenv-vars tmp/restart.txt tmp/caching-dev.txt ).freeze.each { |path| Spring.watch(path) }
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/config/boot.rb
config/boot.rb
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) require "bundler/setup" # Set up gems listed in the Gemfile.
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/config/initializers/filter_parameter_logging.rb
config/initializers/filter_parameter_logging.rb
# Be sure to restart your server when you modify this file. # Configure sensitive parameters which will be filtered from the log file. Rails.application.config.filter_parameters += [:password]
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/config/initializers/application_controller_renderer.rb
config/initializers/application_controller_renderer.rb
# frozen_string_literal: true # Be sure to restart your server when you modify this file. # ApplicationController.renderer.defaults.merge!( # http_host: 'example.org', # https: false # )
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/config/initializers/statesman.rb
config/initializers/statesman.rb
Statesman.configure do storage_adapter(Statesman::Adapters::ActiveRecord) end
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/config/initializers/session_store.rb
config/initializers/session_store.rb
# Be sure to restart your server when you modify this file. value = "_ruby_casts_brasil_session" Rails.application.config.session_store :cookie_store, key: value
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/config/initializers/devise.rb
config/initializers/devise.rb
# Use this hook to configure devise mailer, warden hooks and so forth. # Many of these configuration options can be set straight in your model. Devise.setup do |config| # The secret key used by Devise. Devise uses this key to generate # random tokens. Changing this key will render invalid all existing # confirmat...
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/config/initializers/new_framework_defaults.rb
config/initializers/new_framework_defaults.rb
# frozen_string_literal: true # Be sure to restart your server when you modify this file. # # This file contains migration options to ease your Rails 5.0 upgrade. # # Once upgraded flip defaults one by one to migrate to the new default. # # Read the Rails 5.0 release notes for more info on each option. # Enable per-fo...
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/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
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/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
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/config/initializers/simple_form_bootstrap.rb
config/initializers/simple_form_bootstrap.rb
# Use this setup block to configure all options available in SimpleForm. SimpleForm.setup do |config| config.button_class = 'btn btn-default' config.boolean_label_class = nil config.wrappers :vertical_form, tag: 'div', class: 'form-group', error_class: 'has-error' do |b| b.use :html5 b.use :placeholder ...
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/config/initializers/simple_form.rb
config/initializers/simple_form.rb
# Use this setup block to configure all options available in SimpleForm. SimpleForm.setup do |config| # Wrappers are used by the form builder to generate a # complete input. You can remove any component from the # wrapper, change the order or even add your own to the # stack. The options given below are used to...
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/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
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/config/initializers/assets.rb
config/initializers/assets.rb
# frozen_string_literal: true # Be sure to restart your server when you modify this file. # Version of your assets, change this if you want to expire all your assets. Rails.application.config.assets.version = "1.0" # Add additional assets to the asset load path # Rails.application.config.assets.paths << Emoji.images...
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/config/initializers/rolify.rb
config/initializers/rolify.rb
Rolify.configure do |config| # By default ORM adapter is ActiveRecord. uncomment to use mongoid # config.use_mongoid # Dynamic shortcuts for User class (user.is_admin? like methods). Default is: false # Enable this feature _after_ running rake db:migrate as it relies on the roles table # config.use_dynamic_s...
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/config/initializers/backtrace_silencers.rb
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
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/config/initializers/mime_types.rb
config/initializers/mime_types.rb
# Be sure to restart your server when you modify this file. # Add new mime types for use in respond_to blocks: # Mime::Type.register "text/richtext", :rtf
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/config/environments/test.rb
config/environments/test.rb
Rails.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
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/config/environments/development.rb
config/environments/development.rb
Rails.application.configure do # Settings specified here will take precedence over those in # config/application.rb. # In the development environment your application"s code is reloaded on # every request. This slows down response time but is perfect for development # since you don"t have to restart the web ...
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
castsbrasil/castsbrasil
https://github.com/castsbrasil/castsbrasil/blob/7101a10d43353fde8b415cf101a8f52626c371e7/config/environments/production.rb
config/environments/production.rb
Rails.application.configure do # Settings specified here will take precedence over those # in config/application.rb. # Code is not reloaded between requests. config.cache_classes = true # Eager load code on boot. This eager loads most of Rails and # your application in memory, allowing both threaded web s...
ruby
Apache-2.0
7101a10d43353fde8b415cf101a8f52626c371e7
2026-01-04T17:40:55.411883Z
false
mamantoha/omniauth-vkontakte
https://github.com/mamantoha/omniauth-vkontakte/blob/6d11c17a8c7706080e9873355f1145a9cfb37fa6/spec/spec_helper.rb
spec/spec_helper.rb
# frozen_string_literal: true $LOAD_PATH.unshift File.expand_path(__dir__) $LOAD_PATH.unshift File.expand_path('../lib', __dir__) require 'simplecov' SimpleCov.start require 'rspec' require 'webmock/rspec' require 'omniauth' require 'omniauth-vkontakte' RSpec.configure do |config| config.include WebMock::API conf...
ruby
MIT
6d11c17a8c7706080e9873355f1145a9cfb37fa6
2026-01-04T17:42:17.809179Z
false
mamantoha/omniauth-vkontakte
https://github.com/mamantoha/omniauth-vkontakte/blob/6d11c17a8c7706080e9873355f1145a9cfb37fa6/spec/omniauth/strategies/vkontakte_spec.rb
spec/omniauth/strategies/vkontakte_spec.rb
# frozen_string_literal: true require 'spec_helper' describe OmniAuth::Strategies::Vkontakte do let(:request) { double('Request', params: {}, cookies: {}, env: {}) } before do OmniAuth.config.test_mode = true end it 'should have version' do expect(OmniAuth::Vkontakte::VERSION).to_not be_nil end ...
ruby
MIT
6d11c17a8c7706080e9873355f1145a9cfb37fa6
2026-01-04T17:42:17.809179Z
false
mamantoha/omniauth-vkontakte
https://github.com/mamantoha/omniauth-vkontakte/blob/6d11c17a8c7706080e9873355f1145a9cfb37fa6/examples/main.rb
examples/main.rb
# frozen_string_literal: true require 'sinatra' require 'omniauth' require 'omniauth-vkontakte' configure { set :server, :puma } SCOPE = 'friends,audio' use Rack::Session::Cookie use OmniAuth::Builder do provider :vkontakte, ENV.fetch('VKONTAKTE_KEY', nil), ENV.fetch('VKONTAKTE_SECRET', nil), scope: S...
ruby
MIT
6d11c17a8c7706080e9873355f1145a9cfb37fa6
2026-01-04T17:42:17.809179Z
false
mamantoha/omniauth-vkontakte
https://github.com/mamantoha/omniauth-vkontakte/blob/6d11c17a8c7706080e9873355f1145a9cfb37fa6/lib/omniauth-vkontakte.rb
lib/omniauth-vkontakte.rb
# frozen_string_literal: true require 'omniauth/vkontakte/version' require 'omniauth' # :nodoc: module OmniAuth # :nodoc: module Strategies autoload :Vkontakte, 'omniauth/strategies/vkontakte' end end OmniAuth.config.add_camelization 'vkontakte', 'Vkontakte'
ruby
MIT
6d11c17a8c7706080e9873355f1145a9cfb37fa6
2026-01-04T17:42:17.809179Z
false
mamantoha/omniauth-vkontakte
https://github.com/mamantoha/omniauth-vkontakte/blob/6d11c17a8c7706080e9873355f1145a9cfb37fa6/lib/omniauth/vkontakte/version.rb
lib/omniauth/vkontakte/version.rb
# frozen_string_literal: true module OmniAuth module Vkontakte VERSION = '1.9.0' end end
ruby
MIT
6d11c17a8c7706080e9873355f1145a9cfb37fa6
2026-01-04T17:42:17.809179Z
false
mamantoha/omniauth-vkontakte
https://github.com/mamantoha/omniauth-vkontakte/blob/6d11c17a8c7706080e9873355f1145a9cfb37fa6/lib/omniauth/strategies/vkontakte.rb
lib/omniauth/strategies/vkontakte.rb
# frozen_string_literal: true require 'omniauth/strategies/oauth2' module OmniAuth module Strategies # Authenticate to Vkontakte utilizing OAuth 2.0 and retrieve # basic user information. # documentation available here: # http://vk.ru/dev/authentication # # @example Basic Usage # use...
ruby
MIT
6d11c17a8c7706080e9873355f1145a9cfb37fa6
2026-01-04T17:42:17.809179Z
false
arydjmal/to_xls
https://github.com/arydjmal/to_xls/blob/a8a54f6d248e929c026a22629864187aca8b45be/init.rb
init.rb
require 'to_xls'
ruby
MIT
a8a54f6d248e929c026a22629864187aca8b45be
2026-01-04T17:42:20.449982Z
false
arydjmal/to_xls
https://github.com/arydjmal/to_xls/blob/a8a54f6d248e929c026a22629864187aca8b45be/test/to_xls_test.rb
test/to_xls_test.rb
require File.dirname(__FILE__) + '/test_helper' class ToXlsTest < Test::Unit::TestCase def setup @users = [ User.new(:id => 1, :name => 'Ary', :age => 25), User.new(:id => 2, :name => 'Nati', :age => 22) ] end def test_with_empty_array assert_equal build_document(nil), Array.new.to_xls ...
ruby
MIT
a8a54f6d248e929c026a22629864187aca8b45be
2026-01-04T17:42:20.449982Z
false
arydjmal/to_xls
https://github.com/arydjmal/to_xls/blob/a8a54f6d248e929c026a22629864187aca8b45be/test/test_helper.rb
test/test_helper.rb
begin require 'rubygems' require 'test/unit' require 'active_support' require File.dirname(__FILE__) + '/../lib/to_xls' rescue LoadError puts 'to_xls tests rely on active_support' end class User COLUMNS = %w(id name age) attr_accessor *COLUMNS def self.human_attribute_name(attribute) attribute....
ruby
MIT
a8a54f6d248e929c026a22629864187aca8b45be
2026-01-04T17:42:20.449982Z
false
arydjmal/to_xls
https://github.com/arydjmal/to_xls/blob/a8a54f6d248e929c026a22629864187aca8b45be/lib/to_xls.rb
lib/to_xls.rb
class Array def to_xls(options = {}) output = '<?xml version="1.0" encoding="UTF-8"?><Workbook xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns="urn:schemas-microsoft-com:office:spreadsheet" xmlns:o="urn:sch...
ruby
MIT
a8a54f6d248e929c026a22629864187aca8b45be
2026-01-04T17:42:20.449982Z
false
Eric-Guo/weui-rails
https://github.com/Eric-Guo/weui-rails/blob/8ef1564f307146e367f96ac12c40e8be9ebb0785/lib/weui-rails.rb
lib/weui-rails.rb
require 'autoprefixer-rails' require 'weui-rails/version' require 'weui-rails/helpers/weui_message_box' module Weui module Rails class Engine < ::Rails::Engine end # Make Weui helpers available in Rails applications. class Railtie < ::Rails::Railtie initializer 'weui.add_helpers' do Ac...
ruby
MIT
8ef1564f307146e367f96ac12c40e8be9ebb0785
2026-01-04T17:42:24.981389Z
false
Eric-Guo/weui-rails
https://github.com/Eric-Guo/weui-rails/blob/8ef1564f307146e367f96ac12c40e8be9ebb0785/lib/weui-rails/version.rb
lib/weui-rails/version.rb
module Weui module Rails VERSION = '1.1.3' end end
ruby
MIT
8ef1564f307146e367f96ac12c40e8be9ebb0785
2026-01-04T17:42:24.981389Z
false
Eric-Guo/weui-rails
https://github.com/Eric-Guo/weui-rails/blob/8ef1564f307146e367f96ac12c40e8be9ebb0785/lib/weui-rails/helpers/weui_message_box.rb
lib/weui-rails/helpers/weui_message_box.rb
module Weui module Helpers def weui_message_box(title, description, icon_style = 'weui-icon-warn', button_text = '确定') render partial: 'weui/message_box', locals: { title: title, description: description, icon_style: icon_style, button_text: button_text } end end en...
ruby
MIT
8ef1564f307146e367f96ac12c40e8be9ebb0785
2026-01-04T17:42:24.981389Z
false
makandra/assignable_values
https://github.com/makandra/assignable_values/blob/b697c65723442c91588643fe737548e0f3539660/spec/spec_helper.rb
spec/spec_helper.rb
$: << File.join(File.dirname(__FILE__), "/../../lib" ) require 'i18n' require 'active_record' require 'assignable_values' require 'rspec_candy/all' require 'gemika' I18n.enforce_available_locales = true I18n.load_path = [File.join(File.dirname(__FILE__), 'support/i18n.yml')] I18n.default_locale = :en if ActiveRecord...
ruby
MIT
b697c65723442c91588643fe737548e0f3539660
2026-01-04T17:42:26.089155Z
false
makandra/assignable_values
https://github.com/makandra/assignable_values/blob/b697c65723442c91588643fe737548e0f3539660/spec/support/models.rb
spec/support/models.rb
class Artist < ActiveRecord::Base has_many :songs end class Song < ActiveRecord::Base belongs_to :artist attr_accessor :virtual_sub_genre, :virtual_sub_genres, :virtual_multi_genres if ActiveRecord::VERSION::MAJOR < 4 || !Song.new(:multi_genres => ['test']).multi_genres.is_a?(Array) # Rails 4 or not p...
ruby
MIT
b697c65723442c91588643fe737548e0f3539660
2026-01-04T17:42:26.089155Z
false
makandra/assignable_values
https://github.com/makandra/assignable_values/blob/b697c65723442c91588643fe737548e0f3539660/spec/support/database.rb
spec/support/database.rb
database = Gemika::Database.new database.connect database.rewrite_schema! do create_table :artists create_table :songs do |t| t.integer :artist_id t.string :genre t.integer :year t.integer :duration if defined?(Mysql2) t.string :multi_genres else t.string :multi_genres, :array...
ruby
MIT
b697c65723442c91588643fe737548e0f3539660
2026-01-04T17:42:26.089155Z
false