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

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
5d7970d97d3cd33fcd85696b87a4611e?d=identicon&s=25 Chris Parrish (cparrish)
on 2008-11-24 06: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 Neil'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).

http://github.com/SwankInnovations/radiant-sns-ext...


-Chris
514784888f1bbfb08a189684bf14abc2?d=identicon&s=25 Andrew Neil (Guest)
on 2008-11-24 14:28
(Received via mailing list)
Thanks Chris,

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

   http://github.com/nelstrom/radiant-sns_file_system...

Also on the Radiant extensions repository:

    http://ext.radiantcms.org/extensions/69-sns-file-system

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
the
file system all of the stylesheets and javascripts that are managed
through
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
useful
reference. Sean's template extension[2] also does this.

Cheers,
Drew


[1]:
http://github.com/nelstrom/radiant-file-system-ext...
[2]:
http://github.com/seancribbs/radiant-templates-ext...

On Mon, Nov 24, 2008 at 5:47 AM, Chris Parrish <
8270a373485baab4701a735cb4cd174b?d=identicon&s=25 Anton Aylward (antonaylward)
on 2008-11-24 15:20
(Received via mailing list)
Chris Parrish 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
installed.


--
"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
5d7970d97d3cd33fcd85696b87a4611e?d=identicon&s=25 Chris Parrish (cparrish)
on 2008-11-24 18:30
(Received via mailing list)
Updating
--------
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]
radiant:extensions:[ext_name]:any-other-task-needed-by-ext


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).


-Chris
8270a373485baab4701a735cb4cd174b?d=identicon&s=25 Anton Aylward (antonaylward)
on 2008-11-24 19:45
(Received via mailing list)
Chris Parrish 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!
Please!

--
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
5d7970d97d3cd33fcd85696b87a4611e?d=identicon&s=25 Chris Parrish (cparrish)
on 2008-11-24 20: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
wherever).

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.


-Chris
This topic is locked and can not be replied to.