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 |
|---|---|---|---|---|---|---|---|---|
mikel/mail | https://github.com/mikel/mail/blob/d1d65b370b109b98e673a934e8b70a0c1f58cc59/lib/mail/fields/unstructured_field.rb | lib/mail/fields/unstructured_field.rb | # encoding: utf-8
# frozen_string_literal: true
require 'mail/utilities'
module Mail
# Provides access to an unstructured header field
#
# ===Per RFC 2822:
# 2.2.1. Unstructured Header Field Bodies
#
# Some field bodies in this standard are defined simply as
# "unstructured" (which is specified ... | ruby | MIT | d1d65b370b109b98e673a934e8b70a0c1f58cc59 | 2026-01-04T15:49:43.011919Z | false |
mikel/mail | https://github.com/mikel/mail/blob/d1d65b370b109b98e673a934e8b70a0c1f58cc59/lib/mail/fields/received_field.rb | lib/mail/fields/received_field.rb | # encoding: utf-8
# frozen_string_literal: true
module Mail
# trace = [return]
# 1*received
#
# return = "Return-Path:" path CRLF
#
# path = ([CFWS] "<" ([CFWS] / addr-spec) ">" [CFWS]) /
# obs-path
#
# re... | ruby | MIT | d1d65b370b109b98e673a934e8b70a0c1f58cc59 | 2026-01-04T15:49:43.011919Z | false |
mikel/mail | https://github.com/mikel/mail/blob/d1d65b370b109b98e673a934e8b70a0c1f58cc59/lib/mail/fields/content_location_field.rb | lib/mail/fields/content_location_field.rb | # encoding: utf-8
# frozen_string_literal: true
module Mail
class ContentLocationField < NamedStructuredField #:nodoc:
NAME = 'Content-Location'
def self.singular?
true
end
def element
@element ||= Mail::ContentLocationElement.new(value)
end
def location
element.location
... | ruby | MIT | d1d65b370b109b98e673a934e8b70a0c1f58cc59 | 2026-01-04T15:49:43.011919Z | false |
mikel/mail | https://github.com/mikel/mail/blob/d1d65b370b109b98e673a934e8b70a0c1f58cc59/lib/mail/fields/content_id_field.rb | lib/mail/fields/content_id_field.rb | # encoding: utf-8
# frozen_string_literal: true
require 'mail/utilities'
module Mail
class ContentIdField < NamedStructuredField #:nodoc:
NAME = 'Content-ID'
def self.singular?
true
end
def initialize(value = nil, charset = nil)
value = Mail::Utilities.generate_message_id if Utilities.b... | ruby | MIT | d1d65b370b109b98e673a934e8b70a0c1f58cc59 | 2026-01-04T15:49:43.011919Z | false |
mikel/mail | https://github.com/mikel/mail/blob/d1d65b370b109b98e673a934e8b70a0c1f58cc59/lib/mail/fields/structured_field.rb | lib/mail/fields/structured_field.rb | # encoding: utf-8
# frozen_string_literal: true
module Mail
# Provides access to a structured header field
#
# ===Per RFC 2822:
# 2.2.2. Structured Header Field Bodies
#
# Some field bodies in this standard have specific syntactical
# structure more restrictive than the unstructured field bodies... | ruby | MIT | d1d65b370b109b98e673a934e8b70a0c1f58cc59 | 2026-01-04T15:49:43.011919Z | false |
mikel/mail | https://github.com/mikel/mail/blob/d1d65b370b109b98e673a934e8b70a0c1f58cc59/lib/mail/fields/common_message_id_field.rb | lib/mail/fields/common_message_id_field.rb | # encoding: utf-8
# frozen_string_literal: true
require 'mail/utilities'
module Mail
class CommonMessageIdField < NamedStructuredField #:nodoc:
def element
@element ||= Mail::MessageIdsElement.new(value)
end
def message_id
element.message_id
end
def message_ids
element.message... | ruby | MIT | d1d65b370b109b98e673a934e8b70a0c1f58cc59 | 2026-01-04T15:49:43.011919Z | false |
mikel/mail | https://github.com/mikel/mail/blob/d1d65b370b109b98e673a934e8b70a0c1f58cc59/lib/mail/fields/references_field.rb | lib/mail/fields/references_field.rb | # encoding: utf-8
# frozen_string_literal: true
module Mail
# = References Field
#
# The References field inherits references StructuredField and handles the References: header
# field in the email.
#
# Sending references to a mail message will instantiate a Mail::Field object that
# has a ReferencesFiel... | ruby | MIT | d1d65b370b109b98e673a934e8b70a0c1f58cc59 | 2026-01-04T15:49:43.011919Z | false |
mikel/mail | https://github.com/mikel/mail/blob/d1d65b370b109b98e673a934e8b70a0c1f58cc59/lib/mail/fields/named_unstructured_field.rb | lib/mail/fields/named_unstructured_field.rb | # encoding: utf-8
# frozen_string_literal: true
module Mail
class NamedUnstructuredField < UnstructuredField #:nodoc:
def initialize(value = nil, charset = nil)
super self.class::NAME, value, charset
end
end
end
| ruby | MIT | d1d65b370b109b98e673a934e8b70a0c1f58cc59 | 2026-01-04T15:49:43.011919Z | false |
mikel/mail | https://github.com/mikel/mail/blob/d1d65b370b109b98e673a934e8b70a0c1f58cc59/lib/mail/fields/cc_field.rb | lib/mail/fields/cc_field.rb | # encoding: utf-8
# frozen_string_literal: true
module Mail
# = Carbon Copy Field
#
# The Cc field inherits from StructuredField and handles the Cc: header
# field in the email.
#
# Sending cc to a mail message will instantiate a Mail::Field object that
# has a CcField as its field type. This includes a... | ruby | MIT | d1d65b370b109b98e673a934e8b70a0c1f58cc59 | 2026-01-04T15:49:43.011919Z | false |
mikel/mail | https://github.com/mikel/mail/blob/d1d65b370b109b98e673a934e8b70a0c1f58cc59/lib/mail/fields/resent_bcc_field.rb | lib/mail/fields/resent_bcc_field.rb | # encoding: utf-8
# frozen_string_literal: true
module Mail
# = Resent-Bcc Field
#
# The Resent-Bcc field inherits resent-bcc StructuredField and handles the
# Resent-Bcc: header field in the email.
#
# Sending resent_bcc to a mail message will instantiate a Mail::Field object that
# has a ResentBccField... | ruby | MIT | d1d65b370b109b98e673a934e8b70a0c1f58cc59 | 2026-01-04T15:49:43.011919Z | false |
mikel/mail | https://github.com/mikel/mail/blob/d1d65b370b109b98e673a934e8b70a0c1f58cc59/lib/mail/fields/parameter_hash.rb | lib/mail/fields/parameter_hash.rb | # encoding: utf-8
# frozen_string_literal: true
require 'mail/constants'
require 'mail/indifferent_hash'
require 'mail/encodings'
module Mail
# ParameterHash is an intelligent Hash that allows you to add
# parameter values including the MIME extension paramaters that
# have the name*0="blah", name*1="bleh" keys,... | ruby | MIT | d1d65b370b109b98e673a934e8b70a0c1f58cc59 | 2026-01-04T15:49:43.011919Z | false |
mikel/mail | https://github.com/mikel/mail/blob/d1d65b370b109b98e673a934e8b70a0c1f58cc59/lib/mail/fields/mime_version_field.rb | lib/mail/fields/mime_version_field.rb | # encoding: utf-8
# frozen_string_literal: true
require 'mail/utilities'
module Mail
class MimeVersionField < NamedStructuredField #:nodoc:
NAME = 'MIME-Version'
def self.singular?
true
end
def initialize(value = nil, charset = nil)
value = '1.0' if Utilities.blank?(value)
super v... | ruby | MIT | d1d65b370b109b98e673a934e8b70a0c1f58cc59 | 2026-01-04T15:49:43.011919Z | false |
mikel/mail | https://github.com/mikel/mail/blob/d1d65b370b109b98e673a934e8b70a0c1f58cc59/lib/mail/fields/message_id_field.rb | lib/mail/fields/message_id_field.rb | # encoding: utf-8
# frozen_string_literal: true
require 'mail/utilities'
module Mail
# Only one Message-ID field may appear in a header.
#
# Note that parsed Message IDs do not contain their enclosing angle
# brackets which, per RFC, are not part of the ID.
#
# mail = Mail.new
# mail.message_id = '<F6E... | ruby | MIT | d1d65b370b109b98e673a934e8b70a0c1f58cc59 | 2026-01-04T15:49:43.011919Z | false |
mikel/mail | https://github.com/mikel/mail/blob/d1d65b370b109b98e673a934e8b70a0c1f58cc59/lib/mail/fields/common_field.rb | lib/mail/fields/common_field.rb | # encoding: utf-8
# frozen_string_literal: true
require 'mail/constants'
module Mail
class CommonField #:nodoc:
def self.singular?
false
end
def self.parse(*args)
new(*args).tap(&:parse)
end
attr_accessor :name
attr_reader :value
attr_accessor :charset
attr_reader :error... | ruby | MIT | d1d65b370b109b98e673a934e8b70a0c1f58cc59 | 2026-01-04T15:49:43.011919Z | false |
mikel/mail | https://github.com/mikel/mail/blob/d1d65b370b109b98e673a934e8b70a0c1f58cc59/lib/mail/fields/content_transfer_encoding_field.rb | lib/mail/fields/content_transfer_encoding_field.rb | # encoding: utf-8
# frozen_string_literal: true
module Mail
class ContentTransferEncodingField < NamedStructuredField #:nodoc:
NAME = 'Content-Transfer-Encoding'
def self.singular?
true
end
def self.normalize_content_transfer_encoding(value)
case value
when /7-?bits?/i
'7b... | ruby | MIT | d1d65b370b109b98e673a934e8b70a0c1f58cc59 | 2026-01-04T15:49:43.011919Z | false |
mikel/mail | https://github.com/mikel/mail/blob/d1d65b370b109b98e673a934e8b70a0c1f58cc59/lib/mail/fields/to_field.rb | lib/mail/fields/to_field.rb | # encoding: utf-8
# frozen_string_literal: true
module Mail
# = To Field
#
# The To field inherits to StructuredField and handles the To: header
# field in the email.
#
# Sending to to a mail message will instantiate a Mail::Field object that
# has a ToField as its field type. This includes all Mail::Co... | ruby | MIT | d1d65b370b109b98e673a934e8b70a0c1f58cc59 | 2026-01-04T15:49:43.011919Z | false |
mikel/mail | https://github.com/mikel/mail/blob/d1d65b370b109b98e673a934e8b70a0c1f58cc59/lib/mail/fields/content_type_field.rb | lib/mail/fields/content_type_field.rb | # encoding: utf-8
# frozen_string_literal: true
module Mail
class ContentTypeField < NamedStructuredField #:nodoc:
NAME = 'Content-Type'
class << self
def singular?
true
end
def with_boundary(type)
new "#{type}; boundary=#{generate_boundary}"
end
def generate_... | ruby | MIT | d1d65b370b109b98e673a934e8b70a0c1f58cc59 | 2026-01-04T15:49:43.011919Z | false |
mikel/mail | https://github.com/mikel/mail/blob/d1d65b370b109b98e673a934e8b70a0c1f58cc59/lib/mail/fields/in_reply_to_field.rb | lib/mail/fields/in_reply_to_field.rb | # encoding: utf-8
# frozen_string_literal: true
module Mail
# = In-Reply-To Field
#
# The In-Reply-To field inherits from StructuredField and handles the
# In-Reply-To: header field in the email.
#
# Sending in_reply_to to a mail message will instantiate a Mail::Field object that
# has a InReplyToField a... | ruby | MIT | d1d65b370b109b98e673a934e8b70a0c1f58cc59 | 2026-01-04T15:49:43.011919Z | false |
mikel/mail | https://github.com/mikel/mail/blob/d1d65b370b109b98e673a934e8b70a0c1f58cc59/lib/mail/fields/resent_sender_field.rb | lib/mail/fields/resent_sender_field.rb | # encoding: utf-8
# frozen_string_literal: true
module Mail
# = Resent-Sender Field
#
# The Resent-Sender field inherits resent-sender StructuredField and handles the Resent-Sender: header
# field in the email.
#
# Sending resent_sender to a mail message will instantiate a Mail::Field object that
# has a... | ruby | MIT | d1d65b370b109b98e673a934e8b70a0c1f58cc59 | 2026-01-04T15:49:43.011919Z | false |
mikel/mail | https://github.com/mikel/mail/blob/d1d65b370b109b98e673a934e8b70a0c1f58cc59/lib/mail/fields/named_structured_field.rb | lib/mail/fields/named_structured_field.rb | # encoding: utf-8
# frozen_string_literal: true
module Mail
class NamedStructuredField < StructuredField #:nodoc:
def initialize(value = nil, charset = nil)
super self.class::NAME, value, charset
end
end
end
| ruby | MIT | d1d65b370b109b98e673a934e8b70a0c1f58cc59 | 2026-01-04T15:49:43.011919Z | false |
mikel/mail | https://github.com/mikel/mail/blob/d1d65b370b109b98e673a934e8b70a0c1f58cc59/lib/mail/fields/common_date_field.rb | lib/mail/fields/common_date_field.rb | require 'mail/utilities'
module Mail
class CommonDateField < NamedStructuredField #:nodoc:
def self.singular?
true
end
def self.normalize_datetime(string)
if Utilities.blank?(string)
datetime = ::DateTime.now
else
stripped = string.to_s.gsub(/\(.*?\)/, '').squeeze(' ')
... | ruby | MIT | d1d65b370b109b98e673a934e8b70a0c1f58cc59 | 2026-01-04T15:49:43.011919Z | false |
mikel/mail | https://github.com/mikel/mail/blob/d1d65b370b109b98e673a934e8b70a0c1f58cc59/lib/mail/fields/keywords_field.rb | lib/mail/fields/keywords_field.rb | # encoding: utf-8
# frozen_string_literal: true
module Mail
# keywords = "Keywords:" phrase *("," phrase) CRLF
class KeywordsField < NamedStructuredField #:nodoc:
NAME = 'Keywords'
def element
@element ||= PhraseList.new(value)
end
def keywords
element.phrases
end
... | ruby | MIT | d1d65b370b109b98e673a934e8b70a0c1f58cc59 | 2026-01-04T15:49:43.011919Z | false |
mikel/mail | https://github.com/mikel/mail/blob/d1d65b370b109b98e673a934e8b70a0c1f58cc59/lib/mail/fields/resent_to_field.rb | lib/mail/fields/resent_to_field.rb | # encoding: utf-8
# frozen_string_literal: true
module Mail
# = Resent-To Field
#
# The Resent-To field inherits resent-to StructuredField and handles the Resent-To: header
# field in the email.
#
# Sending resent_to to a mail message will instantiate a Mail::Field object that
# has a ResentToField as it... | ruby | MIT | d1d65b370b109b98e673a934e8b70a0c1f58cc59 | 2026-01-04T15:49:43.011919Z | false |
mikel/mail | https://github.com/mikel/mail/blob/d1d65b370b109b98e673a934e8b70a0c1f58cc59/lib/mail/fields/reply_to_field.rb | lib/mail/fields/reply_to_field.rb | # encoding: utf-8
# frozen_string_literal: true
module Mail
# = Reply-To Field
#
# The Reply-To field inherits reply-to StructuredField and handles the Reply-To: header
# field in the email.
#
# Sending reply_to to a mail message will instantiate a Mail::Field object that
# has a ReplyToField as its fiel... | ruby | MIT | d1d65b370b109b98e673a934e8b70a0c1f58cc59 | 2026-01-04T15:49:43.011919Z | false |
mikel/mail | https://github.com/mikel/mail/blob/d1d65b370b109b98e673a934e8b70a0c1f58cc59/lib/mail/fields/resent_from_field.rb | lib/mail/fields/resent_from_field.rb | # encoding: utf-8
# frozen_string_literal: true
module Mail
# = Resent-From Field
#
# The Resent-From field inherits resent-from StructuredField and handles the Resent-From: header
# field in the email.
#
# Sending resent_from to a mail message will instantiate a Mail::Field object that
# has a ResentFro... | ruby | MIT | d1d65b370b109b98e673a934e8b70a0c1f58cc59 | 2026-01-04T15:49:43.011919Z | false |
mikel/mail | https://github.com/mikel/mail/blob/d1d65b370b109b98e673a934e8b70a0c1f58cc59/lib/mail/fields/return_path_field.rb | lib/mail/fields/return_path_field.rb | # encoding: utf-8
# frozen_string_literal: true
module Mail
# 4.4.3. REPLY-TO / RESENT-REPLY-TO
#
# Note: The "Return-Path" field is added by the mail transport
# service, at the time of final deliver. It is intended
# to identify a path back to the orginator of the mes-
# ... | ruby | MIT | d1d65b370b109b98e673a934e8b70a0c1f58cc59 | 2026-01-04T15:49:43.011919Z | false |
mikel/mail | https://github.com/mikel/mail/blob/d1d65b370b109b98e673a934e8b70a0c1f58cc59/lib/mail/fields/sender_field.rb | lib/mail/fields/sender_field.rb | # encoding: utf-8
# frozen_string_literal: true
module Mail
# = Sender Field
#
# The Sender field inherits sender StructuredField and handles the Sender: header
# field in the email.
#
# Sending sender to a mail message will instantiate a Mail::Field object that
# has a SenderField as its field type. Th... | ruby | MIT | d1d65b370b109b98e673a934e8b70a0c1f58cc59 | 2026-01-04T15:49:43.011919Z | false |
mikel/mail | https://github.com/mikel/mail/blob/d1d65b370b109b98e673a934e8b70a0c1f58cc59/lib/mail/fields/date_field.rb | lib/mail/fields/date_field.rb | # encoding: utf-8
# frozen_string_literal: true
module Mail
# = Date Field
#
# The Date field inherits from StructuredField and handles the Date: header
# field in the email.
#
# Sending date to a mail message will instantiate a Mail::Field object that
# has a DateField as its field type. This includes ... | ruby | MIT | d1d65b370b109b98e673a934e8b70a0c1f58cc59 | 2026-01-04T15:49:43.011919Z | false |
mikel/mail | https://github.com/mikel/mail/blob/d1d65b370b109b98e673a934e8b70a0c1f58cc59/lib/mail/fields/subject_field.rb | lib/mail/fields/subject_field.rb | # encoding: utf-8
# frozen_string_literal: true
module Mail
#
# subject = "Subject:" unstructured CRLF
class SubjectField < NamedUnstructuredField #:nodoc:
NAME = 'Subject'
def self.singular?
true
end
end
end
| ruby | MIT | d1d65b370b109b98e673a934e8b70a0c1f58cc59 | 2026-01-04T15:49:43.011919Z | false |
mikel/mail | https://github.com/mikel/mail/blob/d1d65b370b109b98e673a934e8b70a0c1f58cc59/lib/mail/fields/content_disposition_field.rb | lib/mail/fields/content_disposition_field.rb | # encoding: utf-8
# frozen_string_literal: true
module Mail
class ContentDispositionField < NamedStructuredField #:nodoc:
NAME = 'Content-Disposition'
def self.singular?
true
end
def initialize(value = nil, charset = nil)
super ensure_filename_quoted(value), charset
end
def ele... | ruby | MIT | d1d65b370b109b98e673a934e8b70a0c1f58cc59 | 2026-01-04T15:49:43.011919Z | false |
mikel/mail | https://github.com/mikel/mail/blob/d1d65b370b109b98e673a934e8b70a0c1f58cc59/lib/mail/fields/bcc_field.rb | lib/mail/fields/bcc_field.rb | # encoding: utf-8
# frozen_string_literal: true
module Mail
# = Blind Carbon Copy Field
#
# The Bcc field inherits from StructuredField and handles the Bcc: header
# field in the email.
#
# Sending bcc to a mail message will instantiate a Mail::Field object that
# has a BccField as its field type. This ... | ruby | MIT | d1d65b370b109b98e673a934e8b70a0c1f58cc59 | 2026-01-04T15:49:43.011919Z | false |
mikel/mail | https://github.com/mikel/mail/blob/d1d65b370b109b98e673a934e8b70a0c1f58cc59/lib/mail/fields/comments_field.rb | lib/mail/fields/comments_field.rb | # encoding: utf-8
# frozen_string_literal: true
module Mail
# = Comments Field
#
# The Comments field inherits from UnstructuredField and handles the Comments:
# header field in the email.
#
# Sending comments to a mail message will instantiate a Mail::Field object that
# has a CommentsField as its field... | ruby | MIT | d1d65b370b109b98e673a934e8b70a0c1f58cc59 | 2026-01-04T15:49:43.011919Z | false |
mikel/mail | https://github.com/mikel/mail/blob/d1d65b370b109b98e673a934e8b70a0c1f58cc59/lib/mail/fields/resent_message_id_field.rb | lib/mail/fields/resent_message_id_field.rb | # encoding: utf-8
# frozen_string_literal: true
module Mail
#
# resent-msg-id = "Resent-Message-ID:" msg-id CRLF
class ResentMessageIdField < CommonMessageIdField #:nodoc:
NAME = 'Resent-Message-ID'
end
end
| ruby | MIT | d1d65b370b109b98e673a934e8b70a0c1f58cc59 | 2026-01-04T15:49:43.011919Z | false |
mikel/mail | https://github.com/mikel/mail/blob/d1d65b370b109b98e673a934e8b70a0c1f58cc59/lib/mail/fields/optional_field.rb | lib/mail/fields/optional_field.rb | # encoding: utf-8
# frozen_string_literal: true
module Mail
# The field names of any optional-field MUST NOT be identical to any
# field name specified elsewhere in this standard.
#
# optional-field = field-name ":" unstructured CRLF
class OptionalField < UnstructuredField #:nodoc:
private
d... | ruby | MIT | d1d65b370b109b98e673a934e8b70a0c1f58cc59 | 2026-01-04T15:49:43.011919Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/padrino_test/app/app.rb | fixtures/padrino_test/app/app.rb | class PadrinoTest < Padrino::Application
register Padrino::Rendering
register Padrino::Mailer
register Padrino::Helpers
enable :sessions
##
# Application configuration options
#
# set :raise_errors, true # Raise exceptions (will stop application) (default for test)
# set :dump_errors, true ... | ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/padrino_test/app/helpers/posts_helper.rb | fixtures/padrino_test/app/helpers/posts_helper.rb | # Helper methods defined here can be accessed in any controller or view in the application
PadrinoTest.helpers do
# def simple_helper_method
# ...
# end
end
| ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/padrino_test/app/helpers/users_helper.rb | fixtures/padrino_test/app/helpers/users_helper.rb | # Helper methods defined here can be accessed in any controller or view in the application
PadrinoTest.helpers do
# def simple_helper_method
# ...
# end
end
| ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/padrino_test/app/controllers/users.rb | fixtures/padrino_test/app/controllers/users.rb | PadrinoTest.controllers :users do
get :index do
@users = User.order("username ASC")
render "users/index"
end
get :show, :map => "/users", :with => :id do
@user = User.find(params[:id])
render "users/show"
end
end
| ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/padrino_test/app/controllers/posts.rb | fixtures/padrino_test/app/controllers/posts.rb | PadrinoTest.controllers :posts do
get :index do
@posts = Post.order("id ASC")
render "posts/index"
end
get :show, :map => "/posts", :with => :id do
@post = Post.find(params[:id])
render "posts/show"
end
end
| ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/padrino_test/db/schema.rb | fixtures/padrino_test/db/schema.rb | # encoding: UTF-8
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative sou... | ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/padrino_test/test/test_config.rb | fixtures/padrino_test/test/test_config.rb | # Load Silence Functionality
require File.expand_path(File.dirname(__FILE__) + "/../../../test/silence.rb")
silence_warnings do
PADRINO_ENV = 'test' unless defined?(PADRINO_ENV)
require File.expand_path(File.dirname(__FILE__) + "/../config/boot")
silence_stream(STDOUT) { ActiveRecord::Migrator.up('db/migrate') }... | ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/padrino_test/test/app/controllers/posts_controller_test.rb | fixtures/padrino_test/test/app/controllers/posts_controller_test.rb | # frozen_string_literal: true
# Lives in <rabl>/test/integration/posts_controller_test.rb
# Symlinked to fixture applications
begin # Padrino
require File.expand_path(File.dirname(__FILE__) + '/../../test_config.rb')
rescue LoadError # Rails
require File.expand_path(File.dirname(__FILE__) + '/../test_helper.rb')
... | ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/padrino_test/test/app/controllers/users_controller_test.rb | fixtures/padrino_test/test/app/controllers/users_controller_test.rb | # frozen_string_literal: true
# Lives in <rabl>/test/integration/users_controller_test.rb
# Symlinked to fixture applications
begin # Sinatra
require File.expand_path(File.dirname(__FILE__) + '/../../test_config.rb')
rescue LoadError # Rails
require File.expand_path(File.dirname(__FILE__) + '/../test_helper.rb')
... | ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/padrino_test/config/apps.rb | fixtures/padrino_test/config/apps.rb | ##
# This file mounts each app in the Padrino project to a specified sub-uri.
# You can mount additional applications using any of these commands below:
#
# Padrino.mount("blog").to('/blog')
# Padrino.mount("blog", :app_class => "BlogApp").to('/blog')
# Padrino.mount("blog", :app_file => "path/to/blog/app.rb").t... | ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/padrino_test/config/boot.rb | fixtures/padrino_test/config/boot.rb | # Defines our constants
PADRINO_ENV = ENV["PADRINO_ENV"] ||= ENV["RACK_ENV"] ||= "development" unless defined?(PADRINO_ENV)
PADRINO_ROOT = File.expand_path('../..', __FILE__) unless defined?(PADRINO_ROOT)
# Load our dependencies
require 'rubygems' unless defined?(Gem)
require 'bundler/setup'
Bundler.require(:default... | ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/padrino_test/config/database.rb | fixtures/padrino_test/config/database.rb | ##
# You can use other adapters like:
#
# ActiveRecord::Base.configurations[:development] = {
# :adapter => 'mysql',
# :encoding => 'utf8',
# :reconnect => true,
# :database => 'your_database',
# :pool => 5,
# :username => 'root',
# :password => '',
# :host => 'localhos... | ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/ashared/controllers_rails_5/posts_controller.rb | fixtures/ashared/controllers_rails_5/posts_controller.rb | class PostsController < ApplicationController
respond_to :json, :xml, :html, :rabl_test_v1
def index
@posts = Post.order('id ASC').load
end
def show
@post = Post.find(params[:id])
end
def renderer
post = Post.find(params[:id])
render json: Rabl.render(post, 'posts/renderer', view_path: '... | ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/ashared/controllers_rails_5/users_controller.rb | fixtures/ashared/controllers_rails_5/users_controller.rb | class UsersController < ApplicationController
respond_to :json
def index
@users = User.order('username ASC').load
end
def show
@user = User.find(params[:id])
end
end
| ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/ashared/helpers/application_helper.rb | fixtures/ashared/helpers/application_helper.rb | module ApplicationHelper
def helper_foo
"BAR!"
end
end
| ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/ashared/models/post.rb | fixtures/ashared/models/post.rb | class Post < ActiveRecord::Base
belongs_to :user
end
| ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/ashared/models/phone_number.rb | fixtures/ashared/models/phone_number.rb | class PhoneNumber < ActiveRecord::Base
belongs_to :user
def formatted
"(#{self.area_code}) #{self.prefix}-#{self.suffix}"
end
end
| ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/ashared/models/user.rb | fixtures/ashared/models/user.rb | class User < ActiveRecord::Base
has_many :phone_numbers
end
| ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/ashared/migrate/20111002092016_create_users.rb | fixtures/ashared/migrate/20111002092016_create_users.rb | class CreateUsers < ActiveRecord::Migration
def self.up
create_table :users do |t|
t.string :username
t.string :email
t.string :location
t.boolean :is_admin
t.timestamps
end
end
def self.down
drop_table :users
end
end
| ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/ashared/migrate/20111002092019_create_posts.rb | fixtures/ashared/migrate/20111002092019_create_posts.rb | class CreatePosts < ActiveRecord::Migration
def self.up
create_table :posts do |t|
t.integer :user_id
t.string :title
t.text :body
t.timestamps
end
end
def self.down
drop_table :posts
end
end
| ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/ashared/migrate/20111002092024_create_phone_numbers.rb | fixtures/ashared/migrate/20111002092024_create_phone_numbers.rb | class CreatePhoneNumbers < ActiveRecord::Migration
def self.up
create_table :phone_numbers do |t|
t.integer :user_id
t.boolean :is_primary
t.string :area_code
t.string :prefix
t.string :suffix
t.string :name
end
end
def self.down
drop_table :phone_numbers
end
end... | ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/sinatra_test/app.rb | fixtures/sinatra_test/app.rb | require 'rubygems'
require 'sinatra'
require 'rabl'
require 'active_support/core_ext'
require 'active_support/inflector'
require 'active_record'
require 'builder'
ActiveRecord::Base.establish_connection(
:adapter => 'sqlite3',
:database => ':memory:'
)
Dir[File.dirname(__FILE__) + "/models/*.rb"].each do |file|
... | ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/sinatra_test/test/test_helper.rb | fixtures/sinatra_test/test/test_helper.rb | # Load Silence Functionality
require File.expand_path(File.dirname(__FILE__) + "/../../../test/silence.rb")
silence_warnings do
PADRINO_ENV = 'test' unless defined?(PADRINO_ENV)
require 'bundler'
Bundler.require
require File.expand_path(File.dirname(__FILE__) + "/../app.rb")
silence_stream(STDOUT) { ActiveRe... | ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/sinatra_test/test/functional/posts_controller_test.rb | fixtures/sinatra_test/test/functional/posts_controller_test.rb | # frozen_string_literal: true
# Lives in <rabl>/test/integration/posts_controller_test.rb
# Symlinked to fixture applications
begin # Padrino
require File.expand_path(File.dirname(__FILE__) + '/../../test_config.rb')
rescue LoadError # Rails
require File.expand_path(File.dirname(__FILE__) + '/../test_helper.rb')
... | ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/sinatra_test/test/functional/users_controller_test.rb | fixtures/sinatra_test/test/functional/users_controller_test.rb | # frozen_string_literal: true
# Lives in <rabl>/test/integration/users_controller_test.rb
# Symlinked to fixture applications
begin # Sinatra
require File.expand_path(File.dirname(__FILE__) + '/../../test_config.rb')
rescue LoadError # Rails
require File.expand_path(File.dirname(__FILE__) + '/../test_helper.rb')
... | ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/rails5/app/jobs/application_job.rb | fixtures/rails5/app/jobs/application_job.rb | class ApplicationJob < ActiveJob::Base
end
| ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/rails5/app/controllers/posts_controller.rb | fixtures/rails5/app/controllers/posts_controller.rb | class PostsController < ApplicationController
respond_to :json, :xml, :html, :rabl_test_v1
def index
@posts = Post.order('id ASC').load
end
def show
@post = Post.find(params[:id])
end
def renderer
post = Post.find(params[:id])
render json: Rabl.render(post, 'posts/renderer', view_path: '... | ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/rails5/app/controllers/users_controller.rb | fixtures/rails5/app/controllers/users_controller.rb | class UsersController < ApplicationController
respond_to :json
def index
@users = User.order('username ASC').load
end
def show
@user = User.find(params[:id])
end
end
| ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/rails5/app/controllers/application_controller.rb | fixtures/rails5/app/controllers/application_controller.rb | class ApplicationController < ActionController::Base
protect_from_forgery with: :exception
end
| ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/rails5/app/mailers/application_mailer.rb | fixtures/rails5/app/mailers/application_mailer.rb | class ApplicationMailer < ActionMailer::Base
default from: 'from@example.com'
layout 'mailer'
end
| ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/rails5/app/channels/application_cable/channel.rb | fixtures/rails5/app/channels/application_cable/channel.rb | module ApplicationCable
class Channel < ActionCable::Channel::Base
end
end
| ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/rails5/app/channels/application_cable/connection.rb | fixtures/rails5/app/channels/application_cable/connection.rb | module ApplicationCable
class Connection < ActionCable::Connection::Base
end
end
| ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/rails5/db/seeds.rb | fixtures/rails5/db/seeds.rb | # This file should contain all the record creation needed to seed the database with its default values.
# The data can then be loaded with the rails db:seed command (or created alongside the database with db:setup).
#
# Examples:
#
# movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }])
# Ch... | ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/rails5/db/schema.rb | fixtures/rails5/db/schema.rb | # This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative source for your
# dat... | ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/rails5/test/test_helper.rb | fixtures/rails5/test/test_helper.rb | # Load Silence Functionality
require File.expand_path(File.dirname(__FILE__) + "/../../../test/silence.rb")
# Load Environment
silence_warnings do
ENV["RAILS_ENV"] = "test"
require File.expand_path('../../config/environment', __FILE__)
require 'rails/test_help'
end
# Load Riot Test Environment
require File.expa... | ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/rails5/test/functional/posts_controller_test.rb | fixtures/rails5/test/functional/posts_controller_test.rb | # frozen_string_literal: true
# Lives in <rabl>/test/integration/posts_controller_test.rb
# Symlinked to fixture applications
begin # Padrino
require File.expand_path(File.dirname(__FILE__) + '/../../test_config.rb')
rescue LoadError # Rails
require File.expand_path(File.dirname(__FILE__) + '/../test_helper.rb')
... | ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/rails5/test/functional/users_controller_test.rb | fixtures/rails5/test/functional/users_controller_test.rb | # frozen_string_literal: true
# Lives in <rabl>/test/integration/users_controller_test.rb
# Symlinked to fixture applications
begin # Sinatra
require File.expand_path(File.dirname(__FILE__) + '/../../test_config.rb')
rescue LoadError # Rails
require File.expand_path(File.dirname(__FILE__) + '/../test_helper.rb')
... | ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/rails5/config/application.rb | fixtures/rails5/config/application.rb | require_relative 'boot'
require 'rails/all'
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)
module Rails5
class Application < Rails::Application
# Settings in config/environments/* take precedence over those specif... | ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/rails5/config/environment.rb | fixtures/rails5/config/environment.rb | # Load the Rails application.
require_relative 'application'
# Initialize the Rails application.
Rails.application.initialize!
| ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/rails5/config/puma.rb | fixtures/rails5/config/puma.rb | # Puma can serve each request in a thread from an internal thread pool.
# The `threads` method setting takes two numbers a minimum and maximum.
# Any libraries that use thread pools should be configured to match
# the maximum value specified for Puma. Default is set to 5 threads for minimum
# and maximum, this matches ... | ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/rails5/config/routes.rb | fixtures/rails5/config/routes.rb | Rails.application.routes.draw do
resources :users
resources :posts do
member do
get 'renderer'
end
end
end
| ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/rails5/config/spring.rb | fixtures/rails5/config/spring.rb | %w(
.ruby-version
.rbenv-vars
tmp/restart.txt
tmp/caching-dev.txt
).each { |path| Spring.watch(path) }
| ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/rails5/config/boot.rb | fixtures/rails5/config/boot.rb | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
require 'bundler/setup' # Set up gems listed in the Gemfile.
| ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/rails5/config/initializers/filter_parameter_logging.rb | fixtures/rails5/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 | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/rails5/config/initializers/application_controller_renderer.rb | fixtures/rails5/config/initializers/application_controller_renderer.rb | # Be sure to restart your server when you modify this file.
# ApplicationController.renderer.defaults.merge!(
# http_host: 'example.org',
# https: false
# )
| ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/rails5/config/initializers/session_store.rb | fixtures/rails5/config/initializers/session_store.rb | # Be sure to restart your server when you modify this file.
Rails.application.config.session_store :cookie_store, key: '_rails5_session'
| ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/rails5/config/initializers/new_framework_defaults.rb | fixtures/rails5/config/initializers/new_framework_defaults.rb | # Be sure to restart your server when you modify this file.
#
# This file contains migration options to ease your Rails 5.0 upgrade.
#
# Read the Rails 5.0 release notes for more info on each option.
# Enable per-form CSRF tokens. Previous versions had false.
Rails.application.config.action_controller.per_form_csrf_to... | ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/rails5/config/initializers/wrap_parameters.rb | fixtures/rails5/config/initializers/wrap_parameters.rb | # Be sure to restart your server when you modify this file.
# This file contains settings for ActionController::ParamsWrapper which
# is enabled by default.
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
ActiveSupport.on_load(:action_controller) do
wrap_parameters f... | ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/rails5/config/initializers/inflections.rb | fixtures/rails5/config/initializers/inflections.rb | # Be sure to restart your server when you modify this file.
# Add new inflection rules using the following format. Inflections
# are locale specific, and you may define rules for as many different
# locales as you wish. All of these examples are active by default:
# ActiveSupport::Inflector.inflections(:en) do |inflec... | ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/rails5/config/initializers/cookies_serializer.rb | fixtures/rails5/config/initializers/cookies_serializer.rb | # Be sure to restart your server when you modify this file.
# Specify a serializer for the signed and encrypted cookie jars.
# Valid options are :json, :marshal, and :hybrid.
Rails.application.config.action_dispatch.cookies_serializer = :json
| ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/rails5/config/initializers/assets.rb | fixtures/rails5/config/initializers/assets.rb | # 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_path
# Precompile additional ... | ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/rails5/config/initializers/backtrace_silencers.rb | fixtures/rails5/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 | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/rails5/config/initializers/mime_types.rb | fixtures/rails5/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
Mime::Type.register 'application/vnd.rabl-test_v1+json', :rabl_test_v1
| ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/rails5/config/environments/test.rb | fixtures/rails5/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 suit... | ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/rails5/config/environments/development.rb | fixtures/rails5/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 serv... | ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/rails5/config/environments/production.rb | fixtures/rails5/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 serve... | ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/rails5_api/app/jobs/application_job.rb | fixtures/rails5_api/app/jobs/application_job.rb | class ApplicationJob < ActiveJob::Base
end
| ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/rails5_api/app/controllers/posts_controller.rb | fixtures/rails5_api/app/controllers/posts_controller.rb | class PostsController < ApplicationController
respond_to :json, :xml, :html, :rabl_test_v1
def index
@posts = Post.order('id ASC').load
end
def show
@post = Post.find(params[:id])
end
def renderer
post = Post.find(params[:id])
render json: Rabl.render(post, 'posts/renderer', view_path: '... | ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/rails5_api/app/controllers/users_controller.rb | fixtures/rails5_api/app/controllers/users_controller.rb | class UsersController < ApplicationController
respond_to :json
def index
@users = User.order('username ASC').load
end
def show
@user = User.find(params[:id])
end
end
| ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/rails5_api/app/controllers/application_controller.rb | fixtures/rails5_api/app/controllers/application_controller.rb | class ApplicationController < ActionController::API
end
| ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/rails5_api/app/mailers/application_mailer.rb | fixtures/rails5_api/app/mailers/application_mailer.rb | class ApplicationMailer < ActionMailer::Base
default from: 'from@example.com'
layout 'mailer'
end
| ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/rails5_api/app/channels/application_cable/channel.rb | fixtures/rails5_api/app/channels/application_cable/channel.rb | module ApplicationCable
class Channel < ActionCable::Channel::Base
end
end
| ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/rails5_api/app/channels/application_cable/connection.rb | fixtures/rails5_api/app/channels/application_cable/connection.rb | module ApplicationCable
class Connection < ActionCable::Connection::Base
end
end
| ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/rails5_api/db/seeds.rb | fixtures/rails5_api/db/seeds.rb | # This file should contain all the record creation needed to seed the database with its default values.
# The data can then be loaded with the rails db:seed command (or created alongside the database with db:setup).
#
# Examples:
#
# movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }])
# Ch... | ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/rails5_api/db/schema.rb | fixtures/rails5_api/db/schema.rb | # This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative source for your
# dat... | ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
nesquena/rabl | https://github.com/nesquena/rabl/blob/2a19185fcc63dbeeeb8e51192e6086c31aeba749/fixtures/rails5_api/test/test_helper.rb | fixtures/rails5_api/test/test_helper.rb | # Load Silence Functionality
require File.expand_path(File.dirname(__FILE__) + "/../../../test/silence.rb")
# Load Environment
silence_warnings do
ENV["RAILS_ENV"] = "test"
require File.expand_path('../../config/environment', __FILE__)
require 'rails/test_help'
end
# Load Riot Test Environment
require File.expa... | ruby | MIT | 2a19185fcc63dbeeeb8e51192e6086c31aeba749 | 2026-01-04T15:49:51.900070Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.