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
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/minitest/assert_respond_to.rb
lib/rubocop/cop/minitest/assert_respond_to.rb
# frozen_string_literal: true module RuboCop module Cop module Minitest # Enforces the use of `assert_respond_to(object, :do_something)` # over `assert(object.respond_to?(:do_something))`. # # @example # # bad # assert(object.respond_to?(:do_something)) # assert(ob...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/minitest/refute_kind_of.rb
lib/rubocop/cop/minitest/refute_kind_of.rb
# frozen_string_literal: true module RuboCop module Cop module Minitest # Enforces the use of `refute_kind_of(Class, object)` # over `refute(object.kind_of?(Class))`. # # @example # # bad # refute(object.kind_of?(Class)) # refute(object.kind_of?(Class), 'message') ...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/minitest/redundant_message_argument.rb
lib/rubocop/cop/minitest/redundant_message_argument.rb
# frozen_string_literal: true module RuboCop module Cop module Minitest # Detects redundant message argument in assertion methods. # The message argument `nil` is redundant because it is the default value. # # @example # # # bad # assert_equal(expected, actual, nil) ...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/minitest/assert_equal.rb
lib/rubocop/cop/minitest/assert_equal.rb
# frozen_string_literal: true module RuboCop module Cop module Minitest # Enforces the use of `assert_equal(expected, actual)` # over `assert(expected == actual)`. # # @example # # bad # assert("rubocop-minitest" == actual) # assert_operator("rubocop-minitest", :==...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/minitest/assert_output.rb
lib/rubocop/cop/minitest/assert_output.rb
# frozen_string_literal: true module RuboCop module Cop module Minitest # Checks for opportunities to use `assert_output`. # # @example # # bad # $stdout = StringIO.new # puts object.method # $stdout.rewind # assert_match expected, $stdout.read # ...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/minitest/assert_includes.rb
lib/rubocop/cop/minitest/assert_includes.rb
# frozen_string_literal: true module RuboCop module Cop module Minitest # Enforces the test to use `assert_includes` # instead of using `assert(collection.include?(object))`. # # @example # # bad # assert(collection.include?(object)) # assert(collection.include?(ob...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/minitest/return_in_test_method.rb
lib/rubocop/cop/minitest/return_in_test_method.rb
# frozen_string_literal: true module RuboCop module Cop module Minitest # Enforces the use of `skip` instead of `return` in test methods. # # @example # # bad # def test_something # return if condition? # assert_equal(42, something) # end # ...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/minitest/test_method_name.rb
lib/rubocop/cop/minitest/test_method_name.rb
# frozen_string_literal: true module RuboCop module Cop module Minitest # Enforces that test method names start with `test_` prefix. # It aims to prevent tests that aren't executed by forgetting to start test method name with `test_`. # # @example # # bad # class FooTest <...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/minitest/empty_line_before_assertion_methods.rb
lib/rubocop/cop/minitest/empty_line_before_assertion_methods.rb
# frozen_string_literal: true module RuboCop module Cop module Minitest # Enforces empty line before assertion methods because it separates assertion phase. # # @example # # # bad # do_something # assert_equal(expected, actual) # # # good # do...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/minitest/refute_path_exists.rb
lib/rubocop/cop/minitest/refute_path_exists.rb
# frozen_string_literal: true module RuboCop module Cop module Minitest # Enforces the test to use `refute_path_exists` instead of using `refute(File.exist?(path))`. # # @example # # bad # refute(File.exist?(path)) # refute(File.exist?(path), 'message') # # ...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/minitest/assert_truthy.rb
lib/rubocop/cop/minitest/assert_truthy.rb
# frozen_string_literal: true module RuboCop module Cop module Minitest # Enforces the test to use `assert(actual)` instead of using `assert_equal(true, actual)`. # # @safety # This cop is unsafe because true might be expected instead of truthy. # False positives cannot be preve...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/minitest/refute_predicate.rb
lib/rubocop/cop/minitest/refute_predicate.rb
# frozen_string_literal: true module RuboCop module Cop module Minitest # Enforces the test to use `refute_predicate` # instead of using `refute(obj.a_predicate_method?)`. # # @example # # bad # refute(obj.one?) # refute(obj.one?, 'message') # # # goo...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/minitest/assert_raises_compound_body.rb
lib/rubocop/cop/minitest/assert_raises_compound_body.rb
# frozen_string_literal: true module RuboCop module Cop module Minitest # Enforces the block body of `assert_raises { ... }` to be reduced to only the raising code. # # @example # # bad # assert_raises(MyError) do # foo # bar # end # # #...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/minitest/assert_same.rb
lib/rubocop/cop/minitest/assert_same.rb
# frozen_string_literal: true module RuboCop module Cop module Minitest # Enforces the use of `assert_same(expected, actual)` # over `assert(expected.equal?(actual))`. # # NOTE: Use `assert_same` only when there is a need to compare by identity. # Otherwise, use `assert_equal`...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/minitest/assert_with_expected_argument.rb
lib/rubocop/cop/minitest/assert_with_expected_argument.rb
# frozen_string_literal: true module RuboCop module Cop module Minitest # Tries to detect when a user accidentally used # `assert` when they meant to use `assert_equal`. # # NOTE: The second argument to the `assert` method named `message` and `msg` is allowed. # Because their ...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/minitest/refute_respond_to.rb
lib/rubocop/cop/minitest/refute_respond_to.rb
# frozen_string_literal: true module RuboCop module Cop module Minitest # Enforces the test to use `refute_respond_to(object, :do_something)` # over `refute(object.respond_to?(:do_something))`. # # @example # # bad # refute(object.respond_to?(:do_something)) # refu...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/minitest/assert_silent.rb
lib/rubocop/cop/minitest/assert_silent.rb
# frozen_string_literal: true module RuboCop module Cop module Minitest # Enforces the test to use `assert_silent { ... }` # instead of using `assert_output('', '') { ... }`. # # @example # # bad # assert_output('', '') { puts object.do_something } # # # good...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/minitest/assert_empty.rb
lib/rubocop/cop/minitest/assert_empty.rb
# frozen_string_literal: true module RuboCop module Cop module Minitest # Enforces the test to use `assert_empty` instead of using `assert(object.empty?)`. # # @example # # bad # assert(object.empty?) # assert(object.empty?, 'message') # # # good # ...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/minitest/assertion_in_lifecycle_hook.rb
lib/rubocop/cop/minitest/assertion_in_lifecycle_hook.rb
# frozen_string_literal: true module RuboCop module Cop module Minitest # Checks for usage of assertions in lifecycle hooks. # # @example # # bad # class FooTest < Minitest::Test # def setup # assert_equal(foo, bar) # end # end # ...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/minitest/refute_false.rb
lib/rubocop/cop/minitest/refute_false.rb
# frozen_string_literal: true module RuboCop module Cop module Minitest # Enforces the use of `refute(object)` over `assert_equal(false, object)`. # # @safety # This cop is unsafe because it cannot detect failure when second argument is `nil`. # False positives cannot be prevent...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/minitest/test_file_name.rb
lib/rubocop/cop/minitest/test_file_name.rb
# frozen_string_literal: true module RuboCop module Cop module Minitest # Checks if test file names start with `test_` or end with `_test.rb`. # Files which define classes having names ending with `Test` are checked. # Not following this convention may result in tests not being run. # ...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/minitest/no_assertions.rb
lib/rubocop/cop/minitest/no_assertions.rb
# frozen_string_literal: true module RuboCop module Cop module Minitest # Checks if test cases contain any assertion calls. # # Matchers such as `must_equal` and `wont_match` are also treated as assertion methods. # # @example # # bad # class FooTest < Minitest::Test...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/minitest/refute_nil.rb
lib/rubocop/cop/minitest/refute_nil.rb
# frozen_string_literal: true module RuboCop module Cop module Minitest # Enforces the test to use `refute_nil` instead of using # `refute_equal(nil, something)`, `refute(something.nil?)`, or `refute_predicate(something, :nil?)`. # # @example # # bad # refute_equal(nil, ac...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/minitest/refute_equal.rb
lib/rubocop/cop/minitest/refute_equal.rb
# frozen_string_literal: true module RuboCop module Cop module Minitest # Enforces the use of `refute_equal(expected, object)` # over `assert(expected != actual)` or `assert(! expected == actual)`. # # @example # # bad # assert("rubocop-minitest" != actual) # refut...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/minitest/assert_nil.rb
lib/rubocop/cop/minitest/assert_nil.rb
# frozen_string_literal: true module RuboCop module Cop module Minitest # Enforces the test to use `assert_nil` instead of using # `assert_equal(nil, something)`, `assert(something.nil?)`, or `assert_predicate(something, :nil?)`. # # @example # # bad # assert_equal(nil, ac...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/minitest/refute_empty.rb
lib/rubocop/cop/minitest/refute_empty.rb
# frozen_string_literal: true module RuboCop module Cop module Minitest # Enforces to use `refute_empty` instead of using `refute(object.empty?)`. # # @example # # bad # refute(object.empty?) # refute(object.empty?, 'message') # # # good # refute_em...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/minitest/non_executable_test_method.rb
lib/rubocop/cop/minitest/non_executable_test_method.rb
# frozen_string_literal: true module RuboCop module Cop module Minitest # Checks for the use of test methods outside of a test class. # # Test methods should be defined within a test class to ensure their execution. # # NOTE: This cop assumes that classes whose superclass name inclu...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/minitest/assert_path_exists.rb
lib/rubocop/cop/minitest/assert_path_exists.rb
# frozen_string_literal: true module RuboCop module Cop module Minitest # Enforces the test to use `assert_path_exists` instead of using `assert(File.exist?(path))`. # # @example # # bad # assert(File.exist?(path)) # assert(File.exist?(path), 'message') # # ...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/minitest/lifecycle_hooks_order.rb
lib/rubocop/cop/minitest/lifecycle_hooks_order.rb
# frozen_string_literal: true module RuboCop module Cop module Minitest # Checks that lifecycle hooks are declared in the order in which they will be executed. # # @example # # bad # class FooTest < Minitest::Test # def teardown; end # def setup; end # ...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/minitest/assert_instance_of.rb
lib/rubocop/cop/minitest/assert_instance_of.rb
# frozen_string_literal: true module RuboCop module Cop module Minitest # Enforces the test to use `assert_instance_of(Class, object)` # over `assert(object.instance_of?(Class))`. # # @example # # bad # assert(object.instance_of?(Class)) # assert(object.instance_of...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/minitest/assert_empty_literal.rb
lib/rubocop/cop/minitest/assert_empty_literal.rb
# frozen_string_literal: true module RuboCop module Cop module Minitest # Enforces the test to use `assert_empty` # instead of using `assert_equal([], object)` or `assert_equal({}, object)`. # # @example # # bad # assert_equal([], object) # assert_equal({}, object)...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/minitest/refute_same.rb
lib/rubocop/cop/minitest/refute_same.rb
# frozen_string_literal: true module RuboCop module Cop module Minitest # Enforces the use of `refute_same(expected, object)` # over `refute(expected.equal?(actual))`. # # NOTE: Use `refute_same` only when there is a need to compare by identity. # Otherwise, use `refute_equal`...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/minitest/focus.rb
lib/rubocop/cop/minitest/focus.rb
# frozen_string_literal: true module RuboCop module Cop module Minitest # Enforces tests are not focused. # # @example # # bad # focus test 'foo' do # end # # # bad # focus # test 'foo' do # end # # # good # tes...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/minitest/unspecified_exception.rb
lib/rubocop/cop/minitest/unspecified_exception.rb
# frozen_string_literal: true module RuboCop module Cop module Minitest # Checks for a specified error in `assert_raises`. # # @example # # bad # assert_raises { raise FooException } # assert_raises('This should have raised') { raise FooException } # # # go...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/minitest/refute_operator.rb
lib/rubocop/cop/minitest/refute_operator.rb
# frozen_string_literal: true module RuboCop module Cop module Minitest # Enforces the use of `refute_operator(expected, :<, actual)` over `refute(expected < actual)`. # # @example # # # bad # refute(expected < actual) # # # good # refute_operator(exp...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/minitest/duplicate_test_run.rb
lib/rubocop/cop/minitest/duplicate_test_run.rb
# frozen_string_literal: true module RuboCop module Cop module Minitest # If a Minitest class inherits from another class, # it will also inherit its methods causing Minitest to run the parent's tests methods twice. # # This cop detects when there are two tests classes, one inherits from ...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/minitest/refute_match.rb
lib/rubocop/cop/minitest/refute_match.rb
# frozen_string_literal: true module RuboCop module Cop module Minitest # Enforces the test to use `refute_match` # instead of using `refute(matcher.match(string))`. # # @example # # bad # refute(matcher.match(string)) # refute(matcher.match?(string)) # ref...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/minitest/refute_instance_of.rb
lib/rubocop/cop/minitest/refute_instance_of.rb
# frozen_string_literal: true module RuboCop module Cop module Minitest # Enforces the use of `refute_instance_of(Class, object)` # over `refute(object.instance_of?(Class))`. # # @example # # bad # refute(object.instance_of?(Class)) # refute(object.instance_of?(Cla...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/minitest/no_test_cases.rb
lib/rubocop/cop/minitest/no_test_cases.rb
# frozen_string_literal: true module RuboCop module Cop module Minitest # Checks if test class contains any test cases. # # @example # # bad # class FooTest < Minitest::Test # def do_something # end # end # # # good # class FooTe...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/mixin/nil_assertion_handleable.rb
lib/rubocop/cop/mixin/nil_assertion_handleable.rb
# frozen_string_literal: true module RuboCop module Cop module Minitest # Common functionality for `AssertNil` and `RefuteNil` cops. # @api private module NilAssertionHandleable MSG = 'Prefer using `%<assertion_type>s_nil(%<preferred_args>s)`.' private def register_off...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/mixin/minitest_exploration_helpers.rb
lib/rubocop/cop/mixin/minitest_exploration_helpers.rb
# frozen_string_literal: true require 'set' module RuboCop module Cop # Helper methods for different explorations against test files and test cases. # @api private module MinitestExplorationHelpers include DefNode extend NodePattern::Macros VALUE_MATCHERS = %i[ must_be_empty m...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/mixin/in_delta_mixin.rb
lib/rubocop/cop/mixin/in_delta_mixin.rb
# frozen_string_literal: true module RuboCop module Cop # Common functionality for `AssertInDelta` and `RefuteInDelta` cops. # @api private module InDeltaMixin MSG = 'Prefer using `%<good_method>s`.' def on_send(node) equal_floats_call(node) do |expected, actual, message| m...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/mixin/instance_of_assertion_handleable.rb
lib/rubocop/cop/mixin/instance_of_assertion_handleable.rb
# frozen_string_literal: true module RuboCop module Cop module Minitest # Common functionality for `Minitest/AssertInstanceOf` and `Minitest/RefuteInstanceOf` cops. # @api private module InstanceOfAssertionHandleable include ArgumentRangeHelper MSG = 'Prefer using `%<prefer>s`....
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/mixin/minitest_cop_rule.rb
lib/rubocop/cop/mixin/minitest_cop_rule.rb
# frozen_string_literal: true module RuboCop module Cop # Provide a method to define offense rule for Minitest cops. module MinitestCopRule # # Define offense rule for Minitest cops. # # @example # define_rule :assert, target_method: :match # define_rule :refute, targe...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/mixin/predicate_assertion_handleable.rb
lib/rubocop/cop/mixin/predicate_assertion_handleable.rb
# frozen_string_literal: true module RuboCop module Cop module Minitest # Common functionality for `Minitest/AssertPredicate` and `Minitest/RefutePredicate` cops. # @api private module PredicateAssertionHandleable MSG = 'Prefer using `%<assertion_type>s_predicate(%<new_arguments>s)`.' ...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/mixin/argument_range_helper.rb
lib/rubocop/cop/mixin/argument_range_helper.rb
# frozen_string_literal: true module RuboCop module Cop # Methods that calculate and return `Parser::Source::Ranges`. # @api private module ArgumentRangeHelper include RangeHelp private def first_and_second_arguments_range(node) first_argument = node.first_argument sec...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
mmcclimon/mr_poole
https://github.com/mmcclimon/mr_poole/blob/442404c64dd931185ddf2e2345ce2e76994c910f/spec/cli_spec.rb
spec/cli_spec.rb
require 'rspec/autorun' require File.expand_path('../spec_helper', __FILE__) require File.expand_path('../../lib/mr_poole', __FILE__) module MrPoole describe CLI do context 'should determine jekyll dir correctly' do it 'should exit with no _posts directory' do olddir, tmpdir = make_no_jekyll_dir ...
ruby
MIT
442404c64dd931185ddf2e2345ce2e76994c910f
2026-01-04T17:32:36.954580Z
false
mmcclimon/mr_poole
https://github.com/mmcclimon/mr_poole/blob/442404c64dd931185ddf2e2345ce2e76994c910f/spec/command_spec.rb
spec/command_spec.rb
# encoding: UTF-8 require 'rspec/autorun' require File.expand_path('../spec_helper', __FILE__) require File.expand_path('../../lib/mr_poole', __FILE__) module MrPoole describe Commands do let(:date_regex) { %r{\d{4}-\d{2}-\d{2}} } let(:c) { Commands.new } before(:each) { @olddir, @tmpdir = make_jekyll_d...
ruby
MIT
442404c64dd931185ddf2e2345ce2e76994c910f
2026-01-04T17:32:36.954580Z
false
mmcclimon/mr_poole
https://github.com/mmcclimon/mr_poole/blob/442404c64dd931185ddf2e2345ce2e76994c910f/spec/config_spec.rb
spec/config_spec.rb
require 'rspec/autorun' require File.expand_path('../spec_helper', __FILE__) require File.expand_path('../../lib/mr_poole', __FILE__) def write_config_file f = File.open('_config.yml', 'w') f.puts 'poole:' f.puts ' default_layout: _layouts/poole.md' f.puts ' default_extension: md' f.close end def write_co...
ruby
MIT
442404c64dd931185ddf2e2345ce2e76994c910f
2026-01-04T17:32:36.954580Z
false
mmcclimon/mr_poole
https://github.com/mmcclimon/mr_poole/blob/442404c64dd931185ddf2e2345ce2e76994c910f/spec/spec_helper.rb
spec/spec_helper.rb
#!/usr/bin/env ruby require 'stringio' require 'tmpdir' require 'fileutils' if RUBY_VERSION > '1.9' require 'coveralls' Coveralls.wear! end def capture_stdout(&block) stdout = $stdout fake_out = StringIO.new $stdout = fake_out begin yield ensure $stdout = stdout end fake_out.string end def...
ruby
MIT
442404c64dd931185ddf2e2345ce2e76994c910f
2026-01-04T17:32:36.954580Z
false
mmcclimon/mr_poole
https://github.com/mmcclimon/mr_poole/blob/442404c64dd931185ddf2e2345ce2e76994c910f/lib/mr_poole.rb
lib/mr_poole.rb
require 'fileutils' %w{ commands helper cli config version }.each do |lib| require File.expand_path("../mr_poole/#{lib}", __FILE__) end module MrPoole end
ruby
MIT
442404c64dd931185ddf2e2345ce2e76994c910f
2026-01-04T17:32:36.954580Z
false
mmcclimon/mr_poole
https://github.com/mmcclimon/mr_poole/blob/442404c64dd931185ddf2e2345ce2e76994c910f/lib/mr_poole/version.rb
lib/mr_poole/version.rb
module MrPoole VERSION = '0.8.0' end
ruby
MIT
442404c64dd931185ddf2e2345ce2e76994c910f
2026-01-04T17:32:36.954580Z
false
mmcclimon/mr_poole
https://github.com/mmcclimon/mr_poole/blob/442404c64dd931185ddf2e2345ce2e76994c910f/lib/mr_poole/cli.rb
lib/mr_poole/cli.rb
require 'optparse' require 'ostruct' module MrPoole class CLI def initialize(args) @helper = Helper.new @src_dir = @helper.ensure_jekyll_dir @params = args @config = @helper.config ext = @config.default_extension || 'md' @commands = Commands.new(ext) end def execut...
ruby
MIT
442404c64dd931185ddf2e2345ce2e76994c910f
2026-01-04T17:32:36.954580Z
false
mmcclimon/mr_poole
https://github.com/mmcclimon/mr_poole/blob/442404c64dd931185ddf2e2345ce2e76994c910f/lib/mr_poole/commands.rb
lib/mr_poole/commands.rb
require 'fileutils' module MrPoole class Commands POSTS_FOLDER = '_posts' DRAFTS_FOLDER = '_drafts' def initialize(extension='md') @helper = Helper.new @ext = extension end # Generate a timestamped post def post(opts) opts = @helper.ensure_open_struct(opts) date = @...
ruby
MIT
442404c64dd931185ddf2e2345ce2e76994c910f
2026-01-04T17:32:36.954580Z
false
mmcclimon/mr_poole
https://github.com/mmcclimon/mr_poole/blob/442404c64dd931185ddf2e2345ce2e76994c910f/lib/mr_poole/config.rb
lib/mr_poole/config.rb
require 'yaml' require 'ostruct' # YAML parsing in old rubies didn't use Psych, and so throws a NameError later # when we check for one after we parse our YAML. Before we start, we'll check # for that and create a dummy Pysch::SyntaxError constant. Older ruby YAML # errors will be caught by check_word_separator and wi...
ruby
MIT
442404c64dd931185ddf2e2345ce2e76994c910f
2026-01-04T17:32:36.954580Z
false
mmcclimon/mr_poole
https://github.com/mmcclimon/mr_poole/blob/442404c64dd931185ddf2e2345ce2e76994c910f/lib/mr_poole/helper.rb
lib/mr_poole/helper.rb
require 'yaml' require 'pathname' module MrPoole class Helper attr_accessor :config def initialize @config = Config.new end # Check for a _posts directory in current directory. If there's not one, # check for a _config.yml and look for a custom src directory. If we # don't find one,...
ruby
MIT
442404c64dd931185ddf2e2345ce2e76994c910f
2026-01-04T17:32:36.954580Z
false
krainboltgreene/time-lord
https://github.com/krainboltgreene/time-lord/blob/85f4ff9fbac6474f30ad7f24066612c86ddad3a0/test/helper.rb
test/helper.rb
require 'coveralls' Coveralls.wear! do add_filter "/test/" end require 'minitest/autorun' require 'timecop' require 'time-lord' require 'pry' class TestCase < MiniTest::Unit::TestCase def setup @timestamp = Time.parse("2000-01-01 00:00:01 -0800") Timecop.freeze(@timestamp) end def teardown Timecop...
ruby
MIT
85f4ff9fbac6474f30ad7f24066612c86ddad3a0
2026-01-04T17:32:37.321099Z
false
krainboltgreene/time-lord
https://github.com/krainboltgreene/time-lord/blob/85f4ff9fbac6474f30ad7f24066612c86ddad3a0/test/lib/time-lord_test.rb
test/lib/time-lord_test.rb
require "helper" class TestTimeLord < MiniTest::Unit::TestCase def test_that_things_work assert(true) end def test_that_namespace_defined assert(defined?(TimeLord)) end end
ruby
MIT
85f4ff9fbac6474f30ad7f24066612c86ddad3a0
2026-01-04T17:32:37.321099Z
false
krainboltgreene/time-lord
https://github.com/krainboltgreene/time-lord/blob/85f4ff9fbac6474f30ad7f24066612c86ddad3a0/test/lib/time-lord/period_test.rb
test/lib/time-lord/period_test.rb
require 'helper' class TestTimeLordPeriod < TestCase def test_to_i_positive expected = -100 actual = TimeLord::Period.new(@timestamp - 100, @timestamp).difference assert_equal(expected, actual) end def test_to_i_negative expected = 100 actual = TimeLord::Period.new(@timestamp + 100, @timesta...
ruby
MIT
85f4ff9fbac6474f30ad7f24066612c86ddad3a0
2026-01-04T17:32:37.321099Z
false
krainboltgreene/time-lord
https://github.com/krainboltgreene/time-lord/blob/85f4ff9fbac6474f30ad7f24066612c86ddad3a0/test/lib/time-lord/scale_test.rb
test/lib/time-lord/scale_test.rb
require 'helper' class TestTimeLordScale < TestCase def test_to_value_single expected = 1 actual = TimeLord::Scale.new(3600).to_value assert_equal(expected, actual) end def test_to_value_multiple expected = 2 actual = TimeLord::Scale.new(7200).to_value assert_equal(expected, actual) en...
ruby
MIT
85f4ff9fbac6474f30ad7f24066612c86ddad3a0
2026-01-04T17:32:37.321099Z
false
krainboltgreene/time-lord
https://github.com/krainboltgreene/time-lord/blob/85f4ff9fbac6474f30ad7f24066612c86ddad3a0/test/lib/time-lord/time_test.rb
test/lib/time-lord/time_test.rb
require 'helper' class TestTimeLordTime < TestCase def test_to_words_past_seconds expected = "50 seconds ago" actual = TimeLord::Time.new(@timestamp - 50).period.to_words assert_equal(expected, actual) end def test_to_words_singular expected = "1 minute ago" actual = TimeLord::Time.new(@tim...
ruby
MIT
85f4ff9fbac6474f30ad7f24066612c86ddad3a0
2026-01-04T17:32:37.321099Z
false
krainboltgreene/time-lord
https://github.com/krainboltgreene/time-lord/blob/85f4ff9fbac6474f30ad7f24066612c86ddad3a0/test/lib/time-lord/extentions/time_test.rb
test/lib/time-lord/extentions/time_test.rb
require 'helper' class TestTimeLordExtentionsTime < TestCase def oldstamp(minus) @timestamp - minus end def test_ago_in_words_on_time expected = "3 days ago" actual = oldstamp(3.days).ago.in_words assert_equal(expected, actual) end def test_ago_in_words_about expected = "1 hour ago" ...
ruby
MIT
85f4ff9fbac6474f30ad7f24066612c86ddad3a0
2026-01-04T17:32:37.321099Z
false
krainboltgreene/time-lord
https://github.com/krainboltgreene/time-lord/blob/85f4ff9fbac6474f30ad7f24066612c86ddad3a0/test/lib/time-lord/extentions/integer_test.rb
test/lib/time-lord/extentions/integer_test.rb
require 'helper' class TestTimeLordExtentionsInteger < TestCase def test_minutes expected = 1 actual = 1.second assert_equal(expected, actual) expected = 2 actual = 2.seconds assert_equal(expected, actual) end def test_minutes expected = 60 actual = 1.minute assert_equal(exp...
ruby
MIT
85f4ff9fbac6474f30ad7f24066612c86ddad3a0
2026-01-04T17:32:37.321099Z
false
krainboltgreene/time-lord
https://github.com/krainboltgreene/time-lord/blob/85f4ff9fbac6474f30ad7f24066612c86ddad3a0/lib/time-lord.rb
lib/time-lord.rb
require 'time' require_relative 'time-lord/units' require_relative 'time-lord/time' require_relative 'time-lord/period' require_relative 'time-lord/scale' require_relative 'time-lord/extensions/integer' require_relative 'time-lord/extensions/time'
ruby
MIT
85f4ff9fbac6474f30ad7f24066612c86ddad3a0
2026-01-04T17:32:37.321099Z
false
krainboltgreene/time-lord
https://github.com/krainboltgreene/time-lord/blob/85f4ff9fbac6474f30ad7f24066612c86ddad3a0/lib/time-lord/version.rb
lib/time-lord/version.rb
module TimeLord VERSION = "1.1.0" end
ruby
MIT
85f4ff9fbac6474f30ad7f24066612c86ddad3a0
2026-01-04T17:32:37.321099Z
false
krainboltgreene/time-lord
https://github.com/krainboltgreene/time-lord/blob/85f4ff9fbac6474f30ad7f24066612c86ddad3a0/lib/time-lord/period.rb
lib/time-lord/period.rb
module TimeLord # The TimeLord::Period class handles the concept of two points in time and # their relation to each other as a range. Conceptually it should duck type # the Range class # # In an effort to keep things clear we codify these terms: # # - from/after: beginning is bigger (later) than ending,...
ruby
MIT
85f4ff9fbac6474f30ad7f24066612c86ddad3a0
2026-01-04T17:32:37.321099Z
false
krainboltgreene/time-lord
https://github.com/krainboltgreene/time-lord/blob/85f4ff9fbac6474f30ad7f24066612c86ddad3a0/lib/time-lord/units.rb
lib/time-lord/units.rb
module TimeLord # The timelord units module contains all the basic conversions from seconds # to any other unit of basic time. module Units # Our basic unit of measurement is the second, because that's what most # people expect. SECOND = 1 MINUTE = SECOND * 60 HOUR = MINUTE * 6...
ruby
MIT
85f4ff9fbac6474f30ad7f24066612c86ddad3a0
2026-01-04T17:32:37.321099Z
false
krainboltgreene/time-lord
https://github.com/krainboltgreene/time-lord/blob/85f4ff9fbac6474f30ad7f24066612c86ddad3a0/lib/time-lord/time.rb
lib/time-lord/time.rb
module TimeLord # The TimeLord::Time class understands how to take a ::Time object and turn # it into a Period object. It's assumed the object you pass it will be the # beginning of any period. class Time attr_accessor :moment def initialize(moment) self.moment = moment end # You may opt...
ruby
MIT
85f4ff9fbac6474f30ad7f24066612c86ddad3a0
2026-01-04T17:32:37.321099Z
false
krainboltgreene/time-lord
https://github.com/krainboltgreene/time-lord/blob/85f4ff9fbac6474f30ad7f24066612c86ddad3a0/lib/time-lord/scale.rb
lib/time-lord/scale.rb
module TimeLord # We use the TimeLord::Scale class to handle turning a number of seconds into # an reasonable unit of time. For instance 60 seconds should really be denoted # as 1 minute. The same applies for 100 seconds, because it's not enough to # go over 120 seconds (or 2 minutes). class Scale include...
ruby
MIT
85f4ff9fbac6474f30ad7f24066612c86ddad3a0
2026-01-04T17:32:37.321099Z
false
krainboltgreene/time-lord
https://github.com/krainboltgreene/time-lord/blob/85f4ff9fbac6474f30ad7f24066612c86ddad3a0/lib/time-lord/units/business.rb
lib/time-lord/units/business.rb
module TimeLord module Units # Business units of time QUARTER = MONTH * 3 end end
ruby
MIT
85f4ff9fbac6474f30ad7f24066612c86ddad3a0
2026-01-04T17:32:37.321099Z
false
krainboltgreene/time-lord
https://github.com/krainboltgreene/time-lord/blob/85f4ff9fbac6474f30ad7f24066612c86ddad3a0/lib/time-lord/units/long.rb
lib/time-lord/units/long.rb
module TimeLord module Units # Very long units of time FORTNIGHT = WEEK * 2 OLYMPIAD = YEAR * 4 LUSTRUM = YEAR * 5 INDICTION = YEAR * 15 JUBILEE = DECADE * 5 EON = 1.0/0 end end
ruby
MIT
85f4ff9fbac6474f30ad7f24066612c86ddad3a0
2026-01-04T17:32:37.321099Z
false
krainboltgreene/time-lord
https://github.com/krainboltgreene/time-lord/blob/85f4ff9fbac6474f30ad7f24066612c86ddad3a0/lib/time-lord/units/special.rb
lib/time-lord/units/special.rb
module TimeLord module Units # Very special units of time DECADE = YEAR * 10 CENTURY = DECADE * 10 MILLENNIUM = CENTURY * 10 end end
ruby
MIT
85f4ff9fbac6474f30ad7f24066612c86ddad3a0
2026-01-04T17:32:37.321099Z
false
krainboltgreene/time-lord
https://github.com/krainboltgreene/time-lord/blob/85f4ff9fbac6474f30ad7f24066612c86ddad3a0/lib/time-lord/extensions/time.rb
lib/time-lord/extensions/time.rb
class Time def ago TimeLord::Time.new(self).period end end
ruby
MIT
85f4ff9fbac6474f30ad7f24066612c86ddad3a0
2026-01-04T17:32:37.321099Z
false
krainboltgreene/time-lord
https://github.com/krainboltgreene/time-lord/blob/85f4ff9fbac6474f30ad7f24066612c86ddad3a0/lib/time-lord/extensions/integer.rb
lib/time-lord/extensions/integer.rb
class Integer TimeLord::Units.constants.each do |constant| define_method constant.downcase do self * TimeLord::Units.const_get(constant) end alias_method "#{constant.downcase}s", constant.downcase end def from(timestamp = Time.now) time_convert(timestamp + self) end alias_method :after,...
ruby
MIT
85f4ff9fbac6474f30ad7f24066612c86ddad3a0
2026-01-04T17:32:37.321099Z
false
danecjensen/mywanderlust
https://github.com/danecjensen/mywanderlust/blob/ad6bf8372a94ea7548d51a771416354cc6a94ef8/app/helpers/trips_helper.rb
app/helpers/trips_helper.rb
module TripsHelper end
ruby
MIT
ad6bf8372a94ea7548d51a771416354cc6a94ef8
2026-01-04T17:32:27.701520Z
false
danecjensen/mywanderlust
https://github.com/danecjensen/mywanderlust/blob/ad6bf8372a94ea7548d51a771416354cc6a94ef8/app/helpers/destinations_helper.rb
app/helpers/destinations_helper.rb
module DestinationsHelper end
ruby
MIT
ad6bf8372a94ea7548d51a771416354cc6a94ef8
2026-01-04T17:32:27.701520Z
false
danecjensen/mywanderlust
https://github.com/danecjensen/mywanderlust/blob/ad6bf8372a94ea7548d51a771416354cc6a94ef8/app/helpers/application_helper.rb
app/helpers/application_helper.rb
module ApplicationHelper def display_base_errors resource return '' if (resource.errors.empty?) or (resource.errors[:base].empty?) messages = resource.errors[:base].map { |msg| content_tag(:p, msg) }.join html = <<-HTML <div class="alert alert-error alert-block"> <button type="button" class="cl...
ruby
MIT
ad6bf8372a94ea7548d51a771416354cc6a94ef8
2026-01-04T17:32:27.701520Z
false
danecjensen/mywanderlust
https://github.com/danecjensen/mywanderlust/blob/ad6bf8372a94ea7548d51a771416354cc6a94ef8/app/helpers/home_helper.rb
app/helpers/home_helper.rb
module HomeHelper end
ruby
MIT
ad6bf8372a94ea7548d51a771416354cc6a94ef8
2026-01-04T17:32:27.701520Z
false
danecjensen/mywanderlust
https://github.com/danecjensen/mywanderlust/blob/ad6bf8372a94ea7548d51a771416354cc6a94ef8/app/controllers/home_controller.rb
app/controllers/home_controller.rb
class HomeController < ApplicationController def index @users = User.all end end
ruby
MIT
ad6bf8372a94ea7548d51a771416354cc6a94ef8
2026-01-04T17:32:27.701520Z
false
danecjensen/mywanderlust
https://github.com/danecjensen/mywanderlust/blob/ad6bf8372a94ea7548d51a771416354cc6a94ef8/app/controllers/destinations_controller.rb
app/controllers/destinations_controller.rb
class DestinationsController < ApplicationController # GET /destinations # GET /destinations.json def index @destinations = Destination.all respond_to do |format| format.html # index.html.erb format.json { render json: @destinations } end end # GET /destinations/1 # GET /destinatio...
ruby
MIT
ad6bf8372a94ea7548d51a771416354cc6a94ef8
2026-01-04T17:32:27.701520Z
false
danecjensen/mywanderlust
https://github.com/danecjensen/mywanderlust/blob/ad6bf8372a94ea7548d51a771416354cc6a94ef8/app/controllers/users_controller.rb
app/controllers/users_controller.rb
class UsersController < ApplicationController #before_filter :authenticate_user! def index @users = User.all end def show @user = User.find(params[:id]) @trips = @user.trips end end
ruby
MIT
ad6bf8372a94ea7548d51a771416354cc6a94ef8
2026-01-04T17:32:27.701520Z
false
danecjensen/mywanderlust
https://github.com/danecjensen/mywanderlust/blob/ad6bf8372a94ea7548d51a771416354cc6a94ef8/app/controllers/trips_controller.rb
app/controllers/trips_controller.rb
class TripsController < ApplicationController # before_filter :authenticate_user! # GET /trips # GET /trips.json def index @trips = Trip.all respond_to do |format| format.html # index.html.erb format.json { render json: @trips } end end # GET /trips/1 # GET /trips/1.json def sh...
ruby
MIT
ad6bf8372a94ea7548d51a771416354cc6a94ef8
2026-01-04T17:32:27.701520Z
false
danecjensen/mywanderlust
https://github.com/danecjensen/mywanderlust/blob/ad6bf8372a94ea7548d51a771416354cc6a94ef8/app/controllers/application_controller.rb
app/controllers/application_controller.rb
class ApplicationController < ActionController::Base # protect_from_forgery skip_before_filter :verify_authenticity_token end
ruby
MIT
ad6bf8372a94ea7548d51a771416354cc6a94ef8
2026-01-04T17:32:27.701520Z
false
danecjensen/mywanderlust
https://github.com/danecjensen/mywanderlust/blob/ad6bf8372a94ea7548d51a771416354cc6a94ef8/app/controllers/users/omniauth_callbacks_controller.rb
app/controllers/users/omniauth_callbacks_controller.rb
class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController end
ruby
MIT
ad6bf8372a94ea7548d51a771416354cc6a94ef8
2026-01-04T17:32:27.701520Z
false
danecjensen/mywanderlust
https://github.com/danecjensen/mywanderlust/blob/ad6bf8372a94ea7548d51a771416354cc6a94ef8/app/models/destination.rb
app/models/destination.rb
class Destination < ActiveRecord::Base attr_accessible :address, :city, :country, :cross_street, :distance, :lat, :latitude, :lng, :longitude, :name, :photo_url, :postal_code, :state, :cc, :trip_id, :fsq_prefix_url, :fsq_suffix_url, :added_by, :added_by_photo_url, :directions, :url belongs_to :trip acts_a...
ruby
MIT
ad6bf8372a94ea7548d51a771416354cc6a94ef8
2026-01-04T17:32:27.701520Z
false
danecjensen/mywanderlust
https://github.com/danecjensen/mywanderlust/blob/ad6bf8372a94ea7548d51a771416354cc6a94ef8/app/models/comment.rb
app/models/comment.rb
class Comment < ActiveRecord::Base acts_as_nested_set :scope => [:commentable_id, :commentable_type] validates :body, :presence => true validates :user, :presence => true # NOTE: install the acts_as_votable plugin if you # want user to vote on the quality of comments. #acts_as_votable belongs_to :comme...
ruby
MIT
ad6bf8372a94ea7548d51a771416354cc6a94ef8
2026-01-04T17:32:27.701520Z
false
danecjensen/mywanderlust
https://github.com/danecjensen/mywanderlust/blob/ad6bf8372a94ea7548d51a771416354cc6a94ef8/app/models/trip.rb
app/models/trip.rb
class Trip < ActiveRecord::Base attr_accessible :current_lat, :current_lng, :name has_many :destinations belongs_to :user before_create :trip_codes def self.from_param(webstring) find_by_webstring(webstring) end def to_param self.webstring end private def trip_codes require 'digest...
ruby
MIT
ad6bf8372a94ea7548d51a771416354cc6a94ef8
2026-01-04T17:32:27.701520Z
false
danecjensen/mywanderlust
https://github.com/danecjensen/mywanderlust/blob/ad6bf8372a94ea7548d51a771416354cc6a94ef8/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 devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable, :omniauthable, :omniauth_provid...
ruby
MIT
ad6bf8372a94ea7548d51a771416354cc6a94ef8
2026-01-04T17:32:27.701520Z
false
danecjensen/mywanderlust
https://github.com/danecjensen/mywanderlust/blob/ad6bf8372a94ea7548d51a771416354cc6a94ef8/app/mailers/trip_mailer.rb
app/mailers/trip_mailer.rb
class TripMailer < ActionMailer::Base default from: "dream@mywanderlust.co" def share_trip_email(email, url) @url = url mail(to: email, subject: 'Help plan your friends vacation') end end
ruby
MIT
ad6bf8372a94ea7548d51a771416354cc6a94ef8
2026-01-04T17:32:27.701520Z
false
danecjensen/mywanderlust
https://github.com/danecjensen/mywanderlust/blob/ad6bf8372a94ea7548d51a771416354cc6a94ef8/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
ad6bf8372a94ea7548d51a771416354cc6a94ef8
2026-01-04T17:32:27.701520Z
false
danecjensen/mywanderlust
https://github.com/danecjensen/mywanderlust/blob/ad6bf8372a94ea7548d51a771416354cc6a94ef8/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
ad6bf8372a94ea7548d51a771416354cc6a94ef8
2026-01-04T17:32:27.701520Z
false
danecjensen/mywanderlust
https://github.com/danecjensen/mywanderlust/blob/ad6bf8372a94ea7548d51a771416354cc6a94ef8/db/migrate/20130903231646_add_foursquareurls_to_destination.rb
db/migrate/20130903231646_add_foursquareurls_to_destination.rb
class AddFoursquareurlsToDestination < ActiveRecord::Migration def change add_column :destinations, :fsq_prefix_url, :string add_column :destinations, :fsq_suffix_url, :string end end
ruby
MIT
ad6bf8372a94ea7548d51a771416354cc6a94ef8
2026-01-04T17:32:27.701520Z
false
danecjensen/mywanderlust
https://github.com/danecjensen/mywanderlust/blob/ad6bf8372a94ea7548d51a771416354cc6a94ef8/db/migrate/20130820155239_devise_create_users.rb
db/migrate/20130820155239_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
ad6bf8372a94ea7548d51a771416354cc6a94ef8
2026-01-04T17:32:27.701520Z
false
danecjensen/mywanderlust
https://github.com/danecjensen/mywanderlust/blob/ad6bf8372a94ea7548d51a771416354cc6a94ef8/db/migrate/20130906191949_add_directions_to_destination.rb
db/migrate/20130906191949_add_directions_to_destination.rb
class AddDirectionsToDestination < ActiveRecord::Migration def change add_column :destinations, :directions, :string end end
ruby
MIT
ad6bf8372a94ea7548d51a771416354cc6a94ef8
2026-01-04T17:32:27.701520Z
false
danecjensen/mywanderlust
https://github.com/danecjensen/mywanderlust/blob/ad6bf8372a94ea7548d51a771416354cc6a94ef8/db/migrate/20130910160230_acts_as_commentable_with_threading_migration.rb
db/migrate/20130910160230_acts_as_commentable_with_threading_migration.rb
class ActsAsCommentableWithThreadingMigration < ActiveRecord::Migration def self.up create_table :comments, :force => true do |t| t.integer :commentable_id, :default => 0 t.string :commentable_type, :default => "" t.string :title, :default => "" t.text :body, :default => "" t.string ...
ruby
MIT
ad6bf8372a94ea7548d51a771416354cc6a94ef8
2026-01-04T17:32:27.701520Z
false
danecjensen/mywanderlust
https://github.com/danecjensen/mywanderlust/blob/ad6bf8372a94ea7548d51a771416354cc6a94ef8/db/migrate/20130820155425_create_trips.rb
db/migrate/20130820155425_create_trips.rb
class CreateTrips < ActiveRecord::Migration def change create_table :trips do |t| t.string :name t.float :current_lat t.float :current_lng t.timestamps end end end
ruby
MIT
ad6bf8372a94ea7548d51a771416354cc6a94ef8
2026-01-04T17:32:27.701520Z
false
danecjensen/mywanderlust
https://github.com/danecjensen/mywanderlust/blob/ad6bf8372a94ea7548d51a771416354cc6a94ef8/db/migrate/20130820155416_create_destinations.rb
db/migrate/20130820155416_create_destinations.rb
class CreateDestinations < ActiveRecord::Migration def change create_table :destinations do |t| t.integer :trip_id t.string :name t.string :photo_url t.string :address t.string :cross_street t.string :city t.string :state t.string :postal_code t.string :countr...
ruby
MIT
ad6bf8372a94ea7548d51a771416354cc6a94ef8
2026-01-04T17:32:27.701520Z
false
danecjensen/mywanderlust
https://github.com/danecjensen/mywanderlust/blob/ad6bf8372a94ea7548d51a771416354cc6a94ef8/db/migrate/20130820155242_add_name_to_users.rb
db/migrate/20130820155242_add_name_to_users.rb
class AddNameToUsers < ActiveRecord::Migration def change add_column :users, :name, :string end end
ruby
MIT
ad6bf8372a94ea7548d51a771416354cc6a94ef8
2026-01-04T17:32:27.701520Z
false
danecjensen/mywanderlust
https://github.com/danecjensen/mywanderlust/blob/ad6bf8372a94ea7548d51a771416354cc6a94ef8/db/migrate/20130828210904_add_cc_to_destination.rb
db/migrate/20130828210904_add_cc_to_destination.rb
class AddCcToDestination < ActiveRecord::Migration def change add_column :destinations, :cc, :string end end
ruby
MIT
ad6bf8372a94ea7548d51a771416354cc6a94ef8
2026-01-04T17:32:27.701520Z
false
danecjensen/mywanderlust
https://github.com/danecjensen/mywanderlust/blob/ad6bf8372a94ea7548d51a771416354cc6a94ef8/db/migrate/20130909202924_add_url_to_destination.rb
db/migrate/20130909202924_add_url_to_destination.rb
class AddUrlToDestination < ActiveRecord::Migration def change add_column :destinations, :url, :string end end
ruby
MIT
ad6bf8372a94ea7548d51a771416354cc6a94ef8
2026-01-04T17:32:27.701520Z
false