haplo-org / haplo-plugin-tool Goto Github PK
View Code? Open in Web Editor NEWHaplo Plugin Tool
Home Page: http://docs.haplo.org/dev/tool/plugin
License: Other
Haplo Plugin Tool
Home Page: http://docs.haplo.org/dev/tool/plugin
License: Other
haplo-plugin-tool/lib/plugin_tool.rb
Line 206 in 64e61a4
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?
I reported this issue on the JRuby project:
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!
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 ❯
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.