artisan-memory-repository 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
@@ -4,28 +4,28 @@ require 'artisan-memory-repository/models/change'
|
|
4
4
|
module ArtisanMemoryRepository
|
5
5
|
class ChangeRepository
|
6
6
|
include BaseRepository
|
7
|
-
|
7
|
+
|
8
8
|
def model_class
|
9
9
|
ArtisanMemoryRepository::Change
|
10
10
|
end
|
11
|
-
|
11
|
+
|
12
12
|
def create_project_change(attributes = {})
|
13
13
|
create(attributes.merge({:type => "ProjectChange"}))
|
14
14
|
end
|
15
|
-
|
15
|
+
|
16
16
|
def create_iteration_change(attributes = {})
|
17
17
|
create(attributes.merge({:type => "IterationChange"}))
|
18
18
|
end
|
19
|
-
|
20
|
-
|
19
|
+
|
20
|
+
|
21
21
|
def create_story_change(attributes = {})
|
22
22
|
create(attributes.merge({:type => "StoryChange"}))
|
23
23
|
end
|
24
|
-
|
25
|
-
|
24
|
+
|
25
|
+
|
26
26
|
def find_all_by_project_id(project_id)
|
27
27
|
records.values.find_all {|r| r.project_id == project_id}.sort_by(&:created_at).reverse
|
28
28
|
end
|
29
|
-
|
29
|
+
|
30
30
|
end
|
31
31
|
end
|
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'artisan-memory-repository/models/future_user'
|
2
2
|
require 'artisan-memory-repository/base_repository'
|
3
|
+
require 'artisan/repository'
|
3
4
|
|
4
5
|
module ArtisanMemoryRepository
|
5
6
|
class FutureUserRepository
|
@@ -16,7 +17,7 @@ module ArtisanMemoryRepository
|
|
16
17
|
save(future_user)
|
17
18
|
else
|
18
19
|
future_user.add_errors(:email => "This email has already been taken")
|
19
|
-
raise
|
20
|
+
raise Artisan::RecordNotValid.new(future_user)
|
20
21
|
end
|
21
22
|
future_user
|
22
23
|
end
|
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'artisan-memory-repository/models/user'
|
2
2
|
require 'artisan-memory-repository/base_repository'
|
3
|
+
require 'artisan/repository'
|
3
4
|
|
4
5
|
module ArtisanMemoryRepository
|
5
6
|
class UserRepository
|
@@ -15,7 +16,7 @@ module ArtisanMemoryRepository
|
|
15
16
|
save(user)
|
16
17
|
else
|
17
18
|
user.add_error(:login, 'has already been taken')
|
18
|
-
raise
|
19
|
+
raise Artisan::RecordNotValid.new(user)
|
19
20
|
end
|
20
21
|
user
|
21
22
|
end
|
metadata
CHANGED
@@ -1,27 +1,38 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: artisan-memory-repository
|
3
|
-
version: !ruby/object:Gem::Version
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.3
|
4
5
|
prerelease:
|
5
|
-
version: 0.0.2
|
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
|
-
|
14
|
-
|
15
|
-
|
12
|
+
date: 2012-10-13 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: activemodel
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 3.1.6
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 3.1.6
|
16
30
|
description: An interface to the Artisan in memory persistance layer
|
17
31
|
email: paul@8thlight.com
|
18
32
|
executables: []
|
19
|
-
|
20
33
|
extensions: []
|
21
|
-
|
22
34
|
extra_rdoc_files: []
|
23
|
-
|
24
|
-
files:
|
35
|
+
files:
|
25
36
|
- lib/artisan-memory-repository/artisan_memory_repository.rb
|
26
37
|
- lib/artisan-memory-repository/base_repository.rb
|
27
38
|
- lib/artisan-memory-repository/change_repository.rb
|
@@ -44,33 +55,26 @@ files:
|
|
44
55
|
- lib/artisan-memory-repository/user_repository.rb
|
45
56
|
homepage: http://8thlight.com
|
46
57
|
licenses: []
|
47
|
-
|
48
58
|
post_install_message:
|
49
59
|
rdoc_options: []
|
50
|
-
|
51
|
-
require_paths:
|
60
|
+
require_paths:
|
52
61
|
- lib
|
53
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
62
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
54
63
|
none: false
|
55
|
-
requirements:
|
56
|
-
- -
|
57
|
-
- !ruby/object:Gem::Version
|
58
|
-
|
59
|
-
|
60
|
-
- 0
|
61
|
-
version: "0"
|
62
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - ! '>='
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '0'
|
68
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
63
69
|
none: false
|
64
|
-
requirements:
|
65
|
-
- -
|
66
|
-
- !ruby/object:Gem::Version
|
67
|
-
version:
|
70
|
+
requirements:
|
71
|
+
- - ! '>='
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: '0'
|
68
74
|
requirements: []
|
69
|
-
|
70
75
|
rubyforge_project:
|
71
|
-
rubygems_version: 1.8.
|
76
|
+
rubygems_version: 1.8.21
|
72
77
|
signing_key:
|
73
78
|
specification_version: 3
|
74
79
|
summary: Artisan Memory Repository
|
75
80
|
test_files: []
|
76
|
-
|