get a unique URL which can be shared with others in order to download
the file.
-Coquelicot aims to protect, to some extend, users and system
+Coquelicot aims to protect, to some extent, users and system
administrators from disclosure of the files exchanged from passive and
not so active attackers.
apt-get install libsinatra-ruby1.8 libopenssl-ruby1.8 \
libhaml-ruby1.8 liblockfile-ruby libgettext-ruby1.8 \
- rake
-
-Then create the translation catalog through:
-
- rake makemo
+ libjson-ruby1.8 rake
Finally you need to figure out the best way to host a Rack application
depending on your setup. *evil grin*
way is to add `ext/coquelicot_gc.rb` as a cron job that runs every 5
minutes (or so).
-Test suite
-----------
+Test and development
+--------------------
+
+As Coquelicot uses Bundle, the first step to work on Coquelicot
+is installing the proper dependencies by issuing:
-Coquelicot test suite is written using RSpec.
+ bundle install
-On Debian, you will need those extra packages:
+Coquelicot test suite is written using RSpec. Running the test suite is just a
+matter of typing:
- apt-get install librspec-ruby1.8 libhpricot-ruby1.8
+ bundle exec rspec
-You will also need the unpackaged gems "timecop" and "rack-test".
+To update the translation source files, use:
-Then, running the test suite is just a matter of typing:
+ bundle exec rake updatepo
- spec test_coquelicot.rb
+This will update `po/coquelicot.pot` and merge the new strings in the various
+`po/*/coquelicot.po` files.
Migrate from Jyraphe
--------------------
* `lib/coquelicot/auth/<METHOD>.rb`:
- A module implementing the actual authentication. This module must
- implement one method called `authenticate` which will get all the
- parameters as an argument. To simplify your interaction with the
- field `upload_token`, that might be serialized as json, we
- deserialize it prior to passing it to the `authenticate` method.
+ A class implementing the actual authentication. This class must
+ implement an `authenticate` method. It will receive the form fields
+ as usual (params). This method should either return true if upload
+ should be allowed.
* `public/javascripts/coquelicot.auth.<METHOD>.js:`
- We expect 2 javascript methods in that file:
-
- - `authenticationData()`: returns a hash of all the necessary data
- to authenticate on the app side.
- - `authenticationFocus()`: set the focus on the first authentication
- form field.
+ This file should define 'authentication' as an object with the following
+ methods:
+
+ - `getData()`: returns an object of all the necessary data
+ to authenticate on the app side. Keys should have the same name
+ as the input fields used to authenticate without Javascript.
+ - `focus()`: set the focus on the first authentication form field.
+ - (optional) `handleSuccess()`: arbitrary action upon successful
+ authentication. This is called after the livebox is closed.
+ - (optional) `handleReject()`: arbitrary action when access
+ get rejected. One can reset authentication fields after a failed
+ authentication.
+ - (optional) `handleFailure()`: arbitrary action when there was
+ a problem in the authentication procedure.
* `views/auth/<METHOD>.haml`:
Authors
-------
-Coquelicot © 2010-2012 potager.org <jardiniers@potager.org>
+Coquelicot © 2010-2012 potager.org <jardiniers@potager.org>
© 2011 mh / immerda.ch <mh+coquelicot@immerda.ch>
Coquelicot is distributed under the GNU Affero General Public License
version 3. See LICENSE for details.
+
+Background image (`public/images/background.jpg`) derived from:
+"coquelicot" © 2008 Jean-Louis Zimmermann
+Licensed under Creative Commons Attributions 2.0 Generic
+<https://secure.flickr.com/photos/jeanlouis_zimmermann/2478019744/>