backlog 0.1.0 → 0.1.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/Capfile ADDED
@@ -0,0 +1,2 @@
1
+ load 'deploy' if respond_to?(:namespace) # cap2 differentiator
2
+ load 'config/deploy'
data/History.txt CHANGED
@@ -1,4 +1,9 @@
1
- == 0.0.5 2007-07-29
1
+ == 0.1.1 2007-07-29
2
+
3
+ * Improved gem generation
4
+ * Fixed bugs in user registration and initial setup
5
+
6
+ == 0.1.0 2007-07-29
2
7
 
3
8
  * First party (user/group) centric release.
4
9
  * Released gem, but still requires external database.
data/Rakefile CHANGED
@@ -11,12 +11,16 @@ require 'tasks/rails'
11
11
 
12
12
  require 'hoe'
13
13
 
14
- Hoe.new("backlog", '0.1.0') do |p|
14
+ GEM_VERSION = ENV['VERSION'] = '0.1.1'
15
+
16
+ Hoe.new("backlog", GEM_VERSION) do |p|
15
17
  p.rubyforge_name = "backlog"
16
18
  p.description = p.paragraphs_of('README.txt', 0..-1).join("\n\n")
17
19
  p.remote_rdoc_dir = '' # Release to root
18
20
  p.changes = p.paragraphs_of('History.txt', 0..-1).join("\n\n")
21
+ p.rdoc_pattern = /^(app\/(controllers|helpers|models)|lib|bin)|txt$/
19
22
  p.spec_extras = {
20
- :files => Dir['**/*'].reject{|file_name| file_name =~ /^log|pkg|tmp/}
23
+ :files => Dir['**/*'].reject{|file_name| file_name =~ /^(log|pkg|tmp)/}
21
24
  }
25
+ p.need_zip = true
22
26
  end
@@ -183,7 +183,7 @@ class ApplicationController < ActionController::Base
183
183
  end
184
184
 
185
185
  def user
186
- User.find(user_id) if user_id
186
+ User.find_by_id(user_id) if user_id
187
187
  end
188
188
 
189
189
  end
@@ -85,7 +85,7 @@ class UserController < ApplicationController
85
85
  flash.now['message'] = "We could not find a user with the email address #{CGI.escapeHTML(params['user']['email'])}"
86
86
  else
87
87
  begin
88
- User.transaction(user) do
88
+ User.transaction do
89
89
  key = user.generate_security_token
90
90
  url = url_for(:action => 'change_password')
91
91
  url += "?user[id]=#{user.id}&key=#{key}"
@@ -43,11 +43,11 @@ module UserHelper
43
43
  end
44
44
 
45
45
  def user?
46
- !user_id.nil?
46
+ not user.nil?
47
47
  end
48
48
 
49
49
  def user
50
- User.find(user_id)
50
+ User.find_by_id(user_id) if user_id
51
51
  end
52
52
 
53
53
  end
data/app/models/work.rb CHANGED
@@ -2,8 +2,9 @@ class Work < ActiveRecord::Base
2
2
  belongs_to :task
3
3
  belongs_to :user
4
4
 
5
- validates_presence_of :started_at, :if => :validate_user?
6
- validates_presence_of :user_id, :if => :validate_user?
5
+ validates_associated :task
6
+ validates_presence_of :started_at
7
+ validates_associated :user_id, :if => :validate_user?
7
8
 
8
9
  def validate_user?
9
10
  task.backlog.enable_users
data/config/deploy.rb CHANGED
@@ -1,12 +1,12 @@
1
1
  set :application, "backlog"
2
2
  set :repository, "svn://rubyforge.org/var/svn/#{application}/trunk"
3
+ set :rails_env, :production
3
4
 
4
- role :app, "sandra"
5
- role :db, "sandra", :primary => true
6
-
7
- set :deploy_to, "/usr/local/#{application}"
8
- set :user, "capistrano"
5
+ role :web, "www.kubosch.no"
6
+ role :app, "www.kubosch.no"
7
+ role :db, "www.kubosch.no", :primary => true
9
8
 
9
+ set :user, "donv"
10
10
  set :use_sudo, false
11
11
 
12
12
  desc "The spinner task is used by :cold_deploy to start the application up"
@@ -1,11 +1,10 @@
1
1
  set :application, "backlog"
