Skip to content

Update dependency regex pattern #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gemfileparser/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class GemfileParser(object):

gemspec_add_dvtdep_regex = re.compile(r".*add_development_dependency(?P<line>.*)")
gemspec_add_rundep_regex = re.compile(r".*add_runtime_dependency(?P<line>.*)")
gemspec_add_dep_regex = re.compile(r".*dependency(?P<line>.*)")
gemspec_add_dep_regex = re.compile(r".*add_dependency(?P<line>.*)")

def __init__(self, filepath, appname=''):
self.filepath = filepath
Expand Down
24 changes: 24 additions & 0 deletions tests/logstash-mixin-ecs_compatibility_support.gemspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Gem::Specification.new do |s|
s.name = 'logstash-mixin-ecs_compatibility_support'
s.version = '1.3.0'
s.licenses = %w(Apache-2.0)
s.summary = "Support for the ECS-Compatibility mode introduced in Logstash 7.x, for plugins wishing to use this API on older Logstashes"
s.description = "This gem is meant to be a dependency of any Logstash plugin that wishes to use the ECS-Compatibility mode introduced in Logstash 7.x while maintaining backward-compatibility with earlier Logstash releases. When, used on older Logstash versions this adapter provides an implementation of ECS-Compatibility mode that can be controlled at the plugin instance level."
s.authors = %w(Elastic)
s.email = 'info@elastic.co'
s.homepage = 'https://github.com/logstash-plugins/logstash-mixin-ecs_compatibility_support'
s.require_paths = %w(lib)

s.files = %w(lib spec vendor).flat_map{|dir| Dir.glob("#{dir}/**/*")}+Dir.glob(["*.md","LICENSE"])

s.test_files = s.files.grep(%r{^(test|spec|features)/})

s.platform = RUBY_PLATFORM

s.add_runtime_dependency 'logstash-core', '>= 6.0.0'

s.add_development_dependency 'logstash-devutils'
s.add_development_dependency 'rspec', '~> 3.9'
s.add_development_dependency 'rspec-its', '~>1.3'
s.add_development_dependency 'logstash-codec-plain'
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"development": [
{
"name": "logstash-devutils",
"requirement": [],
"autorequire": "",
"source": "",
"parent": [
""
],
"group": "development"
},
{
"name": "rspec",
"requirement": [
"~> 3.9"
],
"autorequire": "",
"source": "",
"parent": [
""
],
"group": "development"
},
{
"name": "rspec-its",
"requirement": [
"~>1.3"
],
"autorequire": "",
"source": "",
"parent": [
""
],
"group": "development"
},
{
"name": "logstash-codec-plain",
"requirement": [],
"autorequire": "",
"source": "",
"parent": [
""
],
"group": "development"
}
],
"runtime": [
{
"name": "logstash-core",
"requirement": [
">= 6.0.0"
],
"autorequire": "",
"source": "",
"parent": [
""
],
"group": "runtime"
}
],
"dependency": [],
"test": [],
"production": [],
"metrics": []
}
3 changes: 3 additions & 0 deletions tests/test_gemfileparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,6 @@ def test_gemspec_2():

def test_gemspec_3():
check_gemparser_results('tests/arel.gemspec')

def test_gemspec_4():
check_gemparser_results('tests/logstash-mixin-ecs_compatibility_support.gemspec')