File tree Expand file tree Collapse file tree 5 files changed +4
-10
lines changed Expand file tree Collapse file tree 5 files changed +4
-10
lines changed Original file line number Diff line number Diff line change 6
6
7
7
class Repository ::Settings < Travis ::Settings
8
8
class SshKey < Travis ::Settings ::Model
9
+ attribute :id , String
9
10
attribute :name , String
10
11
attribute :content , Travis ::Settings ::EncryptedValue
11
12
@@ -17,6 +18,7 @@ class SshKeys < Collection
17
18
end
18
19
19
20
class EnvVar < Travis ::Settings ::Model
21
+ attribute :id , String
20
22
attribute :name , String
21
23
attribute :value , Travis ::Settings ::EncryptedValue
22
24
attribute :public , Boolean , default : false
@@ -28,12 +30,9 @@ class EnvVars < Collection
28
30
model EnvVar
29
31
end
30
32
31
-
32
-
33
33
attribute :ssh_keys , SshKeys . for_virtus
34
34
attribute :env_vars , EnvVars . for_virtus
35
35
36
-
37
36
attribute :builds_only_with_travis_yml , Boolean , default : false
38
37
attribute :build_pushes , Boolean , default : true
39
38
attribute :build_pull_requests , Boolean , default : true
Original file line number Diff line number Diff line change @@ -9,8 +9,6 @@ class Model
9
9
include ActiveModel ::Validations
10
10
include ActiveModel ::Serialization
11
11
12
- attribute :id , String
13
-
14
12
class Errors < ActiveModel ::Errors
15
13
# Default behavior of Errors in Active Model is to
16
14
# translate symbolized message into full text message,
Original file line number Diff line number Diff line change 7
7
@model_class = Class . new ( Travis ::Settings ::Model ) {
8
8
attribute :description
9
9
10
+ attribute :id , String
10
11
attribute :secret , Travis ::Settings ::EncryptedValue
11
12
}
12
13
Original file line number Diff line number Diff line change @@ -87,11 +87,6 @@ def name
87
87
model . name . should == 'PIOTR'
88
88
end
89
89
90
- it 'automatically generates id attribute' do
91
- model = model_class . new ( id : 'foobar' )
92
- model . id . should == 'foobar'
93
- end
94
-
95
90
it 'handles validations' do
96
91
model_class = Class . new ( described_class ) do
97
92
attribute :name
Original file line number Diff line number Diff line change 90
90
describe 'to_hash' do
91
91
it 'returns registered collections and all attributes' do
92
92
model_class = Class . new ( Travis ::Settings ::Model ) {
93
+ attribute :id , String
93
94
attribute :name , String
94
95
attribute :content , Travis ::Settings ::EncryptedValue
95
96
}
You can’t perform that action at this time.
0 commit comments