mallet 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.rvmrc +1 -0
 - data/Gemfile +15 -0
 - data/Gemfile.lock +129 -0
 - data/README.md +1 -0
 - data/Rakefile +8 -0
 - data/config.ru +7 -0
 - data/lib/generators/active_record/invoicing_generator.rb +30 -0
 - data/lib/generators/active_record/mallet_generator.rb +30 -0
 - data/lib/generators/active_record/templates/migration.rb +31 -0
 - data/lib/mallet/mail.rb +37 -0
 - data/lib/mallet/mail_generation.rb +30 -0
 - data/lib/mallet/version.rb +3 -0
 - data/lib/mallet.rb +23 -0
 - data/mallet.gemspec +29 -0
 - data/spec/README +0 -0
 - data/spec/internal/config/database.yml +3 -0
 - data/spec/internal/config/database.yml.sample +3 -0
 - data/spec/internal/config/routes.rb +3 -0
 - data/spec/internal/db/mallet_test.sqlite +0 -0
 - data/spec/internal/db/schema.rb +28 -0
 - data/spec/internal/log/.gitignore +1 -0
 - data/spec/internal/public/favicon.ico +0 -0
 - data/spec/lib/mallet/mail_spec.rb +63 -0
 - data/spec/spec_helper.rb +31 -0
 - metadata +193 -0
 
    
        data/.rvmrc
    ADDED
    
    | 
         @@ -0,0 +1 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            rvm use 1.9.2@mallet --create
         
     | 
    
        data/Gemfile
    ADDED
    
    | 
         @@ -0,0 +1,15 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            source "http://rubygems.org"
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            # Specify your gem's dependencies in invoicing.gemspec
         
     | 
| 
      
 4 
     | 
    
         
            +
            gemspec
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
            group :development do
         
     | 
| 
      
 7 
     | 
    
         
            +
              gem 'rspec'
         
     | 
| 
      
 8 
     | 
    
         
            +
              gem 'rspec-rails'
         
     | 
| 
      
 9 
     | 
    
         
            +
              gem 'sqlite3'
         
     | 
| 
      
 10 
     | 
    
         
            +
              gem 'database_cleaner', '>= 0.9.1'
         
     | 
| 
      
 11 
     | 
    
         
            +
            end
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
            group :test do
         
     | 
| 
      
 14 
     | 
    
         
            +
              gem 'database_cleaner', '>= 0.9.1'
         
     | 
| 
      
 15 
     | 
    
         
            +
            end
         
     | 
    
        data/Gemfile.lock
    ADDED
    
    | 
         @@ -0,0 +1,129 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            PATH
         
     | 
| 
      
 2 
     | 
    
         
            +
              remote: .
         
     | 
| 
      
 3 
     | 
    
         
            +
              specs:
         
     | 
| 
      
 4 
     | 
    
         
            +
                mallet (0.0.1)
         
     | 
| 
      
 5 
     | 
    
         
            +
                  actionmailer (~> 3.0)
         
     | 
| 
      
 6 
     | 
    
         
            +
                  activerecord (~> 3.0)
         
     | 
| 
      
 7 
     | 
    
         
            +
                  activesupport
         
     | 
| 
      
 8 
     | 
    
         
            +
                  delayed_job_active_record
         
     | 
| 
      
 9 
     | 
    
         
            +
                  i18n
         
     | 
| 
      
 10 
     | 
    
         
            +
                  workflow
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
            GEM
         
     | 
| 
      
 13 
     | 
    
         
            +
              remote: http://rubygems.org/
         
     | 
| 
      
 14 
     | 
    
         
            +
              specs:
         
     | 
| 
      
 15 
     | 
    
         
            +
                actionmailer (3.2.12)
         
     | 
| 
      
 16 
     | 
    
         
            +
                  actionpack (= 3.2.12)
         
     | 
| 
      
 17 
     | 
    
         
            +
                  mail (~> 2.4.4)
         
     | 
| 
      
 18 
     | 
    
         
            +
                actionpack (3.2.12)
         
     | 
| 
      
 19 
     | 
    
         
            +
                  activemodel (= 3.2.12)
         
     | 
| 
      
 20 
     | 
    
         
            +
                  activesupport (= 3.2.12)
         
     | 
| 
      
 21 
     | 
    
         
            +
                  builder (~> 3.0.0)
         
     | 
| 
      
 22 
     | 
    
         
            +
                  erubis (~> 2.7.0)
         
     | 
| 
      
 23 
     | 
    
         
            +
                  journey (~> 1.0.4)
         
     | 
| 
      
 24 
     | 
    
         
            +
                  rack (~> 1.4.5)
         
     | 
| 
      
 25 
     | 
    
         
            +
                  rack-cache (~> 1.2)
         
     | 
| 
      
 26 
     | 
    
         
            +
                  rack-test (~> 0.6.1)
         
     | 
| 
      
 27 
     | 
    
         
            +
                  sprockets (~> 2.2.1)
         
     | 
| 
      
 28 
     | 
    
         
            +
                activemodel (3.2.12)
         
     | 
| 
      
 29 
     | 
    
         
            +
                  activesupport (= 3.2.12)
         
     | 
| 
      
 30 
     | 
    
         
            +
                  builder (~> 3.0.0)
         
     | 
| 
      
 31 
     | 
    
         
            +
                activerecord (3.2.12)
         
     | 
| 
      
 32 
     | 
    
         
            +
                  activemodel (= 3.2.12)
         
     | 
| 
      
 33 
     | 
    
         
            +
                  activesupport (= 3.2.12)
         
     | 
| 
      
 34 
     | 
    
         
            +
                  arel (~> 3.0.2)
         
     | 
| 
      
 35 
     | 
    
         
            +
                  tzinfo (~> 0.3.29)
         
     | 
| 
      
 36 
     | 
    
         
            +
                activeresource (3.2.12)
         
     | 
| 
      
 37 
     | 
    
         
            +
                  activemodel (= 3.2.12)
         
     | 
| 
      
 38 
     | 
    
         
            +
                  activesupport (= 3.2.12)
         
     | 
| 
      
 39 
     | 
    
         
            +
                activesupport (3.2.12)
         
     | 
| 
      
 40 
     | 
    
         
            +
                  i18n (~> 0.6)
         
     | 
| 
      
 41 
     | 
    
         
            +
                  multi_json (~> 1.0)
         
     | 
| 
      
 42 
     | 
    
         
            +
                arel (3.0.2)
         
     | 
| 
      
 43 
     | 
    
         
            +
                builder (3.0.4)
         
     | 
| 
      
 44 
     | 
    
         
            +
                combustion (0.3.3)
         
     | 
