From 0baf707b4417381e3f68e665400294e89d658197 Mon Sep 17 00:00:00 2001 From: Dan Rice Date: Thu, 2 Oct 2014 11:37:31 -0400 Subject: [PATCH 1/8] Use badges targeting 2.3_branch --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 631901f4..c9acf5ab 100644 --- a/README.md +++ b/README.md @@ -11,9 +11,7 @@ * Contributors: https://github.com/TracksApp/tracks/wiki/Contributors * Version: 2.3devel -[![Build Status](https://travis-ci.org/TracksApp/tracks.svg?branch=master)](https://travis-ci.org/TracksApp/tracks) -[![Code Climate](https://codeclimate.com/github/TracksApp/tracks/badges/gpa.svg)](https://codeclimate.com/github/TracksApp/tracks) -[![Dependency Status](https://gemnasium.com/TracksApp/tracks.svg)](https://gemnasium.com/TracksApp/tracks) +[![Build Status](https://travis-ci.org/TracksApp/tracks.svg?branch=2.3_branch)](https://travis-ci.org/TracksApp/tracks) Full instructions for both new installations and upgrades from older installations of Tracks can be found within the /doc directory. From 7014c8a0d404b7bb099c9031606e741b6d4cdcb7 Mon Sep 17 00:00:00 2001 From: Dan Rice Date: Thu, 2 Oct 2014 11:52:50 -0400 Subject: [PATCH 2/8] Add pessimistic version constraints for all gems --- Gemfile | 66 ++++++++++++++++++++++++++-------------------------- Gemfile.lock | 64 +++++++++++++++++++++++++------------------------- 2 files changed, 65 insertions(+), 65 deletions(-) diff --git a/Gemfile b/Gemfile index 3b24881a..1ab1db7e 100644 --- a/Gemfile +++ b/Gemfile @@ -1,36 +1,36 @@ source 'https://rubygems.org' -gem 'rails', '~>4.1.6' -gem 'sass-rails', '~>4.0' -gem 'coffee-rails', '~>4.0' +gem 'rails', '~> 4.1.6' +gem 'sass-rails', '~> 4.0.3' +gem 'coffee-rails', '~> 4.0.1' #gem 'json' # todo: remove xml api -gem 'actionpack-xml_parser', '>=1.0.1' +gem 'actionpack-xml_parser', '~> 1.0.1' # See https://github.com/sstephenson/execjs#readme for more supported runtimes gem 'therubyracer' -gem 'uglifier', '>=1.3.0' +gem 'uglifier', '~> 2.5.3' -gem 'jquery-rails' +gem 'jquery-rails', '~> 3.1.2' # you may comment out the database driver you will not be using. # This will prevent a native build of the driver. Building native drivers is not # always possible on all hosters -gem "sqlite3" -gem "mysql2" +gem "sqlite3", "~> 1.3.9" +gem "mysql2", "~> 0.3.16" -gem "RedCloth" -gem "sanitize" -gem "will_paginate" -gem "acts_as_list" -gem "aasm" -gem "htmlentities" -gem "swf_fu" -gem "rails_autolink" -gem "cache_digests" +gem "RedCloth", "~> 4.2.9" +gem "sanitize", "~> 3.0.2" +gem "will_paginate", "~> 3.0.7" +gem "acts_as_list", "~> 0.4.0" +gem "aasm", "~> 3.4.0" +gem "htmlentities", "~> 4.3.2" +gem "swf_fu", "~> 2.0.4" +gem "rails_autolink", "~> 1.1.6" +gem "cache_digests", "~> 0.3.1" # To use ActiveModel has_secure_password gem 'bcrypt', '~> 3.1.7' @@ -42,27 +42,27 @@ gem 'bcrypt', '~> 3.1.7' # gem 'jbuilder', '~> 1.2' group :development do - gem "spring" - gem "spring-commands-cucumber" - gem "yard" + gem "spring", "~> 1.1.3" + gem "spring-commands-cucumber", "~> 1.0.1" + gem "yard", "~> 0.8.7.4" gem 'tolk', '~> 1.6.0' - gem "bullet" - gem "rack-mini-profiler" - gem "rack-dev-mark" - gem "activerecord-deprecated_finders" + gem "bullet", "~> 4.13.2" + gem "rack-mini-profiler", "~> 0.9.2" + gem "rack-dev-mark", "0.7.3" + gem "activerecord-deprecated_finders", "~> 1.0.3" end group :test do - gem "factory_girl_rails" - gem "capybara" - gem "cucumber-rails", :require => false - gem "rspec-expectations" - gem "database_cleaner" - gem "mocha", :require => false + gem "factory_girl_rails", "~> 4.4.1" + gem "capybara", "~> 2.4.3" + gem "cucumber-rails", "~> 1.4.1", :require => false + gem "rspec-expectations", "~> 3.1.2" + gem "database_cleaner", "~> 1.3.0" + gem "mocha", "~> 1.1.0", :require => false - gem "aruba", ">=0.5.4", :require => false + gem "aruba", "~> 0.6.1", :require => false # Note that > 2.14 has problems, see: # https://code.google.com/p/selenium/issues/detail?id=3075 @@ -75,7 +75,7 @@ group :test do #gem "capybara-screenshot" #gem "launchy" - gem "simplecov" + gem "simplecov", "~> 0.9.1" # get test coverage info on codeclimate - gem "codeclimate-test-reporter", group: :test, require: nil + gem "codeclimate-test-reporter", "~> 0.4.1", group: :test, require: nil end diff --git a/Gemfile.lock b/Gemfile.lock index 2fa70c23..4605c8cf 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -207,40 +207,40 @@ PLATFORMS ruby DEPENDENCIES - RedCloth - aasm - actionpack-xml_parser (>= 1.0.1) - activerecord-deprecated_finders - acts_as_list - aruba (>= 0.5.4) + RedCloth (~> 4.2.9) + aasm (~> 3.4.0) + actionpack-xml_parser (~> 1.0.1) + activerecord-deprecated_finders (~> 1.0.3) + acts_as_list (~> 0.4.0) + aruba (~> 0.6.1) bcrypt (~> 3.1.7) - bullet - cache_digests - capybara - codeclimate-test-reporter - coffee-rails (~> 4.0) - cucumber-rails - database_cleaner - factory_girl_rails - htmlentities - jquery-rails - mocha - mysql2 - rack-dev-mark - rack-mini-profiler + bullet (~> 4.13.2) + cache_digests (~> 0.3.1) + capybara (~> 2.4.3) + codeclimate-test-reporter (~> 0.4.1) + coffee-rails (~> 4.0.1) + cucumber-rails (~> 1.4.1) + database_cleaner (~> 1.3.0) + factory_girl_rails (~> 4.4.1) + htmlentities (~> 4.3.2) + jquery-rails (~> 3.1.2) + mocha (~> 1.1.0) + mysql2 (~> 0.3.16) + rack-dev-mark (= 0.7.3) + rack-mini-profiler (~> 0.9.2) rails (~> 4.1.6) - rails_autolink - rspec-expectations - sanitize - sass-rails (~> 4.0) + rails_autolink (~> 1.1.6) + rspec-expectations (~> 3.1.2) + sanitize (~> 3.0.2) + sass-rails (~> 4.0.3) selenium-webdriver - simplecov - spring - spring-commands-cucumber - sqlite3 - swf_fu + simplecov (~> 0.9.1) + spring (~> 1.1.3) + spring-commands-cucumber (~> 1.0.1) + sqlite3 (~> 1.3.9) + swf_fu (~> 2.0.4) therubyracer tolk (~> 1.6.0) - uglifier (>= 1.3.0) - will_paginate - yard + uglifier (~> 2.5.3) + will_paginate (~> 3.0.7) + yard (~> 0.8.7.4) From f6195905411b8a4b74631d17064200a1967fa208 Mon Sep 17 00:00:00 2001 From: Dan Rice Date: Thu, 2 Oct 2014 11:53:34 -0400 Subject: [PATCH 3/8] Version 2.3.rc1 --- README.md | 2 +- config/initializers/tracks.rb | 6 +++--- doc/CHANGELOG.md | 2 +- doc/upgrading.md | 12 +++++------- 4 files changed, 10 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index c9acf5ab..d78b730e 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ * IRC channel: #tracks on Freenode * Original developer: bsag (http://www.rousette.org.uk/) * Contributors: https://github.com/TracksApp/tracks/wiki/Contributors -* Version: 2.3devel +* Version: 2.3.rc1 [![Build Status](https://travis-ci.org/TracksApp/tracks.svg?branch=2.3_branch)](https://travis-ci.org/TracksApp/tracks) diff --git a/config/initializers/tracks.rb b/config/initializers/tracks.rb index 4b5b766e..cb13c93a 100644 --- a/config/initializers/tracks.rb +++ b/config/initializers/tracks.rb @@ -1,7 +1,7 @@ -tracks_version='2.3devel' +tracks_version='2.3.rc1' # comment out next two lines if you do not want (or can not) the date of the # last git commit in the footer -info=`git log --pretty=format:"%ai" -1` -tracks_version=tracks_version + ' ('+info+')' +#info=`git log --pretty=format:"%ai" -1` +#tracks_version=tracks_version + ' ('+info+')' TRACKS_VERSION=tracks_version diff --git a/doc/CHANGELOG.md b/doc/CHANGELOG.md index b3da5e4e..927d06cc 100644 --- a/doc/CHANGELOG.md +++ b/doc/CHANGELOG.md @@ -1,4 +1,4 @@ -## Version 2.3devel +## Version 2.3 ### New and changed features * Numerous bug fixes diff --git a/doc/upgrading.md b/doc/upgrading.md index 1818857d..21dd89b4 100644 --- a/doc/upgrading.md +++ b/doc/upgrading.md @@ -1,18 +1,16 @@ # Upgrading Tracks -## Upgrading from Tracks 2.2 to 2.3devel +## Upgrading from Tracks 2.2 to 2.3 -WARNING: 2.3devel is a development tree of Tracks and may (will?) contain bugs that might destroy your data! It is not recommended to upgrade to 2.3devel unless you know what you are doing. - -That said. To upgrade: +To upgrade: 1. Back up your existing database and installation of Tracks -2. Install Tracks 2.3devel in a new directory. Or you can create a separate installation of 2.3 for testing purposes. -3. Copy over the configuration from your previous Tracks installation. If using SQLite3, copy the old database into the new Tracks 2.3devel directory. +2. Install Tracks 2.3 in a new directory. Or you can create a separate installation of 2.3 for testing purposes. +3. Copy over the configuration from your previous Tracks installation. If using SQLite3, copy the old database into the new Tracks 2.3 directory. 4. Check that you have all dependencies installed: `bundle install --without development test` Or leave out the `--without development test` part if you intend to test or develop on this tree. 5. Run `bundle exec rake db:migrate RAILS_ENV=production` to update your old database to the new schema. This is the point of no return. Make sure you have backups! 6. Precompile your static assets (css, javascript, etc.) by running `bundle exec rake assets:precompile RAILS_ENV=production`. -7. Run `bundle exec rails server -e production` inside your Tracks 2.3devel directory to start up Tracks. Or use `-e development` if you intend to try your changes and get more log info. +7. Run `bundle exec rails server -e production` inside your Tracks 2.3 directory to start up Tracks. Or use `-e development` if you intend to try your changes and get more log info. Please note that if you intend to use Tracks with the built in webserver called WEBrick for production, you’ll need to change `config.serve_static_assets` to `true` in `config/environments/production.rb` in order for the images, stylesheets, and javascript files to be served correctly. From 595aa1458559426af588a28056e323346d296bd1 Mon Sep 17 00:00:00 2001 From: Dan Rice Date: Thu, 2 Oct 2014 12:41:56 -0400 Subject: [PATCH 4/8] Ruby >=1.9.3 is required for Rails 4.1 [ci skip] --- doc/installation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/installation.md b/doc/installation.md index 7bca7e91..1d29cf6e 100644 --- a/doc/installation.md +++ b/doc/installation.md @@ -18,7 +18,7 @@ If you are not confident installing Tracks from source using these instructions, Tracks has a few software requirements that must be satisfied before installation: -1. **Ruby**. Tracks requires Ruby 1.9.2 or greater. +1. **Ruby**. Tracks requires Ruby 1.9.3 or greater. 2. **Bundler**. Tracks requires a recent version of [Bundler](http://bundler.io) to handle the installation of dependencies. Bundler is typically installed by running `gem install bundler`. 3. **Database**. Tracks is tested on [MySQL](http://www.mysql.com/), but [SQLite](http://www.sqlite.org/) and [PostgreSQL](http://www.postgresql.org/) can also be used. Of the three, SQLite requires the least configuration. Whatever your choice, the appropriate database software must be installed. From 166387f0bed8ae5ca8223ed42f7c0c342c2cceec Mon Sep 17 00:00:00 2001 From: Reinier Balt Date: Wed, 5 Nov 2014 17:07:21 +0100 Subject: [PATCH 5/8] Statistics for longest running projects now includes completed and hidden projects. fixes #1725 --- app/models/project.rb | 8 ++++ app/models/stats/projects.rb | 9 +++- app/views/stats/_chart.html.erb | 2 +- app/views/stats/_projects.html.erb | 3 +- app/views/stats/_projects_list.html.erb | 3 +- test/models/project_test.rb | 59 ++++++++++++++++--------- 6 files changed, 57 insertions(+), 27 deletions(-) diff --git a/app/models/project.rb b/app/models/project.rb index d313905a..94300fef 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -138,6 +138,14 @@ class Project < ActiveRecord::Base @age_in_days ||= (Time.current.to_date - created_at.to_date).to_i + 1 end + def running_time + if completed_at.nil? + return age_in_days + else + return (completed_at.to_date - created_at.to_date).to_i + 1 + end + end + def self.import(filename, params, user) count = 0 CSV.foreach(filename, headers: true) do |row| diff --git a/app/models/stats/projects.rb b/app/models/stats/projects.rb index 45b437f4..d4a1f73b 100644 --- a/app/models/stats/projects.rb +++ b/app/models/stats/projects.rb @@ -7,7 +7,7 @@ module Stats end def runtime - @runtime ||= user.projects.active.order('created_at ASC').limit(10) + @runtime ||= find_top10_longest_running_projects end def actions @@ -18,5 +18,12 @@ module Stats @actions_last30days ||= Stats::TopProjectsQuery.new(user, 1.month.ago.beginning_of_day).result end + private + + def find_top10_longest_running_projects + projects = user.projects.order('created_at ASC') + projects.sort{|a,b| b.running_time <=> a.running_time}.take(10) + end + end end diff --git a/app/views/stats/_chart.html.erb b/app/views/stats/_chart.html.erb index d0d581c2..ecb45698 100644 --- a/app/views/stats/_chart.html.erb +++ b/app/views/stats/_chart.html.erb @@ -1,5 +1,5 @@ <% @swf_count ||= 0 -%> -
<%= swf_tag asset_path("open-flash-chart.swf"), +
<%= swf_tag "open-flash-chart.swf", :flashvars => { 'width' => chart.width, 'height' => chart.height, 'data' => url_for(:action => chart.action)}, :parameters => { 'allowScriptAccess' => 'sameDomain', 'wmode' => 'transparent'}, :div_id => "chart_#{@swf_count+=1}", diff --git a/app/views/stats/_projects.html.erb b/app/views/stats/_projects.html.erb index 918fc128..1d75b847 100644 --- a/app/views/stats/_projects.html.erb +++ b/app/views/stats/_projects.html.erb @@ -2,5 +2,4 @@ <%= render :partial => 'projects_list', :locals => {:projects => projects.actions_last30days, :key => 'projects_30days', :n => :count} -%> -<%= render :partial => 'projects_list', :locals => {:projects => projects.runtime, :key => 'longrunning', :n => :age_in_days} -%> - +<%= render :partial => 'projects_list', :locals => {:projects => projects.runtime, :key => 'longrunning', :n => :running_time, :i18n_key => "days_midsentence"} -%> diff --git a/app/views/stats/_projects_list.html.erb b/app/views/stats/_projects_list.html.erb index eddf1737..ee582eb5 100644 --- a/app/views/stats/_projects_list.html.erb +++ b/app/views/stats/_projects_list.html.erb @@ -1,7 +1,8 @@ +<%- i18n_key ||= "actions_midsentence" -%>

