preaction / Statocles

Static website CMS
http://preaction.me/statocles
Other
84 stars 33 forks source link

Add 'status' command [GH#516] #527

Closed perlancar closed 7 years ago

perlancar commented 7 years ago

This is part of PRC assignment for January 2017.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.7%) to 92.494% when pulling d160c3ecf4af84e934b5d5213d4fba122622060a on perlancar:add-status-command into e3eb705882ec824ef4b4fac17e325035a8cd1eb1 on preaction:master.

preaction commented 7 years ago

Thanks for implementing this feature! There's one small change to make before I can merge this: The status.yml file should be in the .statocles directory. So Path::Tiny->new( '.statocles', 'status.yml' ) should work fine (see the default value for build_store: https://github.com/preaction/Statocles/blob/master/lib/Statocles/Site.pm#L310).

Because of where the file is being written (in .statocles/status.yml), it will be difficult to actually test any of this, otherwise I'd also ask that you write some automated tests. Right now, the Site object only knows about build_store (which defaults to .statocles/build). Since we can't assume any value for build_store, to fix this problem we will have to create a different attribute. This is way outside the scope of your work, so I'm not going to block this PR on that. I will open a new ticket for the new feature I just described.

So, once the file path is changed to include the .statocles directory, I can merge this. If you'd like me to handle that part, just let me know.

Thanks again for your help!

perlancar commented 7 years ago

Hi Doug,

Thanks for your comment and response. I've committed the change of putting status.yml under .statocles/.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.7%) to 92.494% when pulling 43440fba7f54c488e24474d8f8255a6375c93074 on perlancar:add-status-command into e3eb705882ec824ef4b4fac17e325035a8cd1eb1 on preaction:master.

preaction commented 7 years ago

Excellent, thanks! Looks like the Travis failure is both intermittent and mildly related to the issue I mentioned, so I'll merge this as-is and open that new ticket to fix the problem of us not having a generic build directory for us to store things like this, the built site, and caches of other kinds of generated data.

preaction commented 7 years ago

This is merged and will be available in Statocles 0.083. Thanks!