| 
      
 45 
     | 
    
         
            +
                  rails (>= 3.0.0)
         
     | 
| 
      
 46 
     | 
    
         
            +
                  thor (>= 0.14.6)
         
     | 
| 
      
 47 
     | 
    
         
            +
                database_cleaner (0.9.1)
         
     | 
| 
      
 48 
     | 
    
         
            +
                delayed_job (3.0.5)
         
     | 
| 
      
 49 
     | 
    
         
            +
                  activesupport (~> 3.0)
         
     | 
| 
      
 50 
     | 
    
         
            +
                delayed_job_active_record (0.4.3)
         
     | 
| 
      
 51 
     | 
    
         
            +
                  activerecord (>= 2.1.0, < 4)
         
     | 
| 
      
 52 
     | 
    
         
            +
                  delayed_job (~> 3.0)
         
     | 
| 
      
 53 
     | 
    
         
            +
                diff-lcs (1.2.1)
         
     | 
| 
      
 54 
     | 
    
         
            +
                erubis (2.7.0)
         
     | 
| 
      
 55 
     | 
    
         
            +
                hike (1.2.1)
         
     | 
| 
      
 56 
     | 
    
         
            +
                i18n (0.6.4)
         
     | 
| 
      
 57 
     | 
    
         
            +
                journey (1.0.4)
         
     | 
| 
      
 58 
     | 
    
         
            +
                json (1.7.7)
         
     | 
| 
      
 59 
     | 
    
         
            +
                mail (2.4.4)
         
     | 
| 
      
 60 
     | 
    
         
            +
                  i18n (>= 0.4.0)
         
     | 
| 
      
 61 
     | 
    
         
            +
                  mime-types (~> 1.16)
         
     | 
| 
      
 62 
     | 
    
         
            +
                  treetop (~> 1.4.8)
         
     | 
| 
      
 63 
     | 
    
         
            +
                mime-types (1.21)
         
     | 
| 
      
 64 
     | 
    
         
            +
                multi_json (1.6.1)
         
     | 
| 
      
 65 
     | 
    
         
            +
                polyglot (0.3.3)
         
     | 
| 
      
 66 
     | 
    
         
            +
                rack (1.4.5)
         
     | 
| 
      
 67 
     | 
    
         
            +
                rack-cache (1.2)
         
     | 
| 
      
 68 
     | 
    
         
            +
                  rack (>= 0.4)
         
     | 
| 
      
 69 
     | 
    
         
            +
                rack-ssl (1.3.3)
         
     | 
| 
      
 70 
     | 
    
         
            +
                  rack
         
     | 
| 
      
 71 
     | 
    
         
            +
                rack-test (0.6.2)
         
     | 
| 
      
 72 
     | 
    
         
            +
                  rack (>= 1.0)
         
     | 
| 
      
 73 
     | 
    
         
            +
                rails (3.2.12)
         
     | 
| 
      
 74 
     | 
    
         
            +
                  actionmailer (= 3.2.12)
         
     | 
| 
      
 75 
     | 
    
         
            +
                  actionpack (= 3.2.12)
         
     | 
| 
      
 76 
     | 
    
         
            +
                  activerecord (= 3.2.12)
         
     | 
| 
      
 77 
     | 
    
         
            +
                  activeresource (= 3.2.12)
         
     | 
| 
      
 78 
     | 
    
         
            +
                  activesupport (= 3.2.12)
         
     | 
| 
      
 79 
     | 
    
         
            +
                  bundler (~> 1.0)
         
     | 
| 
      
 80 
     | 
    
         
            +
                  railties (= 3.2.12)
         
     | 
| 
      
 81 
     | 
    
         
            +
                railties (3.2.12)
         
     | 
| 
      
 82 
     | 
    
         
            +
                  actionpack (= 3.2.12)
         
     | 
| 
      
 83 
     | 
    
         
            +
                  activesupport (= 3.2.12)
         
     | 
| 
      
 84 
     | 
    
         
            +
                  rack-ssl (~> 1.3.2)
         
     | 
| 
      
 85 
     | 
    
         
            +
                  rake (>= 0.8.7)
         
     | 
| 
      
 86 
     | 
    
         
            +
                  rdoc (~> 3.4)
         
     | 
| 
      
 87 
     | 
    
         
            +
                  thor (>= 0.14.6, < 2.0)
         
     | 
| 
      
 88 
     | 
    
         
            +
                rake (10.0.3)
         
     | 
| 
      
 89 
     | 
    
         
            +
                rdoc (3.12.2)
         
     | 
| 
      
 90 
     | 
    
         
            +
                  json (~> 1.4)
         
     | 
| 
      
 91 
     | 
    
         
            +
                rspec (2.13.0)
         
     | 
| 
      
 92 
     | 
    
         
            +
                  rspec-core (~> 2.13.0)
         
     | 
| 
      
 93 
     | 
    
         
            +
                  rspec-expectations (~> 2.13.0)
         
     | 
| 
      
 94 
     | 
    
         
            +
                  rspec-mocks (~> 2.13.0)
         
     | 
| 
      
 95 
     | 
    
         
            +
                rspec-core (2.13.0)
         
     | 
| 
      
 96 
     | 
    
         
            +
                rspec-expectations (2.13.0)
         
     | 
| 
      
 97 
     | 
    
         
            +
                  diff-lcs (>= 1.1.3, < 2.0)
         
     | 
| 
      
 98 
     | 
    
         
            +
                rspec-mocks (2.13.0)
         
     | 
| 
      
 99 
     | 
    
         
            +
                rspec-rails (2.13.0)
         
     | 
| 
      
 100 
     | 
    
         
            +
                  actionpack (>= 3.0)
         
     | 
| 
      
 101 
     | 
    
         
            +
                  activesupport (>= 3.0)
         
     | 
| 
      
 102 
     | 
    
         
            +
                  railties (>= 3.0)
         
     | 
| 
      
 103 
     | 
    
         
            +
                  rspec-core (~> 2.13.0)
         
     | 
| 
      
 104 
     | 
    
         
            +
                  rspec-expectations (~> 2.13.0)
         
     | 
| 
      
 105 
     | 
    
         
            +
                  rspec-mocks (~> 2.13.0)
         
     | 
| 
      
 106 
     | 
    
         
            +
                sprockets (2.2.2)
         
     | 
| 
      
 107 
     | 
    
         
            +
                  hike (~> 1.2)
         
     | 
| 
      
 108 
     | 
    
         
            +
                  multi_json (~> 1.0)
         
     | 
| 
      
 109 
     | 
    
         
            +
                  rack (~> 1.0)
         
     | 
| 
      
 110 
     | 
    
         
            +
                  tilt (~> 1.1, != 1.3.0)
         
     | 
| 
      
 111 
     | 
    
         
            +
                sqlite3 (1.3.7)
         
     | 
| 
      
 112 
     | 
    
         
            +
                thor (0.17.0)
         
     | 
| 
      
 113 
     | 
    
         
            +
                tilt (1.3.5)
         
     | 
| 
      
 114 
     | 
    
         
            +
                treetop (1.4.12)
         
     | 
| 
      
 115 
     | 
    
         
            +
                  polyglot
         
     | 
| 
      
 116 
     | 
    
         
            +
                  polyglot (>= 0.3.1)
         
     | 
| 
      
 117 
     | 
    
         
            +
                tzinfo (0.3.37)
         
     | 
| 
      
 118 
     | 
    
         
            +
                workflow (1.0.0)
         
     | 
| 
      
 119 
     | 
    
         
            +
             
     | 
| 
      
 120 
     | 
    
         
            +
            PLATFORMS
         
     | 
| 
      
 121 
     | 
    
         
            +
              ruby
         
     | 
| 
      
 122 
     | 
    
         
            +
             
     | 
| 
      
 123 
     | 
    
         
            +
            DEPENDENCIES
         
     | 
| 
      
 124 
     | 
    
         
            +
              combustion (~> 0.3.1)
         
     | 
| 
      
 125 
     | 
    
         
            +
              database_cleaner (>= 0.9.1)
         
     | 
| 
      
 126 
     | 
    
         
            +
              mallet!
         
     | 
| 
      
 127 
     | 
    
         
            +
              rspec
         
     | 
| 
      
 128 
     | 
    
         
            +
              rspec-rails
         
     | 
| 
      
 129 
     | 
    
         
            +
              sqlite3
         
     | 
    
        data/README.md
    ADDED
    
    | 
         @@ -0,0 +1 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
             
     | 
    
        data/Rakefile
    ADDED
    
    
    
        data/config.ru
    ADDED
    
    
| 
         @@ -0,0 +1,30 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            module Mallet
         
     | 
| 
      
 2 
     | 
    
         
            +
              module Generators
         
     | 
| 
      
 3 
     | 
    
         
            +
                class InstallGenerator < Rails::Generators::Base
         
     | 
| 
      
 4 
     | 
    
         
            +
                  include Rails::Generators::Migration
         
     | 
| 
      
 5 
     | 
    
         
            +
                  
         
     | 
| 
      
 6 
     | 
    
         
            +
                  source_root File.expand_path("../templates", __FILE__)
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
                  desc <<-CONTENT
         
     | 
| 
      
 9 
     | 
    
         
            +
                    Copies the mallet migration file to the migrations
         
     | 
| 
      
 10 
     | 
    
         
            +
                    folder.
         
     | 
| 
      
 11 
     | 
    
         
            +
                    
         
     | 
| 
      
 12 
     | 
    
         
            +
                    Please run rake db:migrate once the installer is 
         
     | 
| 
      
 13 
     | 
    
         
            +
                    complete.
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
              CONTENT
         
     | 
| 
      
 16 
     | 
    
         
            +
             
     | 
| 
      
 17 
     | 
    
         
            +
                  def self.next_migration_number(dirname) #:nodoc:
         
     | 
| 
      
 18 
     | 
    
         
            +
                    if ActiveRecord::Base.timestamped_migrations
         
     | 
| 
      
 19 
     | 
    
         
            +
                      Time.now.utc.strftime("%Y%m%d%H%M%S")
         
     | 
| 
      
 20 
     | 
    
         
            +
                    else
         
     | 
| 
      
 21 
     | 
    
         
            +
                      "%.3d" % (current_migration_number(dirname) + 1)
         
     | 
| 
      
 22 
     | 
    
         
            +
                    end
         
     | 
| 
      
 23 
     | 
    
         
            +
                  end
         
     | 
| 
      
 24 
     | 
    
         
            +
             
     | 
| 
      
 25 
     | 
    
         
            +
                  def create_migration_file
         
     | 
| 
      
 26 
     | 
    
         
            +
                    migration_template 'migration.rb', 'db/migrate/create_mallet_tables.rb'
         
     | 
| 
      
 27 
     | 
    
         
            +
                  end
         
     | 
| 
      
 28 
     | 
    
         
            +
                end
         
     | 
| 
      
 29 
     | 
    
         
            +
              end
         
     | 
| 
      
 30 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,30 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            module Invoicing
         
     | 
| 
      
 2 
     | 
    
         
            +
              module Generators
         
     | 
| 
      
 3 
     | 
    
         
            +
                class InstallGenerator < Rails::Generators::Base
         
     | 
| 
      
 4 
     | 
    
         
            +
                  include Rails::Generators::Migration
         
     | 
| 
      
 5 
     | 
    
         
            +
                  
         
     | 
| 
      
 6 
     | 
    
         
            +
                  source_root File.expand_path("../templates", __FILE__)
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
                  desc <<-CONTENT
         
     | 
| 
      
 9 
     | 
    
         
            +
                    Copies the invoicing migration file to the migrations
         
     | 
| 
      
 10 
     | 
    
         
            +
                    folder.
         
     | 
| 
      
 11 
     | 
    
         
            +
                    
         
     | 
| 
      
 12 
     | 
    
         
            +
                    Please run rake db:migrate once the installer is 
         
     | 
| 
      
 13 
     | 
    
         
            +
                    complete.
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
              CONTENT
         
     | 
| 
      
 16 
     | 
    
         
            +
             
     | 
| 
      
 17 
     | 
    
         
            +
                  def self.next_migration_number(dirname) #:nodoc:
         
     | 
| 
      
 18 
     | 
    
         
            +
                    if ActiveRecord::Base.timestamped_migrations
         
     | 
| 
      
 19 
     | 
    
         
            +
                      Time.now.utc.strftime("%Y%m%d%H%M%S")
         
     | 
| 
      
 20 
     | 
    
         
            +
                    else
         
     | 
| 
      
 21 
     | 
    
         
            +
                      "%.3d" % (current_migration_number(dirname) + 1)
         
     | 
| 
      
 22 
     | 
    
         
            +
                    end
         
     | 
| 
      
 23 
     | 
    
         
            +
                  end
         
     | 
| 
      
 24 
     | 
    
         
            +
             
     | 
| 
      
 25 
     | 
    
         
            +
                  def create_migration_file
         
     | 
| 
      
 26 
     | 
    
         
            +
                    migration_template 'migration.rb', 'db/migrate/create_invoicing_tables.rb'
         
     | 
| 
      
 27 
     | 
    
         
            +
                  end
         
     | 
