Skip to content
This repository has been archived by the owner on Nov 27, 2018. It is now read-only.

refactoring #63

Merged
merged 177 commits into from
Jan 22, 2015
Merged

refactoring #63

merged 177 commits into from
Jan 22, 2015

Conversation

maboiteaspam
Copy link
Contributor

hi,

here is the refactoring applied. While general compatibility was kept in order to insure that no breaking changes was introduced, here is a list of interesting changes,

  • lib/cozy-light now is a kind of cozy kernel, holding reference to necessary sub module, manage proper init / exit process of a cozy instance
  • all sub modules are now in a independant files, tests also reflect that
  • a new cozy.status is introduced to know if the app is actively running the front gui
  • cozyLight.actions exposes a new event 'restarted' to listen this event
  • install / uninstall app and plugins are updated to not let twice app being installed together
  • uninstall command now requires the name app instead of install source reference
  • mocha integration is updated, the options are deported to a specific files when possible
  • should.js is used whenever it is possible in the test scenarios to improve tests results understanding
  • tests are now delegated to specific sh files for process isolations
  • package file was cleaned of several useless dependency, at least not explicitly required.
  • application helpers and plugin helpers exposes cozyLight instance as last arguments
  • README was updated with fedora specifics install steps
  • also added tip to faster test run

HTH

@maboiteaspam
Copy link
Contributor Author

Can t find my comment about printit anymore.
Two remarks about this logger,
does not support log level filters
there is some hardcoded stuff inside related to NODE_ENV variable that i could not control form the lib.
This was a bit desperating.

@maboiteaspam
Copy link
Contributor Author

i found the right rules for parens,
http://eslint.org/docs/rules/space-in-parens.html

test/npm-helpers.js
  11:32  error  There should be no spaces inside this paren  space-in-parens
  12:31  error  There should be no spaces inside this paren  space-in-parens

✖ 82 problems

:x

@frankrousseau
Copy link
Contributor

Ok, thank you!

@frankrousseau
Copy link
Contributor

About printit, it works that way:

  • it disables color in production mode.
  • it displays debug in dev mode.

From my point of view log levels are useless for a simple software like Cozy Light. Why do you need it?

@maboiteaspam
Copy link
Contributor Author

really !! disables color ? !! Why ? I don t get it sorry. Anyway, can we make it configurable at runtime ?

@frankrousseau
Copy link
Contributor

Open an issue on the dedictaed repository describing your requirements. Then, we'll see what we could do.

@frankrousseau
Copy link
Contributor

Ok. I'm working on the merge, please do not commit anymore on this PR. I expect to finish next week.

@maboiteaspam
Copy link
Contributor Author

Seems ok for shipping now. I fixed some late stuff. I ll delay some other updates to later.

The problems i lately found was sufficiently important that i don t respect your demand to not commit on it. Hope it won t be too much troubles.

@frankrousseau
Copy link
Contributor

Ok np, thank you!

@frankrousseau
Copy link
Contributor

Sorry I can't integrate your recent commit I renamed file and it make thinks too complex to merge them. I'll tell you when I will finish the merge.

@frankrousseau frankrousseau merged commit e001ca3 into cozy-labs:master Jan 22, 2015
@frankrousseau
Copy link
Contributor

I merged this PR so you can open a new one if you want to make fixes. I changed requires to make them look more like the Node way.
Tests failed, I will fix it soon.

@frankrousseau
Copy link
Contributor

Thank you for that big work on the codebase. That's very helpful.

@maboiteaspam
Copy link
Contributor Author

Hi,

Don t worry it s not finish ; ) But at least we can focus on other topics now this is more workable.

I ll give a check to the test and the merge later!

thank you.

@maboiteaspam
Copy link
Contributor Author

Hi,

i did not see the heavy changes you are still doing until now.

Do you mind using an alternate branch than master for such large changes ?

@maboiteaspam
Copy link
Contributor Author

This said, you maybe interested to merge this commit too,
maboiteaspam@5b43bdc

helps to detect faulty apps / plugin / main server in their stop sequence.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants