The original idea belongs to plus.google.com/102094915438818669469/posts/g4tYBNoSTod, not me.
A live example: ciphermyurl.herokuapp.com
-
Install search.npmjs.org/#/less
Install bundler:
# gem install bundler
-
Create initial configuration:
% git clone ... % cd ciphermyurl
Install all dependencies. You have 2 choices:
-
Usual via
# bundle install
-
Or only for this program
% bundle install --path vendor/bundle
You’ll have to prefix other commands with ‘bundle exec’ though.
Generate configuration options:
% rake config/options.yaml
-
(Edit <tt>config/options.yaml</tt>.) Generate some other important defaults: % rake init
-
Create a database.
The default configuration uses PStore as a DB so no external database is necessary. To create minimal PStore file with 1 record, type:
% rake db:fixtures
Warning! Do not type this every time after redeploying–this rake task deleted old database and then creates a new one.
-
Run application:
% rackup
-
Point a browser to 127.0.0.1:9292
-
(Unnecessary)
To generate API docs in xhtml, install recent Python’s (what a shame) docutils and run:
% rake doc:all
% git add config/options.yaml db/apikeys.yaml Gemfile.lock % git commit -a -m 'saving my local config'
db/data.marshall
is your PStore db.
Recaptcha is used to prevent packing spam. Set in config/options.yaml
your public & private keys.
Default web client public & private key values (‘key1’, ‘key2’) are not suited for the production mode–change them after initial program testing. Don’t confuse them with recaptcha keys–they are for a completely different purpose.
Set the value of :dbadapter
in config/options.yaml
to :couchdb
. :login
& :pw
keys are required too.