| 
      
 28 
     | 
    
         
            +
                end
         
     | 
| 
      
 29 
     | 
    
         
            +
              end
         
     | 
| 
      
 30 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,31 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            class CreateMalletTables < ActiveRecord::Migration
         
     | 
| 
      
 2 
     | 
    
         
            +
              def self.change
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
                create_table "mallet_mails", :force => true do |t|
         
     | 
| 
      
 5 
     | 
    
         
            +
                  t.string "mailer_class"
         
     | 
| 
      
 6 
     | 
    
         
            +
                  t.string "mailer_method"
         
     | 
| 
      
 7 
     | 
    
         
            +
                  t.string "malletable_type"
         
     | 
| 
      
 8 
     | 
    
         
            +
                  t.string "malletable_id"
         
     | 
| 
      
 9 
     | 
    
         
            +
                  t.string   "workflow_state"
         
     | 
| 
      
 10 
     | 
    
         
            +
                  t.timestamps
         
     | 
| 
      
 11 
     | 
    
         
            +
                end
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
                create_table "delayed_jobs", :force => true do |t|
         
     | 
| 
      
 14 
     | 
    
         
            +
                  t.integer  "priority",   :default => 0
         
     | 
| 
      
 15 
     | 
    
         
            +
                  t.integer  "attempts",   :default => 0
         
     | 
| 
      
 16 
     | 
    
         
            +
                  t.text     "handler"
         
     | 
| 
      
 17 
     | 
    
         
            +
                  t.text     "last_error"
         
     | 
| 
      
 18 
     | 
    
         
            +
                  t.datetime "run_at"
         
     | 
| 
      
 19 
     | 
    
         
            +
                  t.datetime "locked_at"
         
     | 
| 
      
 20 
     | 
    
         
            +
                  t.datetime "failed_at"
         
     | 
| 
      
 21 
     | 
    
         
            +
                  t.string   "locked_by"
         
     | 
| 
      
 22 
     | 
    
         
            +
                  t.string   "queue"
         
     | 
| 
      
 23 
     | 
    
         
            +
                  t.datetime "created_at",                :null => false
         
     | 
| 
      
 24 
     | 
    
         
            +
                  t.datetime "updated_at",                :null => false
         
     | 
| 
      
 25 
     | 
    
         
            +
                end
         
     | 
| 
      
 26 
     | 
    
         
            +
             
     | 
| 
      
 27 
     | 
    
         
            +
                add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority"
         
     | 
| 
      
 28 
     | 
    
         
            +
             
         
     | 
| 
      
 29 
     | 
    
         
            +
              end
         
     | 
| 
      
 30 
     | 
    
         
            +
             
     | 
| 
      
 31 
     | 
    
         
            +
            end
         
     | 
    
        data/lib/mallet/mail.rb
    ADDED
    
    | 
         @@ -0,0 +1,37 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            module Mallet
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
              class Mail < ActiveRecord::Base
         
     | 
| 
      
 4 
     | 
    
         
            +
                include ::Workflow
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
                belongs_to :malletable, polymorphic: true
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
                validates_presence_of :mailer_class
         
     | 
| 
      
 9 
     | 
    
         
            +
                validates_presence_of :mailer_method
         
     | 
| 
      
 10 
     | 
    
         
            +
                validates_presence_of :malletable
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
                before_save :validate
         
     | 
| 
      
 13 
     | 
    
         
            +
                after_create :delayed_delivery
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
                workflow do
         
     | 
| 
      
 16 
     | 
    
         
            +
                  state :pending do
         
     | 
| 
      
 17 
     | 
    
         
            +
                    event :deliver, :transitions_to => :sent
         
     | 
| 
      
 18 
     | 
    
         
            +
                  end
         
     | 
| 
      
 19 
     | 
    
         
            +
             
     | 
| 
      
 20 
     | 
    
         
            +
                  state :error
         
     | 
| 
      
 21 
     | 
    
         
            +
                  state :sent
         
     | 
| 
      
 22 
     | 
    
         
            +
                end
         
     | 
| 
      
 23 
     | 
    
         
            +
             
     | 
| 
      
 24 
     | 
    
         
            +
                def validate
         
     | 
| 
      
 25 
     | 
    
         
            +
                  raise Exception unless mailer_class.constantize.ancestors.include? ActionMailer::Base
         
     | 
| 
      
 26 
     | 
    
         
            +
                end
         
     | 
| 
      
 27 
     | 
    
         
            +
             
     | 
| 
      
 28 
     | 
    
         
            +
                def delayed_delivery
         
     | 
| 
      
 29 
     | 
    
         
            +
                  delay.deliver!
         
     | 
| 
      
 30 
     | 
    
         
            +
                end
         
     | 
| 
      
 31 
     | 
    
         
            +
             
     | 
| 
      
 32 
     | 
    
         
            +
                def deliver
         
     | 
| 
      
 33 
     | 
    
         
            +
                  mailer_class.constantize.send mailer_method.to_sym, malletable
         
     | 
| 
      
 34 
     | 
    
         
            +
                end
         
     | 
| 
      
 35 
     | 
    
         
            +
              end
         
     | 
| 
      
 36 
     | 
    
         
            +
             
     | 
| 
      
 37 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,30 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            module Mallet
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
              class MailGeneration
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
                attr_accessor :mail
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
                def initialize
         
     | 
| 
      
 8 
     | 
    
         
            +
                  self.mail = Mail.new
         
     | 
| 
      
 9 
     | 
    
         
            +
                end
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
                def to(malletable)
         
     | 
| 
      
 12 
     | 
    
         
            +
                  mail.malletable_type = malletable.class.name
         
     | 
| 
      
 13 
     | 
    
         
            +
                  mail.malletable_id = malletable.id
         
     | 
| 
      
 14 
     | 
    
         
            +
                end
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
                def mailer(mailer)
         
     | 
| 
      
 17 
     | 
    
         
            +
                  mail.mailer_class = mailer
         
     | 
| 
      
 18 
     | 
    
         
            +
                end
         
     | 
| 
      
 19 
     | 
    
         
            +
             
     | 
| 
      
 20 
     | 
    
         
            +
                def method(method)
         
     | 
| 
      
 21 
     | 
    
         
            +
                  mail.mailer_method = method
         
     | 
| 
      
 22 
     | 
    
         
            +
                end
         
     | 
| 
      
 23 
     | 
    
         
            +
             
     | 
| 
      
 24 
     | 
    
         
            +
                def persist!
         
     | 
| 
      
 25 
     | 
    
         
            +
                  mail.save!
         
     | 
| 
      
 26 
     | 
    
         
            +
                end
         
     | 
