SlideShare a Scribd company logo
Searched gems which supports only ruby 2.6
🎉
require 'rubygems'
require 'open-uri
specs = Marshal.load(Gem.gunzip(File.read("./latest_specs.4.8.gz")))
total = specs.length
specs.each do |gem_name, gem_version, _|
begin
compressed = open("https://rubygems.org/quick/Marshal.4.8/#{gem_name}-#{gem_version}.gemspec.rz").read
inflated = Gem.inflate(compressed)
spec = Marshal.load(inflated)
ruby1_8 = Gem::Version.new("1.8.7")
ruby1_9 = Gem::Version.new("1.9.3")
ruby2_0 = Gem::Version.new("2.0.0")
ruby2_1 = Gem::Version.new("2.1.0")
ruby2_2 = Gem::Version.new("2.2.0")
ruby2_3 = Gem::Version.new("2.3.0")
ruby2_4 = Gem::Version.new("2.4.0")
ruby2_5 = Gem::Version.new("2.5.0")
ruby2_5_1 = Gem::Version.new("2.5.1")
ruby2_5_2 = Gem::Version.new("2.5.2")
ruby2_5_3 = Gem::Version.new("2.5.3")
ruby2_6 = Gem::Version.new("2.6.0")
old_versions = [ruby1_8, ruby1_9, ruby2_0, ruby2_1,
ruby2_2, ruby2_3, ruby2_4, ruby2_5,
ruby2_5_1, ruby2_5_2, ruby2_5_3]
required = spec.required_ruby_version
if old_versions.all?{|v| !required.satisfied_by?(v) } && required.satisfied_by?(ruby2_6)
puts "#{gem_name}-#{gem_version}"
end
rescue => e
puts "#{gem_name}: #{e.message}"
end
end
Searched gems which supports only ruby 2.6
Searched gems which supports only ruby 2.6
Searched gems which supports only ruby 2.6
Searched gems which supports only ruby 2.6
Searched gems which supports only ruby 2.6
Searched gems which supports only ruby 2.6
Searched gems which supports only ruby 2.6
require 'function-composite'
using Function::Composite
p %w{72 101 108 108 111}.map(&:to_i >> :chr) #=> ["H", "e", "l", "l", "o"]
p %w{72 101 108 108 111}.map(&proc { |s| s.to_i } >> :chr) #=> ["H", "e", "l", "l", "o"]
h = { Alice: 30, Bob: 60, Cris: 90 }
p %w{Alice Bob Cris}.map(&(:to_sym >> h)) #=> [30, 60, 90]
Searched gems which supports only ruby 2.6
Searched gems which supports only ruby 2.6
😳
Searched gems which supports only ruby 2.6
😅

More Related Content

PPTX
Highload осень 2012 лекция 1
PDF
Asynchronous PHP and Real-time Messaging
PDF
NodeJS "Web en tiempo real"
PDF
Security Challenges in Node.js
PPTX
node.js workshop- node.js middleware
PPTX
node.js workshop- node.js basics
PDF
Ruby e xmpp
PDF
Node.js Stream API
Highload осень 2012 лекция 1
Asynchronous PHP and Real-time Messaging
NodeJS "Web en tiempo real"
Security Challenges in Node.js
node.js workshop- node.js middleware
node.js workshop- node.js basics
Ruby e xmpp
Node.js Stream API

What's hot (20)

PDF
Gerenciando múltiplas versões do PostgreSQL com pgvm
PDF
Creating ASTTs The painful truth
PPTX
Introduction to Node.js
PDF
Paris Kafka Meetup - How to develop with Kafka
PDF
minne の API 改善
KEY
WebClusters, Redis
PPTX
How to build a container monitoring solution - David Gildeh, CEO and Co-Found...
PDF
Devinsampa nginx-scripting
TXT
Tipo virus espia con esto aprenderan a espiar a personas etc jeropas de mrd :v
PDF
Open Social Data (Jaca), Alejandro Rivero
PDF
Redis as a message queue
PPT
Lightweight DAS components in Perl
PDF
Lua tech talk
PDF
PPTX
PDF
Introduction to Node.js
PDF
Node.js streaming csv downloads proxy
PPTX
hacking with node.JS
PDF
Roll Your Own API Management Platform with nginx and Lua
Gerenciando múltiplas versões do PostgreSQL com pgvm
Creating ASTTs The painful truth
Introduction to Node.js
Paris Kafka Meetup - How to develop with Kafka
minne の API 改善
WebClusters, Redis
How to build a container monitoring solution - David Gildeh, CEO and Co-Found...
Devinsampa nginx-scripting
Tipo virus espia con esto aprenderan a espiar a personas etc jeropas de mrd :v
Open Social Data (Jaca), Alejandro Rivero
Redis as a message queue
Lightweight DAS components in Perl
Lua tech talk
Introduction to Node.js
Node.js streaming csv downloads proxy
hacking with node.JS
Roll Your Own API Management Platform with nginx and Lua
Ad

Similar to Searched gems which supports only ruby 2.6 (20)

PDF
RubyGems 3 & 4
PDF
RubyGems 3 & 4
PDF
Gems on Ruby
DOCX
PDF
Dependency Resolution with Standard Libraries
PDF
Gemification for Ruby 2.5/3.0
PDF
The Future of Dependency Management for Ruby
PDF
How to make a Ruby Gem - Austin on Rails, January 2014
PDF
Extracting ruby gem
PDF
The Future of library dependency manageement of Ruby
KEY
Week6
PDF
Roadmap for RubyGems 4 and Bundler 3
KEY
Why Bundler 1.1 will be much faster
PDF
Release responsibly (Maintaining Backwards Compatibility)
PDF
What's new in RubyGems3
PDF
Gemification for Ruby 2.5/3.0
PDF
Gems on Ruby
PDF
The Future of library dependency management of Ruby
PDF
The Future of Bundled Bundler
PDF
Long journey of Ruby standard library at RubyConf AU 2024
RubyGems 3 & 4
RubyGems 3 & 4
Gems on Ruby
Dependency Resolution with Standard Libraries
Gemification for Ruby 2.5/3.0
The Future of Dependency Management for Ruby
How to make a Ruby Gem - Austin on Rails, January 2014
Extracting ruby gem
The Future of library dependency manageement of Ruby
Week6
Roadmap for RubyGems 4 and Bundler 3
Why Bundler 1.1 will be much faster
Release responsibly (Maintaining Backwards Compatibility)
What's new in RubyGems3
Gemification for Ruby 2.5/3.0
Gems on Ruby
The Future of library dependency management of Ruby
The Future of Bundled Bundler
Long journey of Ruby standard library at RubyConf AU 2024
Ad

More from Maki Toshio (11)

PDF
Rails 6.1 → 7.0アップデート記録
PDF
自社サービスのAPIをOAuth2対応にして公開した
PPTX
ActiveRecordで複雑なクエリを書くのは間違っているのか
PPTX
やさしいGemパッチの作り方
PPTX
ファイルシステムのスナップショット機能でバックアップを取得する
PPTX
Cloud Foundry Day in Tokyo Lightning Talk - Cloud Foundry over the Proxy
PDF
メール製品を作って気づいたmailライブラリの光と闇について語る
KEY
明日から使える(?)Rubyトリビア
ZIP
Rubyで簡単にremote access apiを実行する
ZIP
レガシーコード改善ガイド
PPT
Ruby on rails on hudsonの活用事例
Rails 6.1 → 7.0アップデート記録
自社サービスのAPIをOAuth2対応にして公開した
ActiveRecordで複雑なクエリを書くのは間違っているのか
やさしいGemパッチの作り方
ファイルシステムのスナップショット機能でバックアップを取得する
Cloud Foundry Day in Tokyo Lightning Talk - Cloud Foundry over the Proxy
メール製品を作って気づいたmailライブラリの光と闇について語る
明日から使える(?)Rubyトリビア
Rubyで簡単にremote access apiを実行する
レガシーコード改善ガイド
Ruby on rails on hudsonの活用事例

Recently uploaded (20)

PDF
PPT on Performance Review to get promotions
PDF
Digital Logic Computer Design lecture notes
PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
PPTX
bas. eng. economics group 4 presentation 1.pptx
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PDF
composite construction of structures.pdf
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PPTX
Welding lecture in detail for understanding
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PPTX
Internet of Things (IOT) - A guide to understanding
PPTX
Geodesy 1.pptx...............................................
PPTX
Construction Project Organization Group 2.pptx
PPTX
Sustainable Sites - Green Building Construction
PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PPTX
Lesson 3_Tessellation.pptx finite Mathematics
PPT on Performance Review to get promotions
Digital Logic Computer Design lecture notes
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
bas. eng. economics group 4 presentation 1.pptx
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
composite construction of structures.pdf
Model Code of Practice - Construction Work - 21102022 .pdf
Welding lecture in detail for understanding
Operating System & Kernel Study Guide-1 - converted.pdf
Internet of Things (IOT) - A guide to understanding
Geodesy 1.pptx...............................................
Construction Project Organization Group 2.pptx
Sustainable Sites - Green Building Construction
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
Lesson 3_Tessellation.pptx finite Mathematics

Searched gems which supports only ruby 2.6

  • 3. require 'rubygems' require 'open-uri specs = Marshal.load(Gem.gunzip(File.read("./latest_specs.4.8.gz"))) total = specs.length specs.each do |gem_name, gem_version, _| begin compressed = open("https://rubygems.org/quick/Marshal.4.8/#{gem_name}-#{gem_version}.gemspec.rz").read inflated = Gem.inflate(compressed) spec = Marshal.load(inflated) ruby1_8 = Gem::Version.new("1.8.7") ruby1_9 = Gem::Version.new("1.9.3") ruby2_0 = Gem::Version.new("2.0.0") ruby2_1 = Gem::Version.new("2.1.0") ruby2_2 = Gem::Version.new("2.2.0") ruby2_3 = Gem::Version.new("2.3.0") ruby2_4 = Gem::Version.new("2.4.0") ruby2_5 = Gem::Version.new("2.5.0") ruby2_5_1 = Gem::Version.new("2.5.1") ruby2_5_2 = Gem::Version.new("2.5.2") ruby2_5_3 = Gem::Version.new("2.5.3") ruby2_6 = Gem::Version.new("2.6.0") old_versions = [ruby1_8, ruby1_9, ruby2_0, ruby2_1, ruby2_2, ruby2_3, ruby2_4, ruby2_5, ruby2_5_1, ruby2_5_2, ruby2_5_3] required = spec.required_ruby_version if old_versions.all?{|v| !required.satisfied_by?(v) } && required.satisfied_by?(ruby2_6) puts "#{gem_name}-#{gem_version}" end rescue => e puts "#{gem_name}: #{e.message}" end end
  • 11. require 'function-composite' using Function::Composite p %w{72 101 108 108 111}.map(&:to_i >> :chr) #=> ["H", "e", "l", "l", "o"] p %w{72 101 108 108 111}.map(&proc { |s| s.to_i } >> :chr) #=> ["H", "e", "l", "l", "o"] h = { Alice: 30, Bob: 60, Cris: 90 } p %w{Alice Bob Cris}.map(&(:to_sym >> h)) #=> [30, 60, 90]
  • 14. 😳
  • 16. 😅