Skip to content

Commit

Permalink
- fix bug in useragent (bad variable name)
Browse files Browse the repository at this point in the history
- make tests run correctly to catch future jar issues fixed above.
  • Loading branch information
jordansissel committed May 7, 2013
1 parent 87044fb commit 2b6326b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,11 @@ build/flatgems: | build vendor/bundle
$(QUIET)rsync -a $(VENDOR_DIR)/gems/user_agent_parser-*/vendor/ua-parser $@/vendor

flatjar-test:
GEM_HOME= GEM_PATH= java -jar build/logstash-$(VERSION)-flatjar.jar rspec $(TESTS)
cd build && GEM_HOME= GEM_PATH= java -jar build/logstash-$(VERSION)-flatjar.jar rspec $(TESTS)
cd build && GEM_HOME= GEM_PATH= java -jar logstash-$(VERSION)-flatjar.jar rspec spec/jar.rb

jar-test:
GEM_HOME= GEM_PATH= java -jar build/logstash-$(VERSION)-monolithic.jar rspec $(TESTS)
cd build && GEM_HOME= GEM_PATH= java -jar build/logstash-$(VERSION)-monolithic.jar rspec $(TESTS)
cd build && GEM_HOME= GEM_PATH= java -jar logstash-$(VERSION)-monolithic.jar rspec spec/jar.rb

flatjar-test-and-report:
Expand Down
2 changes: 1 addition & 1 deletion lib/logstash/filters/useragent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def register
if __FILE__ =~ /file:\/.*\.jar!/
# Running from a flatjar which has a different layout
regexes_file = [__FILE__.split("!").first, "/vendor/ua-parser/regexes.yaml"].join("!")
@parser = UserAgentParser::Parser.new(:patterns_path => jar_path)
@parser = UserAgentParser::Parser.new(:patterns_path => regexes_file)
else
# assume operating from the git checkout
@parser = UserAgentParser::Parser.new(:patterns_path => "vendor/ua-parser/regexes.yaml")
Expand Down

0 comments on commit 2b6326b

Please sign in to comment.