<%= t("stats.top10_#{key}") %>

<% projects.each_with_index do |p, i| -%> - <%= i + 1 -%> - <%= link_to p.name, project_path(p) %> (<%=p.send(n)%> <%= t('common.actions_midsentence', :count => p.send(n)) %>)
+ <%= i + 1 -%> - <%= link_to p.name, project_path(p) %> (<%=p.send(n)%> <%= t("common.#{i18n_key}", :count => p.send(n)) %>)
<% end -%> <%= render :partial => 'null_list_item', :locals => {:from => projects.size + 1, :to => 10} -%>
diff --git a/test/models/project_test.rb b/test/models/project_test.rb index e2f7b5b2..19186150 100644 --- a/test/models/project_test.rb +++ b/test/models/project_test.rb @@ -2,40 +2,40 @@ require 'test_helper' class ProjectTest < ActiveSupport::TestCase fixtures :projects, :contexts, :todos, :recurring_todos, :users, :preferences - + def setup @timemachine = projects(:timemachine) @moremoney = projects(:moremoney) end - + # associations - + def test_has_default_context assert !@timemachine.default_context.nil? assert @timemachine.default_context.name == contexts(:lab).name - + p = Project.new assert_equal '', p.default_context.name p.default_context = contexts(:agenda) assert_equal 'agenda', p.default_context.name end - + # validations - + def test_validate_presence_of_name @timemachine.name = "" assert !@timemachine.save assert_equal 1, @timemachine.errors.count assert_equal "project must have a name", @timemachine.errors[:name][0] end - + def test_validate_name_is_less_than_256 @timemachine.name = generate_random_string(256) assert !@timemachine.save assert_equal 1, @timemachine.errors.count assert_equal "project name must be less than 256 characters", @timemachine.errors[:name][0] end - + def test_validate_name_is_unique newproj = Project.new newproj.name = projects(:timemachine).name @@ -44,20 +44,20 @@ class ProjectTest < ActiveSupport::TestCase assert_equal 1, newproj.errors.count assert_equal "already exists", newproj.errors[:name][0] end - + # state machine - + def test_project_initial_state_is_active assert_equal :active, @timemachine.aasm.current_state assert @timemachine.active? end - + def test_hide_project @timemachine.hide! assert_equal :hidden, @timemachine.aasm.current_state assert @timemachine.hidden? end - + def test_activate_project @timemachine.activate! assert_equal :active, @timemachine.aasm.current_state @@ -81,7 +81,7 @@ class ProjectTest < ActiveSupport::TestCase end # other tests - + def test_review_project assert_nil @timemachine.last_reviewed assert @timemachine.needs_review?(users(:admin_user)) @@ -100,7 +100,7 @@ class ProjectTest < ActiveSupport::TestCase assert_not_nil @timemachine.completed_at, "completed_at not expected to be nil" assert_in_delta Time.now, @timemachine.completed_at, 1 end - + def test_delete_project_deletes_todos_within_it assert_equal 3, @timemachine.todos.count timemachine_todo_ids = @timemachine.todos.map{ |t| t.id } @@ -109,7 +109,7 @@ class ProjectTest < ActiveSupport::TestCase assert !Todo.exists?(t_id) end end - + def test_deferred_todos assert_equal 1, @timemachine.todos.deferred.size t = @timemachine.todos.not_completed[0] @@ -117,7 +117,7 @@ class ProjectTest < ActiveSupport::TestCase t.save! assert_equal 2, Project.find(@timemachine.id).todos.deferred.size end - + def test_to_param_returns_id assert_equal '1', @timemachine.to_param end @@ -129,29 +129,29 @@ class ProjectTest < ActiveSupport::TestCase assert_nil p.id assert_equal "", p.name end - + def test_name_removes_extra_spaces newproj = Project.new newproj.name = "These Words Have Proximity Issues " assert newproj.save assert_equal 0, newproj.errors.count assert_equal "These Words Have Proximity Issues", newproj.name - + # and on update... @timemachine.name = " a time machine needs lots of spaaaaaaace " assert @timemachine.save assert_equal "a time machine needs lots of spaaaaaaace", @timemachine.name end - + def test_deferred_todo_count assert_equal 1, @timemachine.todos.deferred.count assert_equal 0, @moremoney.todos.deferred.count - + first_todo = @moremoney.todos[0] first_todo.show_from = Time.zone.now + 1.week first_todo.save! assert_equal :deferred, @moremoney.todos[0].aasm.current_state - + assert_equal 1, @moremoney.todos.deferred.count end @@ -233,9 +233,24 @@ class ProjectTest < ActiveSupport::TestCase p2 = users(:admin_user).projects.create!(:name => "test7") p2.created_at = 1.week.ago p2.save! - + p2.reload assert_equal 8, p2.age_in_days end + def test_running_time + p = users(:admin_user).projects.create!(:name => "test8") + p.created_at = 1.week.ago + p.save! + + p.reload + assert_equal 8, p.running_time + + p.completed_at = 4.days.ago + p.save! + + p.reload + assert_equal 4, p.running_time + end + end From 280d394aa41362c83bf55b397faf606c6192a2bc Mon Sep 17 00:00:00 2001 From: Reinier Balt Date: Wed, 5 Nov 2014 17:10:43 +0100 Subject: [PATCH 6/8] update Gemfile --- Gemfile.lock | 102 +++++++++++++++++++++++++-------------------------- 1 file changed, 51 insertions(+), 51 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 4605c8cf..2b8a301e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -3,30 +3,30 @@ GEM specs: RedCloth (4.2.9) aasm (3.4.0) - actionmailer (4.1.6) - actionpack (= 4.1.6) - actionview (= 4.1.6) + actionmailer (4.1.7) + actionpack (= 4.1.7) + actionview (= 4.1.7) mail (~> 2.5, >= 2.5.4) - actionpack (4.1.6) - actionview (= 4.1.6) - activesupport (= 4.1.6) + actionpack (4.1.7) + actionview (= 4.1.7) + activesupport (= 4.1.7) rack (~> 1.5.2) rack-test (~> 0.6.2) actionpack-xml_parser (1.0.1) actionpack (>= 4.0.0.rc1) - actionview (4.1.6) - activesupport (= 4.1.6) + actionview (4.1.7) + activesupport (= 4.1.7) builder (~> 3.1) erubis (~> 2.7.0) - activemodel (4.1.6) - activesupport (= 4.1.6) + activemodel (4.1.7) + activesupport (= 4.1.7) builder (~> 3.1) - activerecord (4.1.6) - activemodel (= 4.1.6) - activesupport (= 4.1.6) + activerecord (4.1.7) + activemodel (= 4.1.7) + activesupport (= 4.1.7) arel (~> 5.0.0) activerecord-deprecated_finders (1.0.3) - activesupport (4.1.6) + activesupport (4.1.7) i18n (~> 0.6, >= 0.6.9) json (~> 1.7, >= 1.7.7) minitest (~> 5.1) @@ -39,7 +39,7 @@ GEM childprocess (>= 0.3.6) cucumber (>= 1.1.1) rspec-expectations (>= 2.7.0) - bcrypt (3.1.7) + bcrypt (3.1.9) builder (3.2.2) bullet (4.13.2) activesupport (>= 3.0.0) @@ -47,13 +47,13 @@ GEM cache_digests (0.3.1) actionpack (>= 3.2) thread_safe - capybara (2.4.3) + capybara (2.4.4) mime-types (>= 1.16) nokogiri (>= 1.3.3) rack (>= 1.0.0) rack-test (>= 0.5.4) xpath (~> 2.0) - childprocess (0.5.3) + childprocess (0.5.5) ffi (~> 1.0, >= 1.0.11) codeclimate-test-reporter (0.4.1) simplecov (>= 0.7.1, < 1.0.0) @@ -63,31 +63,31 @@ GEM coffee-script (2.3.0) coffee-script-source execjs - coffee-script-source (1.7.1) + coffee-script-source (1.8.0) crass (0.2.1) - cucumber (1.3.16) + cucumber (1.3.17) builder (>= 2.1.2) diff-lcs (>= 1.1.3) gherkin (~> 2.12) multi_json (>= 1.7.5, < 2.0) multi_test (>= 0.1.1) - cucumber-rails (1.4.1) + cucumber-rails (1.4.2) capybara (>= 1.1.2, < 3) cucumber (>= 1.3.8, < 2) - mime-types (~> 1.16) + mime-types (>= 1.16, < 3) nokogiri (~> 1.5) rails (>= 3, < 5) database_cleaner (1.3.0) diff-lcs (1.2.5) docile (1.1.5) erubis (2.7.0) - execjs (2.2.1) + execjs (2.2.2) factory_girl (4.4.0) activesupport (>= 3.0.0) factory_girl_rails (4.4.1) factory_girl (~> 4.4.0) railties (>= 3.0.0) - ffi (1.9.3) + ffi (1.9.6) gherkin (2.12.2) multi_json (~> 1.3) hike (1.2.3) @@ -97,20 +97,20 @@ GEM railties (>= 3.0, < 5.0) thor (>= 0.14, < 2.0) json (1.8.1) - libv8 (3.16.14.3) - mail (2.6.1) + libv8 (3.16.14.7) + mail (2.6.3) mime-types (>= 1.16, < 3) metaclass (0.0.4) - mime-types (1.25.1) - mini_portile (0.6.0) + mime-types (2.4.3) + mini_portile (0.6.1) minitest (5.4.2) mocha (1.1.0) metaclass (~> 0.0.1) multi_json (1.10.1) multi_test (0.1.1) mysql2 (0.3.16) - nokogiri (1.6.3.1) - mini_portile (= 0.6.0) + nokogiri (1.6.4) + mini_portile (~> 0.6.0) nokogumbo (1.1.12) nokogiri rack (1.5.2) @@ -120,21 +120,21 @@ GEM rack (>= 1.1.3) rack-test (0.6.2) rack (>= 1.0) - rails (4.1.6) - actionmailer (= 4.1.6) - actionpack (= 4.1.6) - actionview (= 4.1.6) - activemodel (= 4.1.6) - activerecord (= 4.1.6) - activesupport (= 4.1.6) + rails (4.1.7) + actionmailer (= 4.1.7) + actionpack (= 4.1.7) + actionview (= 4.1.7) + activemodel (= 4.1.7) + activerecord (= 4.1.7) + activesupport (= 4.1.7) bundler (>= 1.3.0, < 2.0) - railties (= 4.1.6) + railties (= 4.1.7) sprockets-rails (~> 2.0) rails_autolink (1.1.6) rails (> 3.1) - railties (4.1.6) - actionpack (= 4.1.6) - activesupport (= 4.1.6) + railties (4.1.7) + actionpack (= 4.1.7) + activesupport (= 4.1.7) rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) rake (10.3.2) @@ -142,20 +142,20 @@ GEM rspec-expectations (3.1.2) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.1.0) - rspec-support (3.1.1) + rspec-support (3.1.2) rubyzip (1.1.6) safe_yaml (1.0.4) - sanitize (3.0.2) + sanitize (3.0.3) crass (~> 0.2.0) nokogiri (>= 1.4.4) nokogumbo (= 1.1.12) sass (3.2.19) - sass-rails (4.0.3) + sass-rails (4.0.4) railties (>= 4.0.0, < 5.0) - sass (~> 3.2.0) - sprockets (~> 2.8, <= 2.11.0) + sass (~> 3.2.2) + sprockets (~> 2.8, < 2.12) sprockets-rails (~> 2.0) - selenium-webdriver (2.43.0) + selenium-webdriver (2.44.0) childprocess (~> 0.5) multi_json (~> 1.0) rubyzip (~> 1.0) @@ -168,16 +168,16 @@ GEM spring (1.1.3) spring-commands-cucumber (1.0.1) spring (>= 0.9.1) - sprockets (2.11.0) + sprockets (2.11.3) hike (~> 1.2) multi_json (~> 1.0) rack (~> 1.0) tilt (~> 1.1, != 1.3.0) - sprockets-rails (2.1.4) + sprockets-rails (2.2.0) actionpack (>= 3.0) activesupport (>= 3.0) - sprockets (~> 2.8) - sqlite3 (1.3.9) + sprockets (>= 2.8, < 4.0) + sqlite3 (1.3.10) swf_fu (2.0.4) coffee-script rails (>= 3.1) @@ -201,7 +201,7 @@ GEM will_paginate (3.0.7) xpath (2.0.0) nokogiri (~> 1.3) - yard (0.8.7.4) + yard (0.8.7.6) PLATFORMS ruby From 13f8023ca042ae02d0df66e8055ae4bcd1e364e9 Mon Sep 17 00:00:00 2001 From: Matteo Giaccone Date: Fri, 19 Dec 2014 19:09:37 +0000 Subject: [PATCH 7/8] Fix #1724 --- app/models/todo.rb | 2 +- test/models/todo_test.rb | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/app/models/todo.rb b/app/models/todo.rb index e40139aa..88178891 100644 --- a/app/models/todo.rb +++ b/app/models/todo.rb @@ -45,7 +45,7 @@ class Todo < ActiveRecord::Base # other scopes scope :are_due, -> { where 'NOT (todos.due IS NULL)' } scope :due_today, -> { where("todos.due <= ?", Time.zone.now) } - scope :with_tag, lambda { |tag_id| joins("INNER JOIN taggings ON todos.id = taggings.taggable_id").where("taggings.tag_id = ? ", tag_id) } + scope :with_tag, lambda { |tag_id| joins("INNER JOIN taggings ON todos.id = taggings.taggable_id").where("taggings.tag_id = ? AND taggings.taggable_type='Todo'", tag_id) } scope :with_tags, lambda { |tag_ids| where("EXISTS(SELECT * from taggings t WHERE t.tag_id IN (?) AND t.taggable_id=todos.id AND t.taggable_type='Todo')", tag_ids) } scope :completed_after, lambda { |date| where("todos.completed_at > ?", date) } scope :completed_before, lambda { |date| where("todos.completed_at < ?", date) } diff --git a/test/models/todo_test.rb b/test/models/todo_test.rb index 72e19cb0..4662a283 100644 --- a/test/models/todo_test.rb +++ b/test/models/todo_test.rb @@ -471,6 +471,19 @@ class TodoTest < ActiveSupport::TestCase assert_equal 2, todos_with_aORc_and_b.count end + def test_find_tagged_todos_of_correct_taggable_type + recurring = Todo.where(:recurring_todo_id => 1).first.reload + recurring.tag_list = "recurring_tag" + recurring.save! + recurring.recurring_todo.tag_list = "recurring_tag" + recurring.recurring_todo.save! + + tag_id = Tag.where(:name => "recurring_tag").first.id + tagged_todos = Todo.with_tag(tag_id) + assert_equal 1, tagged_todos.count + assert_equal recurring.id, tagged_todos.first.id + end + # test named_scopes def test_find_completed # Given 2 completed todos, one completed now and one completed 2 months ago From 177971a70ed187906b3578424b35a29d101b0268 Mon Sep 17 00:00:00 2001 From: Matteo Giaccone Date: Thu, 1 Jan 2015 23:50:50 +0000 Subject: [PATCH 8/8] Remove applescript integration. Closes #1723 --- app/assets/javascripts/tracks.js.erb | 20 +---- app/controllers/integrations_controller.rb | 18 +--- app/views/integrations/_applescript1.html.erb | 20 ----- app/views/integrations/_applescript2.html.erb | 82 ------------------- .../_quicksilver_applescript.html.erb | 15 ---- app/views/integrations/index.de.html.erb | 68 --------------- app/views/integrations/index.en.html.erb | 68 --------------- app/views/integrations/index.nl.html.erb | 71 ---------------- config/locales/cs.yml | 3 - config/locales/de.yml | 3 - config/locales/en.yml | 3 - config/locales/es.yml | 3 - config/locales/fr.yml | 3 - config/locales/he.yml | 3 - config/locales/nl.yml | 3 - config/locales/ru.yml | 3 - config/routes.rb | 3 - features/show_integration_options.feature | 44 ---------- .../step_definitions/integration_steps.rb | 20 ----- 19 files changed, 3 insertions(+), 450 deletions(-) delete mode 100644 app/views/integrations/_applescript1.html.erb delete mode 100644 app/views/integrations/_applescript2.html.erb delete mode 100644 app/views/integrations/_quicksilver_applescript.html.erb delete mode 100644 features/show_integration_options.feature delete mode 100644 features/step_definitions/integration_steps.rb diff --git a/app/assets/javascripts/tracks.js.erb b/app/assets/javascripts/tracks.js.erb index c5737d92..1974af86 100644 --- a/app/assets/javascripts/tracks.js.erb +++ b/app/assets/javascripts/tracks.js.erb @@ -725,23 +725,6 @@ var ContextListPage = { } }; -var IntegrationsPage = { - setup_behavior: function() { - $(document).on("change",'#applescript1-contexts', function(){ - IntegrationsPage.get_script_for_context("#applescript1", "get_applescript1", this.value); - }); - $(document).on("change",'#applescript2-contexts', function(){ - IntegrationsPage.get_script_for_context("#applescript2", "get_applescript2", this.value); - }); - $(document).on("change",'#quicksilver-contexts', function(){ - IntegrationsPage.get_script_for_context("#quicksilver", "get_quicksilver_applescript", this.value); - }); - }, - get_script_for_context: function(element, getter, context){ - generic_get_script_for_list(element, "integrations/"+getter, "context_id="+context); - } -}; - var FeedsPage = { setup_behavior: function() { /* TODO: blocking of dropdown */ @@ -1166,7 +1149,7 @@ $(document).ready(function() { TodoItemsContainer.setup_container_toggles(); /* enable page specific behavior */ - $([ 'PreferencesPage', 'IntegrationsPage', 'NotesPage', 'ProjectListPage', 'ContextListPage', + $([ 'PreferencesPage', 'NotesPage', 'ProjectListPage', 'ContextListPage', 'FeedsPage', 'RecurringTodosPage', 'TodoItems', 'TracksPages', 'TracksForm', 'SearchPage', 'UsersPage' ]).each(function() { eval(this+'.setup_behavior();'); @@ -1175,3 +1158,4 @@ $(document).ready(function() { /* Gets called from all AJAX callbacks, too */ enable_rich_interaction(); }); + diff --git a/app/controllers/integrations_controller.rb b/app/controllers/integrations_controller.rb index 88f2b839..72ca7eda 100644 --- a/app/controllers/integrations_controller.rb +++ b/app/controllers/integrations_controller.rb @@ -12,18 +12,6 @@ class IntegrationsController < ApplicationController @page_title = 'TRACKS::REST API Documentation' end - def get_quicksilver_applescript - get_applescript('quicksilver_applescript') - end - - def get_applescript1 - get_applescript('applescript1') - end - - def get_applescript2 - get_applescript('applescript2') - end - def search_plugin @icon_data = [File.open(File.join(Rails.root, 'app', 'assets', 'images', 'done.png')).read]. pack('m').gsub(/\n/, '') @@ -72,9 +60,5 @@ class IntegrationsController < ApplicationController return result end - def get_applescript(partial_name) - context = current_user.contexts.find params[:context_id] - render :partial => partial_name, :locals => { :context => context } - end - end + diff --git a/app/views/integrations/_applescript1.html.erb b/app/views/integrations/_applescript1.html.erb deleted file mode 100644 index 1e6497d5..00000000 --- a/app/views/integrations/_applescript1.html.erb +++ /dev/null @@ -1,20 +0,0 @@ -(* Pops up a dialog box in which you enter a description for a next action. - It then creates that next action in Tracks in the context specified below. - *) - -set myUsername to "<%= current_user.login %>" -set myToken to "<%= current_user.token %>" -set myContextID to <%= context.id %> (* <%= context.name %> *) - --- Display dialog to enter your description -display dialog "<%= t('integrations.applescript_next_action_prompt') %>" default answer "" -set myDesc to text returned of the result - --- Now send all that info to Tracks --- Edit the URL of your Tracks installation if necessary" -tell application "<%= root_url %>backend/api" - set returnValue to call xmlrpc {method name:"NewTodo", parameters:{myUsername, myToken, myContextID, myDesc}} -end tell - --- Show the ID of the newly created next action -display dialog "<%= t('integrations.applescript_success_before_id') %> " & returnValue & " <%= t('integrations.applescript_success_after_id') %>" \ No newline at end of file diff --git a/app/views/integrations/_applescript2.html.erb b/app/views/integrations/_applescript2.html.erb deleted file mode 100644 index 59de5201..00000000 --- a/app/views/integrations/_applescript2.html.erb +++ /dev/null @@ -1,82 +0,0 @@ -(* -Script to grab the sender and subject of the selected -Mail message(s), and create new next action(s) with description -"Email [sender] about [subject]" - -If you have Growl, it pops a notification up with the id of -the newly created action. -*) - -(* Edit appropriately for your setup *) -property myUsername : "<%= current_user.login %>" -property myToken : "<%= current_user.token %>" -property myContextID : <%= context.id %> (* <%= context.name %> *) - --- this string is used when the message subject is empty -property emptySubject : "No Subject Specified" - --- Get the selected email in Mail -tell application "Mail" - set theSelection to the selection - if the length of theSelection is less than 1 then - display dialog "One or more messages must be selected." buttons {"OK"} default button 1 with icon caution - else - repeat with theMessage in theSelection - my importMessage(theMessage) - end repeat - end if -end tell - -on importMessage(theMessage) - - -- Get the info from the email message - tell application "Mail" - try - set theSender to the sender of theMessage - set theSubject to subject of theMessage - if theSubject is equal to "" then set theSubject to emptySubject - set theMessageId to message id of theMessage - - -- Construct the description string from the email info - set myDesc to "Email " & theSender & " about " & theSubject - -- Trim the string to 100 characters otherwise it won't validate - if length of myDesc > 100 then - set myDesc to characters 1 thru 100 of myDesc - end if - - set myNote to "message://<" & theMessageId & ">" - end try - end tell - - -- Now send all that info to Tracks - -- Edit the URL of your Tracks installation if necessary" - tell application "<%= root_url %>backend/api" - set returnValue to call xmlrpc {method name:"NewTodo", parameters:{myUsername, myToken, myContextID, myDesc, myNote}} - end tell - - (* Growl support - comment out or delete this section if - you don't have Growl *) - tell application "GrowlHelperApp" - set the allNotificationsList to ¬ - {"Tracks Notification"} - - -- Make a list of the notifications - -- that will be enabled by default. - -- Those not enabled by default can be enabled later - -- in the 'Applications' tab of the growl prefpane. - set the enabledNotificationsList to ¬ - {"Tracks Notification"} - - -- Register our script with growl. - -- You can optionally (as here) set a default icon - -- for this script's notifications. - register as application ¬ - "Tracks Applescript" all notifications allNotificationsList ¬ - default notifications enabledNotificationsList ¬ - icon of application "Script Editor" - set growlDescription to "Action with ID " & returnValue & " was created." - notify with name "Tracks Notification" title "New action sent to Tracks" description growlDescription application name "Tracks Applescript" icon of application "Script Editor.app" - end tell - (* End of Growl section *) - -end importMessage diff --git a/app/views/integrations/_quicksilver_applescript.html.erb b/app/views/integrations/_quicksilver_applescript.html.erb deleted file mode 100644 index 0ef5d614..00000000 --- a/app/views/integrations/_quicksilver_applescript.html.erb +++ /dev/null @@ -1,15 +0,0 @@ -using terms from application "Quicksilver" - on process text ThisClipping - - set myUsername to "<%= current_user.login %>" - set myToken to "<%= current_user.token %>" - set myContextID to <%= context.id %> (* <%= context.name %> *) - - tell application "<%= root_url %>backend/api" - set returnValue to call xmlrpc {method name:"NewTodo", parameters:{myUsername, myToken, myContextID, ThisClipping}} - end tell - tell application "Quicksilver" - show notification "Tracks: action added." - end tell - end process text -end using terms from diff --git a/app/views/integrations/index.de.html.erb b/app/views/integrations/index.de.html.erb index 70bc29d2..cd71480c 100644 --- a/app/views/integrations/index.de.html.erb +++ b/app/views/integrations/index.de.html.erb @@ -8,9 +8,6 @@ Weitere Informationen finden Sie in der <%= link_to "Entwickler Documentation der Tracks' REST API", url_for(:action => 'rest_api') %> (englisch).


