source
stringclasses
1 value
repo
stringlengths
5
63
repo_url
stringlengths
24
82
path
stringlengths
5
167
language
stringclasses
1 value
license
stringclasses
5 values
stars
int64
10
51.4k
ref
stringclasses
23 values
size_bytes
int64
200
258k
text
stringlengths
137
258k
github
shyouhei/optdown
https://github.com/shyouhei/optdown
test/xprintf.rb
Ruby
mit
19
master
1,993
#! /your/favourite/path/to/ruby # -*- mode: ruby; coding: utf-8; indent-tabs-mode: nil; ruby-indent-level: 2 -*- # -*- frozen_string_literal: true -*- # -*- warn_indent: true -*- # Copyright (c) 2017 Urabe, Shyouhei # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software an...
github
shyouhei/optdown
https://github.com/shyouhei/optdown
test/matcher.rb
Ruby
mit
19
master
6,923
#! /your/favourite/path/to/ruby # -*- mode: ruby; coding: utf-8; indent-tabs-mode: nil; ruby-indent-level: 2 -*- # -*- frozen_string_literal: true -*- # -*- warn_indent: true -*- # Copyright (c) 2017 Urabe, Shyouhei # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software an...
github
shyouhei/optdown
https://github.com/shyouhei/optdown
test/test_helper.rb
Ruby
mit
19
master
2,406
#! /your/favourite/path/to/ruby # -*- mode: ruby; coding: utf-8; indent-tabs-mode: nil; ruby-indent-level: 2 -*- # -*- frozen_string_literal: true -*- # -*- warn_indent: true -*- # Copyright (c) 2017 Urabe, Shyouhei # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software an...
github
shyouhei/optdown
https://github.com/shyouhei/optdown
test/blocklevel.rb
Ruby
mit
19
master
8,115
#! /your/favourite/path/to/ruby # -*- mode: ruby; coding: utf-8; indent-tabs-mode: nil; ruby-indent-level: 2 -*- # -*- frozen_string_literal: true -*- # -*- warn_indent: true -*- # Copyright (c) 2017 Urabe, Shyouhei # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software an...
github
shyouhei/optdown
https://github.com/shyouhei/optdown
test/renderer.rb
Ruby
mit
19
master
2,443
#! /your/favourite/path/to/ruby # -*- mode: ruby; coding: utf-8; indent-tabs-mode: nil; ruby-indent-level: 2 -*- # -*- frozen_string_literal: true -*- # -*- warn_indent: true -*- # Copyright (c) 2017 Urabe, Shyouhei # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software an...
github
shyouhei/optdown
https://github.com/shyouhei/optdown
test/expr.rb
Ruby
mit
19
master
14,020
#! /your/favourite/path/to/ruby # -*- mode: ruby; coding: utf-8; indent-tabs-mode: nil; ruby-indent-level: 2 -*- # -*- frozen_string_literal: true-*- # -*- warn_indent: true-*- # Copyright (c) 2017 Urabe, Shyouhei # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and ...
github
shyouhei/optdown
https://github.com/shyouhei/optdown
test/000_compile.rb
Ruby
mit
19
master
1,487
#! /your/favourite/path/to/ruby # -*- mode: ruby; coding: utf-8; indent-tabs-mode: nil; ruby-indent-level: 2 -*- # -*- frozen_string_literal: true -*- # -*- warn_indent: true -*- # Copyright (c) 2017 Urabe, Shyouhei # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software an...
github
shyouhei/optdown
https://github.com/shyouhei/optdown
test/pathological.rb
Ruby
mit
19
master
3,091
#! /your/favourite/path/to/ruby # -*- mode: ruby; coding: utf-8; indent-tabs-mode: nil; ruby-indent-level: 2 -*- # -*- frozen_string_literal: true -*- # -*- warn_indent: true -*- # Copyright (c) 2017 Urabe, Shyouhei # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software an...
github
shyouhei/optdown
https://github.com/shyouhei/optdown
test/integrated.rb
Ruby
mit
19
master
9,939
#! /your/favourite/path/to/ruby # -*- mode: ruby; coding: utf-8; indent-tabs-mode: nil; ruby-indent-level: 2 -*- # -*- frozen_string_literal: true -*- # -*- warn_indent: true -*- # Copyright (c) 2017 Urabe, Shyouhei # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software an...
github
shyouhei/optdown
https://github.com/shyouhei/optdown
test/inline.rb
Ruby
mit
19
master
6,982
#! /your/favourite/path/to/ruby # -*- mode: ruby; coding: utf-8; indent-tabs-mode: nil; ruby-indent-level: 2 -*- # -*- frozen_string_literal: true -*- # -*- warn_indent: true -*- # Copyright (c) 2017 Urabe, Shyouhei # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software an...
github
shyouhei/optdown
https://github.com/shyouhei/optdown
test/deeply_frozen.rb
Ruby
mit
19
master
1,888
#! /your/favourite/path/to/ruby # -*- mode: ruby; coding: utf-8; indent-tabs-mode: nil; ruby-indent-level: 2 -*- # -*- frozen_string_literal: true -*- # -*- warn_indent: true -*- # Copyright (c) 2017 Urabe, Shyouhei # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software an...
github
shyouhei/optdown
https://github.com/shyouhei/optdown
lib/optdown.rb
Ruby
mit
19
master
2,697
#! /your/favourite/path/to/ruby # -*- mode: ruby; coding: utf-8; indent-tabs-mode: nil; ruby-indent-level: 2 -*- # -*- frozen_string_literal: true -*- # -*- warn_indent: true -*- # Copyright (c) 2017 Urabe, Shyouhei # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software an...
github
shyouhei/optdown
https://github.com/shyouhei/optdown
lib/optdown/entity.rb
Ruby
mit
19
master
2,455
#! /your/favourite/path/to/ruby # -*- mode: ruby; coding: utf-8; indent-tabs-mode: nil; ruby-indent-level: 2 -*- # -*- frozen_string_literal: true -*- # -*- warn_indent: true -*- # Copyright (c) 2017 Urabe, Shyouhei # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software an...
github
shyouhei/optdown
https://github.com/shyouhei/optdown
lib/optdown/parser.rb
Ruby
mit
19
master
2,988
#! /your/favourite/path/to/ruby # -*- mode: ruby; coding: utf-8; indent-tabs-mode: nil; ruby-indent-level: 2 -*- # -*- frozen_string_literal: true -*- # -*- warn_indent: true -*- # Copyright (c) 2017 Urabe, Shyouhei # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software an...
github
shyouhei/optdown
https://github.com/shyouhei/optdown
lib/optdown/blocklevel.rb
Ruby
mit
19
master
4,025
#! /your/favourite/path/to/ruby # -*- mode: ruby; coding: utf-8; indent-tabs-mode: nil; ruby-indent-level: 2 -*- # -*- frozen_string_literal: true -*- # -*- warn_indent: true -*- # Copyright (c) 2017 Urabe, Shyouhei # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software an...
github
shyouhei/optdown
https://github.com/shyouhei/optdown
lib/optdown/link_def.rb
Ruby
mit
19
master
2,484
#! /your/favourite/path/to/ruby # -*- mode: ruby; coding: utf-8; indent-tabs-mode: nil; ruby-indent-level: 2 -*- # -*- frozen_string_literal: true -*- # -*- warn_indent: true -*- # Copyright (c) 2017 Urabe, Shyouhei # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software an...
github
shyouhei/optdown
https://github.com/shyouhei/optdown
lib/optdown/blockquote.rb
Ruby
mit
19
master
2,400
#! /your/favourite/path/to/ruby # -*- mode: ruby; coding: utf-8; indent-tabs-mode: nil; ruby-indent-level: 2 -*- # -*- frozen_string_literal: true -*- # -*- warn_indent: true -*- # Copyright (c) 2017 Urabe, Shyouhei # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software an...
github
shyouhei/optdown
https://github.com/shyouhei/optdown
lib/optdown/table.rb
Ruby
mit
19
master
4,334
#! /your/favourite/path/to/ruby # -*- mode: ruby; coding: utf-8; indent-tabs-mode: nil; ruby-indent-level: 2 -*- # -*- frozen_string_literal: true -*- # -*- warn_indent: true -*- # Copyright (c) 2017 Urabe, Shyouhei # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software an...
github
shyouhei/optdown
https://github.com/shyouhei/optdown
lib/optdown/expr.rb
Ruby
mit
19
master
21,110
#! /your/favourite/path/to/ruby # -*- mode: fundamental; coding: utf-8 -*- # -*- frozen_string_literal: true -*- # -*- warn_indent: true -*- # Copyright (c) 2017 Urabe, Shyouhei # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the ...
github
shyouhei/optdown
https://github.com/shyouhei/optdown
lib/optdown/autolink.rb
Ruby
mit
19
master
2,073
#! /your/favourite/path/to/ruby # -*- mode: ruby; coding: utf-8; indent-tabs-mode: nil; ruby-indent-level: 2 -*- # -*- frozen_string_literal: true -*- # -*- warn_indent: true -*- # Copyright (c) 2017 Urabe, Shyouhei # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software an...
github
shyouhei/optdown
https://github.com/shyouhei/optdown
lib/optdown/renderer.rb
Ruby
mit
19
master
7,579
#! /your/favourite/path/to/ruby # -*- mode: ruby; coding: utf-8; indent-tabs-mode: nil; ruby-indent-level: 2 -*- # -*- frozen_string_literal: true -*- # -*- warn_indent: true -*- # Copyright (c) 2017 Urabe, Shyouhei # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software an...
github
shyouhei/optdown
https://github.com/shyouhei/optdown
lib/optdown/strikethrough.rb
Ruby
mit
19
master
2,190
#! /your/favourite/path/to/ruby # -*- mode: ruby; coding: utf-8; indent-tabs-mode: nil; ruby-indent-level: 2 -*- # -*- frozen_string_literal: false -*- # -*- warn_indent: true -*- # Copyright (c) 2017 Urabe, Shyouhei # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software a...
github
shyouhei/optdown
https://github.com/shyouhei/optdown
lib/optdown/newline.rb
Ruby
mit
19
master
1,746
#! /your/favourite/path/to/ruby # -*- mode: ruby; coding: utf-8; indent-tabs-mode: nil; ruby-indent-level: 2 -*- # -*- frozen_string_literal: true -*- # -*- warn_indent: true -*- # Copyright (c) 2017 Urabe, Shyouhei # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software an...
github
shyouhei/optdown
https://github.com/shyouhei/optdown
lib/optdown/setext_heading.rb
Ruby
mit
19
master
3,115
#! /your/favourite/path/to/ruby # -*- mode: ruby; coding: utf-8; indent-tabs-mode: nil; ruby-indent-level: 2 -*- # -*- frozen_string_literal: true -*- # -*- warn_indent: true -*- # Copyright (c) 2017 Urabe, Shyouhei # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software an...
github
shyouhei/optdown
https://github.com/shyouhei/optdown
lib/optdown/deeply_frozen.rb
Ruby
mit
19
master
2,164
#! /your/favourite/path/to/ruby # -*- mode: ruby; coding: utf-8; indent-tabs-mode: nil; ruby-indent-level: 2 -*- # -*- frozen_string_literal: false -*- # -*- warn_indent: true -*- # Copyright (c) 2017 Urabe, Shyouhei # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software a...
github
shyouhei/optdown
https://github.com/shyouhei/optdown
lib/optdown/list.rb
Ruby
mit
19
master
2,579
#! /your/favourite/path/to/ruby # -*- mode: ruby; coding: utf-8; indent-tabs-mode: nil; ruby-indent-level: 2 -*- # -*- frozen_string_literal: true -*- # -*- warn_indent: true -*- # Copyright (c) 2017 Urabe, Shyouhei # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software an...
github
shyouhei/optdown
https://github.com/shyouhei/optdown
lib/optdown/atx_heading.rb
Ruby
mit
19
master
1,962
#! /your/favourite/path/to/ruby # -*- mode: ruby; coding: utf-8; indent-tabs-mode: nil; ruby-indent-level: 2 -*- # -*- frozen_string_literal: true -*- # -*- warn_indent: true -*- # Copyright (c) 2017 Urabe, Shyouhei # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software an...
github
shyouhei/optdown
https://github.com/shyouhei/optdown
lib/optdown/link_title.rb
Ruby
mit
19
master
2,531
#! /your/favourite/path/to/ruby # -*- mode: ruby; coding: utf-8; indent-tabs-mode: nil; ruby-indent-level: 2 -*- # -*- frozen_string_literal: true -*- # -*- warn_indent: true -*- # Copyright (c) 2017 Urabe, Shyouhei # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software an...
github
shyouhei/optdown
https://github.com/shyouhei/optdown
lib/optdown/inline.rb
Ruby
mit
19
master
4,869
#! /your/favourite/path/to/ruby # -*- mode: ruby; coding: utf-8; indent-tabs-mode: nil; ruby-indent-level: 2 -*- # -*- frozen_string_literal: true -*- # -*- warn_indent: true -*- # Copyright (c) 2017 Urabe, Shyouhei # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software an...
github
shyouhei/optdown
https://github.com/shyouhei/optdown
lib/optdown/emphasis.rb
Ruby
mit
19
master
4,676
#! /your/favourite/path/to/ruby # -*- mode: ruby; coding: utf-8; indent-tabs-mode: nil; ruby-indent-level: 2 -*- # -*- frozen_string_literal: false -*- # -*- warn_indent: true -*- # Copyright (c) 2017 Urabe, Shyouhei # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software a...
github
shyouhei/optdown
https://github.com/shyouhei/optdown
lib/optdown/always_frozen.rb
Ruby
mit
19
master
1,984
#! /your/favourite/path/to/ruby # -*- mode: ruby; coding: utf-8; indent-tabs-mode: nil; ruby-indent-level: 2 -*- # -*- frozen_string_literal: true -*- # -*- warn_indent: true -*- # Copyright (c) 2017 Urabe, Shyouhei # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software an...
github
shyouhei/optdown
https://github.com/shyouhei/optdown
lib/optdown/fenced_code_block.rb
Ruby
mit
19
master
2,294
#! /your/favourite/path/to/ruby # -*- mode: ruby; coding: utf-8; indent-tabs-mode: nil; ruby-indent-level: 2 -*- # -*- frozen_string_literal: true -*- # -*- warn_indent: true -*- # Copyright (c) 2017 Urabe, Shyouhei # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software an...
github
shyouhei/optdown
https://github.com/shyouhei/optdown
lib/optdown/indented_code_block.rb
Ruby
mit
19
master
2,548
#! /your/favourite/path/to/ruby # -*- mode: ruby; coding: utf-8; indent-tabs-mode: nil; ruby-indent-level: 2 -*- # -*- frozen_string_literal: true -*- # -*- warn_indent: true -*- # Copyright (c) 2017 Urabe, Shyouhei # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software an...
github
shyouhei/optdown
https://github.com/shyouhei/optdown
lib/optdown/html5entity.rb
Ruby
mit
19
master
190,844
#! /your/favourite/path/to/ruby # -*- mode: ruby; coding: utf-8; indent-tabs-mode: nil; ruby-indent-level: 2 -*- # -*- frozen_string_literal: true -*- # -*- warn_indent: true -*- # Copyright © 2014 W3C® (MIT, ERCIM, Keio, Beihang). All Rights Reserved. # # This work is being provided by the copyright holders unde...
github
shyouhei/optdown
https://github.com/shyouhei/optdown
lib/optdown/raw_html.rb
Ruby
mit
19
master
1,651
#! /your/favourite/path/to/ruby # -*- mode: ruby; coding: utf-8; indent-tabs-mode: nil; ruby-indent-level: 2 -*- # -*- frozen_string_literal: true -*- # -*- warn_indent: true -*- # Copyright (c) 2017 Urabe, Shyouhei # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software an...
github
shyouhei/optdown
https://github.com/shyouhei/optdown
lib/optdown/paragraph.rb
Ruby
mit
19
master
2,813
#! /your/favourite/path/to/ruby # -*- mode: ruby; coding: utf-8; indent-tabs-mode: nil; ruby-indent-level: 2 -*- # -*- frozen_string_literal: true -*- # -*- warn_indent: true -*- # Copyright (c) 2017 Urabe, Shyouhei # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software an...
github
shyouhei/optdown
https://github.com/shyouhei/optdown
lib/optdown/blockhtml.rb
Ruby
mit
19
master
2,788
#! /your/favourite/path/to/ruby # -*- mode: ruby; coding: utf-8; indent-tabs-mode: nil; ruby-indent-level: 2 -*- # -*- frozen_string_literal: true -*- # -*- warn_indent: true -*- # Copyright (c) 2017 Urabe, Shyouhei # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software an...
github
shyouhei/optdown
https://github.com/shyouhei/optdown
lib/optdown/list_item.rb
Ruby
mit
19
master
5,592
#! /your/favourite/path/to/ruby # -*- mode: ruby; coding: utf-8; indent-tabs-mode: nil; ruby-indent-level: 2 -*- # -*- frozen_string_literal: true -*- # -*- warn_indent: true -*- # Copyright (c) 2017 Urabe, Shyouhei # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software an...
github
shyouhei/optdown
https://github.com/shyouhei/optdown
lib/optdown/escape.rb
Ruby
mit
19
master
1,810
#! /your/favourite/path/to/ruby # -*- mode: ruby; coding: utf-8; indent-tabs-mode: nil; ruby-indent-level: 2 -*- # -*- frozen_string_literal: true -*- # -*- warn_indent: true -*- # Copyright (c) 2017 Urabe, Shyouhei # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software an...
github
shyouhei/optdown
https://github.com/shyouhei/optdown
lib/optdown/link.rb
Ruby
mit
19
master
5,522
#! /your/favourite/path/to/ruby # -*- mode: ruby; coding: utf-8; indent-tabs-mode: nil; ruby-indent-level: 2 -*- # -*- frozen_string_literal: true -*- # -*- warn_indent: true -*- # Copyright (c) 2017 Urabe, Shyouhei # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software an...
github
shyouhei/optdown
https://github.com/shyouhei/optdown
lib/optdown/thematic_break.rb
Ruby
mit
19
master
1,689
#! /your/favourite/path/to/ruby # -*- mode: ruby; coding: utf-8; indent-tabs-mode: nil; ruby-indent-level: 2 -*- # -*- frozen_string_literal: true -*- # -*- warn_indent: true -*- # Copyright (c) 2017 Urabe, Shyouhei # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software an...
github
shyouhei/optdown
https://github.com/shyouhei/optdown
lib/optdown/code_span.rb
Ruby
mit
19
master
2,334
#! /your/favourite/path/to/ruby # -*- mode: ruby; coding: utf-8; indent-tabs-mode: nil; ruby-indent-level: 2 -*- # -*- frozen_string_literal: true -*- # -*- warn_indent: true -*- # Copyright (c) 2017 Urabe, Shyouhei # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software an...
github
shyouhei/optdown
https://github.com/shyouhei/optdown
lib/optdown/token.rb
Ruby
mit
19
master
3,210
#! /your/favourite/path/to/ruby # -*- mode: ruby; coding: utf-8; indent-tabs-mode: nil; ruby-indent-level: 2 -*- # -*- frozen_string_literal: true -*- # -*- warn_indent: true -*- # Copyright (c) 2017 Urabe, Shyouhei # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software an...
github
shyouhei/optdown
https://github.com/shyouhei/optdown
lib/optdown/xprintf.rb
Ruby
mit
19
master
2,885
#! /your/favourite/path/to/ruby # -*- mode: ruby; coding: utf-8; indent-tabs-mode: nil; ruby-indent-level: 2 -*- # -*- frozen_string_literal: false -*- # -*- warn_indent: true -*- # Copyright (c) 2017 Urabe, Shyouhei # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software a...
github
shyouhei/optdown
https://github.com/shyouhei/optdown
lib/optdown/matcher.rb
Ruby
mit
19
master
9,597
#! /your/favourite/path/to/ruby # -*- mode: ruby; coding: utf-8; indent-tabs-mode: nil; ruby-indent-level: 2 -*- # -*- frozen_string_literal: true -*- # -*- warn_indent: true -*- # Copyright (c) 2017 Urabe, Shyouhei # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software an...
github
shyouhei/optdown
https://github.com/shyouhei/optdown
lib/optdown/flanker.rb
Ruby
mit
19
master
5,875
#! /your/favourite/path/to/ruby # -*- mode: ruby; coding: utf-8; indent-tabs-mode: nil; ruby-indent-level: 2 -*- # -*- frozen_string_literal: false -*- # -*- warn_indent: true -*- # Copyright (c) 2017 Urabe, Shyouhei # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software a...
github
shyouhei/optdown
https://github.com/shyouhei/optdown
lib/optdown/plugins/plaintext_renderer.rb
Ruby
mit
19
master
6,827
#! /your/favourite/path/to/ruby # -*- mode: ruby; coding: utf-8; indent-tabs-mode: nil; ruby-indent-level: 2 -*- # -*- frozen_string_literal: true -*- # -*- warn_indent: true -*- # Copyright (c) 2017 Urabe, Shyouhei # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software an...
github
shyouhei/optdown
https://github.com/shyouhei/optdown
lib/optdown/plugins/html_renderer.rb
Ruby
mit
19
master
11,216
#! /your/favourite/path/to/ruby # -*- mode: ruby; coding: utf-8; indent-tabs-mode: nil; ruby-indent-level: 2 -*- # -*- frozen_string_literal: true -*- # -*- warn_indent: true -*- # Copyright (c) 2017 Urabe, Shyouhei # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software an...
github
shyouhei/optdown
https://github.com/shyouhei/optdown
lib/optdown/plugins/houdini_compat.rb
Ruby
mit
19
master
3,909
#! /your/favourite/path/to/ruby # -*- mode: ruby; coding: utf-8; indent-tabs-mode: nil; ruby-indent-level: 2 -*- # -*- frozen_string_literal: true -*- # -*- warn_indent: true -*- # Copyright (c) 2017 Urabe, Shyouhei # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software an...
github
ankane/highs-ruby
https://github.com/ankane/highs-ruby
highs.gemspec
Ruby
mit
19
master
535
require_relative "lib/highs/version" Gem::Specification.new do |spec| spec.name = "highs" spec.version = Highs::VERSION spec.summary = "Linear optimization for Ruby" spec.homepage = "https://github.com/ankane/highs-ruby" spec.license = "MIT" spec.author = "Andrew Kan...
github
ankane/highs-ruby
https://github.com/ankane/highs-ruby
Rakefile
Ruby
mit
19
master
2,880
require "bundler/gem_tasks" require "rake/testtask" require "ruby_memcheck" test_config = lambda do |t| t.pattern = "test/**/*_test.rb" end Rake::TestTask.new(&test_config) namespace :test do RubyMemcheck::TestTask.new(:valgrind, &test_config) end task default: :test shared_libraries = %w(libhighs.so libhighs.a...
github
ankane/highs-ruby
https://github.com/ankane/highs-ruby
lib/highs.rb
Ruby
mit
19
master
871
# stdlib require "fiddle/import" # modules require_relative "highs/array" require_relative "highs/methods" require_relative "highs/model" require_relative "highs/version" module Highs class Error < StandardError; end extend Methods class << self attr_accessor :ffi_lib end lib_name = if Gem.win_pla...
github
ankane/highs-ruby
https://github.com/ankane/highs-ruby
lib/highs/methods.rb
Ruby
mit
19
master
3,291
module Highs module Methods def lp(sense:, offset: 0, col_cost:, col_lower:, col_upper:, row_lower:, row_upper:, a_format:, a_start:, a_index:, a_value:) num_col = col_cost.size num_row = row_lower.size num_nz = a_index.size a_format = FFI::MATRIX_FORMAT.fetch(a_format) sense = FFI::...
github
ankane/highs-ruby
https://github.com/ankane/highs-ruby
lib/highs/model.rb
Ruby
mit
19
master
1,975
module Highs class Model def initialize @ptr = FFI.Highs_create @ptr.free = FFI["Highs_destroy"] check_status FFI.Highs_setBoolOptionValue(@ptr, +"output_flag", 0) end def solve(verbose: false, time_limit: nil) num_col = FFI.Highs_getNumCol(@ptr) num_row = FFI.Highs_getNumR...
github
ankane/highs-ruby
https://github.com/ankane/highs-ruby
lib/highs/array.rb
Ruby
mit
19
master
839
module Highs class BaseArray NOT_SET = Object.new def initialize(size, value = NOT_SET) @size = size @ptr = if value == NOT_SET Fiddle::Pointer.malloc(size * self.class::SIZE, Fiddle::RUBY_FREE) else if value.size != size # TODO add variable name to...
github
ankane/highs-ruby
https://github.com/ankane/highs-ruby
lib/highs/ffi.rb
Ruby
mit
19
master
5,451
module Highs module FFI extend Fiddle::Importer libs = Array(Highs.ffi_lib).dup begin dlload Fiddle.dlopen(libs.shift) rescue Fiddle::DLError => e retry if libs.any? raise e end # https://github.com/ERGO-Code/HiGHS/blob/master/src/interfaces/highs_c_api.h VAR_TYPE = { ...
github
ankane/highs-ruby
https://github.com/ankane/highs-ruby
test/test_helper.rb
Ruby
mit
19
master
484
require "bundler/setup" Bundler.require(:default) require "minitest/autorun" class Minitest::Test def setup # autoload before GC.stress Highs::FFI if stress? GC.stress = true if stress? end def teardown GC.stress = false if stress? end def stress? ENV["STRESS"] end def assert_elem...
github
ankane/highs-ruby
https://github.com/ankane/highs-ruby
test/highs_test.rb
Ruby
mit
19
master
4,042
require_relative "test_helper" class HighsTest < Minitest::Test def test_lp model = Highs.lp( sense: :minimize, col_cost: [8, 10], col_lower: [0, 0], col_upper: [1e30, 1e30], row_lower: [7, 12, 6], row_upper: [1e30, 1e30, 1e30], a_format: :colwise, ...
github
covidence/ssolo
https://github.com/covidence/ssolo
ssolo.gemspec
Ruby
mit
19
main
1,043
# frozen_string_literal: true require_relative "lib/ssolo/version" Gem::Specification.new do |spec| spec.name = "ssolo" spec.version = SSOlo::VERSION spec.authors = ["Pat Allan"] spec.email = ["pat@freelancing-gods.com"] spec.summary = "A micro SAML IdP for development/test environments" spec.homepage = ...
github
covidence/ssolo
https://github.com/covidence/ssolo
spec/spec_helper.rb
Ruby
mit
19
main
368
# frozen_string_literal: true require "ssolo" RSpec.configure do |config| # Enable flags like --only-failures and --next-failure config.example_status_persistence_file_path = ".rspec_status" # Disable RSpec exposing methods globally on `Module` and `main` config.disable_monkey_patching! config.expect_with...
github
covidence/ssolo
https://github.com/covidence/ssolo
spec/requests/server_spec.rb
Ruby
mit
19
main
3,243
# frozen_string_literal: true require "spec_helper" require "rack/test" require "ruby-saml" OneLogin::RubySaml::Logging.logger.level = :info RSpec.describe SSOlo::Server do include Rack::Test::Methods let(:sp_private_key) { OpenSSL::PKey::RSA.new(2048) } let(:sp_certificate) { SSOlo::Certificate.call(sp_priva...
github
covidence/ssolo
https://github.com/covidence/ssolo
spec/ssolo/server_spec.rb
Ruby
mit
19
main
929
# frozen_string_literal: true require "fileutils" require "spec_helper" RSpec.describe SSOlo::Server do let(:sp_private_key) { OpenSSL::PKey::RSA.new(2048) } let(:sp_certificate) { SSOlo::Certificate.call(sp_private_key) } it "generates different credentials for each instance by default" do a = SSOlo::Serv...
github
covidence/ssolo
https://github.com/covidence/ssolo
lib/ssolo.rb
Ruby
mit
19
main
440
# frozen_string_literal: true require_relative "ssolo/certificate" require_relative "ssolo/controller" require_relative "ssolo/server" require_relative "ssolo/templates/entry" require_relative "ssolo/templates/metadata" require_relative "ssolo/templates/response" require_relative "ssolo/version" # This gem provides a...
github
covidence/ssolo
https://github.com/covidence/ssolo
lib/ssolo/server.rb
Ruby
mit
19
main
2,810
# frozen_string_literal: true require "rack" require "saml_idp" require_relative "certificate" module SSOlo # A rack app that operates as an extremely minimal SAML Identity Provider. # There are two endpoints: # # - GET /metadata -- which returns the SAML IdP metadata as XML # - GET /saml -- which, if ther...
github
covidence/ssolo
https://github.com/covidence/ssolo
lib/ssolo/controller.rb
Ruby
mit
19
main
1,105
# frozen_string_literal: true module SSOlo # Manages the external process of a SSOlo server class Controller MAXIMUM_ATTEMPTS = 20 def metadata_url @metadata_url ||= "http://127.0.0.1:#{port}/metadata" end def settings @settings ||= begin wait_until_booted OneLogin::R...
github
covidence/ssolo
https://github.com/covidence/ssolo
lib/ssolo/certificate.rb
Ruby
mit
19
main
1,187
# frozen_string_literal: true require "openssl" module SSOlo # Generates an X509 certificate with the given private key. These certificates # are not meant for production use. class Certificate def self.call(...) new(...).call end def initialize(private_key) @private_key = private_key ...
github
covidence/ssolo
https://github.com/covidence/ssolo
lib/ssolo/templates/entry.rb
Ruby
mit
19
main
1,017
# frozen_string_literal: true module SSOlo module Templates # Returns HTML for a form that contains an in-progress SAML request, with # a field to specify a custom Name ID/email address. class Entry def self.call(request) <<~HTML <!DOCTYPE html> <html> <head>...
github
covidence/ssolo
https://github.com/covidence/ssolo
lib/ssolo/templates/metadata.rb
Ruby
mit
19
main
1,106
# frozen_string_literal: true module SSOlo module Templates # Renders the XML details of the Identity Provider class Metadata def self.call(request, certificate) <<~XML <?xml version="1.0" encoding="utf-8"?> <EntityDescriptor xmlns="urn:oasis:names:tc:SAML:2.0:metadata" enti...
github
covidence/ssolo
https://github.com/covidence/ssolo
lib/ssolo/templates/response.rb
Ruby
mit
19
main
2,730
# frozen_string_literal: true module SSOlo module Templates # Returns the HTML output of an auto-submitting form, to post the SAML # response through to the service provider. class Response def self.call(...) new(...).call end def initialize(server, request, name_id) @s...
github
delano/otto
https://github.com/delano/otto
Gemfile
Ruby
mit
19
main
969
# Gemfile # To install all development and test dependencies: # # $ bundle config set with 'development test' # $ bundle install source 'https://rubygems.org' gemspec group :test do gem 'rack-test' gem 'rspec', '~> 3.13' gem 'user_agent_parser', '~> 2.18' # Validate anonymized UAs preserve semantic info e...
github
delano/otto
https://github.com/delano/otto
otto.gemspec
Ruby
mit
19
main
1,499
# otto.gemspec require_relative 'lib/otto/version' Gem::Specification.new do |spec| spec.name = 'otto' spec.version = Otto::VERSION.to_s spec.summary = 'Define your rack-apps in plaintext.' spec.description = "Otto: #{spec.summary}" spec.email = 'gems@solutious.com' spec.aut...
github
delano/otto
https://github.com/delano/otto
examples/logging_improvements.rb
Ruby
mit
19
main
2,452
#!/usr/bin/env ruby # frozen_string_literal: true # Example demonstrating Otto's enhanced logging capabilities # Inspired by structured logging patterns with timing require_relative '../lib/otto' # Set up Otto with structured logging Otto.logger = Logger.new(STDOUT) Otto.debug = true # Create a simple Otto app otto...
github
delano/otto
https://github.com/delano/otto
examples/simple_geo_resolver.rb
Ruby
mit
19
main
3,295
#!/usr/bin/env ruby # frozen_string_literal: true # Otto GeoResolver Extension Guide # # This guide shows two approaches to extend Otto's IP geolocation: # 1. Configuration-based (simple, inline) # 2. Subclass-based (full control) require 'bundler/setup' require 'otto' # =============================================...
github
delano/otto
https://github.com/delano/otto
examples/backtrace_sanitization_demo.rb
Ruby
mit
19
main
2,836
#!/usr/bin/env ruby # frozen_string_literal: true # Demo script showing Otto's automatic backtrace sanitization in structured_log # # This demonstrates that Otto now automatically sanitizes backtraces when they # appear in structured log data, eliminating the need for monkey patches. require_relative '../lib/otto' re...
github
delano/otto
https://github.com/delano/otto
examples/error_handler_registration.rb
Ruby
mit
19
main
4,033
#!/usr/bin/env ruby # frozen_string_literal: true # Example: Error Handler Registration # # This example demonstrates how to register custom error handlers for expected # business logic errors, preventing them from being logged as unhandled 500 errors. require_relative '../lib/otto' # Define some business logic erro...
github
delano/otto
https://github.com/delano/otto
examples/basic/app.rb
Ruby
mit
19
main
1,452
# examples/basic/app.rb require_relative '../../lib/otto/design_system' # Basic example application demonstrating Otto framework features. class App include Otto::DesignSystem attr_reader :req, :res def initialize(req, res) @req = req @res = res res.he...
github
delano/otto
https://github.com/delano/otto
examples/basic/config.ru
Ruby
mit
19
main
574
# examples/basic/config.ru # OTTO EXAMPLE APP CONFIG - 2011-12-17 # # Usage: # # $ thin -e dev -R config.ru -p 10770 start public_path = File.expand_path('../../public', __dir__) require_relative '../../lib/otto' require_relative 'app' app = Otto.new('routes') # DEV: Run web apps with extra logging and reloadi...
github
delano/otto
https://github.com/delano/otto
examples/mcp_demo/config.ru
Ruby
mit
19
main
458
# examples/mcp_demo/config.ru require_relative '../../lib/otto' require_relative 'app' # Initialize Otto with MCP support app = Otto.new('routes', { mcp_enabled: true, auth_tokens: ['demo-token-123', 'another-token-456'], requests_per_minute: 60, # Rate limiting for the MCP endpoint tools_per_minute: 20, }) ...
github
delano/otto
https://github.com/delano/otto
examples/mcp_demo/app.rb
Ruby
mit
19
main
1,484
# examples/mcp_demo/app.rb require 'json' require 'time' # DemoApp provides basic HTML pages for the demo. class DemoApp def self.index(_req, res) res.headers['content-type'] = 'text/html; charset=utf-8' res.body = <<~HTML <h1>Otto MCP Demo</h1> <p>This example demonstrates Otto's Model-Controlle...
github
delano/otto
https://github.com/delano/otto
examples/authentication_strategies/config.ru
Ruby
mit
19
main
647
# frozen_string_literal: true require 'rack' require_relative '../../lib/otto' require_relative 'app/auth' require_relative 'app/controllers/main_controller' require_relative 'app/controllers/auth_controller' # Configure Otto with advanced features otto = Otto.new('routes') # Enable security features to demonstrate ...
github
delano/otto
https://github.com/delano/otto
examples/authentication_strategies/app/auth.rb
Ruby
mit
19
main
2,426
# frozen_string_literal: true # Authentication result data class to contain the session, user and anything # else we want to make available to the route handlers/controllers/logic classes. AuthResultData = Data.define(:session, :user) do def initialize(session: {}, user: {}) super(session: session, user: user) ...
github
delano/otto
https://github.com/delano/otto
examples/authentication_strategies/app/controllers/main_controller.rb
Ruby
mit
19
main
806
require 'json' require 'time' class MainController def self.index [200, { 'content-type' => 'text/html' }, ['<h1>Authentication Strategies Example</h1>']] end def self.receive_feedback [200, { 'content-type' => 'text/plain' }, ['Feedback received']] end def self.dashboard [200, { 'content-type'...
github
delano/otto
https://github.com/delano/otto
examples/authentication_strategies/app/controllers/auth_controller.rb
Ruby
mit
19
main
905
require 'json' class AuthController def self.login_form [200, { 'content-type' => 'text/html' }, ['<h1>Login</h1><p>Use ?token=demo_token, ?token=admin_token, or ?api_key=demo_api_key_123</p>']] end def self.login # In a real app, you'd handle login logic here. # For this demo, we redirect to the pr...
github
delano/otto
https://github.com/delano/otto
examples/security_features/app.rb
Ruby
mit
19
main
9,531
# examples/security_features/app.rb require_relative '../../lib/otto/design_system' # Example application demonstrating Otto's security features including CSRF protection class SecureApp include Otto::DesignSystem include Otto::Security::CSRFHelpers attr_reader :req, :res def initialize(req, res) @req ...
github
delano/otto
https://github.com/delano/otto
examples/security_features/config.ru
Ruby
mit
19
main
2,714
# examples/security_features/config.ru # OTTO SECURE EXAMPLE APP CONFIG - 2025-07-18 # # Usage: # # $ thin -e dev -R config.ru -p 10770 start # public_path = File.expand_path('../../public', __dir__) require_relative '../../lib/otto' require_relative 'app' # Create Otto app with security features enabled app = ...
github
delano/otto
https://github.com/delano/otto
examples/advanced_routes/config.rb
Ruby
mit
19
main
537
# frozen_string_literal: true require 'rack' require_relative '../../lib/otto' require_relative 'app' # Simple Otto configuration demonstrating advanced routes syntax otto = Otto.new('routes') # Enable basic security features to demonstrate CSRF functionality otto.enable_csrf_protection! # Set error handlers otto.n...
github
delano/otto
https://github.com/delano/otto
examples/advanced_routes/puma.rb
Ruby
mit
19
main
453
#!/usr/bin/env ruby # frozen_string_literal: true require 'puma' # The shared config file returns the configured Otto app otto_app = require_relative 'config' # Configure Puma server Puma::Server.new(otto_app).tap do |server| server.add_tcp_listener '127.0.0.1', 9292 puts "Otto Advanced Routes Example running o...
github
delano/otto
https://github.com/delano/otto
examples/advanced_routes/run.rb
Ruby
mit
19
main
1,021
#!/usr/bin/env ruby # frozen_string_literal: true require 'webrick' # The shared config file returns the configured Otto app otto_app = require_relative 'config' # Create a simple WEBrick server server = WEBrick::HTTPServer.new( Port: 9292, Logger: WEBrick::Log.new($stdout, WEBrick::Log::INFO) ) # Mount the Ott...
github
delano/otto
https://github.com/delano/otto
examples/advanced_routes/test.rb
Ruby
mit
19
main
1,498
#!/usr/bin/env ruby # frozen_string_literal: true # The shared config file returns the configured Otto app otto_app = require_relative 'config' # Simple test runner to demonstrate routes without a server def test_route(method, path, params = {}) query_string = params.map { |k, v| "#{k}=#{v}" }.join('&') env = { ...
github
delano/otto
https://github.com/delano/otto
examples/advanced_routes/app.rb
Ruby
mit
19
main
1,310
# frozen_string_literal: true # Application Loader # Controllers require_relative 'app/controllers/routes_app' require_relative 'app/controllers/handlers/async' require_relative 'app/controllers/handlers/dynamic' require_relative 'app/controllers/handlers/static' require_relative 'app/controllers/modules/auth' requir...
github
delano/otto
https://github.com/delano/otto
examples/advanced_routes/app/controllers/routes_app.rb
Ruby
mit
19
main
6,978
# frozen_string_literal: true require 'json' require 'time' # Main application class demonstrating advanced routes syntax class RoutesApp # ======================================== # BASIC ROUTES # ======================================== def self.index [200, { 'content-type' => 'text/html' }, ['<h1>Adva...
github
delano/otto
https://github.com/delano/otto
examples/advanced_routes/app/controllers/handlers/static.rb
Ruby
mit
19
main
203
# frozen_string_literal: true module Handlers class Static def self.serve [200, { 'content-type' => 'text/html' }, ['<h1>Static Handler</h1><p>Static content served</p>']] end end end
github
delano/otto
https://github.com/delano/otto
examples/advanced_routes/app/controllers/modules/auth.rb
Ruby
mit
19
main
203
# frozen_string_literal: true module Modules class Auth def process [200, { 'content-type' => 'text/html' }, ['<h1>Auth Module</h1><p>Instance method implementation</p>']] end end end
github
delano/otto
https://github.com/delano/otto
examples/advanced_routes/app/controllers/modules/validator.rb
Ruby
mit
19
main
206
# frozen_string_literal: true module Modules class Validator def validate [200, { 'content-type' => 'application/json' }, ['{"validation": "passed", "module": "Validator"}']] end end end
github
delano/otto
https://github.com/delano/otto
examples/advanced_routes/app/controllers/modules/transformer.rb
Ruby
mit
19
main
210
# frozen_string_literal: true module Modules class Transformer def transform [200, { 'content-type' => 'application/json' }, ['{"transformation": "complete", "csrf": "exempt"}']] end end end
github
delano/otto
https://github.com/delano/otto
examples/advanced_routes/app/controllers/v2/settings.rb
Ruby
mit
19
main
209
# frozen_string_literal: true module V2 class Settings def self.modify [200, { 'content-type' => 'application/json' }, ['{"message": "V2 settings modified", "csrf": "exempt"}']] end end end
github
delano/otto
https://github.com/delano/otto
examples/advanced_routes/app/logic/input_validator.rb
Ruby
mit
19
main
455
# frozen_string_literal: true class InputValidator attr_reader :context, :params, :locale def initialize(context, params, locale) @context = context @params = params @locale = locale end def process { validation: 'Input validated successfully', validated_fields: @params.keys, ...
github
delano/otto
https://github.com/delano/otto
examples/advanced_routes/app/logic/test_logic.rb
Ruby
mit
19
main
391
# frozen_string_literal: true class TestLogic attr_reader :context, :params, :locale def initialize(context, params, locale) @context = context @params = params @locale = locale end def process { test: 'Logic class test', params_received: @params, processing_complete: true, ...
github
delano/otto
https://github.com/delano/otto
examples/advanced_routes/app/logic/simple_logic.rb
Ruby
mit
19
main
463
# frozen_string_literal: true class SimpleLogic attr_reader :context, :params, :locale def initialize(context, params, locale) @context = context @params = params @locale = locale end def process { message: 'Simple logic processed', params: @params, locale: @locale, au...
github
delano/otto
https://github.com/delano/otto
examples/advanced_routes/app/logic/reports_generator.rb
Ruby
mit
19
main
540
# frozen_string_literal: true module Reports class Generator attr_reader :context, :params, :locale def initialize(context, params, locale) @context = context @params = params @locale = locale end def process { report_generation: 'Complete', namespace: 'Repor...