Deprecated. Replaced by MailchimpTransactional - A Ruby API library for the Mandrill email as a service platform.
Client library for Amazon's Simple Email Service's REST API
Deprecated. Replaced by MailchimpMarketing - A Ruby API library for the MailChimp email platform
Hominid is a Ruby gem that provides a wrapper for interacting with the Mailchimp email marketing service MC, STS and Export API's.
Use this gem to send emails through Postmark HTTP API and retrieve info about bounces.
This gem allows simple integration between ActionMailer and SendGrid. SendGrid is an email deliverability API that is affordable and has lots of bells and whistles.
Rodauth is Ruby's most advanced authentication framework, designed to work in all rack applications. It's built using Roda and Sequel, but it can be used as middleware in front of web applications that use other web frameworks and database libraries. Rodauth aims to provide strong security for password storage by utilizing separate database accounts if possible on PostgreSQL, MySQL, and Microsoft SQL Server. Configuration is done via a DSL that makes it easy to override any part of the authentication process. Rodauth supports typical authentication features: such as login and logout, changing logins and passwords, and creating, verifying, unlocking, and resetting passwords for accounts. Rodauth also supports many advanced authentication features: * Secure password storage using security definer database functions * Multiple primary multifactor authentication methods (WebAuthn and TOTP), as well as backup multifactor authentication methods (SMS and recovery codes). * Passwordless authentication using email links and WebAuthn authenticators. * Both standard HTML form and JSON API support for all features.
Delivery Method for Rails ActionMailer to send emails using the SparkPost API
Access the Nuntium API in ruby. Nuntium is an open source and free platform -developed by InSTEDD- that allows applications to send and receive all type of messages. Examples of messages are sms, emails and twitter direct messages.
Incoming! standardizes various mail parse apis, making it a snap to receive emails through HTTP post hooks.
This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
A convenient way to use the Send With Us email service with a Ruby on Rails app. SendWilthUsMailer implements a mailer API similar to the ActionMailer railtie.
Use this gem to send emails through SMTP and Postmark API and check if email arrived.
Inventory Inventory keeps track of the contents of your Ruby¹ projects. Such an inventory can be used to load the project, create gem specifications and gems, run unit tests, compile extensions, and verify that the projectās content is what you think it is. ¹ See http://ruby-lang.org/ § Usage Letās begin by discussing the project structure that Inventory expects you to use. Itās pretty much exactly the same as the standard Ruby project structure¹: āāā README āāā Rakefile āāā lib ā āāā foo-1.0 ā ā āāā bar.rb ā ā āāā version.rb ā āāā foo-1.0.rb āāā test āāā unit āāā foo-1.0 ā āāā bar.rb ā āāā version.rb āāā foo-1.0.rb Here you see a simplified version of a project called āFooāās project structure. The only real difference from the standard is that the main entry point into the library is named āfoo-1.0.rbā instead of āfoo.rbā and that the root sub-directory of ālibā is similarly named āfoo-1.0ā instead of āfooā. The difference is the inclusion of the API version. This must be the major version of the project followed by a constant ā.0ā. The reason for this is that it allows concurrent installations of different major versions of the project and means that the wrong version will never accidentally be loaded with require. Thereās a bigger difference in the content of the files. ā¹Lib/foo-1.0/version.rbāŗ will contain our inventory instead of a String: require 'inventory-1.0' class Foo Version = Foo.new(1, 4, 0){ authors{ author 'A. U. Thor', 'a.u.thor@example.org' } homepage 'http://example.org/' licenses{ license 'LGPLv3+', 'GNU Lesser General Public License, version 3 or later', 'http://www.gnu.org/licenses/' } def dependencies super + Dependencies.new{ development 'baz', 1, 3, 0 runtime 'goo', 2, 0, 0 optional 'roo-loo', 3, 0, 0, :feature => 'roo-loo' } end def package_libs %w[bar.rb] end } end Weāre introducing quite a few concepts at once, and weāll look into each in greater detail, but we begin by setting the ā¹Versionāŗ constant to a new instance of an Inventory with major, minor, and patch version atoms 1, 4, and 0. Then we add a couple of dependencies and list the library files that are included in this project. The version numbers shouldnāt come as a surprise. These track the version of the API that weāre shipping using {semantic versioning}². They also allow the Inventory#to_s method to act as if youād defined Version as ā¹'1.4.0'āŗ. Next follows information about the authors of the project, the projectās homepage, and the projectās licenses. Each author has a name and an email address. The homepage is simply a string URL. Licenses have an abbreviation, a name, and a URL where the license text can be found. We then extend the definition of ā¹dependenciesāŗ by adding another set of dependencies to ā¹superāŗ. ā¹Superāŗ includes a dependency on the version of the inventory project thatās being used with this project, so youāll never have to list that yourself. The other three dependencies are all of different kinds: development, runtime, and optional. A development dependency is one thatās required while developing the project, for example, a unit-testing framework, a documentation generator, and so on. Runtime dependencies are requirements of the project to be able to run, both during development and when installed. Finally, optional dependencies are runtime dependencies that may or may not be required during execution. The difference between runtime and optional is that the inventory wonāt try to automatically load an optional dependency, instead leaving that up to you to do when and if it becomes necessary. By that logic, runtime dependencies will be automatically loaded, which is a good reason for having dependency information available at runtime. The version numbers of dependencies also use semantic versioning, but note that the patch atom is ignored unless the major atom is 0. You should always only depend on the major and minor atoms. As mentioned, runtime dependencies will be automatically loaded and the feature they try to load is based on the name of the dependency with a ā-X.0ā tacked on the end, where āXā is the major version of the dependency. Sometimes, this isnāt correct, in which case the :feature option may be given to specify the name of the feature. You may also override other parts of a dependency by passing in a block to the dependency, much like weāre doing for inventories. The rest of an inventory will list the various files included in the project. This project only consists of one additional file to those that an inventory automatically include (Rakefile, README, the main entry point, and the version.rb file that defines the inventory itself), namely the library file ā¹bar.rbāŗ. Library files will be loaded automatically when the main entry point file loads the inventory. Library files that shouldnāt be loaded may be listed under a different heading, namely āadditional_libsā. Both these sets of files will be used to generate a list of unit test files automatically, so each library file will have a corresponding unit test file in the inventory. Weāll discuss the different headings of an inventory in more detail later on. Now that weāve written our inventory, letās set it up so that itās content gets loaded when our main entry point gets loaded. We add the following piece of code to ā¹lib/foo-1.0.rbāŗ: module Foo load File.expand_path('../foo-1.0/version.rb', __FILE__) Version.load end Thatās all thereās to it. The inventory can also be used to great effect from a Rakefile using a separate project called Inventory-Rake³. Using itāll give us tasks for cleaning up our project, compiling extensions, installing dependencies, installing and uninstalling the project itself, and creating and pushing distribution files to distribution points. require 'inventory-rake-1.0' load File.expand_path('../lib/foo-1.0/version.rb', __FILE__) Inventory::Rake::Tasks.define Foo::Version Inventory::Rake::Tasks.unless_installing_dependencies do require 'lookout-rake-3.0' Lookout::Rake::Tasks::Test.new end Itās ā¹Inventory::Rake::Tasks.defineāŗ that does the heavy lifting. It takes our inventory and sets up the tasks mentioned above. As we want to be able to use our Rakefile to install our dependencies for us, the rest of the Rakefile is inside the conditional #unless_installing_dependencies, which, as the name certainly implies, executes its block unless the task being run is the one that installs our dependencies. This becomes relevant when we set up Travisā“ integration next. The only conditional set-up we do in our Rakefile is creating our test task via Lookout-Rakeāµ, which also uses our inventory to find the unit tests to run when executed. Travis integration is straightforward. Simply put before_script: - gem install inventory-rake -v '~> VERSION' --no-rdoc --no-ri - rake gem:deps:install in the projectās ā¹.travis.ymlāŗ file, replacing ā¹VERSIONāŗ with the version of Inventory-Rake that you require. Thisāll make sure that Travis installs all development, runtime, and optional dependencies that youāve listed in your inventory before running any tests. You might also need to put env: - RUBYOPT=rubygems in your ā¹.travis.ymlāŗ file, depending on how things are set up. ¹ Ruby project structure: http://guides.rubygems.org/make-your-own-gem/ ² Semantic versioning: http://semver.org/ ³ Inventory-Rake: http://disu.se/software/inventory-rake-1.0/ ā“ Travis: http://travis-ci.org/ āµ Lookout-Rake: http://disu.se/software/lookout-rake-3.0/ § API If the guide above doesnāt provide you with all the answers you seek, you may refer to the API¹ for more answers. ¹ See http://disu.se/software/inventory-1.0/api/Inventory/ § Financing Currently, most of my time is spent at my day job and in my rather busy private life. Please motivate me to spend time on this piece of software by donating some of your money to this project. Yeah, I realize that requesting money to develop software is a bit, well, capitalistic of me. But please realize that I live in a capitalistic society and I need money to have other people give me the things that I need to continue living under the rules of said society. So, if you feel that this piece of software has helped you out enough to warrant a reward, please PayPal a donation to now@disu.se¹. Thanks! Your support wonāt go unnoticed! ¹ Send a donation: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=now@disu.se&item_name=Inventory § Reporting Bugs Please report any bugs that you encounter to the {issue tracker}¹. ¹ See https://github.com/now/inventory/issues § Authors Nikolai Weibull wrote the code, the tests, the documentation, and this README. § Licensing Inventory is free software: you may redistribute it and/or modify it under the terms of the {GNU Lesser General Public License, version 3}¹ or later², as published by the {Free Software Foundation}³. ¹ See http://disu.se/licenses/lgpl-3.0/ ² See http://gnu.org/licenses/ ³ See http://fsf.org/
A fork of the official Ruby API library for the Mandrillus email as a service platform.
Policy Troubleshooter makes it easier to understand why a user has access to a resource or doesn't have permission to call an API. Given an email, resource, and permission, Policy Troubleshooter will examine all IAM policies that apply to the resource. It then reveals whether the member's roles include the permission on that resource and, if so, which policies bind the member to those roles. Note that google-cloud-policy_troubleshooter-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-policy_troubleshooter instead. See the readme for more details.
A Ruby API library for the Mandrill email as a service platform, forked to support json 2.0.2. Originally on https://bitbucket.org/mailchimp/mandrill-api-ruby/
A Ruby client library for the Drop.io API (http://api.drop.io). Please email jake@dropio.com with any questions.
OTP (email, SMS) JWT authentication for HTTP APIs.
Allows easy integration with marketo from ruby. You can synchronize leads and fetch them back by email. By default this is configured for the SOAP wsdl file: http://app.marketo.com/soap/mktows/1_4?WSDL but this is configurable when you construct the client, e.g. client = Rapleaf::Marketo.new_client(<access_key>, <secret_key>, (api_subdomain = 'na-i'), (api_version = '1_5'), (document_version = '1_4')) More information at https://www.rapleaf.com/developers/marketo.
Ruby SDK for interacting with the Paubox Transactional Email HTTP API.
Custom ActionMailer delivery method for sending emails via GOV.UK Notify API
A Ruby interface to Gmail API (NO IMAP, NO SMTP). Search, read and send multipart emails; archive, mark as read/unread, delete emails; and manage labels. Everything is done through the Gmail API without going through IMAP or SMTP Protocol
Easily switch between email APIs
Ruby client library for Litmus Instant API, provides the simplest way to capture instant email previews in real clients from Ruby.
Use this gem to send emails through SES via Mailchimp api.
Client library for Amazon's Simple Email Service's REST API
Sem4r is a library to access google adwords api. It will works with ruby 1.9 and ruby 1.8 without soap4r. It uses a high level model instead of a low level api. You think about clients, campaigns, keywords and not about operations, operands, selectors, service calls. This is a ALPHA version.rb don't use in production. If you are interested in this project let me now: install it and update periodically, so the gemcutter download counter go up. Or subscribe to my feed at sem4r.com. Or watch the project on github. Or simply drop me a line in email. However I will know there is someone out of here.
EmailHunter is a minimalistic Ruby wrapper for the Hunter.io API. It provides a straightforward interface to integrate Hunter.io's email discovery capabilities into your sales and marketing workflows.
Client library for Amazon's Simple Email Service's REST API
Implements the complete functionality of the email direct REST API.
Lyris is an enterprise email service. Postal makes it easy for Ruby to talk to Lyris's API.
Allows delivery of emails using Microsoft Graph API with OAuth 2.0 client credentials flow
Ruby SOAP Api Client for EmailVision / CampaignCommander
Use this plugin in your rails applications to send emails through the SES/MailChimp API
This library provides Ruby calls to interact with the Contactology email marketing API
Easy Contacts Syncing over API with encrypted contacts email and phone numbers
Policy Troubleshooter makes it easier to understand why a user has access to a resource or doesn't have permission to call an API. Given an email, resource, and permission, Policy Troubleshooter will examine all IAM policies that apply to the resource. It then reveals whether the member's roles include the permission on that resource and, if so, which policies bind the member to those roles.
Create emails addresses in Ruby then send and receive real emails and attachments. See https://www.mailslurp.com/ruby/ for full Ruby documentation. Get an API Key at https://app.mailslurp.com
This gem allows simple integration between ActionMailer and SendGrid. SendGrid is an email deliverability API that is affordable and has lots of bells and whistles.
Outbound sends automated email, SMS, phone calls and push notifications based on the actions users take or do not take in your app. The Outbound API has two components: Identify each of your users and their attributes using an identify API call. Track the actions that each user takes in your app using a track API call. Because every message is associated with a user (identify call) and a specific trigger action that a user took or should take (track call), Outbound is able to keep track of how each message affects user actions in your app. These calls also allow you to target campaigns and customize each message based on user data. Example: When a user in San Francisco(user attribute) does signup(event) but does not upload a picture(event) within 2 weeks, send them an email about how they'll benefit from uploading a picture.
A ruby wrapper around Hunter.io API. Direct access to all the web's email addresses.
Tool to generate weekly meetup emails using the Meetup API
Ame Ame provides a simple command-line interface API for Ruby¹. It can be used to provide both simple interfaces like that of ā¹rmāŗĀ² and complex ones like that of ā¹gitāŗĀ³. It uses Rubyās own classes, methods, and argument lists to provide an interface that is both simple to use from the command-line side and from the Ruby side. The provided command-line interface is flexible and follows commond standards for command-line processing. ¹ See http://ruby-lang.org/ ² See http://pubs.opengroup.org/onlinepubs/9699919799/utilities/rm.html ³ See http://git-scm.com/docs/ § Usage Letās begin by looking at two examples, one where we mimic the POSIX¹ command-line interface to the ā¹rmāŗ command. Looking at the entry² in the standard, ā¹rmāŗ takes the following options: = -f. = Do not prompt for confirmation. = -i. = Prompt for confirmation. = -R. = Remove file hierarchies. = -r. = Equivalent to /-r/. It also takes the following arguments: = FILE. = A pathname or directory entry to be removed. And actually allows one or more of these /FILE/ arguments to be given. We also note that the ā¹rmāŗ command is described as a command to āremove directory entriesā. ¹ See http://pubs.opengroup.org/onlinepubs/9699919799/utilities/contents.html ² See http://pubs.opengroup.org/onlinepubs/9699919799/utilities/rm.html Letās turn this specification into one using Ameās API. We begin by adding a flag for each of the options listed above: class Rm < Ame::Root flag 'f', '', false, 'Do not prompt for confirmation' flag 'i', '', nil, 'Prompt for confirmation' do |options| options['f'] = false end flag 'R', '', false, 'Remove file hierarchies' flag 'r', '', nil, 'Equivalent to -R' do |options| options['r'] = true end A flag¹ is a boolean option that doesnāt take an argument. Each flag gets a short and long name, where an empty name means that thereās no corresponding short or long name for the flag, a default value (true, false, or nil), and a description of what the flag does. Each flag can also optionally take a block that can do further processing. In this case we use this block to modify the Hash that maps option names to their values passed to the block to set other flagsā values than the ones that the block is associated with. As these flags (āiā and ārā) arenāt themselves of interest, their default values have been set to nil, which means that they wonāt be included in the Hash that maps option names to their values when passed to the method. ¹ See http://disu.se/software/ame-1.0/api/user/Ame/Class#flag-class-method There are quite a few other kinds of options besides flags that can be defined using Ame, but flags are all that are required for this example. Weāll get to the other kinds in later examples. Next we add a āsplusā argument. splus 'FILE', String, 'File to remove' A splus¹ argument is like a Ruby āsplatā, that is, an Array argument at the end of the argument list to a method preceded by a star, except that a splus requires at least one argument. A splus argument gets a name for the argument (ā¹FILEāŗ), the type of argument it represents (String), and a description. ¹ See http://disu.se/software/ame-1.0/api/user/Ame/Class#splus-class-method Then we add a description of the command (method) itself: description 'Remove directory entries' Descriptions¹ will be used in help output to assist the user in using the command. ¹ See http://disu.se/software/ame-1.0/api/user/Ame/Class#description-class-method Finally, we add the Ruby method thatāll implement the command (all preceding code included here for completeness): class Rm < Ame::Root version '1.0.0' flag 'f', '', false, 'Do not prompt for confirmation' flag 'i', '', nil, 'Prompt for confirmation' do |options| options['f'] = false end flag 'R', '', false, 'Remove file hierarchies' flag 'r', '', nil, 'Equivalent to -R' do |options| options['r'] = true end splus 'FILE', String, 'File to remove' description 'Remove directory entries' def rm(files, options = {}) require 'fileutils' FileUtils.send options['R'] ? :rm_r : :rm, [first] + rest, :force => options['f'] end end Actually, another bit of code was also added, namely version '1.0.0' This sets the version¹ String of the command. This information is used when the command is invoked with the āā¹--versionāŗā flag. This flag is automatically added, so you donāt need to add it yourself. Another flag, āā¹--helpāŗā, is also added automatically. When given, this flagāll make Ame output usage information of the command. ¹ See http://disu.se/software/ame-1.0/api/user/Ame/Class#version-class-method To actually run the command, all you need to do is invoke Rm.process Thisāll invoke the command using the command-line arguments stored in ā¹ARGVāŗ, but you can also specify other ones if you want to: Rm.process 'rm', %w[-r /tmp/*] The first argument to #process¹ is the name of the method to invoke, which defaults to ā¹File.basename($0)āŗ, and the second argument is an Array of Strings that should be processed as command-line arguments passed to the command. ¹ See http://disu.se/software/ame-1.0/api/user/Ame/Class#process-class-method If youād store the complete ā¹Rmāŗ class defined above in a file called ā¹rmāŗ and add ā¹#! /usr/bin/ruby -wāŗ at the beginning and ā¹Rm.processāŗ at the end, youād have a fully functional ā¹rmāŗ command (after making it executable). Letās see it in action: % rm --help Usage: rm [OPTIONS]... FILE... Remove directory entries Arguments: FILE... File to remove Options: -R Remove file hierarchies -f Do not prompt for confirmation --help Display help for this method -i Prompt for confirmation -r Equivalent to -R --version Display version information % rm --version rm 1.0.0 Some commands are more complex than ā¹rmāŗ. For example, ā¹gitāŗĀ¹ has a rather complex command-line interface. We wonāt mimic it all here, but letās introduce the rest of the Ame API using a fake ā¹gitāŗ clone as an example. ¹ See http://git-scm.com/docs/ ā¹Gitāŗ uses sub-commands to achieve most things. Implementing sub-commands with Ame is done using a ādispatchā. Weāll discuss dispatches in more detail later, but suffice it to say that a dispatch delegates processing to a child class thatāll handle the sub-command in question. We begin by defining our main ā¹gitāŗ command using a class called ā¹Gitāŗ under the ā¹Git::CLIāŗ namespace: module Git end class Git::CLI < Ame::Root version '1.0.0' class Git < Ame::Class description 'The stupid content tracker' def initialize; end Weāre setting things up to use the ā¹Gitāŗ class as a dispatch in the ā¹Git::CLIāŗ class. The description on the ā¹initializeāŗ method will be used as a description of the ā¹gitāŗ dispatch command itself. Next, letās add the ā¹format-patchāŗĀ¹ sub-command: description 'Prepare patches for e-mail submission' flag ?n, 'numbered', false, 'Name output in [PATCH n/m] format' flag ?N, 'no-numbered', nil, 'Name output in [PATCH] format' do |options| options['numbered'] = false end toggle ?s, 'signoff', false, 'Add Signed-off-by: line to the commit message' switch '', 'thread', 'STYLE', nil, Ame::Types::Enumeration[:shallow, :deep], 'Controls addition of In-Reply-To and References headers' flag '', 'no-thread', nil, 'Disables addition of In-Reply-To and Reference headers' do |options, _| options.delete 'thread' end option '', 'start-number', 'N', 1, 'Start numbering the patches at N instead of 1' multioption '', 'to', 'ADDRESS', String, 'Add a To: header to the email headers' optional 'SINCE', 'N/A', 'Generate patches for commits after SINCE' def format_patch(since = '', options = {}) p since, options end ¹ See http://git-scm.com/docs/git-format-patch/ Weāre using quite a few new Ame commands here. Letās look at each in turn: toggle ?s, 'signoff', false, 'Add Signed-off-by: line to the commit message' A ātoggleā¹ is a flag that also has an inverse. Beyond the flags āsā and āsignoffā, the toggle also defines āno-signoffā, which will set āsignoffā to false. This is useful if you want to support configuration files that set āsignoffāās default to true, but still allow it to be overridden on the command line. ¹ See http://disu.se/software/ame-1.0/api/user/Ame/Class#toggle-class-method When using the short form of a toggle (and flag and switch), multiple ones may be juxtaposed after the initial one. For example, āā¹-snāŗā is equivalent to āā¹-s -nāŗā to āgit format-patchāŗā. switch '', 'thread', 'STYLE', nil, Ame::Types::Enumeration[:shallow, :deep], 'Controls addition of In-Reply-To and References headers' A āswitchā¹ is an option that takes an optional argument. This allows you to have separate defaults for when the switch isnāt present on the command line and for when itās given without an argument. The third argument to a switch is the name of the argument. Weāre also introducing a new concept here in ā¹Ame::Types::Enumerationāŗ. An enumeration² allows you to limit the allowed input to a set of Symbols. An enumeration also has a default value in the first item to its constructor (which is aliased as ā¹.[]āŗ). In this case, the āthreadā switch defaults to nil, but, when given, will default to ā¹:shallowāŗ if no argument is given. If an argument is given it must be either āshallowā or ādeepā. A switch isnāt required to take an enumeration as its argument default and can take any kind of default value for its argument that Ame knows how to handle. Weāll look at this in more detail later, but know that the type of the default value will be used to inform Ame how to parse a command-line argument into a Ruby value. An argument to a switch must be given, in this case, as āā¹--thread=deepāŗā on the command line. ¹ See http://disu.se/software/ame-1.0/api/user/Ame/Class#switch-class-method ² See http://disu.se/software/ame-1.0/api/user/Ame/Types/Enumeration/ option '', 'start-number', 'N', 1, 'Start numbering the patches at N instead of 1' An āoptionā¹ is an option that takes an argument. The argument must always be present and may be given, in this case, as āā¹--start-number=2āŗā or āā¹--start-number 2āŗā on the command line. For a short-form option, anything that follows the option is seen as an argument, so assuming that āstart-numberā also had a short name of āSā, āā¹-S2āŗā would be equivalent to āā¹-S 2āŗā, which would be equivalent to āā¹--start-number 2āŗā. Note that āā¹-snS2āŗā would still work as expected. ¹ See http://disu.se/software/ame-1.0/api/user/Ame/Class#option-class-method multioption '', 'to', 'ADDRESS', String, 'Add a To: header to the email headers' A āmultioptionā¹ is an option that takes an argument and may be repeated any number of times. Each argument will be added to an Array stored in the Hash that maps option names to their values. Instead of taking a default argument, it takes a type for the argument (String, in this case). Again, types are used to inform Ame how to parse command-line arguments into Ruby values. ¹ See http://disu.se/software/ame-1.0/api/user/Ame/Class#multioption-class-method optional 'SINCE', 'N/A', 'Generate patches for commits after SINCE' An āoptionalā¹ argument is an argument that isnāt required. If itās not present on the command line itāll get its default value (the String ā¹'N/A'āŗ, in this case). ¹ See http://disu.se/software/ame-1.0/api/user/Ame/Class#optional-class-method Weāve now covered all kinds of options and one new kind of argument. There are three more types of argument (one that weāve already seen and two new) that weāll look into now: āargumentā, āsplatā, and āsplusā. description 'Annotate file lines with commit information' argument 'FILE', String, 'File to annotate' def annotate(file) p file end An āargumentā¹ is an argument thatās required. If itās not present on the command line, an error will be raised (and by default reported to the terminal). As itās required, it doesnāt take a default, but rather a type. ¹ See http://disu.se/software/ame-1.0/api/user/Ame/Class#argument-class-method description 'Add file contents to the index' splat 'PATHSPEC', String, 'Files to add content from' def add(paths) p paths end A āsplatā¹ is an argument thatās not required, but may be given any number of times. The type of a splat is the type of one argument and the type of a splat as a whole is an Array of values of that type. ¹ See http://disu.se/software/ame-1.0/api/user/Ame/Class#splat-class-method description 'Display gitattributes information' splus 'PATHNAME', String, 'Files to list attributes of' def check_attr(paths) p paths end A āsplusā¹ is an argument thatās required, but may also be given any number of times. The type of a splus is the type of one argument and the type of a splus as a whole is an Array of values of that type. ¹ See http://disu.se/software/ame-1.0/api/user/Ame/Class#splus-class-method Now that weāve seen all kinds of options and arguments, letās look on an additional tool at our disposal, the dispatch¹. class Remote < Ame::Class description 'Manage set of remote repositories' def initialize; end description 'Shows a list of existing remotes' flag 'v', 'verbose', false, 'Show remote URL after name' def list(options = {}) p options end description 'Adds a remote named NAME for the repository at URL' argument 'name', String, 'Name of the remote to add' argument 'url', String, 'URL to the repository of the remote to add' def add(name, url) p name, url end end ¹ See http://disu.se/software/ame-1.0/api/user/Ame/Class#dispatch-class-method Here weāre defining a child class to Git::CLI::Git called āRemoteā that doesnāt introduce anything new. Then we set up the dispatch: dispatch Remote, :default => 'list' This adds a method called āremoteā to Git::CLI::Git that will dispatch processing of the command line to an instance of the Remote class when āā¹git remoteāŗā is seen on the command line. The āremoteā method expects an argument thatāll be used to decide what sub-command to execute. Here weāve specified that in the absence of such an argument, the ālistā method should be invoked. We add the same kind of dispatch to Git under Git::CLI: dispatch Git and then weāre done. Hereās all the previous code in its entirety: module Git end class Git::CLI < Ame::Root version '1.0.0' class Git < Ame::Class description 'The stupid content tracker' def initialize; end description 'Prepare patches for e-mail submission' flag ?n, 'numbered', false, 'Name output in [PATCH n/m] format' flag ?N, 'no-numbered', nil, 'Name output in [PATCH] format' do |options| options['numbered'] = false end toggle ?s, 'signoff', false, 'Add Signed-off-by: line to the commit message' switch '', 'thread', 'STYLE', nil, Ame::Types::Enumeration[:shallow, :deep], 'Controls addition of In-Reply-To and References headers' flag '', 'no-thread', nil, 'Disables addition of In-Reply-To and Reference headers' do |options, _| options.delete 'thread' end option '', 'start-number', 'N', 1, 'Start numbering the patches at N instead of 1' multioption '', 'to', 'ADDRESS', String, 'Add a To: header to the email headers' optional 'SINCE', 'N/A', 'Generate patches for commits after SINCE' def format_patch(since = '', options = {}) p since, options end description 'Annotate file lines with commit information' argument 'FILE', String, 'File to annotate' def annotate(file) p file end description 'Add file contents to the index' splat 'PATHSPEC', String, 'Files to add content from' def add(paths) p paths end description 'Display gitattributes information' splus 'PATHNAME', String, 'Files to list attributes of' def check_attr(paths) p paths end class Remote < Ame::Class description 'Manage set of remote repositories' def initialize; end description 'Shows a list of existing remotes' flag 'v', 'verbose', false, 'Show remote URL after name' def list(options = {}) p options end description 'Adds a remote named NAME for the repository at URL' argument 'name', String, 'Name of the remote to add' argument 'url', String, 'URL to the repository of the remote to add' def add(name, url) p name, url end end dispatch Remote, :default => 'list' end dispatch Git end If we put this code in a file called āgitā and add ā¹#! /usr/bin/ruby -wāŗ at the beginning and ā¹Git::CLI.processāŗ at the end, youāll have a very incomplete git command-line interface on your hands. Letās look at what some of its ā¹--helpāŗ output looks like: % git --help Usage: git [OPTIONS]... METHOD [ARGUMENTS]... The stupid content tracker Arguments: METHOD Method to run [ARGUMENTS]... Arguments to pass to METHOD Options: --help Display help for this method --version Display version information Methods: add Add file contents to the index annotate Annotate file lines with commit information check-attr Display gitattributes information format-patch Prepare patches for e-mail submission remote Manage set of remote repositories % git format-patch --help Usage: git format-patch [OPTIONS]... [SINCE] Prepare patches for e-mail submission Arguments: [SINCE=N/A] Generate patches for commits after SINCE Options: -N, --no-numbered Name output in [PATCH] format --help Display help for this method -n, --numbered Name output in [PATCH n/m] format --no-thread Disables addition of In-Reply-To and Reference headers -s, --signoff Add Signed-off-by: line to the commit message --start-number=N Start numbering the patches at N instead of 1 --thread[=STYLE] Controls addition of In-Reply-To and References headers --to=ADDRESS* Add a To: header to the email headers % git remote --help Usage: git remote [OPTIONS]... [METHOD] [ARGUMENTS]... Manage set of remote repositories Arguments: [METHOD=list] Method to run [ARGUMENTS]... Arguments to pass to METHOD Options: --help Display help for this method Methods: add Adds a remote named NAME for the repository at URL list Shows a list of existing remotes § API The previous section gave an introduction to the whole user API in an informal and introductory way. For an indepth reference to the user API, see the {user API documentation}¹. ¹ See http://disu.se/software/ame-1.0/api/user/Ame/ If you want to extend the API or use it in some way other than as a command-line-interface writer, see the {developer API documentation}¹. ¹ See http://disu.se/software/ame-1.0/api/developer/Ame/ § Financing Currently, most of my time is spent at my day job and in my rather busy private life. Please motivate me to spend time on this piece of software by donating some of your money to this project. Yeah, I realize that requesting money to develop software is a bit, well, capitalistic of me. But please realize that I live in a capitalistic society and I need money to have other people give me the things that I need to continue living under the rules of said society. So, if you feel that this piece of software has helped you out enough to warrant a reward, please PayPal a donation to now@disu.se¹. Thanks! Your support wonāt go unnoticed! ¹ Send a donation: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=now@disu.se&item_name=Ame § Reporting Bugs Please report any bugs that you encounter to the {issue tracker}¹. ¹ See https://github.com/now/ame/issues § Authors Nikolai Weibull wrote the code, the tests, the documentation, and this README. § Licensing Ame is free software: you may redistribute it and/or modify it under the terms of the {GNU Lesser General Public License, version 3}¹ or later², as published by the {Free Software Foundation}³. ¹ See http://disu.se/licenses/lgpl-3.0/ ² See http://gnu.org/licenses/ ³ See http://fsf.org/
This package simplifies sending emails outside of the Rails environment. It is a wrapper around the ActionMailer package. Support for smtp over tls is included if you are using Ruby 1.8.7 or above. The API provided is very bare, but can be easily extended. The email configuration is provided through a user-specified configuration file (identical to the ActionMailer configuration in environment.rb in Rails except for the added tls option). This package is most useful in the situation that a user has a number of scripts (outside of the Rails environment) that all send very basic emails (to, from, body, subject).
A Ruby wrapper for the Mad Mimi API. Deliver emails and manage your Mad Mimi audience
A simple tool to check a bunch of email addresses against the Have I Been Pwned? API.
Send emails via Mailgun, Mandrill and SendGrid HTTP APIs.
wrapper for the simple email service api
TeleNotify by ppati000 enables your Rails app to send notifications/messages to your users via Telegram's Bot API. Forget email newsletters! * See installation instructions, demo app and source on https://github.com/ppati000/tele_notify. *