A summary of data about the Ruby ecosystem.

https://github.com/flori/tins

This Is Not Spruz
https://github.com/flori/tins

Last synced: about 2 hours ago
JSON representation

Repository metadata

This Is Not Spruz

README.md

Tins - Useful tools library in Ruby

Description

A collection of useful Ruby utilities that extend the standard library with
practical conveniences. Tins provides lightweight, dependency-free tools for
common programming tasks.

Documentation

Complete API documentation is available at: GitHub.io

Installation

Add this line to your application's Gemfile:

gem 'tins'

Or:

gem 'tins', require 'tins/xt'

to automatically extend some core classes with useful methods.

And then execute:

$ bundle install

Or install it yourself as:

$ gem install tins

Usage

# Load all utilities

require 'tins'

# Load all utilities and extends core classes with useful methods
require 'tins/xt'

Some Usage Examples

Duration Handling

require 'tins/duration'

duration = Tins::Duration.new(9000)
puts duration.to_s # "02:30:00"
puts duration.to_i # 9000 (seconds)

# Parse durations from strings
Tins::Duration.parse('2h 30m', template: '%hh %mm') # 9000 (seconds)

Unit Conversion

require 'tins/unit'

bytes = Tins::Unit.parse('1.5 GB', unit: ?B).to_i # => 1610612736
puts Tins::Unit.format(bytes, unit: 'B') # "1.500000 GB"

Secure File Writing

require 'tins/xt/secure_write'

# Write files safely (atomic operation)
File.secure_write('config.json', '{"key": "value"}')

Time Freezing for Testing

require 'tins/xt/time_freezer'

# Freeze time during testing
Tins::TimeFreezer.freeze(Time.new('2011-12-13 14:15:16')) do
  puts Time.now # Always returns the frozen time
end

Building blocks for DSLs

class Foo
  include Tins::DynamicScope

  def let(bindings = {})
    dynamic_scope do
      bindings.each { |name, value| send("#{name}=", value) }
      yield
    end
  end

  def twice(x)
    2 * x
  end

  def test
    let x: 1, y: twice(1) do
      let z: twice(x) do
        "#{x} * #{y} == #{z} # => #{x * y == twice(x)}"
      end
    end
  end
end

Foo.new.test # "1 * 2 == 2 # => true"

Core Class Extensions (xt)

When you require tins/xt, some useful methods are added to core classes:

default_options = {
  format: :json,
  timeout: 30,
  retries: 3
}

user_options = { timeout: 60 }
options = user_options | default_options
# => { format: :json, timeout: 60, retries: 3 }

'1.10.3'.version < '1.9.2'.version # => false

add_one         = -> x { x + 1 }
multiply_by_two = -> x { x * 2 }
composed        = multiply_by_two * add_one
composed.(5) # => 12

# For Testing
>> o = Object.new
>> o.puts # => private method, NoMethodError
>> o = o.expose
>> o.puts "hello"
hello

Hash Symbolization

require 'tins/hash_symbolize_keys_recursive'

hash = {
  'name' => 'John',
  'age' => 30,
  'address' => {
    'street' => '123 Main St'
  }
}
hash.symbolize_keys_recursive! # Converts all keys to symbols recursively

Author

Florian Frank

License

MIT License


Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: about 11 hours ago

Total Commits: 537
Total Committers: 7
Avg Commits per committer: 76.714
Development Distribution Score (DDS): 0.019

Commits in past year: 169
Committers in past year: 2
Avg Commits per committer in past year: 84.5
Development Distribution Score (DDS) in past year: 0.012

Name Email Commits
Florian Frank f****i@p****e 527
Tobias t@t****e 3
Diego Elio Pettenò f****s@f****u 2
Colin Kelley c****n@i****m 2
Otto Urpelainen o****e@i****i 1
Jens Fahnenbruck j****x@m****m 1
Janosch Müller j****r@b****g 1

Committer domains:


Issue and Pull Request metadata

Last synced: 13 days ago

Total issues: 12
Total pull requests: 13
Average time to close issues: about 2 years
Average time to close pull requests: 3 months
Total issue authors: 12
Total pull request authors: 8
Average comments per issue: 1.33
Average comments per pull request: 0.92
Merged pull request: 5
Bot issues: 0
Bot pull requests: 0

Past year issues: 0
Past year pull requests: 3
Past year average time to close issues: N/A
Past year average time to close pull requests: 3 months
Past year issue authors: 0
Past year pull request authors: 2
Past year average comments per issue: 0
Past year average comments per pull request: 1.67
Past year merged pull request: 0
Past year bot issues: 0
Past year bot pull requests: 0

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/flori/tins

Top Issue Authors

  • arfl (1)
  • Peeja (1)
  • ppeble (1)
  • jaynetics (1)
  • lion-man44 (1)
  • tordans (1)
  • axilleas (1)
  • wildlyinaccurate (1)
  • Ana06 (1)
  • graaff (1)
  • PikachuEXE (1)
  • oturpe (1)

Top Pull Request Authors

  • tordans (3)
  • oturpe (3)
  • parkr (2)
  • Flameeyes (1)
  • jigfox (1)
  • katrinundfritz (1)
  • jaynetics (1)
  • ColinDKelley (1)

Top Issue Labels

Top Pull Request Labels


Package metadata

gem.coop: tins

