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
HubSpot/hubspot-api-ruby
https://github.com/HubSpot/hubspot-api-ruby/blob/75a9afa65e9789fbe6ff711066d798ca0c10f432/lib/hubspot/codegen/automation/actions/models/public_action_definition_input_field_dependencies_inner.rb
lib/hubspot/codegen/automation/actions/models/public_action_definition_input_field_dependencies_inner.rb
=begin #Automation Actions V4 #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) The version of the OpenAPI document: v4 Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.2.1 =end require 'date' require 'time' module Hubspot module...
ruby
Apache-2.0
75a9afa65e9789fbe6ff711066d798ca0c10f432
2026-01-04T17:55:03.682567Z
false
HubSpot/hubspot-api-ruby
https://github.com/HubSpot/hubspot-api-ruby/blob/75a9afa65e9789fbe6ff711066d798ca0c10f432/lib/hubspot/codegen/automation/actions/models/public_action_revision.rb
lib/hubspot/codegen/automation/actions/models/public_action_revision.rb
=begin #Automation Actions V4 #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) The version of the OpenAPI document: v4 Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.2.1 =end require 'date' require 'time' module Hubspot module...
ruby
Apache-2.0
75a9afa65e9789fbe6ff711066d798ca0c10f432
2026-01-04T17:55:03.682567Z
false
HubSpot/hubspot-api-ruby
https://github.com/HubSpot/hubspot-api-ruby/blob/75a9afa65e9789fbe6ff711066d798ca0c10f432/lib/hubspot/codegen/automation/actions/models/public_object_request_options.rb
lib/hubspot/codegen/automation/actions/models/public_object_request_options.rb
=begin #Automation Actions V4 #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) The version of the OpenAPI document: v4 Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.2.1 =end require 'date' require 'time' module Hubspot module...
ruby
Apache-2.0
75a9afa65e9789fbe6ff711066d798ca0c10f432
2026-01-04T17:55:03.682567Z
false
HubSpot/hubspot-api-ruby
https://github.com/HubSpot/hubspot-api-ruby/blob/75a9afa65e9789fbe6ff711066d798ca0c10f432/lib/hubspot/codegen/automation/actions/models/error_detail.rb
lib/hubspot/codegen/automation/actions/models/error_detail.rb
=begin #Automation Actions V4 #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) The version of the OpenAPI document: v4 Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.2.1 =end require 'date' require 'time' module Hubspot module...
ruby
Apache-2.0
75a9afa65e9789fbe6ff711066d798ca0c10f432
2026-01-04T17:55:03.682567Z
false
HubSpot/hubspot-api-ruby
https://github.com/HubSpot/hubspot-api-ruby/blob/75a9afa65e9789fbe6ff711066d798ca0c10f432/lib/hubspot/codegen/automation/actions/models/callback_completion_request.rb
lib/hubspot/codegen/automation/actions/models/callback_completion_request.rb
=begin #Automation Actions V4 #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) The version of the OpenAPI document: v4 Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.2.1 =end require 'date' require 'time' module Hubspot module...
ruby
Apache-2.0
75a9afa65e9789fbe6ff711066d798ca0c10f432
2026-01-04T17:55:03.682567Z
false
HubSpot/hubspot-api-ruby
https://github.com/HubSpot/hubspot-api-ruby/blob/75a9afa65e9789fbe6ff711066d798ca0c10f432/lib/hubspot/codegen/automation/actions/models/collection_response_public_action_definition_forward_paging.rb
lib/hubspot/codegen/automation/actions/models/collection_response_public_action_definition_forward_paging.rb
=begin #Automation Actions V4 #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) The version of the OpenAPI document: v4 Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.2.1 =end require 'date' require 'time' module Hubspot module...
ruby
Apache-2.0
75a9afa65e9789fbe6ff711066d798ca0c10f432
2026-01-04T17:55:03.682567Z
false
HubSpot/hubspot-api-ruby
https://github.com/HubSpot/hubspot-api-ruby/blob/75a9afa65e9789fbe6ff711066d798ca0c10f432/lib/hubspot/codegen/automation/actions/models/field_type_definition.rb
lib/hubspot/codegen/automation/actions/models/field_type_definition.rb
=begin #Automation Actions V4 #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) The version of the OpenAPI document: v4 Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.2.1 =end require 'date' require 'time' module Hubspot module...
ruby
Apache-2.0
75a9afa65e9789fbe6ff711066d798ca0c10f432
2026-01-04T17:55:03.682567Z
false
HubSpot/hubspot-api-ruby
https://github.com/HubSpot/hubspot-api-ruby/blob/75a9afa65e9789fbe6ff711066d798ca0c10f432/lib/hubspot/codegen/automation/actions/models/option.rb
lib/hubspot/codegen/automation/actions/models/option.rb
=begin #Automation Actions V4 #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) The version of the OpenAPI document: v4 Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.2.1 =end require 'date' require 'time' module Hubspot module...
ruby
Apache-2.0
75a9afa65e9789fbe6ff711066d798ca0c10f432
2026-01-04T17:55:03.682567Z
false
HubSpot/hubspot-api-ruby
https://github.com/HubSpot/hubspot-api-ruby/blob/75a9afa65e9789fbe6ff711066d798ca0c10f432/lib/hubspot/codegen/automation/actions/models/public_action_labels.rb
lib/hubspot/codegen/automation/actions/models/public_action_labels.rb
=begin #Automation Actions V4 #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) The version of the OpenAPI document: v4 Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.2.1 =end require 'date' require 'time' module Hubspot module...
ruby
Apache-2.0
75a9afa65e9789fbe6ff711066d798ca0c10f432
2026-01-04T17:55:03.682567Z
false
HubSpot/hubspot-api-ruby
https://github.com/HubSpot/hubspot-api-ruby/blob/75a9afa65e9789fbe6ff711066d798ca0c10f432/lib/hubspot/codegen/automation/actions/models/forward_paging.rb
lib/hubspot/codegen/automation/actions/models/forward_paging.rb
=begin #Automation Actions V4 #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) The version of the OpenAPI document: v4 Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.2.1 =end require 'date' require 'time' module Hubspot module...
ruby
Apache-2.0
75a9afa65e9789fbe6ff711066d798ca0c10f432
2026-01-04T17:55:03.682567Z
false
HubSpot/hubspot-api-ruby
https://github.com/HubSpot/hubspot-api-ruby/blob/75a9afa65e9789fbe6ff711066d798ca0c10f432/lib/hubspot/codegen/automation/actions/models/output_field_definition.rb
lib/hubspot/codegen/automation/actions/models/output_field_definition.rb
=begin #Automation Actions V4 #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) The version of the OpenAPI document: v4 Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.2.1 =end require 'date' require 'time' module Hubspot module...
ruby
Apache-2.0
75a9afa65e9789fbe6ff711066d798ca0c10f432
2026-01-04T17:55:03.682567Z
false
HubSpot/hubspot-api-ruby
https://github.com/HubSpot/hubspot-api-ruby/blob/75a9afa65e9789fbe6ff711066d798ca0c10f432/lib/hubspot/codegen/automation/actions/models/batch_input_callback_completion_batch_request.rb
lib/hubspot/codegen/automation/actions/models/batch_input_callback_completion_batch_request.rb
=begin #Automation Actions V4 #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) The version of the OpenAPI document: v4 Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.2.1 =end require 'date' require 'time' module Hubspot module...
ruby
Apache-2.0
75a9afa65e9789fbe6ff711066d798ca0c10f432
2026-01-04T17:55:03.682567Z
false
HubSpot/hubspot-api-ruby
https://github.com/HubSpot/hubspot-api-ruby/blob/75a9afa65e9789fbe6ff711066d798ca0c10f432/lib/hubspot/codegen/automation/actions/models/public_single_field_dependency.rb
lib/hubspot/codegen/automation/actions/models/public_single_field_dependency.rb
=begin #Automation Actions V4 #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) The version of the OpenAPI document: v4 Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.2.1 =end require 'date' require 'time' module Hubspot module...
ruby
Apache-2.0
75a9afa65e9789fbe6ff711066d798ca0c10f432
2026-01-04T17:55:03.682567Z
false
HubSpot/hubspot-api-ruby
https://github.com/HubSpot/hubspot-api-ruby/blob/75a9afa65e9789fbe6ff711066d798ca0c10f432/lib/hubspot/codegen/automation/actions/models/callback_completion_batch_request.rb
lib/hubspot/codegen/automation/actions/models/callback_completion_batch_request.rb
=begin #Automation Actions V4 #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) The version of the OpenAPI document: v4 Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.2.1 =end require 'date' require 'time' module Hubspot module...
ruby
Apache-2.0
75a9afa65e9789fbe6ff711066d798ca0c10f432
2026-01-04T17:55:03.682567Z
false
HubSpot/hubspot-api-ruby
https://github.com/HubSpot/hubspot-api-ruby/blob/75a9afa65e9789fbe6ff711066d798ca0c10f432/lib/hubspot/codegen/automation/actions/models/public_execution_translation_rule.rb
lib/hubspot/codegen/automation/actions/models/public_execution_translation_rule.rb
=begin #Automation Actions V4 #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) The version of the OpenAPI document: v4 Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.2.1 =end require 'date' require 'time' module Hubspot module...
ruby
Apache-2.0
75a9afa65e9789fbe6ff711066d798ca0c10f432
2026-01-04T17:55:03.682567Z
false
HubSpot/hubspot-api-ruby
https://github.com/HubSpot/hubspot-api-ruby/blob/75a9afa65e9789fbe6ff711066d798ca0c10f432/lib/hubspot/codegen/automation/actions/models/input_field_definition.rb
lib/hubspot/codegen/automation/actions/models/input_field_definition.rb
=begin #Automation Actions V4 #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) The version of the OpenAPI document: v4 Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.2.1 =end require 'date' require 'time' module Hubspot module...
ruby
Apache-2.0
75a9afa65e9789fbe6ff711066d798ca0c10f432
2026-01-04T17:55:03.682567Z
false
HubSpot/hubspot-api-ruby
https://github.com/HubSpot/hubspot-api-ruby/blob/75a9afa65e9789fbe6ff711066d798ca0c10f432/lib/hubspot/codegen/automation/actions/models/collection_response_public_action_revision_forward_paging.rb
lib/hubspot/codegen/automation/actions/models/collection_response_public_action_revision_forward_paging.rb
=begin #Automation Actions V4 #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) The version of the OpenAPI document: v4 Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.2.1 =end require 'date' require 'time' module Hubspot module...
ruby
Apache-2.0
75a9afa65e9789fbe6ff711066d798ca0c10f432
2026-01-04T17:55:03.682567Z
false
HubSpot/hubspot-api-ruby
https://github.com/HubSpot/hubspot-api-ruby/blob/75a9afa65e9789fbe6ff711066d798ca0c10f432/lib/hubspot/codegen/automation/actions/models/public_action_function.rb
lib/hubspot/codegen/automation/actions/models/public_action_function.rb
=begin #Automation Actions V4 #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) The version of the OpenAPI document: v4 Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.2.1 =end require 'date' require 'time' module Hubspot module...
ruby
Apache-2.0
75a9afa65e9789fbe6ff711066d798ca0c10f432
2026-01-04T17:55:03.682567Z
false
HubSpot/hubspot-api-ruby
https://github.com/HubSpot/hubspot-api-ruby/blob/75a9afa65e9789fbe6ff711066d798ca0c10f432/lib/hubspot/codegen/automation/actions/models/error.rb
lib/hubspot/codegen/automation/actions/models/error.rb
=begin #Automation Actions V4 #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) The version of the OpenAPI document: v4 Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.2.1 =end require 'date' require 'time' module Hubspot module...
ruby
Apache-2.0
75a9afa65e9789fbe6ff711066d798ca0c10f432
2026-01-04T17:55:03.682567Z
false
HubSpot/hubspot-api-ruby
https://github.com/HubSpot/hubspot-api-ruby/blob/75a9afa65e9789fbe6ff711066d798ca0c10f432/lib/hubspot/codegen/automation/actions/models/public_action_definition_egg.rb
lib/hubspot/codegen/automation/actions/models/public_action_definition_egg.rb
=begin #Automation Actions V4 #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) The version of the OpenAPI document: v4 Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.2.1 =end require 'date' require 'time' module Hubspot module...
ruby
Apache-2.0
75a9afa65e9789fbe6ff711066d798ca0c10f432
2026-01-04T17:55:03.682567Z
false
HubSpot/hubspot-api-ruby
https://github.com/HubSpot/hubspot-api-ruby/blob/75a9afa65e9789fbe6ff711066d798ca0c10f432/lib/hubspot/codegen/automation/actions/api/definitions_api.rb
lib/hubspot/codegen/automation/actions/api/definitions_api.rb
=begin #Automation Actions V4 #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) The version of the OpenAPI document: v4 Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.2.1 =end require 'cgi' module Hubspot module Automation ...
ruby
Apache-2.0
75a9afa65e9789fbe6ff711066d798ca0c10f432
2026-01-04T17:55:03.682567Z
false
HubSpot/hubspot-api-ruby
https://github.com/HubSpot/hubspot-api-ruby/blob/75a9afa65e9789fbe6ff711066d798ca0c10f432/lib/hubspot/codegen/automation/actions/api/functions_api.rb
lib/hubspot/codegen/automation/actions/api/functions_api.rb
=begin #Automation Actions V4 #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) The version of the OpenAPI document: v4 Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.2.1 =end require 'cgi' module Hubspot module Automation ...
ruby
Apache-2.0
75a9afa65e9789fbe6ff711066d798ca0c10f432
2026-01-04T17:55:03.682567Z
false
HubSpot/hubspot-api-ruby
https://github.com/HubSpot/hubspot-api-ruby/blob/75a9afa65e9789fbe6ff711066d798ca0c10f432/lib/hubspot/codegen/automation/actions/api/revisions_api.rb
lib/hubspot/codegen/automation/actions/api/revisions_api.rb
=begin #Automation Actions V4 #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) The version of the OpenAPI document: v4 Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.2.1 =end require 'cgi' module Hubspot module Automation ...
ruby
Apache-2.0
75a9afa65e9789fbe6ff711066d798ca0c10f432
2026-01-04T17:55:03.682567Z
false
HubSpot/hubspot-api-ruby
https://github.com/HubSpot/hubspot-api-ruby/blob/75a9afa65e9789fbe6ff711066d798ca0c10f432/lib/hubspot/codegen/automation/actions/api/callbacks_api.rb
lib/hubspot/codegen/automation/actions/api/callbacks_api.rb
=begin #Automation Actions V4 #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) The version of the OpenAPI document: v4 Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.2.1 =end require 'cgi' module Hubspot module Automation ...
ruby
Apache-2.0
75a9afa65e9789fbe6ff711066d798ca0c10f432
2026-01-04T17:55:03.682567Z
false
HubSpot/hubspot-api-ruby
https://github.com/HubSpot/hubspot-api-ruby/blob/75a9afa65e9789fbe6ff711066d798ca0c10f432/lib/hubspot/helpers/path.rb
lib/hubspot/helpers/path.rb
require_relative 'snake_case' module Hubspot module Helpers class Path def format(module_name) Hubspot::Helpers::SnakeCase.new.format(module_name.to_s) end def require_with_mapping(path) require path end def require_with_codegen_mapping(path) require path ...
ruby
Apache-2.0
75a9afa65e9789fbe6ff711066d798ca0c10f432
2026-01-04T17:55:03.682567Z
false
HubSpot/hubspot-api-ruby
https://github.com/HubSpot/hubspot-api-ruby/blob/75a9afa65e9789fbe6ff711066d798ca0c10f432/lib/hubspot/helpers/get_all_helper.rb
lib/hubspot/helpers/get_all_helper.rb
module Hubspot module Helpers module GetAllHelper MAX_PAGE_SIZE = 100 # List # Read all contacts. Control what is returned via the `properties` query param. # @param [Hash] opts the optional parameters # @option opts [Array<String>] :properties A comma separated list of the propertie...
ruby
Apache-2.0
75a9afa65e9789fbe6ff711066d798ca0c10f432
2026-01-04T17:55:03.682567Z
false
HubSpot/hubspot-api-ruby
https://github.com/HubSpot/hubspot-api-ruby/blob/75a9afa65e9789fbe6ff711066d798ca0c10f432/lib/hubspot/helpers/camel_case.rb
lib/hubspot/helpers/camel_case.rb
module Hubspot module Helpers class CamelCase def format(string) case string when 'public_smtp_tokens_api' 'PublicSMTPTokensApi' else string.split('_').collect(&:capitalize).join end end end end end
ruby
Apache-2.0
75a9afa65e9789fbe6ff711066d798ca0c10f432
2026-01-04T17:55:03.682567Z
false
HubSpot/hubspot-api-ruby
https://github.com/HubSpot/hubspot-api-ruby/blob/75a9afa65e9789fbe6ff711066d798ca0c10f432/lib/hubspot/helpers/signature.rb
lib/hubspot/helpers/signature.rb
require 'date' require 'openssl' module Hubspot module Helpers class Signature MAX_ALLOWED_TIMESTAMP = 300_000 def timestamp_valid?(timestamp) return false if timestamp.nil? begin get_current_timestamp_microseconds - timestamp.to_i < MAX_ALLOWED_TIMESTAMP rescue St...
ruby
Apache-2.0
75a9afa65e9789fbe6ff711066d798ca0c10f432
2026-01-04T17:55:03.682567Z
false
HubSpot/hubspot-api-ruby
https://github.com/HubSpot/hubspot-api-ruby/blob/75a9afa65e9789fbe6ff711066d798ca0c10f432/lib/hubspot/helpers/snake_case.rb
lib/hubspot/helpers/snake_case.rb
module Hubspot module Helpers class SnakeCase def format(string) string.gsub('OAuth', 'Oauth'). gsub(/::/, '/'). gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2'). gsub(/([a-z\d])([A-Z])/,'\1_\2'). tr("-", "_"). downcase end end end end
ruby
Apache-2.0
75a9afa65e9789fbe6ff711066d798ca0c10f432
2026-01-04T17:55:03.682567Z
false
HubSpot/hubspot-api-ruby
https://github.com/HubSpot/hubspot-api-ruby/blob/75a9afa65e9789fbe6ff711066d798ca0c10f432/lib/hubspot/helpers/association_type.rb
lib/hubspot/helpers/association_type.rb
module Hubspot module Helpers class AssociationType PRIMARY_CONTACT_TO_COMPANY = 1 PRIMARY_COMPANY_TO_CONTACT = 2 DEAL_TO_CONTACT = 3 CONTACT_TO_DEAL = 4 PRIMARY_DEAL_TO_COMPANY = 5 PRIMARY_COMPANY_TO_DEAL = 6 PARENT_TO_CHILD_COMPANY = 13 CHILD_TO_PARENT_COMPANY = 1...
ruby
Apache-2.0
75a9afa65e9789fbe6ff711066d798ca0c10f432
2026-01-04T17:55:03.682567Z
false
HubSpot/hubspot-api-ruby
https://github.com/HubSpot/hubspot-api-ruby/blob/75a9afa65e9789fbe6ff711066d798ca0c10f432/lib/hubspot/helpers/requests/http_auth.rb
lib/hubspot/helpers/requests/http_auth.rb
module Hubspot module Helpers class Auth def self.get_auth_types [:access_token, :api_key] end def self.has_auth_value?(source, key) !source[key].nil? && !source[key].to_s.empty? end def self.choose_auth(config, options) auth_types = get_auth_types a...
ruby
Apache-2.0
75a9afa65e9789fbe6ff711066d798ca0c10f432
2026-01-04T17:55:03.682567Z
false
HubSpot/hubspot-api-ruby
https://github.com/HubSpot/hubspot-api-ruby/blob/75a9afa65e9789fbe6ff711066d798ca0c10f432/lib/hubspot/helpers/requests/http_request_builder.rb
lib/hubspot/helpers/requests/http_request_builder.rb
require 'net/http' require 'uri' require 'json' require 'openssl' require_relative 'http_auth' module Hubspot module Helpers class Request attr_reader :url, :method, :headers, :body def initialize(config, options = {}) @config = config || {} @options = options || {} @base_ur...
ruby
Apache-2.0
75a9afa65e9789fbe6ff711066d798ca0c10f432
2026-01-04T17:55:03.682567Z
false
jesalg/RADD
https://github.com/jesalg/RADD/blob/97a382ef33b8518b0990e14d0c44300bd0b51af2/app/helpers/users_helper.rb
app/helpers/users_helper.rb
module UsersHelper end
ruby
MIT
97a382ef33b8518b0990e14d0c44300bd0b51af2
2026-01-04T17:55:25.451414Z
false
jesalg/RADD
https://github.com/jesalg/RADD/blob/97a382ef33b8518b0990e14d0c44300bd0b51af2/app/helpers/application_helper.rb
app/helpers/application_helper.rb
module ApplicationHelper end
ruby
MIT
97a382ef33b8518b0990e14d0c44300bd0b51af2
2026-01-04T17:55:25.451414Z
false
jesalg/RADD
https://github.com/jesalg/RADD/blob/97a382ef33b8518b0990e14d0c44300bd0b51af2/app/helpers/home_helper.rb
app/helpers/home_helper.rb
module HomeHelper end
ruby
MIT
97a382ef33b8518b0990e14d0c44300bd0b51af2
2026-01-04T17:55:25.451414Z
false
jesalg/RADD
https://github.com/jesalg/RADD/blob/97a382ef33b8518b0990e14d0c44300bd0b51af2/app/controllers/home_controller.rb
app/controllers/home_controller.rb
class HomeController < ApplicationController respond_to :html layout "angular" def index end end
ruby
MIT
97a382ef33b8518b0990e14d0c44300bd0b51af2
2026-01-04T17:55:25.451414Z
false
jesalg/RADD
https://github.com/jesalg/RADD/blob/97a382ef33b8518b0990e14d0c44300bd0b51af2/app/controllers/application_controller.rb
app/controllers/application_controller.rb
class ApplicationController < ActionController::Base protect_from_forgery end
ruby
MIT
97a382ef33b8518b0990e14d0c44300bd0b51af2
2026-01-04T17:55:25.451414Z
false
jesalg/RADD
https://github.com/jesalg/RADD/blob/97a382ef33b8518b0990e14d0c44300bd0b51af2/app/controllers/api/v1/record_controller.rb
app/controllers/api/v1/record_controller.rb
class Api::V1::RecordController < Api::V1::BaseController before_filter :authenticate_user! def index respond_with(Record.all) end def show @data = Record.find(params[:id]).to_json() respond_with(@data) end def update @data = Record.find(params[:id]) respond_to do |format| if ...
ruby
MIT
97a382ef33b8518b0990e14d0c44300bd0b51af2
2026-01-04T17:55:25.451414Z
false
jesalg/RADD
https://github.com/jesalg/RADD/blob/97a382ef33b8518b0990e14d0c44300bd0b51af2/app/controllers/api/v1/users_controller.rb
app/controllers/api/v1/users_controller.rb
class Api::V1::UsersController < Api::V1::BaseController before_filter :authenticate_user!, :except => [:create, :show] def show render :json => {:info => "Current User", :user => current_user}, :status => 200 end def create @user = User.create(user_params) if @user.valid? sign_in(@user) ...
ruby
MIT
97a382ef33b8518b0990e14d0c44300bd0b51af2
2026-01-04T17:55:25.451414Z
false
jesalg/RADD
https://github.com/jesalg/RADD/blob/97a382ef33b8518b0990e14d0c44300bd0b51af2/app/controllers/api/v1/base_controller.rb
app/controllers/api/v1/base_controller.rb
class Api::V1::BaseController < ActionController::Base # Prevent CSRF attacks by raising an exception. # For APIs, you may want to use :null_session instead. protect_from_forgery with: :null_session, :if => Proc.new { |c| c.request.format == 'application/vnd.radd.v1' } respond_to :json rescue_from Exception...
ruby
MIT
97a382ef33b8518b0990e14d0c44300bd0b51af2
2026-01-04T17:55:25.451414Z
false
jesalg/RADD
https://github.com/jesalg/RADD/blob/97a382ef33b8518b0990e14d0c44300bd0b51af2/app/controllers/api/v1/sessions_controller.rb
app/controllers/api/v1/sessions_controller.rb
class Api::V1::SessionsController < Devise::SessionsController protect_from_forgery with: :null_session, :if => Proc.new { |c| c.request.format == 'application/vnd.radd.v1' } def create warden.authenticate!(:scope => resource_name, :recall => "#{controller_path}#failure") render :status => 200, :json => { ...
ruby
MIT
97a382ef33b8518b0990e14d0c44300bd0b51af2
2026-01-04T17:55:25.451414Z
false
jesalg/RADD
https://github.com/jesalg/RADD/blob/97a382ef33b8518b0990e14d0c44300bd0b51af2/app/models/record.rb
app/models/record.rb
class Record < ActiveRecord::Base end
ruby
MIT
97a382ef33b8518b0990e14d0c44300bd0b51af2
2026-01-04T17:55:25.451414Z
false
jesalg/RADD
https://github.com/jesalg/RADD/blob/97a382ef33b8518b0990e14d0c44300bd0b51af2/app/models/user.rb
app/models/user.rb
class User < ActiveRecord::Base # Include default devise modules. Others available are: # :token_authenticatable, :confirmable, # :lockable, :timeoutable and :omniauthable devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable end
ruby
MIT
97a382ef33b8518b0990e14d0c44300bd0b51af2
2026-01-04T17:55:25.451414Z
false
jesalg/RADD
https://github.com/jesalg/RADD/blob/97a382ef33b8518b0990e14d0c44300bd0b51af2/db/seeds.rb
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 rake db:seed (or created alongside the db with db:setup). # # Examples: # # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }]) # Mayor.create(name: 'Emanuel...
ruby
MIT
97a382ef33b8518b0990e14d0c44300bd0b51af2
2026-01-04T17:55:25.451414Z
false
jesalg/RADD
https://github.com/jesalg/RADD/blob/97a382ef33b8518b0990e14d0c44300bd0b51af2/db/schema.rb
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
97a382ef33b8518b0990e14d0c44300bd0b51af2
2026-01-04T17:55:25.451414Z
false
jesalg/RADD
https://github.com/jesalg/RADD/blob/97a382ef33b8518b0990e14d0c44300bd0b51af2/db/migrate/20131108124450_create_records.rb
db/migrate/20131108124450_create_records.rb
class CreateRecords < ActiveRecord::Migration def change create_table :records do |t| t.string :data t.timestamps end end end
ruby
MIT
97a382ef33b8518b0990e14d0c44300bd0b51af2
2026-01-04T17:55:25.451414Z
false
jesalg/RADD
https://github.com/jesalg/RADD/blob/97a382ef33b8518b0990e14d0c44300bd0b51af2/db/migrate/20120920193543_devise_create_users.rb
db/migrate/20120920193543_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_to...
ruby
MIT
97a382ef33b8518b0990e14d0c44300bd0b51af2
2026-01-04T17:55:25.451414Z
false
jesalg/RADD
https://github.com/jesalg/RADD/blob/97a382ef33b8518b0990e14d0c44300bd0b51af2/spec/spec_helper.rb
spec/spec_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 'rspec/rails' require 'rspec/autorun' # Requires supporting ruby files with custom matchers and macros, etc, # in spec/support/ and its subdirect...
ruby
MIT
97a382ef33b8518b0990e14d0c44300bd0b51af2
2026-01-04T17:55:25.451414Z
false
jesalg/RADD
https://github.com/jesalg/RADD/blob/97a382ef33b8518b0990e14d0c44300bd0b51af2/spec/support/api_helper.rb
spec/support/api_helper.rb
module ApiHelper include Rack::Test::Methods def app Rails.application end end RSpec.configure do |c| c.include ApiHelper, :type => :api end
ruby
MIT
97a382ef33b8518b0990e14d0c44300bd0b51af2
2026-01-04T17:55:25.451414Z
false
jesalg/RADD
https://github.com/jesalg/RADD/blob/97a382ef33b8518b0990e14d0c44300bd0b51af2/spec/support/request_helper.rb
spec/support/request_helper.rb
module Requests module JsonHelpers def json @json ||= JSON.parse(response.body) end end end
ruby
MIT
97a382ef33b8518b0990e14d0c44300bd0b51af2
2026-01-04T17:55:25.451414Z
false
jesalg/RADD
https://github.com/jesalg/RADD/blob/97a382ef33b8518b0990e14d0c44300bd0b51af2/spec/factories/users.rb
spec/factories/users.rb
require 'faker' FactoryGirl.define do factory :user do |u| sequence(:email) { |n| "user#{n}_#{Time.now.to_i}@example.com" } password "password" password_confirmation "password" end end
ruby
MIT
97a382ef33b8518b0990e14d0c44300bd0b51af2
2026-01-04T17:55:25.451414Z
false
jesalg/RADD
https://github.com/jesalg/RADD/blob/97a382ef33b8518b0990e14d0c44300bd0b51af2/spec/models/user_spec.rb
spec/models/user_spec.rb
require 'spec_helper' describe User do it "has a valid factory" do expect(build(:user)).to be_valid end let(:user) { create(:user) } describe "ActiveModel validations" do context "Basic validations" do it { should validate_presence_of :email } it { should validate_uniqueness_of :email } ...
ruby
MIT
97a382ef33b8518b0990e14d0c44300bd0b51af2
2026-01-04T17:55:25.451414Z
false
jesalg/RADD
https://github.com/jesalg/RADD/blob/97a382ef33b8518b0990e14d0c44300bd0b51af2/spec/acceptance/api/v1/users_spec.rb
spec/acceptance/api/v1/users_spec.rb
require 'spec_helper' require 'rspec_api_documentation/dsl' resource 'User' do header "Accept", "application/vnd.radd.v1" let(:user) { create(:user) } get "/api/users" do include Warden::Test::Helpers before (:each) do login_as user, scope: :user end example_request "Show current user" ...
ruby
MIT
97a382ef33b8518b0990e14d0c44300bd0b51af2
2026-01-04T17:55:25.451414Z
false
jesalg/RADD
https://github.com/jesalg/RADD/blob/97a382ef33b8518b0990e14d0c44300bd0b51af2/spec/acceptance/api/v1/sessions_spec.rb
spec/acceptance/api/v1/sessions_spec.rb
require 'spec_helper' require 'rspec_api_documentation/dsl' resource 'Session' do header "Accept", "application/vnd.radd.v1" let!(:user) { create(:user) } post "/api/sessions" do parameter :email, "Email", :required => true, :scope => :user parameter :password, "Password", :required => true, :scope => ...
ruby
MIT
97a382ef33b8518b0990e14d0c44300bd0b51af2
2026-01-04T17:55:25.451414Z
false
jesalg/RADD
https://github.com/jesalg/RADD/blob/97a382ef33b8518b0990e14d0c44300bd0b51af2/lib/api_constraints.rb
lib/api_constraints.rb
class ApiConstraints def initialize(options) @version = options[:version] @default = options[:default] end def matches?(req) @default || req.headers['Accept'].include?("application/vnd.radd.v#{@version}") end end
ruby
MIT
97a382ef33b8518b0990e14d0c44300bd0b51af2
2026-01-04T17:55:25.451414Z
false
jesalg/RADD
https://github.com/jesalg/RADD/blob/97a382ef33b8518b0990e14d0c44300bd0b51af2/config/application.rb
config/application.rb
require File.expand_path('../boot', __FILE__) require 'rails/all' # Require the gems listed in Gemfile, including any gems # you've limited to :test, :development, or :production. Bundler.require(:default, :assets, Rails.env) module Radd class Application < Rails::Application # Settings in config/environments/...
ruby
MIT
97a382ef33b8518b0990e14d0c44300bd0b51af2
2026-01-04T17:55:25.451414Z
false
jesalg/RADD
https://github.com/jesalg/RADD/blob/97a382ef33b8518b0990e14d0c44300bd0b51af2/config/environment.rb
config/environment.rb
# Load the rails application require File.expand_path('../application', __FILE__) # Initialize the rails application Radd::Application.initialize!
ruby
MIT
97a382ef33b8518b0990e14d0c44300bd0b51af2
2026-01-04T17:55:25.451414Z
false
jesalg/RADD
https://github.com/jesalg/RADD/blob/97a382ef33b8518b0990e14d0c44300bd0b51af2/config/routes.rb
config/routes.rb
Radd::Application.routes.draw do # The priority is based upon order of creation: # first created -> highest priority. # Sample of regular route: # match 'products/:id' => 'catalog#view' # Keep in mind you can assign values other than :controller and :action # Sample of named route: # match 'products...
ruby
MIT
97a382ef33b8518b0990e14d0c44300bd0b51af2
2026-01-04T17:55:25.451414Z
false
jesalg/RADD
https://github.com/jesalg/RADD/blob/97a382ef33b8518b0990e14d0c44300bd0b51af2/config/boot.rb
config/boot.rb
require 'rubygems' # Set up gems listed in the Gemfile. ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
ruby
MIT
97a382ef33b8518b0990e14d0c44300bd0b51af2
2026-01-04T17:55:25.451414Z
false
jesalg/RADD
https://github.com/jesalg/RADD/blob/97a382ef33b8518b0990e14d0c44300bd0b51af2/config/initializers/session_store.rb
config/initializers/session_store.rb
# Be sure to restart your server when you modify this file. Radd::Application.config.session_store :cookie_store, key: '_radd_session' # Use the database for sessions instead of the cookie-based default, # which shouldn't be used to store highly confidential information # (create the session table with "rails generat...
ruby
MIT
97a382ef33b8518b0990e14d0c44300bd0b51af2
2026-01-04T17:55:25.451414Z
false
jesalg/RADD
https://github.com/jesalg/RADD/blob/97a382ef33b8518b0990e14d0c44300bd0b51af2/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
MIT
97a382ef33b8518b0990e14d0c44300bd0b51af2
2026-01-04T17:55:25.451414Z
false
jesalg/RADD
https://github.com/jesalg/RADD/blob/97a382ef33b8518b0990e14d0c44300bd0b51af2/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 ...
ruby
MIT
97a382ef33b8518b0990e14d0c44300bd0b51af2
2026-01-04T17:55:25.451414Z
false
jesalg/RADD
https://github.com/jesalg/RADD/blob/97a382ef33b8518b0990e14d0c44300bd0b51af2/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 # (all these examples are active by default): # ActiveSupport::Inflector.inflections do |inflect| # inflect.plural /^(ox)$/i, '\1en' # inflect.singular /^(ox)en/i, '\1' # inflect.irregular 'person', ...
ruby
MIT
97a382ef33b8518b0990e14d0c44300bd0b51af2
2026-01-04T17:55:25.451414Z
false
jesalg/RADD
https://github.com/jesalg/RADD/blob/97a382ef33b8518b0990e14d0c44300bd0b51af2/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
MIT
97a382ef33b8518b0990e14d0c44300bd0b51af2
2026-01-04T17:55:25.451414Z
false
jesalg/RADD
https://github.com/jesalg/RADD/blob/97a382ef33b8518b0990e14d0c44300bd0b51af2/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 # Mime::Type.register_alias "text/html", :iphone
ruby
MIT
97a382ef33b8518b0990e14d0c44300bd0b51af2
2026-01-04T17:55:25.451414Z
false
jesalg/RADD
https://github.com/jesalg/RADD/blob/97a382ef33b8518b0990e14d0c44300bd0b51af2/config/initializers/secret_token.rb
config/initializers/secret_token.rb
# Be sure to restart your server when you modify this file. # Your secret key for verifying the integrity of signed cookies. # If you change this key, all old signed cookies will become invalid! # Make sure the secret is at least 30 characters and all random, # no regular words or you'll be exposed to dictionary attac...
ruby
MIT
97a382ef33b8518b0990e14d0c44300bd0b51af2
2026-01-04T17:55:25.451414Z
false
jesalg/RADD
https://github.com/jesalg/RADD/blob/97a382ef33b8518b0990e14d0c44300bd0b51af2/config/environments/test.rb
config/environments/test.rb
Radd::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
97a382ef33b8518b0990e14d0c44300bd0b51af2
2026-01-04T17:55:25.451414Z
false
jesalg/RADD
https://github.com/jesalg/RADD/blob/97a382ef33b8518b0990e14d0c44300bd0b51af2/config/environments/development.rb
config/environments/development.rb
Radd::Application.configure do # Settings specified here will take precedence over those in config/application.rb. $stdout.sync = true # 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 t...
ruby
MIT
97a382ef33b8518b0990e14d0c44300bd0b51af2
2026-01-04T17:55:25.451414Z
false
jesalg/RADD
https://github.com/jesalg/RADD/blob/97a382ef33b8518b0990e14d0c44300bd0b51af2/config/environments/production.rb
config/environments/production.rb
Radd::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 thread web servers...
ruby
MIT
97a382ef33b8518b0990e14d0c44300bd0b51af2
2026-01-04T17:55:25.451414Z
false
calderalabs/rspec_api_blueprint
https://github.com/calderalabs/rspec_api_blueprint/blob/16d6e69bd65fcc4fe3b856c50962e24d0fb0ea85/lib/rspec_api_blueprint.rb
lib/rspec_api_blueprint.rb
require "rspec_api_blueprint/version" require "rspec_api_blueprint/string_extensions" RSpec.configure do |config| config.before(:suite) do if defined? Rails api_docs_folder_path = File.join(Rails.root, '/api_docs/') else api_docs_folder_path = File.join(File.expand_path('.'), '/api_docs/') e...
ruby
MIT
16d6e69bd65fcc4fe3b856c50962e24d0fb0ea85
2026-01-04T17:55:28.474567Z
false
calderalabs/rspec_api_blueprint
https://github.com/calderalabs/rspec_api_blueprint/blob/16d6e69bd65fcc4fe3b856c50962e24d0fb0ea85/lib/rspec_api_blueprint/version.rb
lib/rspec_api_blueprint/version.rb
module RspecApiBlueprint VERSION = "0.0.8" end
ruby
MIT
16d6e69bd65fcc4fe3b856c50962e24d0fb0ea85
2026-01-04T17:55:28.474567Z
false
calderalabs/rspec_api_blueprint
https://github.com/calderalabs/rspec_api_blueprint/blob/16d6e69bd65fcc4fe3b856c50962e24d0fb0ea85/lib/rspec_api_blueprint/string_extensions.rb
lib/rspec_api_blueprint/string_extensions.rb
unless "".respond_to?(:indent) class String def indent(count, char = ' ') gsub(/([^\n]*)(\n|$)/) do |match| last_iteration = ($1 == "" && $2 == "") line = "" line << (char * count) unless last_iteration line << $1 line << $2 line end end end end
ruby
MIT
16d6e69bd65fcc4fe3b856c50962e24d0fb0ea85
2026-01-04T17:55:28.474567Z
false
amatsuda/string_template
https://github.com/amatsuda/string_template/blob/ce8fff3b6d3679d9362c6c6f83410f5a9a5455a3/benchmark.rb
benchmark.rb
# frozen_string_literal: true require 'benchmark_driver' Benchmark.driver do |x| x.prelude %{ require 'rails' require 'action_view' require 'string_template' StringTemplate::Railtie.run_initializers require 'action_view/base' (view = Class.new(ActionView::Base).new(ActionView::LookupContext...
ruby
MIT
ce8fff3b6d3679d9362c6c6f83410f5a9a5455a3
2026-01-04T17:55:25.805409Z
false
amatsuda/string_template
https://github.com/amatsuda/string_template/blob/ce8fff3b6d3679d9362c6c6f83410f5a9a5455a3/test/string_template_test.rb
test/string_template_test.rb
# frozen_string_literal: true require 'test_helper' class StringTemplateTest < Minitest::Test def setup @view = if ActionView::VERSION::MAJOR >= 6 Class.new(ActionView::Base.with_empty_template_cache).with_view_paths([__dir__]) else Class.new(ActionView::Base).new(ActionView::LookupContext.new(_...
ruby
MIT
ce8fff3b6d3679d9362c6c6f83410f5a9a5455a3
2026-01-04T17:55:25.805409Z
false
amatsuda/string_template
https://github.com/amatsuda/string_template/blob/ce8fff3b6d3679d9362c6c6f83410f5a9a5455a3/test/test_helper.rb
test/test_helper.rb
# frozen_string_literal: true $LOAD_PATH.unshift File.expand_path("../../lib", __FILE__) # require logger before requiring rails, or Rails 6 fails to boot require 'logger' require 'rails' require 'action_view' require "string_template" StringTemplate::Railtie.run_initializers require 'action_view/base' require "mini...
ruby
MIT
ce8fff3b6d3679d9362c6c6f83410f5a9a5455a3
2026-01-04T17:55:25.805409Z
false
amatsuda/string_template
https://github.com/amatsuda/string_template/blob/ce8fff3b6d3679d9362c6c6f83410f5a9a5455a3/lib/string_template.rb
lib/string_template.rb
# frozen_string_literal: true require_relative 'string_template/handler' require_relative 'string_template/railtie'
ruby
MIT
ce8fff3b6d3679d9362c6c6f83410f5a9a5455a3
2026-01-04T17:55:25.805409Z
false
amatsuda/string_template
https://github.com/amatsuda/string_template/blob/ce8fff3b6d3679d9362c6c6f83410f5a9a5455a3/lib/string_template/railtie.rb
lib/string_template/railtie.rb
# frozen_string_literal: true module StringTemplate class Railtie < ::Rails::Railtie initializer 'string_template' do ActiveSupport.on_load :action_view do ActionView::Template.register_template_handler :string, StringTemplate::Handler end end end end
ruby
MIT
ce8fff3b6d3679d9362c6c6f83410f5a9a5455a3
2026-01-04T17:55:25.805409Z
false
amatsuda/string_template
https://github.com/amatsuda/string_template/blob/ce8fff3b6d3679d9362c6c6f83410f5a9a5455a3/lib/string_template/handler.rb
lib/string_template/handler.rb
# frozen_string_literal: true module StringTemplate class Handler def self.call(template, source = nil) "%Q\0#{source || template.source}\0" end def self.handles_encoding? true end end end
ruby
MIT
ce8fff3b6d3679d9362c6c6f83410f5a9a5455a3
2026-01-04T17:55:25.805409Z
false
shlima/translate_enum
https://github.com/shlima/translate_enum/blob/1c24f623b8476dc6eb26bb05f5cbd1266d10c4f0/spec/spec_helper.rb
spec/spec_helper.rb
require 'pry' require 'active_model' require 'action_view' require 'translate_enum' RSpec.configure do |config| config.expect_with :rspec do |expectations| expectations.include_chain_clauses_in_custom_matcher_descriptions = true end config.mock_with :rspec do |mocks| mocks.verify_partial_doubles = true ...
ruby
MIT
1c24f623b8476dc6eb26bb05f5cbd1266d10c4f0
2026-01-04T17:55:30.719325Z
false
shlima/translate_enum
https://github.com/shlima/translate_enum/blob/1c24f623b8476dc6eb26bb05f5cbd1266d10c4f0/spec/translate_enum/action_view_spec.rb
spec/translate_enum/action_view_spec.rb
RSpec.describe ActionView do let(:view) do Class.new do include ActionView::Helpers include ActionView::Context end.new end let(:model) do Class.new do include ActiveModel::Model include TranslateEnum translate_enum :status def self.model_name ActiveModel...
ruby
MIT
1c24f623b8476dc6eb26bb05f5cbd1266d10c4f0
2026-01-04T17:55:30.719325Z
false
shlima/translate_enum
https://github.com/shlima/translate_enum/blob/1c24f623b8476dc6eb26bb05f5cbd1266d10c4f0/spec/translate_enum/translate_enum_spec.rb
spec/translate_enum/translate_enum_spec.rb
RSpec.describe TranslateEnum do let(:model_base) do Class.new do include ActiveModel::Model include TranslateEnum def self.model_name ActiveModel::Name.new(nil, nil, 'model') end def self.genders { male: 0, female: 1 } end def gender @gender ||=...
ruby
MIT
1c24f623b8476dc6eb26bb05f5cbd1266d10c4f0
2026-01-04T17:55:30.719325Z
false
shlima/translate_enum
https://github.com/shlima/translate_enum/blob/1c24f623b8476dc6eb26bb05f5cbd1266d10c4f0/spec/translate_enum/active_record_spec.rb
spec/translate_enum/active_record_spec.rb
RSpec.describe 'ActiveRecord::Base', order: :defined do subject do require 'translate_enum/active_record' end context 'ActiveRecord is undefined' do it 'raises an error' do expect { subject }.to raise_error(NameError) end end context 'ActiveRecord defined' do let(:active_record_class) ...
ruby
MIT
1c24f623b8476dc6eb26bb05f5cbd1266d10c4f0
2026-01-04T17:55:30.719325Z
false
shlima/translate_enum
https://github.com/shlima/translate_enum/blob/1c24f623b8476dc6eb26bb05f5cbd1266d10c4f0/lib/translate_enum.rb
lib/translate_enum.rb
# frozen_string_literal: true require 'active_support/concern' require 'active_support/core_ext/string' require 'translate_enum/version' require 'translate_enum/builder' module TranslateEnum extend ActiveSupport::Concern # include TranslateEnum in ActiveModel or ActiveRecord module ClassMethods # @example ...
ruby
MIT
1c24f623b8476dc6eb26bb05f5cbd1266d10c4f0
2026-01-04T17:55:30.719325Z
false
shlima/translate_enum
https://github.com/shlima/translate_enum/blob/1c24f623b8476dc6eb26bb05f5cbd1266d10c4f0/lib/translate_enum/active_record.rb
lib/translate_enum/active_record.rb
# frozen_string_literal: true # Require this fle in order to be +TranslateEnum+ included in +ActiveRecord::Base+ # @example # require 'translate_enum/active_record' require_relative '../translate_enum' unless defined?(ActiveRecord::Base) raise NameError, 'TranslateEnum requires ActiveRecord be defined but it is n...
ruby
MIT
1c24f623b8476dc6eb26bb05f5cbd1266d10c4f0
2026-01-04T17:55:30.719325Z
false
shlima/translate_enum
https://github.com/shlima/translate_enum/blob/1c24f623b8476dc6eb26bb05f5cbd1266d10c4f0/lib/translate_enum/version.rb
lib/translate_enum/version.rb
# frozen_string_literal: true module TranslateEnum VERSION = '0.2.0' end
ruby
MIT
1c24f623b8476dc6eb26bb05f5cbd1266d10c4f0
2026-01-04T17:55:30.719325Z
false
shlima/translate_enum
https://github.com/shlima/translate_enum/blob/1c24f623b8476dc6eb26bb05f5cbd1266d10c4f0/lib/translate_enum/builder.rb
lib/translate_enum/builder.rb
# frozen_string_literal: true module TranslateEnum class Builder attr_accessor :i18n_scope attr_accessor :i18n_key attr_accessor :enum_instance_method_name attr_accessor :enum_klass_method_name attr_accessor :method_name_singular attr_accessor :method_name_plural attr_reader :model, :a...
ruby
MIT
1c24f623b8476dc6eb26bb05f5cbd1266d10c4f0
2026-01-04T17:55:30.719325Z
false
hashrocket/slurper
https://github.com/hashrocket/slurper/blob/4e31454411387ca638c4667b13614969a3bdc18e/spec/spec_helper.rb
spec/spec_helper.rb
require 'bundler' Bundler.require(:default, :development) # Requires supporting files with custom matchers and macros, etc, # in ./support/ and its subdirectories. Dir[File.expand_path(File.join(File.dirname(__FILE__),'support','**','*.rb'))].each {|f| require f} RSpec.configure do |config| config.mock_with :rspec...
ruby
MIT
4e31454411387ca638c4667b13614969a3bdc18e
2026-01-04T17:55:36.755248Z
false
hashrocket/slurper
https://github.com/hashrocket/slurper/blob/4e31454411387ca638c4667b13614969a3bdc18e/spec/lib/slurper/client_spec.rb
spec/lib/slurper/client_spec.rb
require 'spec_helper' describe Slurper::Client do subject { Slurper::Client } it 'uses the project id in the url' do expect(described_class::CREATE_STORY_URL).to eq "https://www.pivotaltracker.com/services/v5/projects/12345/stories" end describe '#create' do let(:story) { Slurper::Story.new } bef...
ruby
MIT
4e31454411387ca638c4667b13614969a3bdc18e
2026-01-04T17:55:36.755248Z
false
hashrocket/slurper
https://github.com/hashrocket/slurper/blob/4e31454411387ca638c4667b13614969a3bdc18e/spec/lib/slurper/story_spec.rb
spec/lib/slurper/story_spec.rb
require 'spec_helper' describe Slurper::Story do before do allow(Slurper::User).to receive(:collection).and_return( [Slurper::User.new(name: 'Johnny Hashrocket', id: 9)] ) end describe '#to_json' do subject { story.to_json } context 'fully populated' do let(:story) do descr...
ruby
MIT
4e31454411387ca638c4667b13614969a3bdc18e
2026-01-04T17:55:36.755248Z
false
hashrocket/slurper
https://github.com/hashrocket/slurper/blob/4e31454411387ca638c4667b13614969a3bdc18e/spec/lib/slurper/config_spec.rb
spec/lib/slurper/config_spec.rb
require 'spec_helper' describe Slurper::Config do subject { Slurper::Config } it { expect(subject.project_id).to eq 12345 } it { expect(subject.requested_by).to eq 'Johnny Hashrocket' } it { expect(subject.token).to eq '123abc123abc123abc123abc' } end
ruby
MIT
4e31454411387ca638c4667b13614969a3bdc18e
2026-01-04T17:55:36.755248Z
false
hashrocket/slurper
https://github.com/hashrocket/slurper/blob/4e31454411387ca638c4667b13614969a3bdc18e/spec/lib/slurper/engine_spec.rb
spec/lib/slurper/engine_spec.rb
require 'spec_helper' describe Slurper::Engine do subject { engine.stories.first } let(:engine) { described_class.new(File.join(File.dirname(__FILE__), "..", "..", "fixtures", filename)) } context "deals with leading/trailing whitespace" do let(:filename) { 'whitespacey_story.slurper' } it{ expect(subje...
ruby
MIT
4e31454411387ca638c4667b13614969a3bdc18e
2026-01-04T17:55:36.755248Z
false
hashrocket/slurper
https://github.com/hashrocket/slurper/blob/4e31454411387ca638c4667b13614969a3bdc18e/spec/lib/slurper/user_spec.rb
spec/lib/slurper/user_spec.rb
require 'spec_helper' describe Slurper::User do describe '.collection' do before do allow(Slurper::Client).to receive(:users).and_return( [ { "person" => { "id" => 100, "name" => "Emperor Palpatine" } }, { "person" => { "id" => 101, "name" => "Darth Vader" } } ] )...
ruby
MIT
4e31454411387ca638c4667b13614969a3bdc18e
2026-01-04T17:55:36.755248Z
false
hashrocket/slurper
https://github.com/hashrocket/slurper/blob/4e31454411387ca638c4667b13614969a3bdc18e/lib/slurper.rb
lib/slurper.rb
require 'active_support' require 'active_support/core_ext/object' require 'yaml' module Slurper autoload :Client, 'slurper/client' autoload :Config, 'slurper/config' autoload :Engine, 'slurper/engine' autoload :Story, 'slurper/story' autoload :User, 'slurper/user' def self.slurp(story_file, reverse) ...
ruby
MIT
4e31454411387ca638c4667b13614969a3bdc18e
2026-01-04T17:55:36.755248Z
false
hashrocket/slurper
https://github.com/hashrocket/slurper/blob/4e31454411387ca638c4667b13614969a3bdc18e/lib/slurper/story.rb
lib/slurper/story.rb
require 'json' module Slurper class Story attr_accessor :attributes def initialize(attrs={}) self.attributes = (attrs || {}).symbolize_keys if attributes[:owned_by].present? puts "DEPRECATION WARNING: `owned_by` is no longer a supported attribute. Please change to `requested_by`." ...
ruby
MIT
4e31454411387ca638c4667b13614969a3bdc18e
2026-01-04T17:55:36.755248Z
false
hashrocket/slurper
https://github.com/hashrocket/slurper/blob/4e31454411387ca638c4667b13614969a3bdc18e/lib/slurper/client.rb
lib/slurper/client.rb
require 'rest-client' module Slurper class Client CREATE_STORY_URL = "https://www.pivotaltracker.com/services/v5/projects/#{Slurper::Config.project_id}/stories" USERS_URL = "https://www.pivotaltracker.com/services/v5/projects/#{Slurper::Config.project_id}/memberships" def self.create(story) ...
ruby
MIT
4e31454411387ca638c4667b13614969a3bdc18e
2026-01-04T17:55:36.755248Z
false
hashrocket/slurper
https://github.com/hashrocket/slurper/blob/4e31454411387ca638c4667b13614969a3bdc18e/lib/slurper/config.rb
lib/slurper/config.rb
module Slurper class Config def self.project_id; @project_id ||= yaml['project_id'] end def self.requested_by; @requested_by ||= yaml['requested_by'] end def self.token; @token ||= yaml['token'] end private def self.yaml YAML.load_file('slurper_config.yml') end end end
ruby
MIT
4e31454411387ca638c4667b13614969a3bdc18e
2026-01-04T17:55:36.755248Z
false
hashrocket/slurper
https://github.com/hashrocket/slurper/blob/4e31454411387ca638c4667b13614969a3bdc18e/lib/slurper/engine.rb
lib/slurper/engine.rb
module Slurper class Engine < Struct.new(:story_file) def stories @stories ||= YAML.load(yamlize_story_file).map { |attrs| Slurper::Story.new(attrs) } end def process puts "Validating story content" stories.each(&:valid?) puts "Preparing to slurp #{stories.size} stories into Tra...
ruby
MIT
4e31454411387ca638c4667b13614969a3bdc18e
2026-01-04T17:55:36.755248Z
false
hashrocket/slurper
https://github.com/hashrocket/slurper/blob/4e31454411387ca638c4667b13614969a3bdc18e/lib/slurper/user.rb
lib/slurper/user.rb
module Slurper class User attr_accessor :attributes def initialize(attrs={}) self.attributes = (attrs || {}).symbolize_keys end def self.collection @collection ||= Slurper::Client.users.map do |attrs| Slurper::User.new(attrs['person']) end end def self.find_by_name(...
ruby
MIT
4e31454411387ca638c4667b13614969a3bdc18e
2026-01-04T17:55:36.755248Z
false
phatworx/easy_captcha
https://github.com/phatworx/easy_captcha/blob/d3a0281b00bd8fc67caf15a0380e185809f12252/init.rb
init.rb
require 'easy_captcha'
ruby
MIT
d3a0281b00bd8fc67caf15a0380e185809f12252
2026-01-04T17:55:31.126454Z
false
phatworx/easy_captcha
https://github.com/phatworx/easy_captcha/blob/d3a0281b00bd8fc67caf15a0380e185809f12252/spec/espeak_spec.rb
spec/espeak_spec.rb
# encoding: utf-8 require File.expand_path(File.dirname(__FILE__) + '/spec_helper') describe EasyCaptcha::Espeak do context 'check default values' do subject { EasyCaptcha::Espeak.new } its(:amplitude) { (80..120).should include(subject.amplitude) } its(:pitch) { (30..70).should include(subject.pitch) }...
ruby
MIT
d3a0281b00bd8fc67caf15a0380e185809f12252
2026-01-04T17:55:31.126454Z
false