Commit graph

21 commits

Author SHA1 Message Date
João Duarte
0d6117173f
update multiple dependencies (#16136)
This upgrades multiple java libraries:

* snakeyaml
* shadow
* gradle
* guava
* commons-io
* commons-logging
* commons-codec
* commons-compress
* commons-lang3
* commons-csv
* log4j
* google-java-format
* httpclient
* httpcore
* javassist
* jackson
* jackson-databind
* wiremock-standalone

Gems:

* rack
*sinatra
*octokit
* gems
* rake
* webmock

Also upgrades Java to 17.0.11+9.

Leftover upgrades:

* commons-csv 1.8 breaks license checker
* janino 3.1.12 breaks java tests
* log4j 2.21.0 breaks java compilation
2024-05-08 09:13:41 +01:00
Andres Rodriguez
cf67cb1377
Rubocop: Enable most SpaceInside cops (#15201)
Enabled:
* SpaceInsideArrayLiteralBrackets
* SpaceInsideParens
* SpaceInsidePercentLiteralDelimiters
* SpaceInsideStringInterpolation
* Add enforced style for SpaceInsideStringInterpolation

Enabled without offenses:
* SpaceInsideArrayPercentLiteral
* Layout/SpaceInsideRangeLiteral
* Layout/SpaceInsideReferenceBrackets
2023-07-20 09:49:46 -04:00
Andres Rodriguez
4255a8fd1c
Rubocop: Enable SpaceAround cops (#15196)
* Enable SpaceARoundBlockParameters
* Enable SpaceAroundEqualsInParameterDefault
* Enable SpaceAroundKeyword
* Enable SpaceAroundOperators
* Enable SpaceBeforeBlockBraces, which yields no changes
2023-07-18 21:11:57 -04:00
Andres Rodriguez
acd87a69e7
Rubocop: Enable various EmptyLine cops (#15194)
Disabled:
 * EmptyLineAfterGuardClause
 * EmptyLineAfterMultilineCondition
 * EmptyLinesAroundAccessModifier

Enabled:
 * Layout/EmptyLineAfterMagicComment
 * Layout/EmptyLineBetweenDefs
 * Layout/EmptyLines
 * Layout/EmptyLinesAroundArguments
 * Layout/EmptyLinesAroundAttributeAccessor
 * Layout/EmptyLinesAroundBeginBody
 * Layout/EmptyLinesAroundBlockBody
 * Layout/EmptyLinesAroundExceptionHandlingKeywords
 * Layout/EmptyLinesAroundMethodBody
 * Layout/EmptyLinesAroundModuleBody
2023-07-18 16:49:16 -04:00
Andres Rodriguez
b63ffea472
Enable SpaceAfterColon, SpaceAfterComma, SpaceAfterSemicolon (#15180)
Enable SpaceAfterColon, SpaceAfterComma, SpaceAfterSemicolon and fix occurrences.
2023-07-14 16:46:35 -04:00
Andres Rodriguez
26ff2f7db9
Enable Style/TrailingEmptyLines and fix ocurrences (#15179) 2023-07-14 14:46:33 -04:00
Andres Rodriguez
5e34aacc6e
Enable trailing whitespace formating (#15174)
* Enable Layout/TrailingWhitespace cop formation
* Remove Trailing Whitespaces
2023-07-14 13:22:02 -04:00
João Duarte
4cb900ce7e
update flores dependency to at least 0.0.8 (#14437) 2022-08-17 09:56:45 +01:00
João Duarte
023e11a8e2
replace with_clean_env with with_unbundled_env (#12615) 2021-01-29 17:31:35 +00:00
João Duarte
e9c9865f40
Add apache and elastic license headers to source code files (#11673)
* add license header to ruby and java files
* add license header to erb and rake files
* add license headers to gradle files
2020-03-11 11:53:38 +00:00
Josh Soref
a06dc211ff Spelling fixes (#6806)
Spelling fixes across the board.
2017-03-29 19:33:26 -07:00
Pier-Hugues Pellerin
515bb75a88 Wrong expectation in the suite
Fixes #6840
2017-03-24 14:07:57 -04:00
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
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