Skip to content

Commit

Permalink
plugins/bundler refactor
Browse files Browse the repository at this point in the history
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 elastic#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 elastic#2647

Fixes elastic#2475
  • Loading branch information
ph authored and jordansissel committed Feb 20, 2015
1 parent 48d6ab5 commit 9e7d620
Show file tree
Hide file tree
Showing 44 changed files with 1,990 additions and 1,707 deletions.
5 changes: 5 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# This is a Logstash generated Gemfile.
# If you modify this file manually all comments and formatting will be lost.

source "https://rubygems.org"
gemspec :name => "logstash"
349 changes: 349 additions & 0 deletions Gemfile.jruby-1.9.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,349 @@
GIT
remote: git://github.com/ph/file-dependencies.git
revision: 7faa11b61777d884b6cab56281d3a34126071b55
branch: fix/close-file-handlers
specs:
file-dependencies (0.1.6)
minitar

PATH
remote: .
specs:
logstash (2.0.0.dev-java)
cabin (>= 0.7.0)
clamp
file-dependencies (= 0.1.6)
filesize
ftw (~> 0.0.40)
i18n (= 0.6.9)
jar-dependencies (= 0.1.7)
jrjackson
jruby-httpclient
maven-tools (= 1.0.7)
mime-types
minitar
pry
rack
ruby-maven (= 3.1.1.0.8)
sinatra
stud
treetop (~> 1.4.0)

GEM
remote: https://rubygems.org/
specs:
addressable (2.3.7)
axiom-types (0.1.1)
descendants_tracker (~> 0.0.4)
ice_nine (~> 0.11.0)
thread_safe (~> 0.3, >= 0.3.1)
backports (3.6.4)
builder (3.2.2)
cabin (0.7.1)
ci_reporter (1.9.3)
builder (>= 2.1.2)
clamp (0.6.3)
coderay (1.1.0)
coercible (1.0.0)
descendants_tracker (~> 0.0.1)
descendants_tracker (0.0.4)
thread_safe (~> 0.3, >= 0.3.1)
diff-lcs (1.2.5)
equalizer (0.0.9)
ffi (1.9.6-java)
filesize (0.0.4)
ftw (0.0.42)
addressable
backports (>= 2.6.2)
cabin (> 0)
http_parser.rb (~> 0.6)
gem_publisher (1.5.0)
http_parser.rb (0.6.0-java)
i18n (0.6.9)
ice_nine (0.11.1)
insist (1.0.0)
jar-dependencies (0.1.7)
jrjackson (0.2.8)
jruby-httpclient (1.1.1-java)
logstash-devutils (0.0.8-java)
gem_publisher
insist (= 1.0.0)
jar-dependencies
minitar
rake
maven-tools (1.0.7)
virtus (~> 1.0)
method_source (0.8.2)
mime-types (2.4.3)
minitar (0.5.4)
polyglot (0.3.5)
pry (0.10.1-java)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
spoon (~> 0.0)
rack (1.6.0)
rack-protection (1.5.3)
rack
rake (10.4.2)
rspec (2.14.1)
rspec-core (~> 2.14.0)
rspec-expectations (~> 2.14.0)
rspec-mocks (~> 2.14.0)
rspec-core (2.14.8)
rspec-expectations (2.14.5)
diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.14.6)
ruby-maven (3.1.1.0.8)
maven-tools (~> 1.0.1)
ruby-maven-libs (= 3.1.1)
ruby-maven-libs (3.1.1)
sinatra (1.4.5)
rack (~> 1.4)
rack-protection (~> 1.4)
tilt (~> 1.3, >= 1.3.4)
slop (3.6.0)
spoon (0.0.4)
ffi
stud (0.0.19)
thread_safe (0.3.4-java)
tilt (1.4.1)
treetop (1.4.15)
polyglot
polyglot
polyglot
polyglot
polyglot
polyglot
polyglot
polyglot
polyglot
polyglot
polyglot
polyglot
polyglot
polyglot
polyglot
polyglot
polyglot
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
polyglot (>= 0.3.1)
virtus (1.0.4)
axiom-types (~> 0.1)
coercible (~> 1.0)
descendants_tracker (~> 0.0, >= 0.0.3)
equalizer (~> 0.0, >= 0.0.9)

PLATFORMS
java

DEPENDENCIES
ci_reporter (= 1.9.3)
file-dependencies!
logstash!
logstash-devutils
rspec (~> 2.14.0)
Loading

0 comments on commit 9e7d620

Please sign in to comment.