| 
      
 27 
     | 
    
         
            +
                
         
     | 
| 
      
 28 
     | 
    
         
            +
              end
         
     | 
| 
      
 29 
     | 
    
         
            +
             
     | 
| 
      
 30 
     | 
    
         
            +
            end
         
     | 
    
        data/lib/mallet.rb
    ADDED
    
    | 
         @@ -0,0 +1,23 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require "active_record"
         
     | 
| 
      
 2 
     | 
    
         
            +
            require "action_mailer"
         
     | 
| 
      
 3 
     | 
    
         
            +
            require "workflow"
         
     | 
| 
      
 4 
     | 
    
         
            +
            require "delayed_job_active_record"
         
     | 
| 
      
 5 
     | 
    
         
            +
            require "mallet/version"
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
            module Mallet
         
     | 
| 
      
 8 
     | 
    
         
            +
                
         
     | 
| 
      
 9 
     | 
    
         
            +
              def self.table_name_prefix
         
     | 
| 
      
 10 
     | 
    
         
            +
                'mallet_'
         
     | 
| 
      
 11 
     | 
    
         
            +
              end
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
              def self.mail(&block)
         
     | 
| 
      
 14 
     | 
    
         
            +
                generator = MailGeneration.new 
         
     | 
| 
      
 15 
     | 
    
         
            +
                generator.instance_eval(&block)
         
     | 
| 
      
 16 
     | 
    
         
            +
                generator.persist!
         
     | 
| 
      
 17 
     | 
    
         
            +
                generator.mail
         
     | 
| 
      
 18 
     | 
    
         
            +
              end
         
     | 
| 
      
 19 
     | 
    
         
            +
             
     | 
| 
      
 20 
     | 
    
         
            +
            end
         
     | 
| 
      
 21 
     | 
    
         
            +
             
     | 
| 
      
 22 
     | 
    
         
            +
            require "mallet/mail"
         
     | 
| 
      
 23 
     | 
    
         
            +
            require "mallet/mail_generation"
         
     | 
    
        data/mallet.gemspec
    ADDED
    
    | 
         @@ -0,0 +1,29 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # -*- encoding: utf-8 -*-
         
     | 
| 
      
 2 
     | 
    
         
            +
            $:.push File.expand_path("../lib", __FILE__)
         
     | 
| 
      
 3 
     | 
    
         
            +
            require "mallet/version"
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            Gem::Specification.new do |s|
         
     | 
| 
      
 6 
     | 
    
         
            +
              s.name        = "mallet"
         
     | 
| 
      
 7 
     | 
    
         
            +
              s.version     = Mallet::VERSION
         
     | 
| 
      
 8 
     | 
    
         
            +
              s.authors     = ["Douglas Anderson", "Tim Jegels", ]
         
     | 
| 
      
 9 
     | 
    
         
            +
              s.email       = ["i.am.douglas.anderson@gmail.com", "tjegels@gmail.com"]
         
     | 
| 
      
 10 
     | 
    
         
            +
              s.homepage    = ""
         
     | 
| 
      
 11 
     | 
    
         
            +
              s.summary     = %q{ A mail gem. }
         
     | 
| 
      
 12 
     | 
    
         
            +
              s.description = %q{ Send and track mails asynchronously. }
         
     | 
| 
      
 13 
     | 
    
         
            +
             
     | 
| 
      
 14 
     | 
    
         
            +
              s.rubyforge_project = "mallet"
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
              s.files         = `git ls-files`.split("\n")
         
     | 
| 
      
 17 
     | 
    
         
            +
              s.test_files    = `git ls-files -- {test,spec,features}/*`.split("\n")
         
     | 
| 
      
 18 
     | 
    
         
            +
              s.executables   = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
         
     | 
| 
      
 19 
     | 
    
         
            +
              s.require_paths = ["lib"]
         
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
      
 21 
     | 
    
         
            +
              s.add_dependency "activesupport"
         
     | 
| 
      
 22 
     | 
    
         
            +
              s.add_dependency "activerecord", "~> 3.0"
         
     | 
| 
      
 23 
     | 
    
         
            +
              s.add_dependency "actionmailer", "~> 3.0"
         
     | 
| 
      
 24 
     | 
    
         
            +
              s.add_dependency "i18n"
         
     | 
| 
      
 25 
     | 
    
         
            +
              s.add_dependency "workflow"
         
     | 
| 
      
 26 
     | 
    
         
            +
              s.add_dependency "delayed_job_active_record"
         
     | 
| 
      
 27 
     | 
    
         
            +
              
         
     | 
| 
      
 28 
     | 
    
         
            +
              s.add_development_dependency 'combustion', '~> 0.3.1'
         
     | 
| 
      
 29 
     | 
    
         
            +
            end
         
     | 
    
        data/spec/README
    ADDED
    
    | 
         
            File without changes
         
     | 
| 
         Binary file 
     | 
| 
         @@ -0,0 +1,28 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            ActiveRecord::Schema.define do
         
     | 
| 
      
 2 
     | 
    
         
            +
              
         
     | 
| 
      
 3 
     | 
    
         
            +
              create_table "mallet_mails", :force => true do |t|
         
     | 
| 
      
 4 
     | 
    
         
            +
                t.string "mailer_class"
         
     | 
| 
      
 5 
     | 
    
         
            +
                t.string "mailer_method"
         
     | 
| 
      
 6 
     | 
    
         
            +
                t.string "malletable_type"
         
     | 
| 
      
 7 
     | 
    
         
            +
                t.string "malletable_id"
         
     | 
| 
      
 8 
     | 
    
         
            +
                t.string "workflow_state"
         
     | 
| 
      
 9 
     | 
    
         
            +
                t.timestamps
         
     | 
| 
      
 10 
     | 
    
         
            +
              end
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
              create_table "delayed_jobs", :force => true do |t|
         
     | 
| 
      
 13 
     | 
    
         
            +
                t.integer  "priority",   :default => 0
         
     | 
| 
      
 14 
     | 
    
         
            +
                t.integer  "attempts",   :default => 0
         
     | 
| 
      
 15 
     | 
    
         
            +
                t.text     "handler"
         
     | 
| 
      
 16 
     | 
    
         
            +
                t.text     "last_error"
         
     | 
| 
      
 17 
     | 
    
         
            +
                t.datetime "run_at"
         
     | 
| 
      
 18 
     | 
    
         
            +
                t.datetime "locked_at"
         
     | 
| 
      
 19 
     | 
    
         
            +
                t.datetime "failed_at"
         
     | 
| 
      
 20 
     | 
    
         
            +
                t.string   "locked_by"
         
     | 
| 
      
 21 
     | 
    
         
            +
                t.string   "queue"
         
     | 