Inhalt:

    -
  • Eine Aktion mit Applescript hinzufügen
  • -
  • Eine Aktion anhand der aktuell in Mail.app selektierten Nachricht erstellen
  • -
  • Aktionen mit Quicksilver und Applescript erstellen
  • Anstehende Aufgaben automatisch sich via E-Mail zusenden lassen
  • Tracks mit einem Mail-Server integrieren, um Aufgaben via E-Mail zu erstellen
  • Tracks zu Ihrer Google Gmail Seite hinzufügen
  • @@ -20,71 +17,6 @@ in unserem Tipps&Tricks Forum, damit wir es für die nächsten Versionen berücksichtigen können.

    - -

    Eine Aktion mit Applescript hinzufügen

    -

    Dieses Beispiel-Script zeigt einen Dialog, welcher nach einer Beschreibung fragt und die Aufgabe in einem festen Kontext anlegt.

    - -<% if has_contexts -%> -
      -
    1. Wählen Sie den Kontext, für welchen die Aktion erstellt werden soll: -
    2. -
    3. Kopieren Sie das AppleScript in die Zwischenablage.
      - - -
    4. -
    5. Öffnen Sie den Script Editor und fügen die Daten in ein neues Script ein.
    6. -
    7. Kompilieren und speichern Sie das Script, um es bei Bedarf einzusetzen.
    8. -
    -<% else %> -

    Sie haben noch keinen Kontext angelegt. Dieses Script ist automatisch verfügbar, sobald Sie Ihren ersten Kontext angelegt haben.

    -<% end %> - - -

    Add an Action with Applescript based on the currently selected Email in Mail.app

    -

    This script takes the sender and subject of the selected email(s) in Mail and creates a new action for each one, with the description, "Email [sender] about [subject]". The description gets truncated to 100 characters (the validation limit for the field) if it is longer than that. It also has Growl notifications if you have Growl installed.

    - -<% if has_contexts -%> -
      -
    1. Choose the context you want to add actions to: -
    2. -
    3. Copy the Applescript below to the clipboard.
      - - -
    4. -
    5. Open Script Editor and paste the script into a new document.
    6. -
    7. Compile and save the script to the ~/Library/Scriipts/Mail Scripts directory.
    8. -
    9. For more information on using AppleScript with Mail.app, see this overview.
    10. -
    -<% else %> -

    You do not have any context yet. The script will be available after you add your first context

    -<% end %> - - -

    Add Actions with Quicksilver and Applescript

    - -

    This integration will allow you to add actions to Tracks via Quicksilver.

    - -<% if has_contexts -%> -
      -
    1. Choose the context you want to add actions to: -
    2. -
    3. Copy the Applescript below to the clipboard.
      - - -
    4. -
    5. Open Script Editor and paste the script into a new document.
    6. -
    7. Compile and save the script as "Add to Tracks.scpt" in ~/Library/Application Support/Quicksilver/Actions/ (you may need to create the Actions directory)
    8. -
    9. Restart Quicksilver
    10. -
    11. Activate Quicksilver (Ctrl+Space by default)
    12. -
    13. Press "." to put quicksilver into text mode
    14. -
    15. Type the description of the next action you want to add
    16. -
    17. Press tab to switch to the action pane.
    18. -
    19. By typing or scrolling, choose the "Add to Tracks" action.
    20. -
    -<% else %> -

    You do not have any context yet. The script will be available after you add your first context

    -<% end %> -

    Automatically Email Yourself Upcoming Actions

    diff --git a/app/views/integrations/index.en.html.erb b/app/views/integrations/index.en.html.erb index 55bafc63..24f936fb 100644 --- a/app/views/integrations/index.en.html.erb +++ b/app/views/integrations/index.en.html.erb @@ -8,9 +8,6 @@ See also <%= link_to "developer documentation for Tracks' REST API", url_for(:action => 'rest_api') %>.


    Contents:

      -
    • Add an Action with Applescript
    • -
    • Add an Action with Applescript based on the currently selected Email in Mail.app
    • -
    • Add Actions with Quicksilver and Applescript
    • Automatically Email Yourself Upcoming Actions
    • Integrate Tracks with an email server to be able to send an action through email to Tracks
    • Send emails to Tracks with Mailgun @@ -22,71 +19,6 @@ it in our Tips and Tricks forum and we may include it on this page in a future versions of Tracks.

      - -

      Add an Action with Applescript

      -

      This is a simple script that pops up a dialog box asking for a description, and then sends that to Tracks with a hard-coded context.

      - -<% if has_contexts -%> -
        -
      1. Choose the context you want to add actions to: -
      2. -
      3. Copy the Applescript below to the clipboard.
        - - -
      4. -
      5. Open Script Editor and paste the script into a new document.
      6. -
      7. Compile and save the script. Run it as necessary.
      8. -
      -<% else %> -

      You do not have any context yet. The script will be available after you add your first context

      -<% end %> - - -

      Add an Action with Applescript based on the currently selected Email in Mail.app

      -

      This script takes the sender and subject of the selected email(s) in Mail and creates a new action for each one, with the description, "Email [sender] about [subject]". The description gets truncated to 100 characters (the validation limit for the field) if it is longer than that. It also has Growl notifications if you have Growl installed.

      - -<% if has_contexts -%> -
        -
      1. Choose the context you want to add actions to: -
      2. -
      3. Copy the Applescript below to the clipboard.
        - - -
      4. -
      5. Open Script Editor and paste the script into a new document.
      6. -
      7. Compile and save the script to the ~/Library/Scriipts/Mail Scripts directory.
      8. -
      9. For more information on using AppleScript with Mail.app, see this overview.
      10. -
      -<% else %> -

      You do not have any context yet. The script will be available after you add your first context

      -<% end %> - - -

      Add Actions with Quicksilver and Applescript

      - -

      This integration will allow you to add actions to Tracks via Quicksilver.

      - -<% if has_contexts -%> -
        -
      1. Choose the context you want to add actions to: -
      2. -
      3. Copy the Applescript below to the clipboard.
        - - -
      4. -
      5. Open Script Editor and paste the script into a new document.
      6. -
      7. Compile and save the script as "Add to Tracks.scpt" in ~/Library/Application Support/Quicksilver/Actions/ (you may need to create the Actions directory)
      8. -
      9. Restart Quicksilver
      10. -
      11. Activate Quicksilver (Ctrl+Space by default)
      12. -
      13. Press "." to put quicksilver into text mode
      14. -
      15. Type the description of the next action you want to add
      16. -
      17. Press tab to switch to the action pane.
      18. -
      19. By typing or scrolling, choose the "Add to Tracks" action.
      20. -
      -<% else %> -

      You do not have any context yet. The script will be available after you add your first context

      -<% end %> -

      Automatically Email Yourself Upcoming Actions

      diff --git a/app/views/integrations/index.nl.html.erb b/app/views/integrations/index.nl.html.erb index 666f78f9..35fdcd5a 100644 --- a/app/views/integrations/index.nl.html.erb +++ b/app/views/integrations/index.nl.html.erb @@ -8,9 +8,6 @@ Zie ook <%= link_to "de documentatie voor ontwikkelaars met Tracks' REST API", url_for(:action => 'rest_api') %>.


      Inhoud:

        -
      • Voeg een actie toe met Applescript
      • -
      • Voeg een acties toe met Applescript op basis van de huidig geselecteerde e-mail in Mail.app
      • -
      • Voeg acties toe met Quicksilver en Applescript
      • Email jezelf automatisch de acties met een aflopende deadline
      • Integreer Tracks met een email server om een actie via email naar Tracks te sturen
      • Voeg tracks toe als een Google Gmail gadget
      • @@ -20,74 +17,6 @@ Tips and Tricks forum en misschien voegen we jouw tip toe op deze pagina in een toekomstige versie van Tracks.

        - -

        Voeg een actie toe met Applescript

        -

        Dit is een eenvoudig script die een dialog box toont om jou om een beschrijving te vragen en vervolgens die op te sturen naar Tracks - met een hard-coded context.

        - -<% if has_contexts -%> -
          -
        1. Kies de context waar de je acties aan toe wilt laten voegen: -
        2. -
        3. Kopieer de volgende Applescript naar het klembord.
          - -
        4. -
        5. Open de Script Editor en plak het script in een nieuw document.
        6. -
        7. Compileer en bewaar het script. Voert het uit wanneer nodig.
        8. -
        -<% else %> -

        Je hebt nog geen context(en). Het script komt beschikbaar als je het eerste context hebt toegevoegd.

        -<% end %> - - -

        Voeg een acties toe met Applescript op basis van de huidig geselecteerde e-mail in Mail.app

        -

        Dit script neemt de verstuurder en het onderwerp van de geselecteerde email(s) - van Mail over en maakt een nieuwe acties voor elke email met de beschrijving - "Email [sender] about [subject]". De beschrijving wordt, als nodig, na 100 karakters afgebroken - (dit is de limiet voor een beschrijving). Het heeft ook Growl notificaties mocht je Growl geïnstalleerd hebben.

        - -<% if has_contexts -%> -
          -
        1. Kies de context waar de je acties aan toe wilt laten voegen: -
        2. -
        3. Kopieer de volgende Applescript naar het klembord.
          - -
        4. -
        5. Open de Script Editor en plak het script in een nieuw document.
        6. -
        7. Compileer en bewaar het script in de directory ~/Library/Scripts/Mail Scripts.
        8. -
        9. Voor meer informatie over het gebruiken van AppleScript met Mail.app, zie - dit overzicht.
        10. -
        -<% else %> -

        Je hebt nog geen context(en). Het script komt beschikbaar als je het eerste context hebt toegevoegd.

        -<% end %> - - -

        Voeg acties toe met Quicksilver en Applescript

        - -

        Dit integratievoorbeeld laat je acties toevoegen aan Tracks via Quicksilver.

        - -<% if has_contexts -%> -
          -
        1. Kies de context waar de je acties aan toe wilt laten voegen: -
        2. -
        3. Kopieer de volgende Applescript naar het klembord.
          - -
        4. -
        5. Open de Script Editor en plak het script in een nieuw document.
        6. -
        7. Compileer en bewaar het script als "Add to Tracks.scpt" in ~/Library/Application Support/Quicksilver/Actions/ - (mogelijk moet je eerst de Actions directory aanmaken)
        8. -
        9. Herstart Quicksilver
        10. -
        11. Activeer Quicksilver (Standaard via Ctrl+Space)
        12. -
        13. Toets "." om quicksilver in text mode te brengen
        14. -
        15. Voer de gewenste beschrijving van de actie in.
        16. -
        17. Toets tab om naar de action pane te gaan.
        18. -
        19. Via typen of bladeren, kies de "Add to Tracks" actie.
        20. -
        -<% else %> -

        Je hebt nog geen context(en). Het script komt beschikbaar als je het eerste context hebt toegevoegd.

        -<% end %> -

        Email jezelf automatisch de acties met een aflopende deadline

        diff --git a/config/locales/cs.yml b/config/locales/cs.yml index 54f87f70..b7460908 100644 --- a/config/locales/cs.yml +++ b/config/locales/cs.yml @@ -308,9 +308,6 @@ cs: footer: send_feedback: Poslat zpětnou vazbu na %{version} integrations: - applescript_next_action_prompt: 'Popis úkolu:' - applescript_success_after_id: vytvořen - applescript_success_before_id: Nový úkol s ID gmail_description: Gadget pro Tracks do Gmailu opensearch_description: Prohledat Tracks layouts: diff --git a/config/locales/de.yml b/config/locales/de.yml index da9c9dc6..82fae0f1 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -313,9 +313,6 @@ de: footer: send_feedback: Senden Sie Feedback zu %{version} integrations: - applescript_next_action_prompt: 'Beschreibung der nächsten Aufgabe:' - applescript_success_after_id: erstellt - applescript_success_before_id: Nächste neue Aufgabe mit ID gmail_description: Gadget, um Tracks als Gadget zu Googlemail hinzuzufügen opensearch_description: In Tracks suchen layouts: diff --git a/config/locales/en.yml b/config/locales/en.yml index 6f516018..023d6b02 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -796,10 +796,7 @@ en: save_status_message: "Note %{id} was saved" integrations: opensearch_description: Search in Tracks - applescript_next_action_prompt: "Description of next action:" gmail_description: Gadget to add Tracks to Gmail as a gadget - applescript_success_after_id: created - applescript_success_before_id: New next action with ID preferences: open_id_url: Your OpenID URL is staleness_starts_after: Staleness starts after %{days} days diff --git a/config/locales/es.yml b/config/locales/es.yml index ae6cc59a..9aa645dc 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -310,9 +310,6 @@ es: footer: send_feedback: Envía comentarios sobre el %{version} integrations: - applescript_next_action_prompt: 'Descripción de la próxima tarea:' - applescript_success_after_id: creado - applescript_success_before_id: Nueva acción junto con la identificación gmail_description: Gadget para añadir pistas a Gmail como un gadget opensearch_description: Buscar en las Tracks layouts: diff --git a/config/locales/fr.yml b/config/locales/fr.yml index f86f8ec1..6357b28e 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -340,9 +340,6 @@ fr: submit: Sauvegarder %{model} update: Mettre à jour %{model} integrations: - applescript_next_action_prompt: 'Description de l''action suivante :' - applescript_success_after_id: Créé - applescript_success_before_id: Nouvelle action suivante avec ID gmail_description: Gadget pour ajouter Tracks à Gmail opensearch_description: Rechercher dans Tracks layouts: diff --git a/config/locales/he.yml b/config/locales/he.yml index 029560f4..d128d810 100644 --- a/config/locales/he.yml +++ b/config/locales/he.yml @@ -257,9 +257,6 @@ he: footer: send_feedback: "שליחת משוב על גירסא %{version}" integrations: - applescript_next_action_prompt: "תיאור הפעולות הבאות:" - applescript_success_after_id: "נוצר" - applescript_success_before_id: "פעולת המשך עם זיהוי" gmail_description: "חֲפִיץ להוספת מסלולים ל-Gmail" opensearch_description: "חיפוש במסלולים" layouts: diff --git a/config/locales/nl.yml b/config/locales/nl.yml index 3dd1b5bd..a1e9e6ac 100644 --- a/config/locales/nl.yml +++ b/config/locales/nl.yml @@ -358,9 +358,6 @@ nl: submit: Bewaar %{model} update: Bijwerken %{model} integrations: - applescript_next_action_prompt: 'Omschrijving van de actie:' - applescript_success_after_id: gemaakt - applescript_success_before_id: Nieuwe actie met ID gmail_description: Gadget om Tracks toe te voegen aan Gmail als een gadget opensearch_description: Zoek in Tracks layouts: diff --git a/config/locales/ru.yml b/config/locales/ru.yml index ba52da27..f7b82a72 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -376,9 +376,6 @@ ru: submit: "Сохранить %{model}" update: "Обновить %{model}" integrations: - applescript_next_action_prompt: "Описание следующего действия:" - applescript_success_after_id: "создано" - applescript_success_before_id: "Новое действие с ID" gmail_description: "Гаджет для добавления Tracks в Gmail как гаджета боковой панели" opensearch_description: "Искать в Tracks" layouts: diff --git a/config/routes.rb b/config/routes.rb index 5b4855c7..11323624 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -29,9 +29,6 @@ Rails.application.routes.draw do post 'integrations/cloudmailin' => 'integrations#cloudmailin' get 'integrations/search_plugin' => "integrations#search_plugin", :as => 'search_plugin' get 'integrations/google_gadget.xml' => 'integrations#google_gadget', :as => 'google_gadget' - get 'integrations/get_applescript1.js' => 'integrations#get_applescript1' - get 'integrations/get_applescript2.js' => 'integrations#get_applescript2' - get 'integrations/get_quicksilver_applescript.js' => 'integrations#get_quicksilver_applescript' get 'preferences' => "preferences#index" get 'preferences/render_date_format' => "preferences#render_date_format" diff --git a/features/show_integration_options.feature b/features/show_integration_options.feature deleted file mode 100644 index a264b973..00000000 --- a/features/show_integration_options.feature +++ /dev/null @@ -1,44 +0,0 @@ -Feature: Integrate Tracks in various ways - In order to use tracks with other software - As a Tracks user - I want to be informed about the various ways to integrate tracks - - Background: - Given the following user record - | login | password | is_admin | - | testuser | secret | false | - And I have logged in as "testuser" with password "secret" - And I have the following contexts: - | context | - | @pc | - | @home | - | @shops | - | @boss | - - Scenario: I cannot see scripts when I do not have a context - Given I have no contexts - When I go to the integrations page - Then I should see a message that you need a context to see scripts - - Scenario: I can see scripts when I have one or more contexts - When I go to the integrations page - Then I should see scripts - - @javascript - Scenario: The scripts on the page should be prefilled with the first context - When I go to the integrations page - Then I should see a script "applescript1" for "@pc" - - @javascript - Scenario Outline: When I select a different context the example scripts should change accordingly - When I go to the integrations page - When I select "" from "" - Then I should see a script "