Magical things from my head and the Web
Turns out that ActionController::TestUploadedFile is deprecated in Rails 3. This makes scripting attachment_fu, for example to import multiple images at once, difficult.
However! All is not lost. In this example, our attachment_fu-enabled Model is called Asset.
In Rails 2, you could do this:
require 'action_controller'
require 'action_controller/test_process.rb'fpath = "/path/to/file"
# this works on UNIX, find another way if you're stuck with Windowsmtype = `file -ib #{fpath}`.gsub(/\n/,"")
@attachable = AttachmentMetadataModel.new(
:uploaded_data =>ActionController::TestUploadedFile.new(path, mimetype)) @attachable.save
However, with Rails 3, that doesn't work. You'll want something like this instead:
require 'action_dispatch'
require 'action_dispatch/testing/test_process'
fpath = "/path/to/file"
# this works on UNIX, find another way if you're stuck with Windows
mtype = `file -ib #{fpath}`.gsub(/\n/,"")@attachable = Asset.new(
:uploaded_data => ActionDispatch::TestProcess.fixture_file_upload(fpath, mtype))
@attachable.save
Same job, different module.
Polycom IP phones are, to use a technical term, a complete ballache to provision. The XML configuration file is rather opaque to say the least.
One thing that I keep coming back to, and keep forgetting how to do, is enable the large clock with the date and time instead of a background image. It's simple once you know the directive to look for...if you can remember it. Google's unhelpful, so hopefully this will get indexed!
Edit /tftpboot/sip.cfg and find a line containing ind.idleDisplay.enabled - change it to look like the following:
<indicators ind.idleDisplay.enabled="0" ind.idleDisplay.mode="">
This will disable the idle display, and the phone will show the date and time instead. Easy when you know how!