html-griddler 0.1.8 → 0.3.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.
@@ -0,0 +1,6 @@
1
+ class Griddler::EmailsController < ActionController::Base
2
+ def create
3
+ Griddler::Email.new(params).process
4
+ head :ok
5
+ end
6
+ end
@@ -0,0 +1 @@
1
+ require 'griddler'
data/config/routes.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  Rails.application.routes.draw do
2
- post '/email_processor' => 'html_griddler/emails#create', as: :email_processor
2
+ post '/email_processor' => 'griddler/emails#create', as: :email_processor
3
3
  end
data/lib/html-griddler.rb CHANGED
@@ -1,8 +1,8 @@
1
- require 'html-griddler/errors'
2
- require 'html-griddler/engine'
3
- require 'html-griddler/email'
4
- require 'html-griddler/email_parser'
5
- require 'html-griddler/configuration'
1
+ require 'griddler/errors'
2
+ require 'griddler/engine'
3
+ require 'griddler/email'
4
+ require 'griddler/email_parser'
5
+ require 'griddler/configuration'
6
6
 
7
- module HtmlGriddler
7
+ module Griddler
8
8
  end
@@ -1,4 +1,4 @@
1
- module HtmlGriddler
1
+ module Griddler
2
2
  @@configuration = nil
3
3
 
4
4
  def self.configure
@@ -1,6 +1,6 @@
1
1
  require 'htmlentities'
2
2
 
3
- class HtmlGriddler::Email
3
+ class Griddler::Email
4
4
  include ActionView::Helpers::SanitizeHelper
5
5
  attr_reader :to, :from, :body, :raw_body, :subject, :attachments, :spam_score, :spam_report, :spf, :dkim
6
6
 
@@ -28,7 +28,7 @@ class HtmlGriddler::Email
28
28
  attr_reader :params
29
29
 
30
30
  def config
31
- HtmlGriddler.configuration
31
+ Griddler.configuration
32
32
  end
33
33
 
34
34
  def extract_address(address, type)
@@ -70,7 +70,7 @@ class HtmlGriddler::Email
70
70
  elsif params.key? :text
71
71
  clean_html(params[:text])
72
72
  else
73
- raise HtmlGriddler::Errors::EmailBodyNotFound
73
+ raise Griddler::Errors::EmailBodyNotFound
74
74
  end
75
75
  end
76
76
 
@@ -22,7 +22,7 @@ module EmailParser
22
22
 
23
23
  def self.extract_reply_body(body)
24
24
  if body
25
- delimeter = HtmlGriddler.configuration.reply_delimiter
25
+ delimeter = Griddler.configuration.reply_delimiter
26
26
  body.split(delimeter).first.
27
27
  split(/^\s*[-]+\s*Original Message\s*[-]+\s*$/).first.
28
28
  split(/^\s*--\s*$/).first.
@@ -1,4 +1,4 @@
1
- module HtmlGriddler
1
+ module Griddler
2
2
  class Engine < ::Rails::Engine
3
3
  end
4
4
  end
@@ -1,9 +1,9 @@
1
- module HtmlGriddler
1
+ module Griddler
2
2
  class Error < StandardError
3
3
  end
4
4
 
5
5
  module Errors
6
- class EmailBodyNotFound < HtmlGriddler::Error
6
+ class EmailBodyNotFound < Griddler::Error
7
7
  end
8
8
  end
9
9
  end
@@ -1,3 +1,3 @@
1
1
  module HtmlGriddler
2
- VERSION = "0.1.8"
3
- end
2
+ VERSION = "0.3.1"
3
+ end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: html-griddler
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.8
5
+ version: 0.3.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Sean Powell - forker :)
@@ -82,8 +82,8 @@ extensions: []
82
82
  extra_rdoc_files: []
83
83
 
84
84
  files:
85
- - app/controllers/html_griddler/emails_controller.rb
86
- - config/initializers/html-griddler.rb
85
+ - app/controllers/griddler/emails_controller.rb
86
+ - config/initializers/griddler.rb
87
87
  - config/routes.rb
88
88
  - lib/html-griddler/configuration.rb
89
89
  - lib/html-griddler/email.rb
@@ -92,7 +92,7 @@ files:
92
92
  - lib/html-griddler/errors.rb
93
93
  - lib/html-griddler/version.rb
94
94
  - lib/html-griddler.rb
95
- - lib/tasks/html-griddler_tasks.rake
95
+ - lib/tasks/griddler_tasks.rake
96
96
  - LICENSE
97
97
  - Rakefile
98
98
  - README.md
@@ -1,6 +0,0 @@
1
- class HtmlGriddler::EmailsController < ActionController::Base
2
- def create
3
- HtmlGriddler::Email.new(params).process
4
- head :ok
5
- end
6
- end
@@ -1 +0,0 @@
1
- require 'html-griddler'