replyr 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (117) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +3 -0
  3. data/Gemfile +14 -0
  4. data/MIT-LICENSE +20 -0
  5. data/README.md +94 -0
  6. data/Rakefile +32 -0
  7. data/lib/email_reply_parser/LICENSE +22 -0
  8. data/lib/email_reply_parser/email_reply_parser.rb +475 -0
  9. data/lib/generators/replyr/install_generator.rb +15 -0
  10. data/lib/generators/replyr/templates/mailman_daemon +12 -0
  11. data/lib/generators/replyr/templates/mailman_server +50 -0
  12. data/lib/generators/replyr/templates/replyr.rb.erb +8 -0
  13. data/lib/replyr/config.rb +22 -0
  14. data/lib/replyr/engine.rb +14 -0
  15. data/lib/replyr/handle_reply.rb +36 -0
  16. data/lib/replyr/reply_address.rb +111 -0
  17. data/lib/replyr/reply_email.rb +50 -0
  18. data/lib/replyr/version.rb +3 -0
  19. data/lib/replyr.rb +26 -0
  20. data/lib/tasks/replyr_tasks.rake +4 -0
  21. data/test/dummy/README.rdoc +28 -0
  22. data/test/dummy/Rakefile +6 -0
  23. data/test/dummy/app/assets/javascripts/application.js +13 -0
  24. data/test/dummy/app/assets/stylesheets/application.css +13 -0
  25. data/test/dummy/app/controllers/application_controller.rb +5 -0
  26. data/test/dummy/app/helpers/application_helper.rb +2 -0
  27. data/test/dummy/app/models/comment.rb +7 -0
  28. data/test/dummy/app/models/user.rb +3 -0
  29. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  30. data/test/dummy/bin/bundle +3 -0
  31. data/test/dummy/bin/rails +4 -0
  32. data/test/dummy/bin/rake +4 -0
  33. data/test/dummy/config/application.rb +23 -0
  34. data/test/dummy/config/boot.rb +5 -0
  35. data/test/dummy/config/database.yml +8 -0
  36. data/test/dummy/config/environment.rb +5 -0
  37. data/test/dummy/config/environments/development.rb +29 -0
  38. data/test/dummy/config/environments/production.rb +80 -0
  39. data/test/dummy/config/environments/test.rb +36 -0
  40. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  41. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  42. data/test/dummy/config/initializers/inflections.rb +16 -0
  43. data/test/dummy/config/initializers/mime_types.rb +5 -0
  44. data/test/dummy/config/initializers/replyr.rb +2 -0
  45. data/test/dummy/config/initializers/secret_token.rb +12 -0
  46. data/test/dummy/config/initializers/session_store.rb +3 -0
  47. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  48. data/test/dummy/config/locales/en.yml +23 -0
  49. data/test/dummy/config/routes.rb +56 -0
  50. data/test/dummy/config.ru +4 -0
  51. data/test/dummy/db/test.sqlite3 +0 -0
  52. data/test/dummy/log/development.log +0 -0
  53. data/test/dummy/log/test.log +12557 -0
  54. data/test/dummy/public/404.html +58 -0
  55. data/test/dummy/public/422.html +58 -0
  56. data/test/dummy/public/500.html +57 -0
  57. data/test/dummy/public/favicon.ico +0 -0
  58. data/test/email_reply_parser/email_reply_parser_test.rb +488 -0
  59. data/test/email_reply_parser/emails/correct_sig.txt +4 -0
  60. data/test/email_reply_parser/emails/email_1_1.txt +13 -0
  61. data/test/email_reply_parser/emails/email_1_2.txt +51 -0
  62. data/test/email_reply_parser/emails/email_1_3.txt +55 -0
  63. data/test/email_reply_parser/emails/email_1_4.txt +5 -0
  64. data/test/email_reply_parser/emails/email_1_5.txt +15 -0
  65. data/test/email_reply_parser/emails/email_1_6.txt +15 -0
  66. data/test/email_reply_parser/emails/email_1_7.txt +12 -0
  67. data/test/email_reply_parser/emails/email_1_8.txt +6 -0
  68. data/test/email_reply_parser/emails/email_1_9.txt +9 -0
  69. data/test/email_reply_parser/emails/email_2_1.txt +25 -0
  70. data/test/email_reply_parser/emails/email_2_2.txt +10 -0
  71. data/test/email_reply_parser/emails/email_2_3.txt +14 -0
  72. data/test/email_reply_parser/emails/email_2_4.txt +14 -0
  73. data/test/email_reply_parser/emails/email_2_5.txt +15 -0
  74. data/test/email_reply_parser/emails/email_2_6.txt +11 -0
  75. data/test/email_reply_parser/emails/email_2_7.txt +5 -0
  76. data/test/email_reply_parser/emails/email_2_7_1.txt +5 -0
  77. data/test/email_reply_parser/emails/email_2_7_de.txt +5 -0
  78. data/test/email_reply_parser/emails/email_2_8.txt +3 -0
  79. data/test/email_reply_parser/emails/email_2_9.txt +9 -0
  80. data/test/email_reply_parser/emails/email_2nd_paragraph_starting_with_on.txt +12 -0
  81. data/test/email_reply_parser/emails/email_BlackBerry.txt +3 -0
  82. data/test/email_reply_parser/emails/email_bullets.txt +22 -0
  83. data/test/email_reply_parser/emails/email_from_address_in_quote_header.txt +12 -0
  84. data/test/email_reply_parser/emails/email_from_name_in_quote_header.txt +12 -0
  85. data/test/email_reply_parser/emails/email_hyphens.txt +5 -0
  86. data/test/email_reply_parser/emails/email_iPhone.txt +3 -0
  87. data/test/email_reply_parser/emails/email_iPhone_de.txt +3 -0
  88. data/test/email_reply_parser/emails/email_iPhone_de_2.txt +3 -0
  89. data/test/email_reply_parser/emails/email_mentions_own_email_address.txt +6 -0
  90. data/test/email_reply_parser/emails/email_mentions_own_name.txt +6 -0
  91. data/test/email_reply_parser/emails/email_multi_word_sent_from_my_mobile_device.txt +3 -0
  92. data/test/email_reply_parser/emails/email_multiline_quote_header_de_mx.txt +8 -0
  93. data/test/email_reply_parser/emails/email_multiline_quote_header_es_mx.txt +8 -0
  94. data/test/email_reply_parser/emails/email_multiline_quote_header_fr.txt +8 -0
  95. data/test/email_reply_parser/emails/email_multiline_quote_header_from_first.txt +11 -0
  96. data/test/email_reply_parser/emails/email_multiline_quote_header_from_replyto_date_to_subject.txt +12 -0
  97. data/test/email_reply_parser/emails/email_multiline_quote_header_from_to_date_subject.txt +11 -0
  98. data/test/email_reply_parser/emails/email_multiline_quote_header_none.txt +11 -0
  99. data/test/email_reply_parser/emails/email_multiline_quote_header_pt_br.txt +8 -0
  100. data/test/email_reply_parser/emails/email_multiline_quote_header_with_asterisks.txt +21 -0
  101. data/test/email_reply_parser/emails/email_multiline_quote_header_with_cc.txt +9 -0
  102. data/test/email_reply_parser/emails/email_multiline_quote_header_with_multiline_headers.txt +14 -0
  103. data/test/email_reply_parser/emails/email_no_signature_deliminator.txt +7 -0
  104. data/test/email_reply_parser/emails/email_no_signature_deliminator_adds_a_middle_initial.txt +7 -0
  105. data/test/email_reply_parser/emails/email_one_is_not_on.txt +10 -0
  106. data/test/email_reply_parser/emails/email_sent_from_my_not_signature.txt +3 -0
  107. data/test/email_reply_parser/emails/email_was_showing_as_nothing_visible.txt +13 -0
  108. data/test/email_reply_parser/emails/new_content/email_1_2.txt +28 -0
  109. data/test/replyr/handle_reply_test.rb +46 -0
  110. data/test/replyr/reply_address_test.rb +77 -0
  111. data/test/replyr/reply_email_test.rb +19 -0
  112. data/test/replyr_test.rb +7 -0
  113. data/test/support/emails/reply_multipart.eml +35 -0
  114. data/test/support/emails/reply_plain.eml +11 -0
  115. data/test/support/emails/reply_with_attachment.eml +466 -0
  116. data/test/test_helper.rb +23 -0
  117. metadata +228 -0
