elastic / elastic/logstash

Some plugins need a publish to rubygems

Open
#5,776 11 comments 0 reactions 1 assignee Assigned to @suyograo View on GitHub
Dominant language
Java
Stars
14.9k
Forks
3.5k
Avg merge
19h 14m
Merged PRs (30d)
63

Description

I was initially checking if mutate filter was published after my last PR and end up writing a quick hack to compare latest rubygem vs github master gemspec.
Here are the plugins that have a more recent version in github than rubygems

@ph can this list be used for mass publish ?

| Plugin | rubygem latest | github master |
| --- | :-: | --: |
| logstash-codec-netflow | 3.1.2 | 3.1.3 |
| logstash-filter-environment | 2.0.6 | 3.0.0 |
| logstash-filter-mutate | 3.1.1 | 3.1.2 |
| logstash-filter-prune | 2.0.5 | 2.0.6 |
| logstash-input-ganglia | 3.0.2 | 3.1.0 |
| logstash-input-rackspace | 0.1.4 | 2.0.4 |
| logstash-input-syslog | 3.0.2 | 3.1.0 |
| logstash-input-zeromq | 3.0.0 | 3.0.2 |
| logstash-output-zeromq | 3.0.0 | 3.0.2 |
| logstash-output-elasticsearch | 4.1.3 | 5.0.0 |
| logstash-output-google_bigquery | 2.0.3 | 2.0.5 |
| logstash-output-google_cloud_storage | 2.0.2 | 2.0.4 |
| logstash-output-rackspace | 0.1.4 | 2.0.4 |
| logstash-filter-yaml | No gem published | 0.1.0 |
| logstash-output-newrelic | No gem published | 0.9.0 |
| logstash-input-neo4j | 2.0.2 | 2.0.4 |
| logstash-filter-hashid | No gem published | 0.1.1 |
| logstash-mixin-zeromq | 2.0.2 | 3.0.1 |
| logstash-filter-dissect | 1.0.6 | 1.0.0 |

here is the script I'm working on

``` ruby
require 'manticore'
require 'json'
require "rubygems"
require 'octokit'

Octokit.auto_paginate = true
Octokit.organization_repositories('logstash-plugins').each do |plugin|
p = plugin.name
if p == "logstash-input-example" || p == "logstash-output-example" || p == "logstash-codec-example" || p == "logstash-filter-example"
#Skipping as not published on rubygem²
next
elsif p == "logstash-input-beats" || p == "logstash-input-kinesis"
#Skipping because it use a VERSION constant in the gemspec, require more work
next
end
gemspec = Manticore.get( "https://raw.githubusercontent.com/logstash-plugins/#{p}/master/#{p}.gemspec").body
if gemspec =~ /404: Not Found/
#puts "ERROR No gemspec for #{p}"
else
File.open("gemspec/#{p}.gemspec", 'w') { |file| file.write(gemspec) }
github_version = Gem::Specification::load(File.join(File.dirname(__FILE__), "gemspec", "#{p}.gemspec")).version.to_s
rubygem_versions_string = Manticore.get( "https://rubygems.org/api/v1/versions/#{p}.json").body
if rubygem_versions_string =~ /This rubygem could not be found/
puts "| #{p} | No gem published | #{github_version} |"
else
rubygem_version = JSON.parse(rubygem_versions_string)[0]["number"].to_s
#puts "Latest version check #{github_version} vs #{rubygem_version}"
if github_version != rubygem_version
puts "| #{p} | #{rubygem_version} | #{github_version} |"
end
end
end
end
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.