| 
      
 22 
     | 
    
         
            +
                t.datetime "created_at",                :null => false
         
     | 
| 
      
 23 
     | 
    
         
            +
                t.datetime "updated_at",                :null => false
         
     | 
| 
      
 24 
     | 
    
         
            +
              end
         
     | 
| 
      
 25 
     | 
    
         
            +
             
     | 
| 
      
 26 
     | 
    
         
            +
              add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority"
         
     | 
| 
      
 27 
     | 
    
         
            +
              
         
     | 
| 
      
 28 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            *.log
         
     | 
| 
         
            File without changes
         
     | 
| 
         @@ -0,0 +1,63 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require 'spec_helper'
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            describe Mallet::Mail do
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
              context "on creation" do
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
                before(:each) do
         
     | 
| 
      
 8 
     | 
    
         
            +
                  job = Delayed::Job.create!
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
                  @mail = Mallet::mail do
         
     | 
| 
      
 11 
     | 
    
         
            +
                    to job
         
     | 
| 
      
 12 
     | 
    
         
            +
                    mailer ActionMailer::Base.name
         
     | 
| 
      
 13 
     | 
    
         
            +
                    method 'welcome'
         
     | 
| 
      
 14 
     | 
    
         
            +
                  end
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
                  @job = job
         
     | 
| 
      
 17 
     | 
    
         
            +
                end
         
     | 
| 
      
 18 
     | 
    
         
            +
             
     | 
| 
      
 19 
     | 
    
         
            +
                it "should default to a pending state" do
         
     | 
| 
      
 20 
     | 
    
         
            +
                  @mail.should be_pending
         
     | 
| 
      
 21 
     | 
    
         
            +
                end
         
     | 
| 
      
 22 
     | 
    
         
            +
             
     | 
| 
      
 23 
     | 
    
         
            +
                it "should record the malletable class" do
         
     | 
| 
      
 24 
     | 
    
         
            +
                  @mail.malletable.should == @job
         
     | 
| 
      
 25 
     | 
    
         
            +
                end
         
     | 
| 
      
 26 
     | 
    
         
            +
             
     | 
| 
      
 27 
     | 
    
         
            +
                it "should trigger sending the mail via delayed job" do
         
     | 
| 
      
 28 
     | 
    
         
            +
                  Delayed::Job.count.should == 2
         
     | 
| 
      
 29 
     | 
    
         
            +
                  ActionMailer::Base.should_receive(:welcome).with(@job)
         
     | 
| 
      
 30 
     | 
    
         
            +
                  Delayed::Job.last.invoke_job
         
     | 
| 
      
 31 
     | 
    
         
            +
                end
         
     | 
| 
      
 32 
     | 
    
         
            +
             
     | 
| 
      
 33 
     | 
    
         
            +
                it "should raise an exception if the mailer does not inherit from ActionMailer" do
         
     | 
| 
      
 34 
     | 
    
         
            +
                  @mail.mailer_class = String.name
         
     | 
| 
      
 35 
     | 
    
         
            +
                  expect { @mail.save! }.to raise_error
         
     | 
| 
      
 36 
     | 
    
         
            +
                end
         
     | 
| 
      
 37 
     | 
    
         
            +
             
     | 
| 
      
 38 
     | 
    
         
            +
              end
         
     | 
| 
      
 39 
     | 
    
         
            +
             
     | 
| 
      
 40 
     | 
    
         
            +
              context "on delivery" do
         
     | 
| 
      
 41 
     | 
    
         
            +
             
     | 
| 
      
 42 
     | 
    
         
            +
                before(:each) do
         
     | 
| 
      
 43 
     | 
    
         
            +
                  job = Delayed::Job.create!
         
     | 
| 
      
 44 
     | 
    
         
            +
                  
         
     | 
| 
      
 45 
     | 
    
         
            +
                  @mail = Mallet::mail do
         
     | 
| 
      
 46 
     | 
    
         
            +
                    to job
         
     | 
| 
      
 47 
     | 
    
         
            +
                    mailer ActionMailer::Base.name
         
     | 
| 
      
 48 
     | 
    
         
            +
                    method 'welcome'
         
     | 
| 
      
 49 
     | 
    
         
            +
                  end
         
     | 
| 
      
 50 
     | 
    
         
            +
             
     | 
| 
      
 51 
     | 
    
         
            +
                  @job = job
         
     | 
| 
      
 52 
     | 
    
         
            +
                end
         
     | 
| 
      
 53 
     | 
    
         
            +
             
     | 
| 
      
 54 
     | 
    
         
            +
                it "should mark the mail as sent" do
         
     | 
| 
      
 55 
     | 
    
         
            +
                  ActionMailer::Base.should_receive(:welcome).with(@job)
         
     | 
| 
      
 56 
     | 
    
         
            +
                  Delayed::Job.last.invoke_job
         
     | 
| 
      
 57 
     | 
    
         
            +
                  @mail.reload
         
     | 
| 
      
 58 
     | 
    
         
            +
                  @mail.should be_sent
         
     | 
| 
      
 59 
     | 
    
         
            +
                end
         
     | 
| 
      
 60 
     | 
    
         
            +
             
     | 
| 
      
 61 
     | 
    
         
            +
              end
         
     | 
| 
      
 62 
     | 
    
         
            +
             
     | 
| 
      
 63 
     | 
    
         
            +
            end
         
     | 
    
        data/spec/spec_helper.rb
    ADDED
    
    | 
         @@ -0,0 +1,31 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
             
     | 
| 
      
 2 
     | 
    
         
            +
            require 'rubygems'
         
     | 
| 
      
 3 
     | 
    
         
            +
            require 'bundler'
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            Bundler.require :default, :development
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
            Combustion.initialize! :active_record
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
            require 'rspec/rails'
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
            RSpec.configure do |config|
         
     | 
| 
      
 12 
     | 
    
         
            +
              config.use_transactional_fixtures = true
         
     | 
| 
      
 13 
     | 
    
         
            +
              config.color_enabled = true
         
     | 
| 
      
 14 
     | 
    
         
            +
              config.formatter = :documentation # :progress, :html, :textmate
         
     | 
| 
      
 15 
     | 
    
         
            +
              #config.include FactoryGirl::Syntax::Methods
         
     | 
| 
      
 16 
     | 
    
         
            +
             
     | 
| 
      
 17 
     | 
    
         
            +
              # config.before(:suite) do
         
     | 
| 
      
 18 
     | 
    
         
            +
              #   DatabaseCleaner.strategy = :transaction
         
     | 
| 
      
 19 
     | 
    
         
            +
              #   DatabaseCleaner.clean_with(:truncation)
         
     | 
| 
      
 20 
     | 
    
         
            +
              # end
         
     | 
| 
      
 21 
     | 
    
         
            +
             
     | 
| 
      
 22 
     | 
    
         
            +
              # config.before(:each) do
         
     | 
| 
      
 23 
     | 
    
         
            +
              #   DatabaseCleaner.start
         
     | 
| 
      
 24 
     | 
    
         
            +
              # end
         
     | 
| 
      
 25 
     | 
    
         
            +
             
     | 
| 
      
 26 
     | 
    
         
            +
              # config.after(:each) do
         
     | 
| 
      
 27 
     | 
    
         
            +
              #   DatabaseCleaner.clean
         
     | 
| 
      
 28 
     | 
    
         
            +
              # end
         
     | 
| 
      
 29 
     | 
    
         
            +
            end
         
     | 
| 
      
 30 
     | 
    
         
            +
             
     | 
| 
      
 31 
     | 
    
         
            +
            #FactoryGirl.find_definitions
         
     | 
    
        metadata
    ADDED
    
    | 
         @@ -0,0 +1,193 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            --- !ruby/object:Gem::Specification
         
     | 
| 
      
 2 
     | 
    
         
            +
            name: mallet
         
     | 
| 
      
 3 
     | 
    
         
            +
            version: !ruby/object:Gem::Version
         
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.0.1
         
     | 
| 
      
 5 
     | 
    
         
            +
              prerelease: 
         
     | 
| 
      
 6 
     | 
    
         
            +
            platform: ruby
         
     | 
| 
      
 7 
     | 
    
         
            +
            authors:
         
     | 
| 
      
 8 
     | 
    
         
            +
            - Douglas Anderson
         
     | 
| 
      
 9 
     | 
    
         
            +
            - Tim Jegels
         
     | 
| 
      
 10 
     | 
    
         
            +
            autorequire: 
         
     | 
| 
      
 11 
     | 
    
         
            +
            bindir: bin
         
     | 
| 
      
 12 
     | 
    
         
            +
            cert_chain: []
         
     | 
| 
      
 13 
     | 
    
         
            +
            date: 2013-03-12 00:00:00.000000000 Z
         
     | 
| 
      
 14 
     | 
    
         
            +
            dependencies:
         
     | 
| 
      
 15 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 16 
     | 
    
         
            +
              name: activesupport
         
     | 
| 
      
 17 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 18 
     | 
    
         
            +
                none: false
         
     | 
| 
      
 19 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 20 
     | 
    
         
            +
                - - ! '>='
         
     | 
| 
      
 21 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 22 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 23 
     | 
    
         
            +
              type: :runtime
         
     | 
| 
      
 24 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 25 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 26 
     | 
    
         
            +
                none: false
         
     | 
| 
      
 27 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 28 
     | 
    
         
            +
                - - ! '>='
         
     | 
| 
      
 29 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 30 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 31 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 32 
     | 
    
         
            +
              name: activerecord
         
     | 
| 
      
 33 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 34 
     | 
    
         
            +
                none: false
         
     | 
| 
      
 35 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 36 
     | 
    
         
            +
                - - ~>
         
     | 
| 
      
 37 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 38 
     | 
    
         
            +
                    version: '3.0'
         
     | 
| 
      
 39 
     | 
    
         
            +
              type: :runtime
         
     | 
| 
      
 40 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 41 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 42 
     | 
    
         
            +
                none: false
         
     | 
| 
      
 43 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 44 
     | 
    
         
            +
                - - ~>
         
     | 
| 
      
 45 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 46 
     | 
    
         
            +
                    version: '3.0'
         
     | 
| 
      
 47 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 48 
     | 
    
         
            +
              name: actionmailer
         
     | 
| 
      
 49 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 50 
     | 
    
         
            +
                none: false
         
     | 
| 
      
 51 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 52 
     | 
    
         
            +
                - - ~>
         
     | 
| 
      
 53 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 54 
     | 
    
         
            +
                    version: '3.0'
         
     | 
| 
      
 55 
     | 
    
         
            +
              type: :runtime
         
     | 
| 
      
 56 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 57 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 58 
     | 
    
         
            +
                none: false
         
     | 
| 
      
 59 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 60 
     | 
    
         
            +
                - - ~>
         
     | 
| 
      
 61 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 62 
     | 
    
         
            +
                    version: '3.0'
         
     | 
| 
      
 63 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 64 
     | 
    
         
            +
              name: i18n
         
     | 
| 
      
 65 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 66 
     | 
    
         
            +
                none: false
         
     | 
| 
      
 67 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 68 
     | 
    
         
            +
                - - ! '>='
         
     | 
| 
      
 69 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 70 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 71 
     | 
    
         
            +
              type: :runtime
         
     | 
| 
      
 72 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 73 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 74 
     | 
    
         
            +
                none: false
         
     | 
| 
      
 75 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 76 
     | 
    
         
            +
                - - ! '>='
         
     | 
| 
      
 77 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 78 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 79 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 80 
     | 
    
         
            +
              name: workflow
         
     | 
| 
      
 81 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 82 
     | 
    
         
            +
                none: false
         
     | 
| 
      
 83 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 84 
     | 
    
         
            +
                - - ! '>='
         
     | 
| 
      
 85 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 86 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 87 
     | 
    
         
            +
              type: :runtime
         
     | 
| 
      
 88 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 89 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 90 
     | 
    
         
            +
                none: false
         
     | 
| 
      
 91 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 92 
     | 
    
         
            +
                - - ! '>='
         
     | 
| 
      
 93 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 94 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 95 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 96 
     | 
    
         
            +
              name: delayed_job_active_record
         
     | 
| 
      
 97 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 98 
     | 
    
         
            +
                none: false
         
     | 
| 
      
 99 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 100 
     | 
    
         
            +
                - - ! '>='
         
     | 
| 
      
 101 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 102 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 103 
     | 
    
         
            +
              type: :runtime
         
     | 
| 
      
 104 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 105 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 106 
     | 
    
         
            +
                none: false
         
     | 
| 
      
 107 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 108 
     | 
    
         
            +
                - - ! '>='
         
     | 
| 
      
 109 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 110 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 111 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 112 
     | 
    
         
            +
              name: combustion
         
     | 
| 
      
 113 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 114 
     | 
    
         
            +
                none: false
         
     | 
| 
      
 115 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 116 
     | 
    
         
            +
                - - ~>
         
     | 
| 
      
 117 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 118 
     | 
    
         
            +
                    version: 0.3.1
         
     | 
| 
      
 119 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 120 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 121 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 122 
     | 
    
         
            +
                none: false
         
     | 
| 
      
 123 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 124 
     | 
    
         
            +
                - - ~>
         
     | 
| 
      
 125 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 126 
     | 
    
         
            +
                    version: 0.3.1
         
     | 
| 
      
 127 
     | 
    
         
            +
            description: ! ' Send and track mails asynchronously. '
         
     | 
| 
      
 128 
     | 
    
         
            +
            email:
         
     | 
| 
      
 129 
     | 
    
         
            +
            - i.am.douglas.anderson@gmail.com
         
     | 
| 
      
 130 
     | 
    
         
            +
            - tjegels@gmail.com
         
     | 
| 
      
 131 
     | 
    
         
            +
            executables: []
         
     | 
| 
      
 132 
     | 
    
         
            +
            extensions: []
         
     | 
| 
      
 133 
     | 
    
         
            +
            extra_rdoc_files: []
         
     | 
| 
      
 134 
     | 
    
         
            +
            files:
         
     | 
| 
      
 135 
     | 
    
         
            +
            - .rvmrc
         
     | 
| 
      
 136 
     | 
    
         
            +
            - Gemfile
         
     | 
| 
      
 137 
     | 
    
         
            +
            - Gemfile.lock
         
     | 
| 
      
 138 
     | 
    
         
            +
            - README.md
         
     | 
| 
      
 139 
     | 
    
         
            +
            - Rakefile
         
     | 
| 
      
 140 
     | 
    
         
            +
            - config.ru
         
     | 
| 
      
 141 
     | 
    
         
            +
            - lib/generators/active_record/invoicing_generator.rb
         
     | 
| 
      
 142 
     | 
    
         
            +
            - lib/generators/active_record/mallet_generator.rb
         
     | 
| 
      
 143 
     | 
    
         
            +
            - lib/generators/active_record/templates/migration.rb
         
     | 
| 
      
 144 
     | 
    
         
            +
            - lib/mallet.rb
         
     | 
| 
      
 145 
     | 
    
         
            +
            - lib/mallet/mail.rb
         
     | 
| 
      
 146 
     | 
    
         
            +
            - lib/mallet/mail_generation.rb
         
     | 
| 
      
 147 
     | 
    
         
            +
            - lib/mallet/version.rb
         
     | 
| 
      
 148 
     | 
    
         
            +
            - mallet.gemspec
         
     | 
| 
      
 149 
     | 
    
         
            +
            - spec/README
         
     | 
| 
      
 150 
     | 
    
         
            +
            - spec/internal/config/database.yml
         
     | 
| 
      
 151 
     | 
    
         
            +
            - spec/internal/config/database.yml.sample
         
     | 
| 
      
 152 
     | 
    
         
            +
            - spec/internal/config/routes.rb
         
     | 
| 
      
 153 
     | 
    
         
            +
            - spec/internal/db/mallet_test.sqlite
         
     | 
| 
      
 154 
     | 
    
         
            +
            - spec/internal/db/schema.rb
         
     | 
| 
      
 155 
     | 
    
         
            +
            - spec/internal/log/.gitignore
         
     | 
| 
      
 156 
     | 
    
         
            +
            - spec/internal/public/favicon.ico
         
     | 
| 
      
 157 
     | 
    
         
            +
            - spec/lib/mallet/mail_spec.rb
         
     | 
| 
      
 158 
     | 
    
         
            +
            - spec/spec_helper.rb
         
     | 
| 
      
 159 
     | 
    
         
            +
            homepage: ''
         
     | 
| 
      
 160 
     | 
    
         
            +
            licenses: []
         
     | 
| 
      
 161 
     | 
    
         
            +
            post_install_message: 
         
     | 
| 
      
 162 
     | 
    
         
            +
            rdoc_options: []
         
     | 
| 
      
 163 
     | 
    
         
            +
            require_paths:
         
     | 
| 
      
 164 
     | 
    
         
            +
            - lib
         
     | 
| 
      
 165 
     | 
    
         
            +
            required_ruby_version: !ruby/object:Gem::Requirement
         
     | 
| 
      
 166 
     | 
    
         
            +
              none: false
         
     | 
| 
      
 167 
     | 
    
         
            +
              requirements:
         
     | 
| 
      
 168 
     | 
    
         
            +
              - - ! '>='
         
     | 
| 
      
 169 
     | 
    
         
            +
                - !ruby/object:Gem::Version
         
     | 
| 
      
 170 
     | 
    
         
            +
                  version: '0'
         
     | 
| 
      
 171 
     | 
    
         
            +
            required_rubygems_version: !ruby/object:Gem::Requirement
         
     | 
| 
      
 172 
     | 
    
         
            +
              none: false
         
     | 
| 
      
 173 
     | 
    
         
            +
              requirements:
         
     | 
| 
      
 174 
     | 
    
         
            +
              - - ! '>='
         
     | 
| 
      
 175 
     | 
    
         
            +
                - !ruby/object:Gem::Version
         
     | 
| 
      
 176 
     | 
    
         
            +
                  version: '0'
         
     | 
| 
      
 177 
     | 
    
         
            +
            requirements: []
         
     | 
| 
      
 178 
     | 
    
         
            +
            rubyforge_project: mallet
         
     | 
| 
      
 179 
     | 
    
         
            +
            rubygems_version: 1.8.24
         
     | 
| 
      
 180 
     | 
    
         
            +
            signing_key: 
         
     | 
| 
      
 181 
     | 
    
         
            +
            specification_version: 3
         
     | 
| 
      
 182 
     | 
    
         
            +
            summary: A mail gem.
         
     | 
| 
      
 183 
     | 
    
         
            +
            test_files:
         
     | 
| 
      
 184 
     | 
    
         
            +
            - spec/README
         
     | 
| 
      
 185 
     | 
    
         
            +
            - spec/internal/config/database.yml
         
     | 
| 
      
 186 
     | 
    
         
            +
            - spec/internal/config/database.yml.sample
         
     | 
| 
      
 187 
     | 
    
         
            +
            - spec/internal/config/routes.rb
         
     | 
| 
      
 188 
     | 
    
         
            +
            - spec/internal/db/mallet_test.sqlite
         
     | 
| 
      
 189 
     | 
    
         
            +
            - spec/internal/db/schema.rb
         
     | 
| 
      
 190 
     | 
    
         
            +
            - spec/internal/log/.gitignore
         
     | 
| 
      
 191 
     | 
    
         
            +
            - spec/internal/public/favicon.ico
         
     | 
| 
      
 192 
     | 
    
         
            +
            - spec/lib/mallet/mail_spec.rb
         
     | 
| 
      
 193 
     | 
    
         
            +
            - spec/spec_helper.rb
         
     |