2
2
  set :repository, "svn://rubyforge.org/var/svn/#{application}/trunk"
3
3
 
4
- #role :web, "sandra"
5
4
  role :app, "sandra"
6
5
  role :db, "sandra", :primary => true
7
6
 
8
- set :deploy_to, "/usr/local/#{application}" # defaults to "/u/apps/#{application}"
7
+ set :deploy_to, "/usr/local/#{application}"
9
8
  set :user, "capistrano"
10
9
 
11
10
  set :use_sudo, false
@@ -1,6 +1,6 @@
1
1
  set :application, "backlog"
2
2
  set :repository, "svn://rubyforge.org/var/svn/#{application}/trunk"
3
- set :rails_env, :kubosch_production
3
+ set :rails_env, :production
4
4
 
5
5
  role :web, "www.kubosch.no"
6
6
  role :app, "www.kubosch.no"
@@ -64,6 +64,7 @@ class CreateGroups < ActiveRecord::Migration
64
64
  remove_column :tasks, :backlog_id
65
65
  remove_column :periods, :party_id
66
66
  drop_table :groups_users
67
+ drop_foreign_key :users, :users_party_id_fkey
67
68
  rename_column :users, :party_id, :id
68
69
  drop_table :groups
69
70
  drop_table :parties
@@ -0,0 +1,37 @@
1
+ namespace :tmp do
2
+ desc "Clear session, cache, and socket files from tmp/"
3
+ task :clear => [ "tmp:sessions:clear", "tmp:cache:clear", "tmp:sockets:clear"]
4
+
5
+ desc "Creates tmp directories for sessions, cache, and sockets"
6
+ task :create do
7
+ FileUtils.mkdir_p(%w( tmp/sessions tmp/cache tmp/sockets tmp/pids ))
8
+ end
9
+
10
+ namespace :sessions do
11
+ desc "Clears all files in tmp/sessions"
12
+ task :clear do
13
+ FileUtils.rm(Dir['tmp/sessions/[^.]*'])
14
+ end
15
+ end
16
+
17
+ namespace :cache do
18
+ desc "Clears all files and directories in tmp/cache"
19
+ task :clear do
20
+ FileUtils.rm_rf(Dir['tmp/cache/[^.]*'])
21
+ end
22
+ end
23
+
24
+ namespace :sockets do
25
+ desc "Clears all files in tmp/sockets"
26
+ task :clear do
27
+ FileUtils.rm(Dir['tmp/sockets/[^.]*'])
28
+ end
29
+ end
30
+
31
+ namespace :pids do
32
+ desc "Clears all files in tmp/pids"
33
+ task :clear do
34
+ FileUtils.rm(Dir['tmp/pids/[^.]*'])
35
+ end
36
+ end
37
+ end
metadata CHANGED
@@ -3,7 +3,7 @@ rubygems_version: 0.9.4
3
3
  specification_version: 1
4
4
  name: backlog
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.1.0
6
+ version: 0.1.1
7
7
  date: 2007-07-29 00:00:00 +02:00
8
8
  summary: The author was too lazy to write a summary
9
9
  require_paths:
@@ -225,7 +225,6 @@ files:
225
225
  - config/environments/datek_production.rb
226
226
  - LICENSE_LOCALIZATION
227
227
  - README.txt
228
- - doc
229
228
  - Manifest.txt
230
229
  - vendor
231
230
  - vendor/plugins
@@ -1148,6 +1147,7 @@ files:
1148
1147
  - vendor/rails/railties/lib/tasks/rails.rb
1149
1148
  - vendor/rails/railties/lib/tasks/statistics.rake
1150
1149
  - vendor/rails/railties/lib/tasks/log.rake
1150
+ - vendor/rails/railties/lib/tasks/tmp.rake
1151
1151
  - vendor/rails/railties/lib/fcgi_handler.rb
1152
1152
  - vendor/rails/railties/lib/console_sandbox.rb
1153
1153
  - vendor/rails/railties/lib/commands
@@ -1655,6 +1655,7 @@ files:
1655
1655
  - vendor/rails/actionpack/install.rb
1656
1656
  - vendor/rails/actionpack/README
1657
1657
  - Rakefile
1658
+ - Capfile
1658
1659
  - README_LOCALIZATION
1659
1660
  - README_LOGIN_SUGAR
1660
1661
  - app