artisan-ar-repository 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -25,7 +25,7 @@ class User < ActiveRecord::Base
25
25
  future_user = future_user_repository.find_by_email(self.email)
26
26
  if future_user
27
27
  project = Artisan::Repository.project.find(future_user.project_id)
28
- team = Team.new(project, self)
28
+ team = Artisan::Teams::Team.new(project, self)
29
29
  team.add_team_member(self)
30
30
  future_user_repository.delete(future_user.id)
31
31
  end
@@ -1,7 +1,8 @@
1
1
  require "active_record"
2
2
  require "acts-as-taggable-on"
3
3
 
4
- dbconfig = YAML::load(File.open(Rails.root + 'config/database.yml'))
4
+ db_yaml = File.join(Rails.root, '/config/database.yml')
5
+ dbconfig = YAML::load(File.open(db_yaml))
5
6
 
6
7
  ActiveRecord::Base.establish_connection(dbconfig[Rails.env])
7
8
 
@@ -0,0 +1,12 @@
1
+ require 'spec_helper'
2
+
3
+ describe ::Iteration do
4
+ it "has a total billed points" do
5
+ project_config = ProjectConfiguration.create!(:estimate_mode => "stddev")
6
+ project = ::Project.create!(:name => "Cymen", :project_configuration => project_config)
7
+ iteration = project.iterations.create!
8
+ iteration.stories.create!(:name => "test", :optimistic => 1, :realistic => 1, :pessimistic => 1, :complete => true, :project => iteration.project)
9
+ iteration.stories.create!(:name => "test", :optimistic => 2, :realistic => 2, :pessimistic => 2, :complete => true, :project => iteration.project )
10
+ iteration.total_billed_points.should == 3
11
+ end
12
+ end
@@ -0,0 +1,21 @@
1
+ require 'artisan-ar-repository/models/project_configuration'
2
+ require 'spec_helper'
3
+
4
+ describe ProjectConfiguration do
5
+ before(:each) do
6
+ ProjectConfiguration.destroy_all
7
+ Project.destroy_all
8
+ end
9
+
10
+ it "belongs to a project" do
11
+ project = Project.create!(:name => "test")
12
+ configuration = ProjectConfiguration.new(:project => project)
13
+ configuration.project.should == project
14
+ end
15
+
16
+ it "returns stddev as default estimate mode" do
17
+ project = Project.create!(:name => "test")
18
+ configuration = ProjectConfiguration.new(:project => project)
19
+ configuration.estimate_mode.should == ProjectConfiguration::STANDARD_DEVIATION
20
+ end
21
+ end
metadata CHANGED
@@ -1,27 +1,22 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: artisan-ar-repository
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.9
4
5
  prerelease:
5
- version: 0.0.8
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - 8th Light Craftsmen
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2012-10-18 00:00:00 Z
12
+ date: 2012-10-20 00:00:00.000000000 Z
14
13
  dependencies: []
15
-
16
14
  description: An interface to the artisan active record persistance layer
17
15
  email: paul@8thlight.com
18
16
  executables: []
19
-
20
17
  extensions: []
21
-
22
18
  extra_rdoc_files: []
23
-
24
- files:
19
+ files:
25
20
  - lib/artisan-ar-repository/base_repository.rb
26
21
  - lib/artisan-ar-repository/change_repository.rb
27
22
  - lib/artisan-ar-repository/future_user_repository.rb
@@ -51,45 +46,43 @@ files:
51
46
  - spec/future_user_repository_spec.rb
52
47
  - spec/iteration_repository_spec.rb
53
48
  - spec/member_repository_spec.rb
49
+ - spec/models/iteration_spec.rb
50
+ - spec/models/project_configuration_spec.rb
54
51
  - spec/project_repository_spec.rb
55
52
  - spec/story_repository_spec.rb
56
53
  - spec/user_repository_spec.rb
57
54
  homepage: http://8thlight.com
58
55
  licenses: []
59
-
60
56
  post_install_message:
61
57
  rdoc_options: []
62
-
63
- require_paths:
58
+ require_paths:
64
59
  - lib
65
- required_ruby_version: !ruby/object:Gem::Requirement
60
+ required_ruby_version: !ruby/object:Gem::Requirement
66
61
  none: false
67
- requirements:
68
- - - ">="
69
- - !ruby/object:Gem::Version
70
- hash: -1207429408703607962
71
- segments:
72
- - 0
73
- version: "0"
74
- required_rubygems_version: !ruby/object:Gem::Requirement
62
+ requirements:
63
+ - - ! '>='
64
+ - !ruby/object:Gem::Version
65
+ version: '0'
66
+ required_rubygems_version: !ruby/object:Gem::Requirement
75
67
  none: false
76
- requirements:
77
- - - ">="
78
- - !ruby/object:Gem::Version
79
- version: "0"
68
+ requirements:
69
+ - - ! '>='
70
+ - !ruby/object:Gem::Version
71
+ version: '0'
80
72
  requirements: []
81
-
82
73
  rubyforge_project:
83
74
  rubygems_version: 1.8.24
84
75
  signing_key:
85
76
  specification_version: 3
86
77
  summary: Artisan Active Record Repository
87
- test_files:
78
+ test_files:
88
79
  - spec/artisan_ar_repository_spec.rb
89
80
  - spec/change_repository_spec.rb
90
81
  - spec/future_user_repository_spec.rb
91
82
  - spec/iteration_repository_spec.rb
92
83
  - spec/member_repository_spec.rb
84
+ - spec/models/iteration_spec.rb
85
+ - spec/models/project_configuration_spec.rb
93
86
  - spec/project_repository_spec.rb
94
87
  - spec/story_repository_spec.rb
95
88
  - spec/user_repository_spec.rb