Coder Social home page Coder Social logo

haplo-plugin-tool's Issues

File uploads on Windows differing from behavior on Unix due to JRuby File.open()

I reported this issue on the JRuby project:

jruby/jruby#5100

But in short, 0x0D is being converted to 0x0A when reading the contents of files using File.open() without the binary flag

Obviously this doesn't much affect code upload, but I noticed when some gifs in static/ started looking very broken after upload (and the resultant file hash being different...)

As a quick workaround I'm currently using "rb" in the plugin tools File.open()'s where it seems to be causing some problems (see commit: thomas-@8ff1f0b)

Appreciate this may be a wontfix, but figured it was worth reporting anyhow!

Plugin tool "passes" check when files fail if there are other files with warnings.

Stumbled upon some inconsistent behaviour when automating some code checks. We're using haplo-plugin check as a step in this, and failing the commit if the check reports a non-zero error code.

Baseline, using example_usage from haplo-standard-plugins-dev:

~/dev/ ❯ cd haplo-standard-plugins-dev
~/dev/haplo-standard-plugins-dev master ❯ hp -p example_usage check
Haplo Plugin Tool (1e1d187)
1 plugin
example_usage .......

PASSED

Adding a file to the js/ folder that is not added to plugin.json - this causes a FAILED and a non-zero error code, as expected.

~/dev/haplo-standard-plugins-dev master ❯ touch example_usage/js/extra.js
~/dev/haplo-standard-plugins-dev master ❯ hp -p example_usage check
Haplo Plugin Tool (1e1d187)
1 plugin
example_usage ....
WARNING: /Users/thomas/dev/haplo-standard-plugins-dev/example_usage/plugin.json doesn't mention js/extra.js in the load directive.

**** js/extra.js has errors:
Couldn't check file - not mentioned in plugin.json
....

FILES WITH ERRORS
  /Users/thomas/dev/haplo-standard-plugins-dev/example_usage/js/extra.js: FAIL

FAILED

But if we add a file that causes a WARN, for instance, a "wrong kind of file", the plugin tool reports PASSED WITH WARNINGS, despite extra.js still giving a FAIL:

~/dev/haplo-standard-plugins-dev master ❯ touch example_usage/ignored.js
~/dev/haplo-standard-plugins-dev master ❯ hp -p example_usage check
Haplo Plugin Tool (1e1d187)
1 plugin
example_usage .
**** ignored.js has errors:
Wrong kind of file
....
WARNING: /Users/thomas/dev/haplo-standard-plugins-dev/example_usage/plugin.json doesn't mention js/extra.js in the load directive.

**** js/extra.js has errors:
Couldn't check file - not mentioned in plugin.json
....

FILES WITH ERRORS
  /Users/thomas/dev/haplo-standard-plugins-dev/example_usage/ignored.js: WARN
  /Users/thomas/dev/haplo-standard-plugins-dev/example_usage/js/extra.js: FAIL

PASSED WITH WARNINGS
~/dev/haplo-standard-plugins-dev master ❯

Ambiguous uncaught error message

application_root_plugin = application_info["config"]["applicationRootPlugin"]

This line assumes that application["config"] exists. If a key already exists for an application on SERVER and the application is deleted and replaced, when you try the command:

hp -p plugin_name -s SERVER

you get the error:

NoMethodError: undefined method '[]' for nil:NilClass

Instead, could a warning be added to highlight the fact that application["config"] does not exist?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.