Commit graph

15 commits

Author SHA1 Message Date
Daniel Kahn Gillmor
6a833a6e83 Use https instead of http where possible
Many of the external links found in the notmuch source can be resolved
using https instead of http.  This changeset addresses as many as i
could find, without touching the e-mail corpus or expected outputs
found in tests.
2016-06-05 08:32:17 -03:00
Ludovic LANGE
7e6e23c36e ruby: add bindings for notmuch_database_get_all_tags
The Ruby bindings were missing a way to get all the tags of the
database. Now you should be able to access this with the public
instance method `all_tags` of your database object.

Example of use:
    notmuchdb = Notmuch::Database.new path, { :create => false,
    	:mode => Notmuch::MODE_READ_ONLY }

    my_tags = notmuchdb.all_tags

    my_tags.each { |tag|
      print tag
    }

    my_tags.destroy!

Amended by db: improve error reporting, add test
2016-05-19 08:02:43 -03:00
Peter Wang
034102303e ruby: handle return status of database close
Throw an exception if notmuch_database_destroy fails.
2014-09-16 20:17:15 +02:00
Austin Clements
bc4000a952 ruby: Update for changes to notmuch_database_get_directory 2012-05-15 08:59:05 -03:00
Austin Clements
9721343e5b ruby: Update Ruby bindings for new notmuch_database_{open, create} signatures 2012-05-05 10:14:47 -03:00
Justus Winter
288feb7cdf ruby: Use notmuch_database_destroy instead of notmuch_database_close
Adapt the ruby bindings to the notmuch_database_close split.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-04-28 09:30:02 -03:00
Ali Polatel
5c00af46ec ruby: Fix macros, use quoting
Fix Data_Get_Notmuch_* macro definitions broken by prev. commit
Adequate quoting for Data_Get_Notmuch_* macros
Remove duplicated RSTRING_PTR() macros, move it to defs.h
2011-10-04 16:57:33 +03:00
Ali Polatel
05dddf883d ruby: be consistent with notmuch's coding style
No functional change, just indentation
2011-10-04 16:43:40 +03:00
Ali Polatel
898613116d ruby: Add wrappers for database_find_message*
Two new wrappers:
Notmuch::Database.find_message(id) => Notmuch::Message or nil
Notmuch::Database.find_message_by_filename(path) => Notmuch::Message or nil
2011-10-04 16:06:20 +03:00
Ali Polatel
bbb41081d7 ruby: Wrap notmuch_database_{begin,end}_atomic
Adding ruby wrappers for functions:
- notmuch_database_begin_atomic()
- notmuch_database_end_atomic()
added by 957f1ba3fc

New functions:
Notmuch::Database.begin_atomic()
Notmuch::Database.end_atomic()
2011-09-24 15:43:43 +03:00
Ali Polatel
5c9e385591 ruby: Don't barf if an object is destroyed more than once
Raise RuntimeError instead.
Also revise Notmuch::Database a bit.
Add Notmuch::Database.open singleton method.
2010-06-06 09:18:00 +03:00
Ali Polatel
d2a457a5d8 ruby: Use rb_scan_args() 2010-06-06 09:17:57 +03:00
Ali Polatel
c7893408bb ruby: Kill garbage collection related cruft.
Let the user destroy objects that she wants explicitly.
It's not possible to specify the order objects are garbage collected.
See id:86y6f8v838.fsf@harikalardiyari.ev on ruby-talk for more
information.
2010-06-06 09:17:47 +03:00
Ali Polatel
8312e7efea ruby: fix documentation of DB.upgrade! 2010-06-06 09:17:06 +03:00
Ali Polatel
06bf04500b Initial ruby bindings 2010-06-06 09:16:53 +03:00