@@ -0,0 +1,7 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4
+ # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
5
+
6
+ # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7
+ # Rails.backtrace_cleaner.remove_silencers!
@@ -0,0 +1,4 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Configure sensitive parameters which will be filtered from the log file.
4
+ Rails.application.config.filter_parameters += [:password]
@@ -0,0 +1,16 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new inflection rules using the following format. Inflections
4
+ # are locale specific, and you may define rules for as many different
5
+ # locales as you wish. All of these examples are active by default:
6
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
7
+ # inflect.plural /^(ox)$/i, '\1en'
8
+ # inflect.singular /^(ox)en/i, '\1'
9
+ # inflect.irregular 'person', 'people'
10
+ # inflect.uncountable %w( fish sheep )
11
+ # end
12
+
13
+ # These inflection rules are supported but not enabled by default:
14
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
15
+ # inflect.acronym 'RESTful'
16
+ # end
@@ -0,0 +1,5 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new mime types for use in respond_to blocks:
4
+ # Mime::Type.register "text/richtext", :rtf
5
+ # Mime::Type.register_alias "text/html", :iphone
@@ -0,0 +1,2 @@
1
+ Replyr.config.host = "example.com"
2
+ Replyr.config.secret = "1a2b3c"
@@ -0,0 +1,12 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Your secret key is used for verifying the integrity of signed cookies.
4
+ # If you change this key, all old signed cookies will become invalid!
5
+
6
+ # Make sure the secret is at least 30 characters and all random,
7
+ # no regular words or you'll be exposed to dictionary attacks.
8
+ # You can use `rake secret` to generate a secure secret key.
9
+
10
+ # Make sure your secret_key_base is kept private
11
+ # if you're sharing your code publicly.
12
+ Dummy::Application.config.secret_key_base = 'f06de6e093af54c0babcdd47d801946f5ed38cefb8feb099c72c8a549de8d7324b6d6a3b61cf2618625f8b506194bac3d09048b5d98189a017ad7f70e287625a'
@@ -0,0 +1,3 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ Dummy::Application.config.session_store :cookie_store, key: '_dummy_session'
@@ -0,0 +1,14 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # This file contains settings for ActionController::ParamsWrapper which
4
+ # is enabled by default.
5
+
6
+ # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7
+ ActiveSupport.on_load(:action_controller) do
8
+ wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
9
+ end
10
+
11
+ # To enable root element in JSON for ActiveRecord objects.
12
+ # ActiveSupport.on_load(:active_record) do
13
+ # self.include_root_in_json = true
14
+ # end
@@ -0,0 +1,23 @@
1
+ # Files in the config/locales directory are used for internationalization
2
+ # and are automatically loaded by Rails. If you want to use locales other
3
+ # than English, add the necessary files in this directory.
4
+ #
5
+ # To use the locales, use `I18n.t`:
6
+ #
7
+ # I18n.t 'hello'
8
+ #
9
+ # In views, this is aliased to just `t`:
10
+ #
11
+ # <%= t('hello') %>
12
+ #
13
+ # To use a different locale, set it with `I18n.locale`:
14
+ #
15
+ # I18n.locale = :es
16
+ #
17
+ # This would use the information in config/locales/es.yml.
18
+ #
19
+ # To learn more, please read the Rails Internationalization guide
20
+ # available at http://guides.rubyonrails.org/i18n.html.
21
+
22
+ en:
23
+ hello: "Hello world"
@@ -0,0 +1,56 @@
1
+ Dummy::Application.routes.draw do
2
+ # The priority is based upon order of creation: first created -> highest priority.
3
+ # See how all your routes lay out with "rake routes".
4
+
5
+ # You can have the root of your site routed with "root"
6
+ # root 'welcome#index'
7
+
8
+ # Example of regular route:
9
+ # get 'products/:id' => 'catalog#view'
10
+
11
+ # Example of named route that can be invoked with purchase_url(id: product.id)
12
+ # get 'products/:id/purchase' => 'catalog#purchase', as: :purchase
13
+
14
+ # Example resource route (maps HTTP verbs to controller actions automatically):
15
+ # resources :products
16
+
17
+ # Example resource route with options:
18
+ # resources :products do
19
+ # member do
20
+ # get 'short'
21
+ # post 'toggle'
22
+ # end
23
+ #
24
+ # collection do
25
+ # get 'sold'
26
+ # end
27
+ # end
28
+
29
+ # Example resource route with sub-resources:
30
+ # resources :products do
31
+ # resources :comments, :sales
32
+ # resource :seller
33
+ # end
34
+
35
+ # Example resource route with more complex sub-resources:
36
+ # resources :products do
37
+ # resources :comments
38
+ # resources :sales do
39
+ # get 'recent', on: :collection
40
+ # end
41
+ # end
42
+
43
+ # Example resource route with concerns:
44
+ # concern :toggleable do
45
+ # post 'toggle'
46
+ # end
47
+ # resources :posts, concerns: :toggleable
48
+ # resources :photos, concerns: :toggleable
49
+
50
+ # Example resource route within a namespace:
51
+ # namespace :admin do
52
+ # # Directs /admin/products/* to Admin::ProductsController
53
+ # # (app/controllers/admin/products_controller.rb)
54
+ # resources :products
55
+ # end
56
+ end
@@ -0,0 +1,4 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require ::File.expand_path('../config/environment', __FILE__)
4
+ run Rails.application
Binary file
File without changes