diff --git a/.gitignore b/.gitignore index eb3489a..d6ea040 100755 --- a/.gitignore +++ b/.gitignore @@ -1,15 +1,7 @@ -# See http://help.github.com/ignore-files/ for more about ignoring files. -# -# If you find yourself ignoring temporary files generated by your text editor -# or operating system, you probably want to add a global ignore instead: -# git config --global core.excludesfile ~/.gitignore_global - -# Ignore bundler config -/.bundle - -# Ignore the default SQLite database. -/db/*.sqlite3 - -# Ignore all logfiles and tempfiles. -/log/*.log -/tmp +log +config/database.yml +.*.sw? +config/site.rb +tmp +mail_temp +.svn diff --git a/AUTHORS.markdown b/AUTHORS similarity index 92% rename from AUTHORS.markdown rename to AUTHORS index 2bdfb37..79766f5 100755 --- a/AUTHORS.markdown +++ b/AUTHORS @@ -1,5 +1,3 @@ -## Authors - * Luben Manolov * Nick Penkov * Eugene Korbut diff --git a/CHANGES.markdown b/CHANGES.markdown deleted file mode 100755 index 50e4d0f..0000000 --- a/CHANGES.markdown +++ /dev/null @@ -1,47 +0,0 @@ -## Changes - -#### 0.9.5 - - * favicon added - -#### 0.9.4 - - * bump gems - -#### 0.9.3 - - * handle Cc & Bcc adresses fix - -#### 0.9.2 - - * fixes in handling draft folder - -#### 0.9.1 - - * nowrap to edit column in contacts & links - * decoded changed in mail gem - * fixes in pl locale - -#### 0.9.0 - - * switch to Rails 3.2.x - * Tweeter Bootstrap as default theme - * many fixes - -#### 0.8.6 - - * new calendar view - -#### 0.8.5 - - * servers view - * identity modification - -#### 0.8.4 - - * calendar view as separate gem - * adding bluecloth for rendering markdown text - -#### 0.8.3 - - * export, imports of contact diff --git a/Gemfile b/Gemfile index 31e4d9d..79bbe16 100755 --- a/Gemfile +++ b/Gemfile @@ -1,47 +1,36 @@ -source 'https://rubygems.org' +source 'http://rubygems.org' -gem 'rails', '>= 3.2.11' +gem 'rails', '3.0.7' # Bundle edge Rails instead: # gem 'rails', :git => 'git://github.com/rails/rails.git' +gem 'sqlite3-ruby',:require => 'sqlite3' +gem 'arel' gem 'mysql2' +gem 'will_paginate' +gem 'themes_for_rails' +gem 'tmail' -gem 'json', '>= 1.7.6' - -# Gems used only for assets and not required -# in production environments by default. -group :assets do - gem 'sass-rails' - gem 'coffee-rails' - - # See https://github.com/sstephenson/execjs#readme for more supported runtimes - # gem 'therubyracer' - - gem 'uglifier' -end - -gem 'jquery-rails' - -# To use ActiveModel has_secure_password -# gem 'bcrypt-ruby', '~> 3.0.0' - -# To use Jbuilder templates for JSON -# gem 'jbuilder' - -# Use unicorn as the app server +# Use unicorn as the web server # gem 'unicorn' # Deploy with Capistrano # gem 'capistrano' -# To use debugger +# To use debugger (ruby-debug for Ruby 1.8.7+, ruby-debug19 for Ruby 1.9.2+) # gem 'ruby-debug' +# gem 'ruby-debug19', :require => 'ruby-debug' -gem 'will_paginate' -gem "ezcrypto" -gem 'calendar_view' -gem 'bluecloth' -gem 'sass' -gem 'haml' -#gem 'twitter_bootstrap_form_for' +# Bundle the extra gems: +# gem 'bj' +# gem 'nokogiri' +# gem 'sqlite3-ruby', :require => 'sqlite3' +# gem 'aws-s3', :require => 'aws/s3' + +# Bundle gems for the local environment. Make sure to +# put test-only gems in this group so their generators +# and rake tasks are available in development mode: +# group :development, :test do +# gem 'webrat' +# end diff --git a/Gemfile.lock b/Gemfile.lock old mode 100644 new mode 100755 index ed43337..1f3e0d8 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,125 +1,83 @@ GEM - remote: https://rubygems.org/ + remote: http://rubygems.org/ specs: - actionmailer (3.2.11) - actionpack (= 3.2.11) - mail (~> 2.4.4) - actionpack (3.2.11) - activemodel (= 3.2.11) - activesupport (= 3.2.11) - builder (~> 3.0.0) - erubis (~> 2.7.0) - journey (~> 1.0.4) - rack (~> 1.4.0) - rack-cache (~> 1.2) - rack-test (~> 0.6.1) - sprockets (~> 2.2.1) - activemodel (3.2.11) - activesupport (= 3.2.11) - builder (~> 3.0.0) - activerecord (3.2.11) - activemodel (= 3.2.11) - activesupport (= 3.2.11) - arel (~> 3.0.2) - tzinfo (~> 0.3.29) - activeresource (3.2.11) - activemodel (= 3.2.11) - activesupport (= 3.2.11) - activesupport (3.2.11) - i18n (~> 0.6) - multi_json (~> 1.0) - arel (3.0.2) - bluecloth (2.2.0) - builder (3.0.4) - calendar_view (0.0.7) - rails (>= 3.0.0) - coffee-rails (3.2.2) - coffee-script (>= 2.2.0) - railties (~> 3.2.0) - coffee-script (2.2.0) - coffee-script-source - execjs - coffee-script-source (1.4.0) + actionmailer (3.0.7) + actionpack (= 3.0.7) + mail (~> 2.2.15) + actionpack (3.0.7) + activemodel (= 3.0.7) + activesupport (= 3.0.7) + builder (~> 2.1.2) + erubis (>= 2.6.6) + i18n (~> 0.5.0) + rack (~> 1.2.1) + rack-mount (>= 0.6.14) + rack-test (~> 0.5.7) + tzinfo (~> 0.3.23) + activemodel (3.0.7) + activesupport (= 3.0.7) + builder (~> 2.1.2) + i18n (~> 0.5.0) + activerecord (3.0.7) + activemodel (= 3.0.7) + activesupport (= 3.0.7) + arel (~> 2.0.2) + tzinfo (~> 0.3.23) + activeresource (3.0.7) + activemodel (= 3.0.7) + activesupport (= 3.0.7) + activesupport (3.0.7) + arel (2.0.4) + builder (2.1.2) erubis (2.7.0) - execjs (1.4.0) - multi_json (~> 1.0) - ezcrypto (0.7.2) - haml (3.1.7) - hike (1.2.1) - i18n (0.6.1) - journey (1.0.4) - jquery-rails (2.2.0) - railties (>= 3.0, < 5.0) - thor (>= 0.14, < 2.0) - json (1.7.6) - mail (2.4.4) + i18n (0.5.0) + mail (2.2.18) + activesupport (>= 2.3.6) i18n (>= 0.4.0) - mime-types (~> 1.16) - treetop (~> 1.4.8) - mime-types (1.19) - multi_json (1.5.0) - mysql2 (0.3.11) - polyglot (0.3.3) - rack (1.4.4) - rack-cache (1.2) - rack (>= 0.4) - rack-ssl (1.3.3) - rack - rack-test (0.6.2) + mime-types (>= 1.16) + treetop (>= 1.4.8) + mime-types (1.16) + mysql2 (0.2.7) + polyglot (0.3.1) + rack (1.2.2) + rack-mount (0.7.3) + rack-test (0.5.7) rack (>= 1.0) - rails (3.2.11) - actionmailer (= 3.2.11) - actionpack (= 3.2.11) - activerecord (= 3.2.11) - activeresource (= 3.2.11) - activesupport (= 3.2.11) + rails (3.0.7) + actionmailer (= 3.0.7) + actionpack (= 3.0.7) + activerecord (= 3.0.7) + activeresource (= 3.0.7) + activesupport (= 3.0.7) bundler (~> 1.0) - railties (= 3.2.11) - railties (3.2.11) - actionpack (= 3.2.11) - activesupport (= 3.2.11) - rack-ssl (~> 1.3.2) + railties (= 3.0.7) + railties (3.0.7) + actionpack (= 3.0.7) + activesupport (= 3.0.7) rake (>= 0.8.7) - rdoc (~> 3.4) - thor (>= 0.14.6, < 2.0) - rake (10.0.3) - rdoc (3.12) - json (~> 1.4) - sass (3.2.5) - sass-rails (3.2.6) - railties (~> 3.2.0) - sass (>= 3.1.10) - tilt (~> 1.3) - sprockets (2.2.2) - hike (~> 1.2) - multi_json (~> 1.0) - rack (~> 1.0) - tilt (~> 1.1, != 1.3.0) - thor (0.17.0) - tilt (1.3.3) - treetop (1.4.12) - polyglot + thor (~> 0.14.4) + rake (0.8.7) + sqlite3 (1.3.3) + sqlite3-ruby (1.3.3) + sqlite3 (>= 1.3.3) + themes_for_rails (0.4.2) + rails (~> 3.0.0) + themes_for_rails + thor (0.14.6) + tmail (1.2.7.1) + treetop (1.4.9) polyglot (>= 0.3.1) - tzinfo (0.3.35) - uglifier (1.3.0) - execjs (>= 0.3.0) - multi_json (~> 1.0, >= 1.0.2) - will_paginate (3.0.4) + tzinfo (0.3.24) + will_paginate (2.3.15) PLATFORMS ruby DEPENDENCIES - bluecloth - calendar_view - coffee-rails - ezcrypto - haml - jquery-rails - json (>= 1.7.6) + arel mysql2 - rails (>= 3.2.11) - sass - sass-rails - uglifier + rails (= 3.0.7) + sqlite3-ruby + themes_for_rails + tmail will_paginate diff --git a/README.markdown b/README.markdown index 06c49cf..e63e407 100755 --- a/README.markdown +++ b/README.markdown @@ -1,38 +1,47 @@ -[![Dependency Status](https://gemnasium.com/musashimm/mailr.png)](https://gemnasium.com/musashimm/mailr) - ## Introduction -_MailR_ is a IMAP mail client based on _Ruby on Rails_ platform. +_Mailr_ is a IMAP mail client based on _Ruby on Rails_ platform. + +## Installation guide **NOTE** All path and filenames are based on _Rails.root_ directory. -## Requirements +### Requirements -In _Rails 3_ and above all dependencies should be defined in file _Gemfile_. All needed gems can be installed using bundler. +In _Rails 3_ all dependencies should be defined in file _Gemfile_. All needed gems can be installed using bundler. -## Installation procedure +### Installation procedure * Checkout the source code. -* Install all dependiences. Check if proper gems (sqlite3/mysql/postgresql) are defined in _Gemfile_ and installed. Use _bundler_ for that: -```shell -bundle install +* If you need to override some of the default constants used in the application take a look at _config/default_site.rb_. Then create _config/site.rb_ that contains only the keys which you want to override. Example content of _config/site.rb_ is: + +```ruby +module CDF + +LOCALCONFIG = { + :imap_server => 'your.imap.server' +} +end +``` + +* Configure SMTP settings + +```ruby +# initializers/smtp_settings.rb + ActionMailer::Base.smtp_settings = { + :address => "mail.example.com.py", + :port => 26, + :authentication => :plain, + :enable_starttls_auto => true, + :user_name => "emilio@example.com.py", + :password => "yourpass" +} ``` -* Check _config/settings.yml_ for proper values. (see _config/settings.yml.example_). * Prepare config/database.yml file (see _config/database.yml.example_). -* Migrate database (rake db:migrate) -* Start rails server if applicable -* Point your browser to application URL: - For local access: http://localhost:3000 - For remote access: http://some_url/mailr -* Using browser do basic setup. If You make a mistake delete all data from DB using rake task: + Check if proper gems (sqlite3/mysql/postgresql) are defined in _Gemfile_ and installed. -```shell -rake db:clear_data -``` +* Migrate database (rake db:migrate) * Use it. -## Specific configuration - -None diff --git a/Rakefile b/Rakefile index c1d2ddb..29283be 100755 --- a/Rakefile +++ b/Rakefile @@ -1,7 +1,7 @@ -#!/usr/bin/env rake # Add your own tasks in files placed in lib/tasks ending in .rake, # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. require File.expand_path('../config/application', __FILE__) +require 'rake' Mailr::Application.load_tasks diff --git a/TODO.markdown b/TODO.markdown deleted file mode 100755 index f1d3348..0000000 --- a/TODO.markdown +++ /dev/null @@ -1,21 +0,0 @@ -## Todo - - * add themes - -app/controllers/folders_controller.rb: - - * [ 29] [TODO] recreate local copy of folders - * [ 98] [TODO] save system folders - -app/controllers/messages_controller.rb: - - * [101] [FIXME] missing fields and support arrays - -app/controllers/messages_ops_controller.rb: - - * [261] [FIXME] edit does not support attachments - * [325] [TODO] check if email address is valid if not get address from contacts - -app/models/prefs.rb: - - * [ 21] [TODO] move refresh to prefs and make refresh page with messages diff --git a/UNLICENSE.markdown b/UNLICENSE similarity index 99% rename from UNLICENSE.markdown rename to UNLICENSE index d5d5664..68a49da 100755 --- a/UNLICENSE.markdown +++ b/UNLICENSE @@ -1,5 +1,3 @@ -## License - This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or diff --git a/app/assets/images/glyphicons-halflings-white.png b/app/assets/images/glyphicons-halflings-white.png deleted file mode 100755 index a20760b..0000000 Binary files a/app/assets/images/glyphicons-halflings-white.png and /dev/null differ diff --git a/app/assets/images/glyphicons-halflings.png b/app/assets/images/glyphicons-halflings.png deleted file mode 100755 index 92d4445..0000000 Binary files a/app/assets/images/glyphicons-halflings.png and /dev/null differ diff --git a/app/assets/images/logo.png b/app/assets/images/logo.png deleted file mode 100755 index 28b9079..0000000 Binary files a/app/assets/images/logo.png and /dev/null differ diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js deleted file mode 100755 index 9097d83..0000000 --- a/app/assets/javascripts/application.js +++ /dev/null @@ -1,15 +0,0 @@ -// This is a manifest file that'll be compiled into application.js, which will include all the files -// listed below. -// -// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, -// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path. -// -// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the -// the compiled file. -// -// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD -// GO AFTER THE REQUIRES BELOW. -// -//= require jquery -//= require jquery_ujs -//= require_tree . diff --git a/app/assets/javascripts/bootstrap.min.js b/app/assets/javascripts/bootstrap.min.js deleted file mode 100755 index 97dc88e..0000000 --- a/app/assets/javascripts/bootstrap.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(a){a(function(){"use strict",a.support.transition=function(){var b=document.body||document.documentElement,c=b.style,d=c.transition!==undefined||c.WebkitTransition!==undefined||c.MozTransition!==undefined||c.MsTransition!==undefined||c.OTransition!==undefined;return d&&{end:function(){var b="TransitionEnd";return a.browser.webkit?b="webkitTransitionEnd":a.browser.mozilla?b="transitionend":a.browser.opera&&(b="oTransitionEnd"),b}()}}()})}(window.jQuery),!function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype={constructor:c,close:function(b){function f(){e.trigger("closed").remove()}var c=a(this),d=c.attr("data-target"),e;d||(d=c.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),e=a(d),e.trigger("close"),b&&b.preventDefault(),e.length||(e=c.hasClass("alert")?c:c.parent()),e.trigger("close").removeClass("in"),a.support.transition&&e.hasClass("fade")?e.on(a.support.transition.end,f):f()}},a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("alert");e||d.data("alert",e=new c(this)),typeof b=="string"&&e[b].call(d)})},a.fn.alert.Constructor=c,a(function(){a("body").on("click.alert.data-api",b,c.prototype.close)})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.button.defaults,c)};b.prototype={constructor:b,setState:function(a){var b="disabled",c=this.$element,d=c.data(),e=c.is("input")?"val":"html";a+="Text",d.resetText||c.data("resetText",c[e]()),c[e](d[a]||this.options[a]),setTimeout(function(){a=="loadingText"?c.addClass(b).attr(b,b):c.removeClass(b).removeAttr(b)},0)},toggle:function(){var a=this.$element.parent('[data-toggle="buttons-radio"]');a&&a.find(".active").removeClass("active"),this.$element.toggleClass("active")}},a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("button"),f=typeof c=="object"&&c;e||d.data("button",e=new b(this,f)),c=="toggle"?e.toggle():c&&e.setState(c)})},a.fn.button.defaults={loadingText:"loading..."},a.fn.button.Constructor=b,a(function(){a("body").on("click.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle")})})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.carousel.defaults,c),this.options.slide&&this.slide(this.options.slide)};b.prototype={cycle:function(){return this.interval=setInterval(a.proxy(this.next,this),this.options.interval),this},to:function(b){var c=this.$element.find(".active"),d=c.parent().children(),e=d.index(c),f=this;if(b>d.length-1||b<0)return;return this.sliding?this.$element.one("slid",function(){f.to(b)}):e==b?this.pause().cycle():this.slide(b>e?"next":"prev",a(d[b]))},pause:function(){return clearInterval(this.interval),this.interval=null,this},next:function(){if(this.sliding)return;return this.slide("next")},prev:function(){if(this.sliding)return;return this.slide("prev")},slide:function(b,c){var d=this.$element.find(".active"),e=c||d[b](),f=this.interval,g=b=="next"?"left":"right",h=b=="next"?"first":"last",i=this;if(!e.length)return;return this.sliding=!0,f&&this.pause(),e=e.length?e:this.$element.find(".item")[h](),!a.support.transition&&this.$element.hasClass("slide")?(this.$element.trigger("slide"),d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid")):(e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),this.$element.trigger("slide"),this.$element.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid")},0)})),f&&this.cycle(),this}},a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("carousel"),f=typeof c=="object"&&c;e||d.data("carousel",e=new b(this,f)),typeof c=="number"?e.to(c):typeof c=="string"||(c=f.slide)?e[c]():e.cycle()})},a.fn.carousel.defaults={interval:5e3},a.fn.carousel.Constructor=b,a(function(){a("body").on("click.carousel.data-api","[data-slide]",function(b){var c=a(this),d,e=a(c.attr("data-target")||(d=c.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,"")),f=!e.data("modal")&&a.extend({},e.data(),c.data());e.carousel(f),b.preventDefault()})})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.collapse.defaults,c),this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.prototype={constructor:b,dimension:function(){var a=this.$element.hasClass("width");return a?"width":"height"},show:function(){var b=this.dimension(),c=a.camelCase(["scroll",b].join("-")),d=this.$parent&&this.$parent.find(".in"),e;d&&d.length&&(e=d.data("collapse"),d.collapse("hide"),e||d.data("collapse",null)),this.$element[b](0),this.transition("addClass","show","shown"),this.$element[b](this.$element[0][c])},hide:function(){var a=this.dimension();this.reset(this.$element[a]()),this.transition("removeClass","hide","hidden"),this.$element[a](0)},reset:function(a){var b=this.dimension();this.$element.removeClass("collapse")[b](a||"auto")[0].offsetWidth,this.$element.addClass("collapse")},transition:function(b,c,d){var e=this,f=function(){c=="show"&&e.reset(),e.$element.trigger(d)};this.$element.trigger(c)[b]("in"),a.support.transition&&this.$element.hasClass("collapse")?this.$element.one(a.support.transition.end,f):f()},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}},a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("collapse"),f=typeof c=="object"&&c;e||d.data("collapse",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.collapse.defaults={toggle:!0},a.fn.collapse.Constructor=b,a(function(){a("body").on("click.collapse.data-api","[data-toggle=collapse]",function(b){var c=a(this),d,e=c.attr("data-target")||b.preventDefault()||(d=c.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""),f=a(e).data("collapse")?"toggle":c.data();a(e).collapse(f)})})}(window.jQuery),!function(a){function d(){a(b).parent().removeClass("open")}"use strict";var b='[data-toggle="dropdown"]',c=function(b){var c=a(b).on("click.dropdown.data-api",this.toggle);a("html").on("click.dropdown.data-api",function(){c.parent().removeClass("open")})};c.prototype={constructor:c,toggle:function(b){var c=a(this),e=c.attr("data-target"),f,g;return e||(e=c.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,"")),f=a(e),f.length||(f=c.parent()),g=f.hasClass("open"),d(),!g&&f.toggleClass("open"),!1}},a.fn.dropdown=function(b){return this.each(function(){var d=a(this),e=d.data("dropdown");e||d.data("dropdown",e=new c(this)),typeof b=="string"&&e[b].call(d)})},a.fn.dropdown.Constructor=c,a(function(){a("html").on("click.dropdown.data-api",d),a("body").on("click.dropdown.data-api",b,c.prototype.toggle)})}(window.jQuery),!function(a){function c(){var b=this,c=setTimeout(function(){b.$element.off(a.support.transition.end),d.call(b)},500);this.$element.one(a.support.transition.end,function(){clearTimeout(c),d.call(b)})}function d(a){this.$element.hide().trigger("hidden"),e.call(this)}function e(b){var c=this,d=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var e=a.support.transition&&d;this.$backdrop=a('