Forum: Radiant CMS [ANN] Styles 'n Scripts v0.7

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Chris P. (Guest)
on 2008-11-24 07:48
(Received via mailing list)
Time for a new release.  This is mostly bugfixes and a minor addition or
two to work with other extension:

    * Renamed one of the TextAsset fields (internal change to let SnS
      work better with Andrew N.'s file_system extension).

    * The radiant:extensions:sns:config rake task was just plain
      broken.  I think most folks out there don't know about this tool
      or I'd have heard more complaints by now.

      Please note that this is *the* way to change the SnS settings --
      not directly in the db or with the settings extension as these
      bypass validations I have in place and, since I store these
      settings in memory, don't take effect until you restart your
      server.  The rake task, however, works properly and immediately.

    * There was an issue with one of the migrations if you had existing
      stylesheets/javascripts from an early SnS version (fringe case).

    * Changed the name of a model so that SnS now "just works" with the
      import-export and super-export extensions (nice tools, BTW)

    * Added the radiant:extensions:sns:update_dependencies rake task to
      recreate the dependencies table if you had a problem importing
      existing data (see above).

Andrew N. (Guest)
on 2008-11-24 15:28
(Received via mailing list)
Thanks Chris,

This means that it is time for me to announce my sns_file_system

Also on the Radiant extensions repository:

You will need the latest version of the file_system extension[1], as
well as
Chris's latest (0.7) release of SnS.

With this extension installed, the styles and scripts are extended to
include the file_system functionality. This means that you can save to
file system all of the stylesheets and javascripts that are managed
the Radiant interface, by running the rake command `rake
file_system:to_files`. Any changes you make to these files can then be
loaded back in to the database by running `rake file_system:to_db`.

If you have written an extension, and you would like for it to piggy
back on
the file_system extension, you might consider sns_file_system to be a
reference. Sean's template extension[2] also does this.



On Mon, Nov 24, 2008 at 5:47 AM, Chris P. <
Anton A. (Guest)
on 2008-11-24 16:20
(Received via mailing list)
Chris P. said the following on 11/24/2008 12:47 AM:
> Time for a new release.  This is mostly bugfixes and a minor addition or
> two to work with other extension:

Hint, please, as to the ways we might update depending on the way we

"The Air Force is reacting to the EPA ban on CFC's by replacing them in
the cooling systems of the ICBMs.  If they are ever fired, it will be an
environmentally friendly nuclear holocaust, not threatening the Ozone
layer."  -- _Access to Energy_, July 1993
Chris P. (Guest)
on 2008-11-24 19:30
(Received via mailing list)
updating SnS is the same as every other extension, run:

    rake [your_env] radiant:extensions:sns:install

The install task is new to SnS in v0.7.  In previous versions (and with
other extensions that dont' have an install task), run:

    rake [your_env] radiant:extensions:[ext_name]:migrate
    rake [your_env] radiant:extensions:[ext_name]:update
    rake [your_env]

Problems With Backing Up
That said, a month or so ago Anton ran into problems when trying to port
data from one Radiant project to another (not quite the same as updating
an existing project).   In his case, during the backup/restore, the
text_asset_dependencies table was copied, and the records were copied --
but not their data.  As you can imagine, SnS didn't like that and threw
an error when it couldn't find the expected data.

Normally, I'd chalk this up to a failure in the import/export process
(he copied and pasted data manually using a sqlite editor) but then Nate
Turnage posted with (essentially) the same problem using the
Import-Export extension.  Except in his case, that table just wasn't
exported because of how the SnS table and model were named (it ignored
them).  With this release, I've changed SnS so that Import-Export (and
Super-Export) extensions will automatically find the models now.  (And
I've submitted a patch to those extensions so that this won't happen
with other extensions).

Backup & Restoring
Rules for copying data from one db to another (SnS or otherwise): Copy
*all* the data.  If using the same db in both places, I might suggest
using your db's dump tools.  The importing-and-exporting extensions
should now work just fine for you too.

New SnS Data Recreation Tool
I've added a new rake task in SnS to repair/rebuild the
text_asset_dependencies table.  It exists for a special migrations case
but it would also help the two situations above. Just run:

    rake [your_env] radiant:extensions:sns:rebuild_dependencies

And SnS will rebuild the text_asset_dependencies table (the table must
exist but it handles both missing and empty records).

Anton A. (Guest)
on 2008-11-24 20:45
(Received via mailing list)
Chris P. said the following on 11/24/2008 12:29 PM:
> Updating
> --------
> updating SnS is the same as every other extension, run:
>     rake [your_env] radiant:extensions:sns:install

OH WOW!  All the git/svn stuff encoded in a rake file!
Why has no-one ever done that before?
Please can we have this done recursively from the root!

A lot of managers talk about 'thinking out of the box,' but they don't
understand the communication process by which that happens.  You do not
think out of the box by commanding the box! You think out of the box
precisely by bringing ideas together that don't allow dominant ideas to
continue to dominate.
   - Stan Deetz
Chris P. (Guest)
on 2008-11-24 21:21
(Received via mailing list)
Um, no. (Though it would be very cool).  In order to make use of the
'install' task, you have to have the latest version of SnS (or any
extension) copied into the extension's directory (from github, svn, or

Install in this sense, means:
    "migrate the db, copy any needed files into your project's /public
folder, do anything else the extension writer deems necessary to get
things working"

and not:
    "go get the latest version and then install that"

I think the Ray extension may do what you're looking for.

This topic is locked and can not be replied to.