Commit graph

250 commits

Author SHA1 Message Date
Pier-Hugues Pellerin
8eae580c95 Downloading gem in binary format
This PR chagne the File's open mode to make sure we correctly download
the file in binary mode on windows, without doing that the gem will be
corrupt and will throw the following message.

```
ERROR:  While executing gem ... (Gem::Package::FormatError)
    package is corrupt, exception while verifying: Unexpected end of ZLIB input stream (Zlib::GzipFile::Error) in logstash-filter-dissect-1.0.8.gem
```

Fixes #6840
2017-03-24 14:07:57 -04:00
Pier-Hugues Pellerin
bab13fbc84 Make the TODO ignore the presence of :
Fixes #6777
2017-03-02 20:21:15 -05:00
Pier-Hugues Pellerin
1ec317b48a Fix an issue with handling the plugin type with new style declaration
Correctly extract the plugin type when the plugin is defined with

```
module LogStash module Inputs class XXX < ...
```

Fixes #6777
2017-03-02 20:21:15 -05:00
Suyog Rao
9cc165a428 [docs gen] Format description to be at the right level 2017-02-18 16:09:55 -08:00
Pier-Hugues Pellerin
aa0793417a Remove the default column in the plugin doc page to give space to the sidebar (#6715)
* Remove the default column in the plugin doc page to give space to the
sidebar

Fix: #6515
2017-02-18 15:40:02 -08:00
Pier-Hugues Pellerin
2d3a2c28c7 Support license in the docgen if they are at the beginning of the document remove the logger statement in the generate file
Fixes #6714
2017-02-16 10:00:29 -05:00
Pier-Hugues Pellerin
e795552c6b Fix a few issues when using the logstash-docgen tools
Fixes the following issues:

- Make multiline plugin definition correctly take the description See
rabbit mq input or output
- Use a regexp to ignore encoding comment
- Use `TODO` The doc gen will now ignore some TODOs.
- rules are now executed in the correct order,
- make sure to ignore comment not associated with a descrition of an
attributes

Ref: #6692

Fixes #6714
2017-02-16 10:00:28 -05:00
Pier-Hugues Pellerin
f3a263d5f6 fix devutils weird ordering.
Fixes #6714
2017-02-16 10:00:28 -05:00
Pier-Hugues Pellerin
2bb986a80b Change plugin templates
This PR changes the following:

- Change the wording for non default plugin
- Add a link to a help section

Fixes #6719
2017-02-16 09:57:53 -05:00
Pier-Hugues Pellerin
b5580d6f4b Change the release date format on the plugin doc template
The new format will be this one: February 7, 2017

Fixes #6717
2017-02-16 09:56:43 -05:00
Jordan Sissel
0ee1612fb1 Pin gems gem to 0.8.3
Fixes this error:

    % bundle install
    ...
    Installing gems 1.0.0
    Gem::InstallError: gems requires Ruby version >= 2.1.9.

Fixes #6681
2017-02-09 14:57:42 -05:00
Suyog Rao
7a302d1064 Better asciidoc formatting and text for ID option
Fixes #6679
2017-02-09 14:39:20 -05:00
Pier-Hugues Pellerin
b218eaba41 remove compatible line until we have per plugin book
Fixes #6678
2017-02-09 14:24:11 -05:00
Clinton Gormley
83ce954e68 Changed the format of generated edit_urls and removed unneeded ones 2017-02-04 16:09:33 +01:00
Pier-Hugues Pellerin
fdda39964d Add bin/logstash-plugin prepare-offline-pack command
This new command replace the old workflow of `pack`, `unpack` and the `install --local`, and wrap all the logic into one uniform way of installing plugins.
The work is based on the flow developed for installing an x-pack inside Logstash, when you call prepare-offline-pack, the specified plugins and their dependencies will be packaged in a zip.
And this zip can be installed with the same flow as the pack.

Definition:

Source Logstash: Where you run the prepare-offline-pack.
Target Logstash: Where you install the offline package.

PROS:
- If you install a .gem in the source logstash, the .gem and his dependencies will be bundled.
- The install flow doesn't need to have access to the internet.
- Nothing special need to be setup in the target logstash environment.

CONS:
- The is one minor drawback, the plugins need to have their JARS bundled with them for this flow to work, this is currently the case for all the official plugins.
- The source Logstash need to have access to the internet when you install plugins before packaging them.

Usage examples:
bin/logstash-plugin prepare-offline-pack logstash-input-beats
bin/logstash-plugin prepare-offline-pack logstash-filter-jdbc logstash-input-beats
bin/logstash-plugin prepare-offline-pack logstash-filter-*
bin/logstash-plugin prepare-offline-pack logstash-filter-* logstash-input-beats

How to install:
bin/logstash-plugin install file:///tmp/logstash-offline-plugins-XXXX.zip

Fixes #6404
2017-01-03 13:59:49 -05:00
Pier-Hugues Pellerin
ef13f7675c assert a specific version of flores
Fixes #6271
2016-12-16 10:13:10 -05:00
Pier-Hugues Pellerin
81a5757fcb no gemfile lock needed
Fixes #6271
2016-12-16 10:13:10 -05:00
Pier-Hugues Pellerin
369d8aff53 Adding the unit tests and an integration test for the gem pack
Fixes #6271
2016-12-16 10:13:10 -05:00
Pier-Hugues Pellerin
10b1bbd308 code reorg and adding unit tests
Fixes #6271
2016-12-16 10:13:10 -05:00
Pier-Hugues Pellerin
8559a5b841 fix the readme and make sure we raise an exception when we dont understand the http response
Fixes #6271
2016-12-16 10:13:10 -05:00
Pier-Hugues Pellerin
49f667428b remove the unecessary dependency and remove the file shellout
Fixes #6271
2016-12-16 10:13:10 -05:00
Pier-Hugues Pellerin
2f19c89388 Feature: Paquet, a tool to pack dependencies
This tool allow to generate a logstash pack of plugin and it is required
by #6168.

This allow the developer to specify which gems it need to be included in
the pack, it will also take care get the parent dependencies.

```ruby
require "paquet"

TARGET_DIRECTORY = File.join(File.dirname(__FILE__), "dependencies")

Paquet::Task.new(TARGET_DIRECTORY) do
  pack "manticore"
  pack "gemoji"
  pack "logstash-output-elasticsearch"

  # Ignore some dependencies that the core will provide
  ignore "logstash-core-plugin-api"
  ignore "logstash-core"
end
```

Fixes #6271
2016-12-16 10:13:09 -05:00
Alvin Chen
6e527b26ec Remove community maintained statement
Remove community maintained statement

Fixes #6365
2016-12-06 17:00:34 -05:00
Jordan Sissel
3cc5d3cf32 Pin webmock to 2.2.0
The latest version of webmock (2.3.1) requires Ruby 2.0 or newer.

Fixes #6362
2016-12-06 14:07:46 -05:00
Pier-Hugues Pellerin
bf2d670d2a Logstash-docgen tool v2
**Motivation**: We have decided to rewrite the documentation generator to add more features
to our documentation and to fix some outstanding bugs.

This PR addresses the following problem:
- Hard to add new features to the code base.
- The code was tied with Logstash.
- No easy way to publish the doc for a single plugin
- The plugin author was not able to test their documentation changes
- The reported errors were hard to understand.
- No easy way to automate it.
- the minimal requirement on base classes.

Fixes #5720
2016-11-30 19:57:40 -05:00
Suyog Rao
dfa3dbe970 Nuke old files no longger used
Fixes #5724
2016-08-02 18:52:01 -04:00
Pere Urbon-Bayes
01ac7c91e9 clean up .tailor and tools/check_pull_changelog.rb files as not used anymore.
Fixes #5268
2016-05-12 06:56:25 +00:00
Pere Urbon-Bayes
a546bdc874 move micro benchmarks and the check pull changelog tool inside the tools folder
Fixes #5268
2016-05-12 06:56:25 +00:00
Pere Urbon-Bayes
1acc309e1e cleanup the tools folder, including tools/release.sh, tools/upload.sh and tools/Gemfile.beaker cause not used anymore
Fixes #5268
2016-05-12 06:56:25 +00:00
Suyog Rao
6bb5ce3635 Attempt to fix failing acceptance tests
Fixes #4107
2015-10-28 22:09:43 +00:00
Suyog Rao
4e7af739d4 Fix failing package acceptance tests
Fixes #4073
2015-10-21 16:23:35 +00:00
Colin Surprenant
827fc6d418 update to jruby-1.7.20 and cleanup legacy patches 2015-05-25 16:51:32 -04:00
Pier-Hugues Pellerin
9e7d6204a5 plugins/bundler refactor
squashed 113 commits by @ph, @colinsurprenant, @jordansissel, @purbon, @jsvd

cleaning the environment.rb

initial work

remove multiples polyglot

force to load rubygems

notice

point to one config

update lock

bootstrap will package the standard application until we have the plugin manager on top of the gemfile

add the gem path to find bundler

fixing dependencies

add gemfiles and bundle

comment platform requiremments in the gemfile

Set `Gem.paths = ...` to the GEM_HOME

Without this, `bin/logstash` will error:

    LoadError: no such file to load -- bundler
         require at org/jruby/RubyKernel.java:1071
         require at C:/Users/jls/Documents/GitHub/logstash/vendor/jruby/lib/ruby/shared/rubygems/core_ext/kernel_require
.rb:55
         set_gem_paths! at C:/Users/jls/Documents/GitHub/logstash/lib/logstash/environment.rb:64
         (root) at C:\Users\jls\Documents\GitHub\logstash\lib\logstash\runner.rb:8

Patch JRuby's jar_installer.rb with a newer version

jar-dependencies is shipped by default with JRuby. However, the version
it ships with has a bug, and despite upgrading jar-dependencies to
0.1.7, which has the fix, JRuby continues to load the "shipped" version
which has a bug.

This patch will patch JRuby by copying in our own jar_installer.rb from
jar-dependencies master, This patching occurs while unpacking JRuby just
after `vendor:jruby`.

The jar_installer.rb is MIT-licensed and no changes were made.

Add `test:plugins` to test all installed plugins

Tell rspec to do the wildcards instead of trying to make the shell do it.

This fixes test runs on Windows (which doesn't do wildcards like this).
The solution was to tell RSpec to look for all files matching a certain path pattern
within the GEM_HOME.

do not run bundle install twice for test:plugins

Gemfile manipulation classes

Gemfile now in root

install POC with new Gemfile classes

specs for the Gemfile classes

header, some bug fixes

spec header

WIP pluginmanager refactor

generated format

updated .lock

unused file

removed --proxy option

fail elegantly

initial support for update

refactor invoke_bundler, debug output

removed old .lock file

no plugin Gemfile

use clamp error handling

reenable list, some cleanups

support for more finders

refactored using new finders

refactor using is_installed_plugin? and some cleanups

verify valid plugin and update all now only update plugins not all gems

support multiple plugins argument, --force option to bypass validation

list only explicitly installed plugins by default, --all option to include dependencies

support multiple plugins argument

renamed all_installed_plugins to all_installed_plugins_gem_specs and return specs, added comments

remove then

update_gem bug, comments

moved gems as development dependencies

updated .lock file

support for :without

--development option, better output feedback, cleanups

abort when no plugins

cosmetic

param fix, cleanups

removed deprecated .lock files

remove deprecated bundler_install_command and struggling with set_gem_paths

refactored all bundler stuff into LogStash::Bundler

rakelib refactor

refactored bundler code

Bundler.real_fuckin_reset

real_fuckin_reset is now reset_settings, removed unnecessary resetings, cleanups

duplicate plugins requirements merging

cleanups

added vendor:rake, cleanups

broke test tasks into 2 steps, first invoke install then test

rake task name fix

proper error exit code

Freezing the jar-dependencies, ruby-maven, tools

set gem paths on error

renamed TEST_PLUGINS to CORE_PLUGINS, added comments

replace test by core, cleanups

DRYied test tasks

missing gemspec

fixed output

correct image build for artifacts

removed deprecated Gemfiles

fix update with multiple plugins arguments

fix update with multiple plugins arguments

remove deprecated code

implicit begin, explicit block

spec for LogStash::Bundler

remove explit require of rubygems

renamed Environment.set_gem_paths! to bundler_setup!

rename Dsl to DSL

respect to_s contract and return empty string not nil

rename DSL.parse gemfile argument to gemfile_content

better error message

renamed --force to --[no-]verify

refactored exit error handling

use explicit array items in iterators

fix --development switch validation, cleaned bundler_options hash init

renamed is_xxx? methods to xxx?

use direct method call on collection

removed double negative, typo

move maven tools monkey patch into maven_tools_patch.rb

renamed build-image to prepare

fix forgotten argument name change

namespace cleanups

spec files glob pattern

cleanup

cleanup

cleanup

Fix the file-dependencies version to 0.1.5 to fix path issues on windows

monkeypatch Rubygems to silence ffi warning

list all plugin gems by default, new options

adding rake task to get faster feedback loop on windows

refactor bat scripts

Use an unreleased filedependencies gem and skip installing drupal

bump file-dependencies

use the released gem of file-dependencies

Add a set of scripts that simplify:   * The necessary setup for the CI test to be executed.   * The actuall CI test execution, having a different scripts for each     different workflow. This makes the test execution simpler and standard, so changes in internal task don't need big changes in the CI config. It also documents and makes easy for developers to run the tests.

Fixes #2640

refactored test to not depend on STDOUT

create a .rspec file to pass some options used while the code is in the testing environment

add coveralls and simplecov as a development dependencies so we can run coverage tests

remove unnecessary .bundle directory from the artifact

In a release, the .bundle/config has a BUNDLE_PATH setting that can
interfere by misleading the plugin manager into not seeing the
vendor/bundle path.

Fixes #2647

Fixes #2475
2015-02-20 17:31:43 +00:00
Pier-Hugues Pellerin
f78b74cf9a Make sure we freeze ruby-maven, maven-tools and jar-dependencies version
Fixes #2596
2015-02-12 15:43:02 +00:00
Richard Pijnenburg
1a7520d5d0 Update package acceptance tests
- Use environment var LS_BRANCH to select which packages to use from which branch.

Fixes #2501
2015-02-03 14:09:18 +00:00
Jordan Sissel
b044906ea5 Update bundler Gemfile.*.lock
Fixes #2455
2015-01-28 00:24:48 +00:00
Suyog Rao
54cb5cfc9d Skip some plugins
Fixes #2453
2015-01-27 23:59:16 +00:00
Joao Duarte
e7d617f703 update jar_dependencies
Fixes #2445
2015-01-27 20:26:45 +00:00
Pere Urbon-Bayes
b53e2e8aed enabled coverage report again throw installing missing dependencies when the user run rake test:prep, user should use COVERAGE=true as before
Fixes #2412
2015-01-27 12:15:31 +00:00
Jordan Sissel
6fad79ca18 Provide our own ssl certs on Windows Ruby
This fixes a bug where Windows Ruby ships with insufficient ssl
certificate information and this causes gem installations to fail. This
patch is only applied under Windows ruby because JRuby is not affected
by it.

Fixes #2402

Fixes #2403
2015-01-27 01:11:04 +00:00
Pere Urbon-Bayes
ba8e4d029f update the cavin version to 0.7.x branch
ammend lock files

Fixes #2409
2015-01-26 21:11:01 +00:00
Pier-Hugues Pellerin
07f7882ccf fix merge conflicts
Fixes #2280
2015-01-21 22:08:11 +00:00
Pier-Hugues Pellerin
45979c4658 revert
Fixes #2331
2015-01-14 23:46:00 +00:00
Pier-Hugues Pellerin
7f0b70aaba Code review comments
Fixes #2331
2015-01-14 23:46:00 +00:00
Pere Urbon-Bayes
2017a64cf7 added examples into the filtered list when getting all plugins from github
Fixes #2342
2015-01-12 18:15:09 +00:00
Pere Urbon-Bayes
75f68d0a0b add logstash-codec-cef as its not released to rubygems so its not possible to be installed with the plugin all command
Fixes #2334
2015-01-12 10:17:41 +00:00
Pier-Hugues Pellerin
73733a007e Generating a new lock files with Bundler 1.7.9
Fixes #2274
2014-12-23 20:18:03 +00:00
Pier-Hugues Pellerin
4448e37fa0 Cleaning gems dependencies from the logstash.gemspec
Fixes #2274
2014-12-23 20:18:03 +00:00
Richard Pijnenburg
f83652aada Refactor doc generation
- Use a generic task for installing all plugins
- Use refactored bundle install task

Fixes #2258
2014-12-17 19:56:31 +00:00
Pere Urbon-Bayes
93aadb4d4c Make the test plugins install throw bundler, so we don't have to install them every time we run the test (it makes the thing slow). Refactor also the bundler install task into a single one, making calls to it when necessary.
Fixes #2237
2014-12-17 17:31:32 +00:00