All the stuff that isn't good/big enough for a real library.

  • Homepage: https://github.com/flori/tins
  • Documentation: http://www.rubydoc.info/gems/tins/
  • Licenses: MIT
  • Latest release: 1.52.0 (published 8 days ago)
  • Last Synced: 2026-03-02T20:31:34.713Z (1 day ago)
  • Versions: 134
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 117,584,966 Total
  • Docker Downloads: 611,323,569
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 0.071%
    • Downloads: 0.213%
  • Maintainers (1)
ubuntu-20.04: ruby-tins

  • Homepage: https://github.com/flori/tins
  • Licenses: other
  • Latest release: 1.1.0-2 (published 19 days ago)
  • Last Synced: 2026-02-13T07:24:17.801Z (19 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Forks count: 0.685%
    • Average: 0.727%
    • Stargazers count: 2.222%
rubygems.org: tins

All the stuff that isn't good/big enough for a real library.

  • Homepage: https://github.com/flori/tins
  • Documentation: http://www.rubydoc.info/gems/tins/
  • Licenses: MIT
  • Latest release: 1.52.0 (published 8 days ago)
  • Last Synced: 2026-03-01T20:02:06.930Z (2 days ago)
  • Versions: 134
  • Dependent Packages: 133
  • Dependent Repositories: 17,966
  • Downloads: 117,551,506 Total
  • Docker Downloads: 611,323,569
  • Rankings:
    • Downloads: 0.206%
    • Docker downloads count: 0.248%
    • Dependent packages count: 0.26%
    • Dependent repos count: 0.268%
    • Average: 3.437%
    • Forks count: 8.314%
    • Stargazers count: 11.323%
  • Maintainers (1)
proxy.golang.org: github.com/flori/tins

  • Homepage:
  • Documentation: https://pkg.go.dev/github.com/flori/tins#section-documentation
  • Licenses: other
  • Latest release: v1.52.0 (published 8 days ago)
  • Last Synced: 2026-03-03T14:33:28.515Z (about 8 hours ago)
  • Versions: 135
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Forks count: 6.374%
    • Stargazers count: 7.895%
    • Average: 8.662%
    • Dependent packages count: 9.576%
    • Dependent repos count: 10.802%
ubuntu-24.04: ruby-tins

  • Homepage: https://github.com/flori/tins
  • Licenses:
  • Latest release: 1.32.1-1 (published 25 days ago)
  • Last Synced: 2026-02-06T16:08:38.685Z (25 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
debian-11: ruby-tins

  • Homepage: https://github.com/flori/tins
  • Documentation: https://packages.debian.org/bullseye/ruby-tins
  • Licenses:
  • Latest release: 1.1.0-2 (published 21 days ago)
  • Last Synced: 2026-02-13T08:25:46.681Z (19 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
ubuntu-23.04: ruby-tins

  • Homepage: https://github.com/flori/tins
  • Licenses:
  • Latest release: 1.1.0-2 (published 21 days ago)
  • Last Synced: 2026-02-11T06:51:24.147Z (21 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
ubuntu-23.10: ruby-tins

  • Homepage: https://github.com/flori/tins
  • Licenses:
  • Latest release: 1.1.0-2 (published 18 days ago)
  • Last Synced: 2026-02-13T18:34:27.511Z (18 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
ubuntu-24.10: ruby-tins

  • Homepage: https://github.com/flori/tins
  • Licenses:
  • Latest release: 1.32.1-1 (published 22 days ago)
  • Last Synced: 2026-02-09T17:26:46.749Z (22 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
debian-10: ruby-tins

  • Homepage: https://github.com/flori/tins
  • Documentation: https://packages.debian.org/buster/ruby-tins
  • Licenses:
  • Latest release: 1.1.0-1 (published 20 days ago)
  • Last Synced: 2026-02-13T04:26:36.843Z (19 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
guix: ruby-tins

Assorted tools for Ruby

debian-12: ruby-tins

  • Homepage: https://github.com/flori/tins
  • Documentation: https://packages.debian.org/bookworm/ruby-tins
  • Licenses:
  • Latest release: 1.1.0-2 (published 19 days ago)
  • Last Synced: 2026-02-12T23:42:57.018Z (19 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
ubuntu-22.04: ruby-tins

  • Homepage: https://github.com/flori/tins
  • Licenses:
  • Latest release: 1.1.0-2 (published 18 days ago)
  • Last Synced: 2026-02-13T13:27:38.966Z (18 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
debian-13: ruby-tins

  • Homepage: https://github.com/flori/tins
  • Documentation: https://packages.debian.org/trixie/ruby-tins
  • Licenses:
  • Latest release: 1.32.1-1 (published 19 days ago)
  • Last Synced: 2026-02-13T13:20:22.822Z (18 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%

Dependencies

Gemfile rubygems
  • byebug >= 0 development
  • term-ansicolor >= 0 development
.github/workflows/codeql-analysis.yml actions
  • actions/checkout v3 composite
  • github/codeql-action/analyze v2 composite
  • github/codeql-action/autobuild v2 composite
  • github/codeql-action/init v2 composite
tins.gemspec rubygems
.github/workflows/static.yml actions
  • actions/checkout v4 composite
  • actions/configure-pages v5 composite
  • actions/deploy-pages v4 composite
  • actions/upload-pages-artifact v3 composite
  • ruby/setup-ruby v1 composite

Score: 26.137148914293096