summaryrefslogtreecommitdiff
path: root/bindings/ruby
AgeCommit message (Collapse)Author
2021-04-18ruby: fix ruby 3.1 warningsFelipe Contreras
init.c:214:5: warning: ‘rb_cData’ is deprecated: by: rb_cObject. Will be removed in 3.1. [-Wdeprecated-declarations] Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2020-07-18bindings/ruby: replacy use of deprecated notmuch_message_get_flagDavid Bremner
Depending on the flag, this actually can return an errror, so raise a ruby exception if so.
2017-08-23database: add n_d_index_file (deprecates n_d_add_message)Daniel Kahn Gillmor
We need a way to pass parameters to the indexing functionality on the first index, not just on reindexing. The obvious place is in notmuch_database_add_message. But since modifying the argument list would break both API and ABI, we needed a new name. I considered notmuch_database_add_message_with_params(), but the functionality we're talking about doesn't always add a message. It tries to index a specific file, possibly adding a message, but possibly doing other things, like adding terms to an existing message, or failing to deal with message objects entirely (e.g. because the file didn't contain a message). So i chose the function name notmuch_database_index_file. I confess i'm a little concerned about confusing future notmuch developers with the new name, since we already have a private _notmuch_message_index_file function, and the two do rather different things. But i think the added clarity for people linking against the future libnotmuch and the capacity for using index parameters makes this a worthwhile tradeoff. (that said, if anyone has another name that they strongly prefer, i'd be happy to go with it) This changeset also adjusts the tests so that we test whether the new, preferred function returns bad values (since the deprecated function just calls the new one). We can keep the deprecated n_d_add_message function around as long as we like, but at the next place where we're forced to break API or ABI we can probably choose to drop the name relatively safely. NOTE: there is probably more cleanup to do in the ruby and go bindings to complete the deprecation directly. I don't know those languages well enough to attempt a fix; i don't know how to test them; and i don't know the culture around those languages about API additions or deprecations.
2017-08-18Use rooted paths in .gitignore filesVladimir Panteleev
A leading / in paths in a .gitignore file matches the beginning of the path, meaning that for patterns without slashes, git will match files only in the current directory as opposed to in any subdirectory. Prefix relevant paths with / in .gitignore files, to prevent accidentally ignoring files in subdirectories and possibly slightly improve the performance of "git status".
2017-03-22lib: replace deprecated n_q_count_threads with status returning versionDavid Bremner
This function was deprecated in notmuch 0.21. We re-use the name for a status returning version, and deprecate the _st name.
2017-03-22lib: replace deprecated n_q_count_messages with status returning versionDavid Bremner
This function was deprecated in notmuch 0.21. We re-use the name for a status returning version, and deprecate the _st name. One or two remaining uses of the (removed) non-status returning version fixed at the same time
2017-03-22lib: replace deprecated n_q_search_messages with status returning versionDavid Bremner
This function was deprecated in notmuch 0.21. We re-use the name for a status returning version, and deprecate the _st name.
2017-03-22lib: replace n_query_search_threads with status returning versionDavid Bremner
This function was deprecated in notmuch 0.21. We finally remove the deprecated API, and rename the status returning version to the simpler name. The status returning is kept as a deprecated alias.
2017-03-12fix out of tree buildTomi Ollila
In addition to use ${srcdir} and deliver ${NOTMUCH_SRCDIR} where needed, source from ruby bindings had to be copied to the out-of-tree target directory -- if the source files in source directory were referenced in build and there were also built object files there, those could have been considered as target files (and then not found when attempting to create bindings/ruby/notmuch.so).
2016-06-05Use https instead of http where possibleDaniel Kahn Gillmor
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-05-19ruby: add bindings for `notmuch_database_get_all_tags`Ludovic LANGE
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
2015-10-05ruby: use new query_search APIDavid Bremner
These changes should not be too surprising for users because the routines were already potentially throwing exceptions.
2015-10-05ruby: use new count APIDavid Bremner
This change of replacing ignoring errors with exceptions is intended, and indeed one of the main motivations for the libnotmuch API changes.
2015-06-14build/ruby: use notmuch configure script values for shared libDavid Bremner
This is supposed to help build on systems like MacOS with different conventions for naming shared libraries. We have already computed the relevant names, so doing it again in ruby seems like a bad idea.
2015-06-13lib, ruby: make use of -Wl,--no-undefined configurableDavid Bremner
In particular this is supposed to help build on systems (presumably using a non-gnu ld) where this flag is not available.
2015-06-12build: integrate building ruby bindings into notmuch build processDavid Bremner
Because ruby generates a Makefile, we have to use recursive make. Because mkmf.rb hardcodes the name Makefile, put our Makefile{.local} in the parent directory.
2015-01-01bindings/ruby: gitignore *.oDavid Bremner
2014-09-16ruby: handle return status of database closePeter Wang
Throw an exception if notmuch_database_destroy fails.
2014-05-18ruby: Add wrapper for notmuch_query_count_threadsWael M. Nasreddine
2014-02-21ruby bindings message: docstring typoGaute Hope
2013-05-23ruby: use in-tree notmuch libraryFelipe Contreras
Currently it simply finds any library available, and if notmuch is installed in the system, it would give priority to that library. Let's implement our own helper functions to link directly to the local library, and give priority to the local header file. Also, add an option to properly check if there are missing symbols. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-05-23ruby: fix missing symbol UINT2FIX()Felipe Contreras
It has never existed in Ruby (maybe JRuby). Fortunately the symbols are loaded lazily, so nobody would notice unless they try 'query::count_messages'. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-02-18ruby: Add bindings for notmuch_thread_get_messagesAustin Clements
2012-06-29ruby: extern linkage portability improvementTomi Ollila
Some C compilers are stricter when it comes to (tentative) definition of a variable -- in those compilers introducing variable without 'extern' keyword always allocates new 'storage' to the variable and linking all these modules fails due to duplicate symbols. This is reimplementation of Charlie Allom's patch: id:"1336481467-66356-1-git-send-email-charlie@mediasp.com", written originally by Ali Polatel. This version has more accurate commit message.
2012-05-25Revert "ruby: Add workarounds to use in-tree build not the installed one"Felipe Contreras
This reverts commit 82b73ffd7380b85d259eeb91100dd6ac2d14223a. Only leave the copyright changes. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2012-05-15ruby: Update for changes to notmuch_database_get_directoryAustin Clements
2012-05-08ruby: Add wrapper for notmuch_query_set_omit_excluded()Ali Polatel
2012-05-08ruby: Add workarounds to use in-tree build not the installed oneAli Polatel
- Make mkmf use the notmuch.h under ../../lib - Use libnotmuch.a instead of linking to the installed libnotmuch.so
2012-05-08ruby: Add wrapper for notmuch_query_add_tag_excludeAli Polatel
2012-05-08ruby: Add wrapper for notmuch_query_count_messagesAli Polatel
2012-05-05ruby: Update Ruby bindings for new notmuch_database_{open, create} signaturesAustin Clements
2012-04-28ruby: Use notmuch_database_destroy instead of notmuch_database_closeJustus Winter
Adapt the ruby bindings to the notmuch_database_close split. Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2011-10-04ruby: Fix macros, use quotingAli Polatel
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-04ruby: Really add wrappers for database_find_message*Ali Polatel
Commit 898613116db746aa0f915ae43da8aba28545203d only added wrapper functions but did not register them. Register the functions in module's initialization function.
2011-10-04ruby: be consistent with notmuch's coding styleAli Polatel
No functional change, just indentation
2011-10-04ruby: Add wrappers for database_find_message*Ali Polatel
Two new wrappers: Notmuch::Database.find_message(id) => Notmuch::Message or nil Notmuch::Database.find_message_by_filename(path) => Notmuch::Message or nil
2011-09-24ruby: New exception Notmuch::UnbalancedAtomicErrorAli Polatel
This exception wraps NOTMUCH_STATUS_UNBALANCED_ATOMIC which was added with the commit e59cc0031fbf84f49e32dedb9927f427d2c49309.
2011-09-24ruby: Wrap notmuch_database_{begin,end}_atomicAli Polatel
Adding ruby wrappers for functions: - notmuch_database_begin_atomic() - notmuch_database_end_atomic() added by 957f1ba3fc1d737887029ff1787fc6bea94de00b New functions: Notmuch::Database.begin_atomic() Notmuch::Database.end_atomic()
2011-09-24ruby: Rename destroy to destroy!Ali Polatel
According to the common Ruby function naming convention, potentially dangerous functions or functions which operate on the object itself are suffixed with an exclamation mark. Both of these are true for object destroying functions. The following modules are affected: - Notmuch::Directory - Notmuch::FileNames - Notmuch::Query - Notmuch::Threads - Notmuch::Thread - Notmuch::Messages - Notmuch::Message - Notmuch::Tags
2011-07-29ruby: Fix typo in documentationAli Polatel
It's Notmuch::FileNames not Notmuch::Filenames
2011-07-29ruby: Remove the split file hack from rdoc.shAli Polatel
2011-07-29ruby: Add markers to method definitions to help rdocAli Polatel
rdoc is dumb and needs markers in method definitions so that she can find which source file the method is defined in
2011-07-29ruby: Document remaining undocumented constantsAli Polatel
2011-07-29ruby: Document constants and exceptions right before definitionAli Polatel
2011-07-29ruby: Add list of classes to main documentationAli Polatel
2011-02-03ruby: Add generated files to .gitignoreAli Polatel
2011-01-25ruby: Add wrapper for message_get_filenamesAli Polatel
2011-01-25ruby: Add wrappers for maildir sync. interfaceAli Polatel
New wrappers: notmuch_message_maildir_flags_to_tags(): MESSAGE.maildir_flags_to_tags notmuch_message_tags_to_maildir_flags(): MESSAGE.tags_to_maildir_flags
2011-01-25ruby: Add wrappers for query_get_s{ort,tring}Ali Polatel
New wrappers: notmuch_query_get_sort(): QUERY.sort notmuch_query_get_query_string(): QUERY.to_s
2010-06-06ruby: Don't barf if an object is destroyed more than onceAli Polatel
Raise RuntimeError instead. Also revise Notmuch::Database a bit. Add Notmuch::Database.open singleton method.