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
q9f/eth.rb
https://github.com/q9f/eth.rb
lib/eth.rb
Ruby
apache-2.0
235
main
1,040
# Copyright (c) 2016-2025 The Ruby-Eth Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
github
q9f/eth.rb
https://github.com/q9f/eth.rb
lib/eth/util.rb
Ruby
apache-2.0
235
main
8,285
# Copyright (c) 2016-2025 The Ruby-Eth Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
github
q9f/eth.rb
https://github.com/q9f/eth.rb
lib/eth/unit.rb
Ruby
apache-2.0
235
main
1,668
# Copyright (c) 2016-2025 The Ruby-Eth Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
github
q9f/eth.rb
https://github.com/q9f/eth.rb
lib/eth/key.rb
Ruby
apache-2.0
235
main
5,945
# Copyright (c) 2016-2025 The Ruby-Eth Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
github
q9f/eth.rb
https://github.com/q9f/eth.rb
lib/eth/contract.rb
Ruby
apache-2.0
235
main
7,603
# Copyright (c) 2016-2025 The Ruby-Eth Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
github
q9f/eth.rb
https://github.com/q9f/eth.rb
lib/eth/chain.rb
Ruby
apache-2.0
235
main
6,545
# Copyright (c) 2016-2025 The Ruby-Eth Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
github
q9f/eth.rb
https://github.com/q9f/eth.rb
lib/eth/tx.rb
Ruby
apache-2.0
235
main
14,804
# Copyright (c) 2016-2025 The Ruby-Eth Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
github
q9f/eth.rb
https://github.com/q9f/eth.rb
lib/eth/rlp.rb
Ruby
apache-2.0
235
main
1,962
# Copyright (c) 2016-2025 The Ruby-Eth Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
github
q9f/eth.rb
https://github.com/q9f/eth.rb
lib/eth/version.rb
Ruby
apache-2.0
235
main
961
# Copyright (c) 2016-2025 The Ruby-Eth Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
github
q9f/eth.rb
https://github.com/q9f/eth.rb
lib/eth/ens.rb
Ruby
apache-2.0
235
main
955
# Copyright (c) 2016-2025 The Ruby-Eth Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
github
q9f/eth.rb
https://github.com/q9f/eth.rb
lib/eth/bls.rb
Ruby
apache-2.0
235
main
2,315
# frozen_string_literal: true require "bls" module Eth # Helper methods for interacting with BLS12-381 points and signatures module Bls module_function # Decode a compressed G1 public key from hex. # @param [String] hex a compressed G1 point # @return [BLS::PointG1] def decode_public_key(hex)...
github
q9f/eth.rb
https://github.com/q9f/eth.rb
lib/eth/client.rb
Ruby
apache-2.0
235
main
21,035
# Copyright (c) 2016-2025 The Ruby-Eth Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
github
q9f/eth.rb
https://github.com/q9f/eth.rb
lib/eth/signature.rb
Ruby
apache-2.0
235
main
6,977
# Copyright (c) 2016-2025 The Ruby-Eth Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
github
q9f/eth.rb
https://github.com/q9f/eth.rb
lib/eth/address.rb
Ruby
apache-2.0
235
main
3,211
# Copyright (c) 2016-2025 The Ruby-Eth Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
github
q9f/eth.rb
https://github.com/q9f/eth.rb
lib/eth/solidity.rb
Ruby
apache-2.0
235
main
2,897
# Copyright (c) 2016-2025 The Ruby-Eth Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
github
q9f/eth.rb
https://github.com/q9f/eth.rb
lib/eth/constant.rb
Ruby
apache-2.0
235
main
1,950
# Copyright (c) 2016-2025 The Ruby-Eth Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
github
q9f/eth.rb
https://github.com/q9f/eth.rb
lib/eth/api.rb
Ruby
apache-2.0
235
main
8,568
# Copyright (c) 2016-2025 The Ruby-Eth Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
github
q9f/eth.rb
https://github.com/q9f/eth.rb
lib/eth/eip712.rb
Ruby
apache-2.0
235
main
8,592
# Copyright (c) 2016-2025 The Ruby-Eth Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
github
q9f/eth.rb
https://github.com/q9f/eth.rb
lib/eth/abi.rb
Ruby
apache-2.0
235
main
5,410
# Copyright (c) 2016-2025 The Ruby-Eth Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
github
q9f/eth.rb
https://github.com/q9f/eth.rb
lib/eth/rlp/decoder.rb
Ruby
apache-2.0
235
main
4,327
# Copyright (c) 2016-2025 The Ruby-Eth Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
github
q9f/eth.rb
https://github.com/q9f/eth.rb
lib/eth/rlp/encoder.rb
Ruby
apache-2.0
235
main
2,702
# Copyright (c) 2016-2025 The Ruby-Eth Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
github
q9f/eth.rb
https://github.com/q9f/eth.rb
lib/eth/rlp/sedes.rb
Ruby
apache-2.0
235
main
2,627
# Copyright (c) 2016-2025 The Ruby-Eth Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
github
q9f/eth.rb
https://github.com/q9f/eth.rb
lib/eth/rlp/sedes/big_endian_int.rb
Ruby
apache-2.0
235
main
2,742
# Copyright (c) 2016-2025 The Ruby-Eth Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
github
q9f/eth.rb
https://github.com/q9f/eth.rb
lib/eth/rlp/sedes/binary.rb
Ruby
apache-2.0
235
main
3,824
# Copyright (c) 2016-2025 The Ruby-Eth Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
github
q9f/eth.rb
https://github.com/q9f/eth.rb
lib/eth/rlp/sedes/list.rb
Ruby
apache-2.0
235
main
3,074
# Copyright (c) 2016-2025 The Ruby-Eth Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
github
q9f/eth.rb
https://github.com/q9f/eth.rb
lib/eth/client/ipc.rb
Ruby
apache-2.0
235
main
1,445
# Copyright (c) 2016-2025 The Ruby-Eth Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
github
q9f/eth.rb
https://github.com/q9f/eth.rb
lib/eth/client/ws.rb
Ruby
apache-2.0
235
main
9,254
# Copyright (c) 2016-2025 The Ruby-Eth Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
github
q9f/eth.rb
https://github.com/q9f/eth.rb
lib/eth/client/http.rb
Ruby
apache-2.0
235
main
2,341
# Copyright (c) 2016-2025 The Ruby-Eth Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
github
q9f/eth.rb
https://github.com/q9f/eth.rb
lib/eth/ens/coin_type.rb
Ruby
apache-2.0
235
main
1,432
# Copyright (c) 2016-2025 The Ruby-Eth Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
github
q9f/eth.rb
https://github.com/q9f/eth.rb
lib/eth/ens/resolver.rb
Ruby
apache-2.0
235
main
4,503
# Copyright (c) 2016-2025 The Ruby-Eth Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
github
q9f/eth.rb
https://github.com/q9f/eth.rb
lib/eth/key/encrypter.rb
Ruby
apache-2.0
235
main
6,170
# Copyright (c) 2016-2025 The Ruby-Eth Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
github
q9f/eth.rb
https://github.com/q9f/eth.rb
lib/eth/key/decrypter.rb
Ruby
apache-2.0
235
main
3,697
# Copyright (c) 2016-2025 The Ruby-Eth Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
github
q9f/eth.rb
https://github.com/q9f/eth.rb
lib/eth/contract/initializer.rb
Ruby
apache-2.0
235
main
1,401
# Copyright (c) 2016-2025 The Ruby-Eth Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
github
q9f/eth.rb
https://github.com/q9f/eth.rb
lib/eth/contract/function_output.rb
Ruby
apache-2.0
235
main
1,376
# Copyright (c) 2016-2025 The Ruby-Eth Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
github
q9f/eth.rb
https://github.com/q9f/eth.rb
lib/eth/contract/error.rb
Ruby
apache-2.0
235
main
2,127
# Copyright (c) 2016-2025 The Ruby-Eth Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
github
q9f/eth.rb
https://github.com/q9f/eth.rb
lib/eth/contract/function.rb
Ruby
apache-2.0
235
main
2,642
# Copyright (c) 2016-2025 The Ruby-Eth Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
github
q9f/eth.rb
https://github.com/q9f/eth.rb
lib/eth/contract/event.rb
Ruby
apache-2.0
235
main
3,270
# Copyright (c) 2016-2025 The Ruby-Eth Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
github
q9f/eth.rb
https://github.com/q9f/eth.rb
lib/eth/contract/function_input.rb
Ruby
apache-2.0
235
main
1,357
# Copyright (c) 2016-2025 The Ruby-Eth Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
github
q9f/eth.rb
https://github.com/q9f/eth.rb
lib/eth/abi/function.rb
Ruby
apache-2.0
235
main
4,179
# Copyright (c) 2016-2025 The Ruby-Eth Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
github
q9f/eth.rb
https://github.com/q9f/eth.rb
lib/eth/abi/type.rb
Ruby
apache-2.0
235
main
10,202
# Copyright (c) 2016-2025 The Ruby-Eth Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
github
q9f/eth.rb
https://github.com/q9f/eth.rb
lib/eth/abi/decoder.rb
Ruby
apache-2.0
235
main
8,483
# Copyright (c) 2016-2025 The Ruby-Eth Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
github
q9f/eth.rb
https://github.com/q9f/eth.rb
lib/eth/abi/encoder.rb
Ruby
apache-2.0
235
main
11,845
# Copyright (c) 2016-2025 The Ruby-Eth Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
github
q9f/eth.rb
https://github.com/q9f/eth.rb
lib/eth/abi/event.rb
Ruby
apache-2.0
235
main
5,617
# Copyright (c) 2016-2025 The Ruby-Eth Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
github
q9f/eth.rb
https://github.com/q9f/eth.rb
lib/eth/abi/packed/encoder.rb
Ruby
apache-2.0
235
main
7,149
# Copyright (c) 2016-2025 The Ruby-Eth Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
github
q9f/eth.rb
https://github.com/q9f/eth.rb
lib/eth/tx/eip1559.rb
Ruby
apache-2.0
235
main
14,243
# Copyright (c) 2016-2025 The Ruby-Eth Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
github
q9f/eth.rb
https://github.com/q9f/eth.rb
lib/eth/tx/eip4844.rb
Ruby
apache-2.0
235
main
15,997
# Copyright (c) 2016-2025 The Ruby-Eth Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
github
q9f/eth.rb
https://github.com/q9f/eth.rb
lib/eth/tx/eip7702.rb
Ruby
apache-2.0
235
main
20,560
# Copyright (c) 2016-2025 The Ruby-Eth Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
github
q9f/eth.rb
https://github.com/q9f/eth.rb
lib/eth/tx/legacy.rb
Ruby
apache-2.0
235
main
11,632
# Copyright (c) 2016-2025 The Ruby-Eth Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
github
q9f/eth.rb
https://github.com/q9f/eth.rb
lib/eth/tx/eip2930.rb
Ruby
apache-2.0
235
main
13,734
# Copyright (c) 2016-2025 The Ruby-Eth Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
github
AndyObtiva/how-to-build-desktop-applications-in-ruby
https://github.com/AndyObtiva/how-to-build-desktop-applications-in-ruby
section-01-gui-basics/exercise-08/hello_layout_with_horizontal_and_vertical_boxes.rb
Ruby
mit
235
rubyconf2024
364
require 'glimmer-dsl-libui' include Glimmer window('Hello, Layout!') { content_size 50, 20 margined true vertical_box { horizontal_box { label('Full Name') entry { text 'John Smith' } } horizontal_box { label('DOB') date_picker { time year: 2004,...
github
AndyObtiva/how-to-build-desktop-applications-in-ruby
https://github.com/AndyObtiva/how-to-build-desktop-applications-in-ruby
section-01-gui-basics/test-01/address_form.rb
Ruby
mit
235
rubyconf2024
1,242
require 'glimmer-dsl-libui' include Glimmer def update_address_summary address_summary = [@full_name_entry.text, @street_entry.text, @city_entry.text, @state_entry.text, @zip_entry.text].reject(&:empty?).join(', ') address_summary += ' (Billing & Shipping)' if @billing_and_shipping_checkbox.checked? @summary_la...
github
AndyObtiva/how-to-build-desktop-applications-in-ruby
https://github.com/AndyObtiva/how-to-build-desktop-applications-in-ruby
section-01-gui-basics/exercise-11/option_selector.rb
Ruby
mit
235
rubyconf2024
738
require 'glimmer-dsl-libui' include Glimmer window('Option Selector') { content_size 50, 20 margined true vertical_box { @selected_options_label = label('None') horizontal_box { @checkboxes = 3.times.map do |n| checkbox("Option #{n+1}") { on_toggled do puts "C...
github
AndyObtiva/how-to-build-desktop-applications-in-ruby
https://github.com/AndyObtiva/how-to-build-desktop-applications-in-ruby
section-01-gui-basics/exercise-10/hello_layout_form.rb
Ruby
mit
235
rubyconf2024
288
require 'glimmer-dsl-libui' include Glimmer window('Hello, Layout!') { content_size 50, 20 margined true form { entry { label 'Full Name' text 'John Smith' } date_picker { label 'DOB' time year: 2004, mon: 11, mday: 17 } } }.show
github
AndyObtiva/how-to-build-desktop-applications-in-ruby
https://github.com/AndyObtiva/how-to-build-desktop-applications-in-ruby
section-01-gui-basics/exercise-09/hello_layout_with_horizontal_and_vertical_boxes_stretchy.rb
Ruby
mit
235
rubyconf2024
430
require 'glimmer-dsl-libui' include Glimmer window('Hello, Layout!') { content_size 50, 20 margined true vertical_box { horizontal_box { label('Full Name') { stretchy false } entry { text 'John Smith' } } horizontal_box { label('DOB') { s...
github
AndyObtiva/how-to-build-desktop-applications-in-ruby
https://github.com/AndyObtiva/how-to-build-desktop-applications-in-ruby
section-01-gui-basics/exercise-07/hello_layout_with_horizontal_box.rb
Ruby
mit
235
rubyconf2024
209
require 'glimmer-dsl-libui' include Glimmer window('Hello, Layout!') { content_size 50, 20 margined true horizontal_box { label('Full Name') entry { text 'John Smith' } } }.show
github
AndyObtiva/how-to-build-desktop-applications-in-ruby
https://github.com/AndyObtiva/how-to-build-desktop-applications-in-ruby
section-02-mvc-software-architecture/exercise-02/option_selector_mvc_implicit_controller.rb
Ruby
mit
235
rubyconf2024
1,478
require 'glimmer-dsl-libui' class OptionSelectorModel attr_accessor :selected_options def initialize @selected_options = [] end def toggle_option(option_number) if @selected_options.include?(option_number) @selected_options.delete(option_number) else @selected_options << option_nu...
github
AndyObtiva/how-to-build-desktop-applications-in-ruby
https://github.com/AndyObtiva/how-to-build-desktop-applications-in-ruby
section-02-mvc-software-architecture/exercise-01/option_selector_mvc_explicit_controller.rb
Ruby
mit
235
rubyconf2024
1,845
require 'glimmer-dsl-libui' class OptionSelectorModel attr_accessor :selected_options def initialize @selected_options = [] end def toggle_option(option_number) if @selected_options.include?(option_number) @selected_options.delete(option_number) else @selected_options << option_nu...
github
AndyObtiva/how-to-build-desktop-applications-in-ruby
https://github.com/AndyObtiva/how-to-build-desktop-applications-in-ruby
section-02-mvc-software-architecture/test-01/address_form_mvc.rb
Ruby
mit
235
rubyconf2024
2,438
require 'glimmer-dsl-libui' class Address attr_accessor :full_name, :street, :city, :state, :zip, :billing_and_shipping alias billing_and_shipping? billing_and_shipping def summary address_summary = [full_name, street, city, state, zip].compact.reject(&:empty?).join(', ') address_summary += ' (Billing...
github
AndyObtiva/how-to-build-desktop-applications-in-ruby
https://github.com/AndyObtiva/how-to-build-desktop-applications-in-ruby
section-03-mvp-data-binding/exercise-02/option_selector_mvp_and_data_binding_model_observer.rb
Ruby
mit
235
rubyconf2024
1,354
require 'glimmer-dsl-libui' class OptionSelectorModel attr_accessor :option1, :option2, :option3, :summary def initialize observer = Glimmer::DataBinding::Observer.proc { update_summary } observer.observe(self, :option1) observer.observe(self, :option2) observer.observe(self, :option3) updat...
github
AndyObtiva/how-to-build-desktop-applications-in-ruby
https://github.com/AndyObtiva/how-to-build-desktop-applications-in-ruby
section-03-mvp-data-binding/exercise-05/form_table.rb
Ruby
mit
235
rubyconf2024
3,830
require 'glimmer-dsl-libui' Contact = Struct.new(:name, :email, :phone, :city, :state) do def valid? values.map(&:to_s).any?(&:empty?) end def reset self.name = '' self.email = '' self.phone = '' self.city = '' self.state = '' end end class FormTablePresenter attr_accessor :contac...
github
AndyObtiva/how-to-build-desktop-applications-in-ruby
https://github.com/AndyObtiva/how-to-build-desktop-applications-in-ruby
section-03-mvp-data-binding/exercise-01/option_selector_mvp_and_data_binding_model_attr_writers.rb
Ruby
mit
235
rubyconf2024
1,386
require 'glimmer-dsl-libui' class OptionSelectorModel attr_accessor :option1, :option2, :option3, :summary def initialize update_summary end def option1=(value) @option1 = value update_summary end def option2=(value) @option2 = value update_summary end def option3=(value...
github
AndyObtiva/how-to-build-desktop-applications-in-ruby
https://github.com/AndyObtiva/how-to-build-desktop-applications-in-ruby
section-03-mvp-data-binding/exercise-06/dynamic_form.rb
Ruby
mit
235
rubyconf2024
2,030
require 'glimmer-dsl-libui' class User ALL_ATTRIBUTES = [:first_name, :last_name, :email, :street, :city, :state, :zip_code, :country] attr_accessor :customizable_attributes, *ALL_ATTRIBUTES def initialize # allow customizing all attributes by default self.customizable_attributes = ALL_ATTRIBUTES.d...
github
AndyObtiva/how-to-build-desktop-applications-in-ruby
https://github.com/AndyObtiva/how-to-build-desktop-applications-in-ruby
section-03-mvp-data-binding/exercise-04/option_selector_mvp_and_data_binding_with_reset.rb
Ruby
mit
235
rubyconf2024
1,333
require 'glimmer-dsl-libui' class OptionSelectorModel attr_accessor :option1, :option2, :option3 def summary selected_options = (1..3).select { |n| send("option#{n}") } if selected_options.empty? 'None' else selected_options.map {|n| "Option #{n}" }.join(', ') end end def rese...
github
AndyObtiva/how-to-build-desktop-applications-in-ruby
https://github.com/AndyObtiva/how-to-build-desktop-applications-in-ruby
section-03-mvp-data-binding/exercise-03/option_selector_mvp_and_data_binding_with_computed_by.rb
Ruby
mit
235
rubyconf2024
1,113
require 'glimmer-dsl-libui' class OptionSelectorModel attr_accessor :option1, :option2, :option3 def summary selected_options = (1..3).select { |n| send("option#{n}") } if selected_options.empty? 'None' else selected_options.map {|n| "Option #{n}" }.join(', ') end end end class Op...
github
AndyObtiva/how-to-build-desktop-applications-in-ruby
https://github.com/AndyObtiva/how-to-build-desktop-applications-in-ruby
section-03-mvp-data-binding/test-01/address_form_mvp.rb
Ruby
mit
235
rubyconf2024
1,358
require 'glimmer-dsl-libui' class Address STRING_ATTRIBUTES = [:full_name, :street, :city, :state, :zip] ATTRIBUTES = STRING_ATTRIBUTES + [:billing_and_shipping] attr_accessor *ATTRIBUTES alias billing_and_shipping? billing_and_shipping def summary address_summary = STRING_ATTRIBUTES.map(&method(:send...
github
AndyObtiva/how-to-build-desktop-applications-in-ruby
https://github.com/AndyObtiva/how-to-build-desktop-applications-in-ruby
section-03-mvp-data-binding/test-02/movie_reviews.rb
Ruby
mit
235
rubyconf2024
2,445
require 'glimmer-dsl-libui' require 'facets/array/average' MovieReview = Struct.new(:reviewer, :movie, :rating, keyword_init: true) do def reset self.reviewer = '' self.movie = '' self.rating = 0 end end MovieRating = Struct.new(:movie, :average_rating, :reviewers, keyword_init: true) do def rating...
github
AndyObtiva/how-to-build-desktop-applications-in-ruby
https://github.com/AndyObtiva/how-to-build-desktop-applications-in-ruby
section-05-custom-components/exercise-01/address_form_custom_control.rb
Ruby
mit
235
rubyconf2024
1,858
require 'glimmer-dsl-libui' class Address ATTRIBUTES = [:name, :street, :city, :state, :zip] attr_accessor *ATTRIBUTES def summary ATTRIBUTES.map(&method(:send)).compact.reject(&:empty?).join(', ') end end class User attr_accessor :addresses def initialize @addresses = 2.times.map { Addre...
github
AndyObtiva/how-to-build-desktop-applications-in-ruby
https://github.com/AndyObtiva/how-to-build-desktop-applications-in-ruby
section-05-custom-components/exercise-02/user_manager.rb
Ruby
mit
235
rubyconf2024
3,630
require 'glimmer-dsl-libui' class UserList attr_accessor :users, :selected_user_index def initialize @users = [] end def selected_user @users[selected_user_index] if selected_user_index end end class User attr_accessor :username, :password def masked_password '*' * password.to_s.s...
github
AndyObtiva/how-to-build-desktop-applications-in-ruby
https://github.com/AndyObtiva/how-to-build-desktop-applications-in-ruby
section-06-scaffolding/exercise-01/hello_world/Rakefile
Ruby
mit
235
rubyconf2024
1,611
# encoding: utf-8 require 'rubygems' require 'bundler' begin Bundler.setup(:default, :development) rescue Bundler::BundlerError => e $stderr.puts e.message $stderr.puts "Run `bundle install` to install missing gems" exit e.status_code end require 'glimmer/launcher' require 'rake' require 'juwelier' Juwelier::T...
github
AndyObtiva/how-to-build-desktop-applications-in-ruby
https://github.com/AndyObtiva/how-to-build-desktop-applications-in-ruby
section-06-scaffolding/exercise-01/hello_world/Gemfile
Ruby
mit
235
rubyconf2024
274
# frozen_string_literal: true source 'https://rubygems.org' git_source(:github) {|repo_name| "https://github.com/#{repo_name}" } gem 'glimmer-dsl-libui', '~> 0.11.0' group :development do gem 'rspec', '~> 3.5.0' gem 'juwelier', '2.4.9' gem 'simplecov', '>= 0' end
github
AndyObtiva/how-to-build-desktop-applications-in-ruby
https://github.com/AndyObtiva/how-to-build-desktop-applications-in-ruby
section-06-scaffolding/exercise-01/hello_world/spec/spec_helper.rb
Ruby
mit
235
rubyconf2024
5,321
# This file was generated by the `rspec --init` command. Conventionally, all # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`. # The generated `.rspec` file contains `--require spec_helper` which will cause # this file to always be loaded, without a need to explicitly require it in any # file...
github
AndyObtiva/how-to-build-desktop-applications-in-ruby
https://github.com/AndyObtiva/how-to-build-desktop-applications-in-ruby
section-06-scaffolding/exercise-01/hello_world/app/hello_world.rb
Ruby
mit
235
rubyconf2024
486
$LOAD_PATH.unshift(File.expand_path('..', __FILE__)) begin require 'bundler/setup' Bundler.require(:default) rescue StandardError, Gem::LoadError # this runs when packaged as a gem (no bundler) require 'glimmer-dsl-libui' # add more gems if needed end class HelloWorld APP_ROOT = File.expand_path('../..', ...
github
AndyObtiva/how-to-build-desktop-applications-in-ruby
https://github.com/AndyObtiva/how-to-build-desktop-applications-in-ruby
section-06-scaffolding/exercise-01/hello_world/app/hello_world/view/hello_world.rb
Ruby
mit
235
rubyconf2024
2,429
require 'hello_world/model/greeting' class HelloWorld module View class HelloWorld include Glimmer::LibUI::Application ## Add options like the following to configure CustomWindow by outside consumers # # options :title, :background_color # option :width, default: 320...
github
AndyObtiva/how-to-build-desktop-applications-in-ruby
https://github.com/AndyObtiva/how-to-build-desktop-applications-in-ruby
section-06-scaffolding/exercise-01/hello_world/app/hello_world/model/greeting.rb
Ruby
mit
235
rubyconf2024
480
# Delete this example model and replace with your own model class HelloWorld module Model class Greeting GREETINGS = [ 'Hello, World!', 'Howdy, Partner!' ] attr_accessor :text def initialize @text = GREETINGS.first end def text_index...
github
Shopify/ci-queue
https://github.com/Shopify/ci-queue
ruby/ci-queue.gemspec
Ruby
mit
235
main
1,860
# coding: utf-8 # frozen_string_literal: true lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'ci/queue/version' require 'pathname' dir = Pathname.new(CI::Queue::RELEASE_SCRIPTS_ROOT).relative_path_from(Pathname.new(__dir__).realpath) lua_scripts = Dir[dir.joi...
github
Shopify/ci-queue
https://github.com/Shopify/ci-queue
ruby/Rakefile
Ruby
mit
235
main
863
# frozen_string_literal: true require 'bundler/gem_tasks' require 'rake/testtask' require 'ci/queue/version' Rake::TestTask.new(:test) do |t| t.libs << 'test' t.libs << 'lib' selected_files = ENV["TEST_FILES"].to_s.strip.split(/\s+/) selected_files = nil if selected_files.empty? t.test_files = selected_files...
github
Shopify/ci-queue
https://github.com/Shopify/ci-queue
ruby/test/test_helper.rb
Ruby
mit
235
main
651
# frozen_string_literal: true require 'simplecov' SimpleCov.start $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__) ENV['PATH'] = "#{File.expand_path('../../exe/', __FILE__)}:#{ENV['PATH']}" require 'ci/queue' require 'ci/queue/redis' require 'minitest/queue' require 'minitest/autorun' require 'mocha/minites...
github
Shopify/ci-queue
https://github.com/Shopify/ci-queue
ruby/test/ci/queue/configuration_test.rb
Ruby
mit
235
main
7,527
# frozen_string_literal: true require 'test_helper' module CI::Queue class ConfigurationTest < Minitest::Test def test_cirleci_defaults config = Configuration.from_env( 'CIRCLE_BUILD_URL' => 'https://circleci.com/gh/circleci/frontend/933', 'CIRCLE_NODE_INDEX' => '12', 'CIRCLE_SHA1' ...
github
Shopify/ci-queue
https://github.com/Shopify/ci-queue
ruby/test/ci/queue/redis_supervisor_test.rb
Ruby
mit
235
main
3,469
# frozen_string_literal: true require 'test_helper' class CI::Queue::Redis::SupervisorTest < Minitest::Test include QueueHelper def setup @redis_url = ENV.fetch('REDIS_URL', 'redis://localhost:6379/0') @redis = ::Redis.new(url: @redis_url) @redis.flushdb @supervisor = supervisor end def test_...
github
Shopify/ci-queue
https://github.com/Shopify/ci-queue
ruby/test/ci/queue/file_test.rb
Ruby
mit
235
main
659
# frozen_string_literal: true require 'test_helper' class CI::Queue::FileTest < Minitest::Test include SharedQueueAssertions TEST_LIST_PATH = '/tmp/queue-test.txt'.freeze def test_from_uri log_path = File.expand_path('../../fixtures/test_order.log', __dir__) queue = CI::Queue.from_uri("file://#{log_pat...
github
Shopify/ci-queue
https://github.com/Shopify/ci-queue
ruby/test/ci/queue/class_resolver_test.rb
Ruby
mit
235
main
2,431
# frozen_string_literal: true require 'test_helper' class CI::Queue::ClassResolverTest < Minitest::Test def test_resolves_fully_qualified_class resolver_test = Module.new inner = Module.new foo_class = Class.new inner.const_set(:FooTest, foo_class) resolver_test.const_set(:Inner, inner) Objec...
github
Shopify/ci-queue
https://github.com/Shopify/ci-queue
ruby/test/ci/queue/static_test.rb
Ruby
mit
235
main
4,463
# frozen_string_literal: true require 'test_helper' class CI::Queue::StaticTest < Minitest::Test include SharedQueueAssertions def test_expired queue = CI::Queue.from_uri('list:foo:bar:plop%3Ffizz', config) assert queue.expired? queue.created_at = Time.now refute queue.expired? end def test_...
github
Shopify/ci-queue
https://github.com/Shopify/ci-queue
ruby/test/ci/queue/file_loader_test.rb
Ruby
mit
235
main
4,554
# frozen_string_literal: true require 'test_helper' class CI::Queue::FileLoaderTest < Minitest::Test def test_load_file_records_stats loader = CI::Queue::FileLoader.new Dir.mktmpdir do |dir| path = File.join(dir, "sample_test.rb") File.write(path, "module FileLoaderSample; class Sample; end; end...
github
Shopify/ci-queue
https://github.com/Shopify/ci-queue
ruby/test/ci/queue/redis_test.rb
Ruby
mit
235
main
32,347
# frozen_string_literal: true require 'test_helper' class CI::Queue::RedisTest < Minitest::Test include SharedQueueAssertions EntryTest = Struct.new(:id, :queue_entry) def setup @redis_url = ENV.fetch('REDIS_URL', 'redis://localhost:6379/0') @redis = ::Redis.new(url: @redis_url) @redis.flushdb ...
github
Shopify/ci-queue
https://github.com/Shopify/ci-queue
ruby/test/ci/queue/queue_entry_test.rb
Ruby
mit
235
main
2,895
# frozen_string_literal: true require 'test_helper' class CI::Queue::QueueEntryTest < Minitest::Test def test_format_raises_without_file_path assert_raises(ArgumentError) { CI::Queue::QueueEntry.format("FooTest#test_bar", nil) } assert_raises(ArgumentError) { CI::Queue::QueueEntry.format("FooTest#test_bar", ...
github
Shopify/ci-queue
https://github.com/Shopify/ci-queue
ruby/test/ci/queue/redis/test_time_record_test.rb
Ruby
mit
235
main
803
# frozen_string_literal: true require 'test_helper' class CI::Queue::Redis::TestTimeRecordTest < Minitest::Test def setup redis_url = ENV.fetch('REDIS_URL', 'redis://localhost:6379/0') redis = Redis.new(url: redis_url) redis.flushdb config = CI::Queue::Configuration.new( timeout: 0.2, bu...
github
Shopify/ci-queue
https://github.com/Shopify/ci-queue
ruby/test/ci/queue/redis/heartbeat_process_test.rb
Ruby
mit
235
main
3,292
# frozen_string_literal: true require 'test_helper' require 'objspace' class CI::Queue::Redis::Base::HeartbeatProcessTest < Minitest::Test MAX = CI::Queue::Redis::Base::HeartbeatProcess::MAX_RESTART_ATTEMPTS # StringIO#write only accepts a single argument on TruffleRuby, so we fake a # pipe that supports the mu...
github
Shopify/ci-queue
https://github.com/Shopify/ci-queue
ruby/test/integration/minitest_redis_test.rb
Ruby
mit
235
main
67,342
# frozen_string_literal: true require 'test_helper' require 'tmpdir' require 'active_support' require 'active_support/testing/time_helpers' require 'concurrent/set' module Integration class MinitestRedisTest < Minitest::Test include OutputTestHelpers include ActiveSupport::Testing::TimeHelpers def setup...
github
Shopify/ci-queue
https://github.com/Shopify/ci-queue
ruby/test/integration/minitest_bisect_test.rb
Ruby
mit
235
main
17,295
# frozen_string_literal: true require 'test_helper' module Integration class MinitestBisectTest < Minitest::Test include OutputTestHelpers def setup skip("biesct rely on forking") unless Process.respond_to?(:fork) super end def test_bisect out, err = capture_subprocess_io do ...
github
Shopify/ci-queue
https://github.com/Shopify/ci-queue
ruby/test/integration/rspec_redis_test.rb
Ruby
mit
235
main
13,640
# frozen_string_literal: true require 'test_helper' module Integration class RSpecRedisTest < Minitest::Test include OutputTestHelpers def setup @redis_url = ENV.fetch('REDIS_URL', 'redis://localhost:6379/0') @redis = Redis.new(url: @redis_url) @redis.flushdb @exe = File.expand_path(...
github
Shopify/ci-queue
https://github.com/Shopify/ci-queue
ruby/test/integration/grind_redis_test.rb
Ruby
mit
235
main
9,231
# frozen_string_literal: true require 'test_helper' module Integration class GrindRedisTest < Minitest::Test include OutputTestHelpers def setup @redis_url = ENV.fetch('REDIS_URL', 'redis://localhost:6379/0') @redis = Redis.new(url: @redis_url) @redis.flushdb @exe = File.expand_path(...
github
Shopify/ci-queue
https://github.com/Shopify/ci-queue
ruby/test/support/fake_test_entry.rb
Ruby
mit
235
main
659
# frozen_string_literal: true module Minitest module Queue # Lightweight stand-in for a test object in unit tests that don't run real tests. # Holds test_id and file_path directly so no source_location lookup is needed. FakeEntry = Struct.new(:id, :queue_entry, :method_name) def self.fake_entry(metho...
github
Shopify/ci-queue
https://github.com/Shopify/ci-queue
ruby/test/support/queue_helpers.rb
Ruby
mit
235
main
620
# frozen_string_literal: true module QueueHelper private def poll(queue, success = true) test_order = [] queue.poll do |test| yield test if block_given? test_order << test failed = !(success.respond_to?(:call) ? success.call(test) : success) if failed if queue.requeue(test.q...
github
Shopify/ci-queue
https://github.com/Shopify/ci-queue
ruby/test/support/reporter_test_helper.rb
Ruby
mit
235
main
2,015
# frozen_string_literal: true module ReporterTestHelper private def result(name, **kwargs) result = Minitest::Result.from(runnable(name, **kwargs)) result.source_location = ["#{Minitest::Queue.project_root}/test/my_test.rb", 12] result.queue_entry = CI::Queue::QueueEntry.format("#{result.klass}##{resul...
github
Shopify/ci-queue
https://github.com/Shopify/ci-queue
ruby/test/support/output_test_helpers.rb
Ruby
mit
235
main
1,712
# frozen_string_literal: true module OutputTestHelpers PROJECT_ROOT_PATH = File.expand_path('../../../', __FILE__) private def strip_blank_lines(output) output.lines.map { |l| l.strip.empty? ? "\n" : l }.join end def decolorize_output(output) output.to_s.gsub(/\e\[\d+m/, '') end def strip_hered...
github
Shopify/ci-queue
https://github.com/Shopify/ci-queue
ruby/test/support/shared_test_cases.rb
Ruby
mit
235
main
582
# frozen_string_literal: true module SharedTestCases class TestCase attr_reader :name def initialize(name) @name = name end def inspect "#<TestCase #{name}>" end def id name end def queue_entry CI::Queue::QueueEntry.format(id, __FILE__) end def to_s...
github
Shopify/ci-queue
https://github.com/Shopify/ci-queue
ruby/test/support/shared_queue_assertions.rb
Ruby
mit
235
main
2,206
# frozen_string_literal: true require 'support/shared_test_cases' module SharedQueueAssertions include SharedTestCases include QueueHelper def setup capture_io { @queue = populate(build_queue) } end def test_progess count = 0 assert_equal 0, @queue.progress poll(@queue) do assert_equ...
github
Shopify/ci-queue
https://github.com/Shopify/ci-queue
ruby/test/minitest/queue/error_report_test.rb
Ruby
mit
235
main
591
# frozen_string_literal: true require 'test_helper' module Minitest module Queue class ErrorReportTest < Minitest::Test def test_default_coder assert defined? Minitest::Queue::ErrorReport::SnappyPack assert_equal Minitest::Queue::ErrorReport::SnappyPack, Minitest::Queue::ErrorReport.coder ...
github
Shopify/ci-queue
https://github.com/Shopify/ci-queue
ruby/test/minitest/queue/queue_population_strategy_test.rb
Ruby
mit
235
main
7,007
# frozen_string_literal: true require 'test_helper' require 'minitest/queue/queue_population_strategy' module Minitest::Queue class QueuePopulationStrategyTest < Minitest::Test class FakeQueue attr_accessor :entry_resolver attr_reader :populated_with, :streamed_with def initialize @fil...
github
Shopify/ci-queue
https://github.com/Shopify/ci-queue
ruby/test/minitest/queue/test_data_test.rb
Ruby
mit
235
main
1,264
# frozen_string_literal: true require 'test_helper' module Minitest::Queue class TestDataTest < Minitest::Test include ReporterTestHelper def test_error_location_without_backtrace failure = Minitest::Assertion.new('Assertion failed') test = result('test_foo', failure: failure) failure.set...