legacy_data 0.1.12 → 0.2.0
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/.rvmrc +1 -0
- data/History.txt +2 -2
- data/README.md +6 -4
- data/Rakefile +9 -11
- data/VERSION +1 -1
- data/examples/generated/blog_mysql/factories.rb +3 -3
- data/examples/generated/blog_sqlite3/factories.rb +4 -4
- data/examples/generated/drupal_mysql/factories.rb +321 -321
- data/examples/generated/j2ee_petstore_mysql/factories.rb +39 -39
- data/examples/generated/j2ee_petstore_oracle/factories.rb +36 -36
- data/examples/generated/j2ee_petstore_sqlite3/factories.rb +39 -39
- data/legacy_data.gemspec +4 -3
- data/lib/{active_record/connection_adapters/oracleenhanced_adapter.rb → foreigner/connection_adapters/oracle_enhanced_adapter.rb} +0 -0
- data/lib/generators/models_from_tables/USAGE +12 -0
- data/lib/generators/models_from_tables/models_from_tables_generator.rb +70 -0
- data/lib/generators/models_from_tables/templates/model.rb +11 -0
- data/lib/legacy_data.rb +6 -7
- data/lib/legacy_data/schema.rb +1 -0
- data/lib/legacy_data/table_class_name_mapper.rb +4 -2
- data/lib/legacy_data/table_definition.rb +1 -2
- data/spec/functional/blog_adapterspec.rb +13 -13
- data/spec/functional/drupal_adapterspec.rb +14 -12
- data/spec/functional/functional_spec_helper.rb +3 -5
- data/spec/functional/j2ee_petstore_adapterspec.rb +14 -14
- data/spec/generators/models_from_tables/expected/factories.rb +5 -0
- data/spec/{expected → generators/models_from_tables/expected}/post.rb +0 -0
- data/spec/{models_from_tables_generator_spec.rb → generators/models_from_tables/models_from_tables_generator_spec.rb} +28 -28
- data/spec/legacy_data/schema_spec.rb +0 -1
- data/spec/legacy_data/table_class_name_mapper_spec.rb +1 -4
- data/spec/spec_helper.rb +46 -28
- metadata +66 -49
- data/generators/models_from_tables/USAGE +0 -6
- data/generators/models_from_tables/models_from_tables_generator.rb +0 -78
- data/generators/models_from_tables/templates/model.rb +0 -11
- data/spec/expected/factories.rb +0 -5
data/.rvmrc
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
rvm @legacy_data
|
data/History.txt
CHANGED
data/README.md
CHANGED
@@ -5,6 +5,8 @@ encoded in the database? Do you have to understand the entire data model before
|
|
5
5
|
in the `legacy_data` gem can help! This generator looks into your existing database and generates ActiveRecord models based on the
|
6
6
|
information encoded in it.
|
7
7
|
|
8
|
+
* If you are using Rails 2.3 you must use v 0.1.12 of this gem "gem install legacy_data --version 0.1.12"
|
9
|
+
|
8
10
|
|
9
11
|
## How to use it
|
10
12
|
|
@@ -14,17 +16,17 @@ information encoded in it.
|
|
14
16
|
|
15
17
|
- If you don't want all tables in the database tell it which table to model
|
16
18
|
|
17
|
-
`script/generate models_from_tables
|
19
|
+
`script/generate models_from_tables comments`
|
18
20
|
|
19
21
|
This uses any foreign_key constraints in the database to spider the database and model the comments table and all associated tables.
|
20
22
|
|
21
23
|
- If you *really* only want the comments table tell it not to follow any foreign_keys
|
22
24
|
|
23
|
-
`script/generate models_from_tables
|
25
|
+
`script/generate models_from_tables comments --skip-associated`
|
24
26
|
|
25
27
|
- If you use [factory girl](http://github.com/thoughtbot/factory_girl) it will generate a simple factory for each model it generates
|
26
28
|
|
27
|
-
`script/generate models_from_tables
|
29
|
+
`script/generate models_from_tables comments`
|
28
30
|
|
29
31
|
(You do need to install the plugin `gem install legacy_data` as long as http://gemcutter.org is one of your gem sources)
|
30
32
|
|
@@ -85,4 +87,4 @@ end
|
|
85
87
|
|
86
88
|
# Copyright
|
87
89
|
|
88
|
-
Copyright (c)
|
90
|
+
Copyright (c) 2010 Alex Rothenberg. See LICENSE for details.
|
data/Rakefile
CHANGED
@@ -13,7 +13,6 @@ end
|
|
13
13
|
require 'rake'
|
14
14
|
|
15
15
|
task :default => :spec_all
|
16
|
-
task :spec => :check_dependencies
|
17
16
|
|
18
17
|
|
19
18
|
# GEM Tasks --------------------------------------------------------
|
@@ -23,10 +22,9 @@ Rake::GemPackageTask.new(spec) do |pkg|
|
|
23
22
|
end
|
24
23
|
# --------------------------------------------------------
|
25
24
|
|
26
|
-
require
|
27
|
-
|
28
|
-
|
29
|
-
spec.spec_files = FileList['spec/**/*_spec.rb']
|
25
|
+
require "rspec/core/rake_task"
|
26
|
+
# rake spec
|
27
|
+
RSpec::Core::RakeTask.new :spec do |spec|
|
30
28
|
end
|
31
29
|
|
32
30
|
def print_msg msg
|
@@ -60,11 +58,13 @@ def adapters
|
|
60
58
|
%w( mysql sqlite3 oracle)
|
61
59
|
end
|
62
60
|
|
61
|
+
# run specs for one database adapter
|
62
|
+
# i.e. rake mysql:spec OR rake sqlite3:spec
|
63
63
|
for adapter in adapters
|
64
64
|
namespace adapter do
|
65
|
-
|
66
|
-
|
67
|
-
spec.
|
65
|
+
desc "Run functional specs using database adapter #{adapter}"
|
66
|
+
RSpec::Core::RakeTask.new :spec do |spec|
|
67
|
+
spec.pattern = "spec/**/*_adapterspec.rb"
|
68
68
|
end
|
69
69
|
end
|
70
70
|
end
|
@@ -74,9 +74,7 @@ task :spec_all => :spec do
|
|
74
74
|
run_functional_without_aborting(*adapters)
|
75
75
|
end
|
76
76
|
|
77
|
-
|
78
|
-
spec.libs << 'lib' << 'spec'
|
79
|
-
spec.pattern = 'spec/**/*_spec.rb'
|
77
|
+
RSpec::Core::RakeTask.new :rcov do |spec|
|
80
78
|
spec.rcov = true
|
81
79
|
spec.rcov_opts = ['--exclude spec,gems', '--sort coverage']
|
82
80
|
end
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.2.0
|
@@ -1,12 +1,12 @@
|
|
1
|
-
Factory.define :comment do |
|
1
|
+
Factory.define :comment do |comment|
|
2
2
|
end
|
3
3
|
|
4
|
-
Factory.define :post_tag do |
|
4
|
+
Factory.define :post_tag do |post_tag|
|
5
5
|
end
|
6
6
|
|
7
|
-
Factory.define :post do |
|
7
|
+
Factory.define :post do |post|
|
8
8
|
end
|
9
9
|
|
10
|
-
Factory.define :tag do |
|
10
|
+
Factory.define :tag do |tag|
|
11
11
|
end
|
12
12
|
|
@@ -1,370 +1,370 @@
|
|
1
|
-
Factory.define :access do |
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
Factory.define :access do |access|
|
2
|
+
access.mask 'some string'
|
3
|
+
access.type 'some string'
|
4
|
+
access.status 7
|
5
5
|
end
|
6
6
|
|
7
|
-
Factory.define :action do |
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
7
|
+
Factory.define :action do |action|
|
8
|
+
action.type 'some string'
|
9
|
+
action.callback 'some string'
|
10
|
+
action.parameters 'some text value'
|
11
|
+
action.description 'some string'
|
12
12
|
end
|
13
13
|
|
14
|
-
Factory.define :actions_aid do |
|
14
|
+
Factory.define :actions_aid do |actions_aid|
|
15
15
|
end
|
16
16
|
|
17
|
-
Factory.define :authmap do |
|
18
|
-
|
19
|
-
|
20
|
-
|
17
|
+
Factory.define :authmap do |authmap|
|
18
|
+
authmap.uid 7
|
19
|
+
authmap.authname 'some string'
|
20
|
+
authmap.module 'some string'
|
21
21
|
end
|
22
22
|
|
23
|
-
Factory.define :batch do |
|
24
|
-
|
25
|
-
|
23
|
+
Factory.define :batch do |batch|
|
24
|
+
batch.token 'some string'
|
25
|
+
batch.timestamp 7
|
26
26
|
end
|
27
27
|
|
28
|
-
Factory.define :block do |
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
28
|
+
Factory.define :block do |block|
|
29
|
+
block.module 'some string'
|
30
|
+
block.delta 'some string'
|
31
|
+
block.theme 'some string'
|
32
|
+
block.status 7
|
33
|
+
block.weight 7
|
34
|
+
block.region 'some string'
|
35
|
+
block.custom 7
|
36
|
+
block.throttle 7
|
37
|
+
block.visibility 7
|
38
|
+
block.pages 'some text value'
|
39
|
+
block.title 'some string'
|
40
|
+
block.cache 7
|
41
41
|
end
|
42
42
|
|
43
|
-
Factory.define :blocks_role do |
|
44
|
-
|
45
|
-
|
46
|
-
|
43
|
+
Factory.define :blocks_role do |blocks_role|
|
44
|
+
blocks_role.module 'some string'
|
45
|
+
blocks_role.delta 'some string'
|
46
|
+
blocks_role.rid 7
|
47
47
|
end
|
48
48
|
|
49
|
-
Factory.define :box do |
|
50
|
-
|
51
|
-
|
49
|
+
Factory.define :box do |box|
|
50
|
+
box.info 'some string'
|
51
|
+
box.format 7
|
52
52
|
end
|
53
53
|
|
54
|
-
Factory.define :cache do |
|
55
|
-
|
56
|
-
|
57
|
-
|
54
|
+
Factory.define :cache do |cache|
|
55
|
+
cache.expire 7
|
56
|
+
cache.created 7
|
57
|
+
cache.serialized 7
|
58
58
|
end
|
59
59
|
|
60
|
-
Factory.define :cache_block do |
|
61
|
-
|
62
|
-
|
63
|
-
|
60
|
+
Factory.define :cache_block do |cache_block|
|
61
|
+
cache_block.expire 7
|
62
|
+
cache_block.created 7
|
63
|
+
cache_block.serialized 7
|
64
64
|
end
|
65
65
|
|
66
|
-
Factory.define :cache_filter do |
|
67
|
-
|
68
|
-
|
69
|
-
|
66
|
+
Factory.define :cache_filter do |cache_filter|
|
67
|
+
cache_filter.expire 7
|
68
|
+
cache_filter.created 7
|
69
|
+
cache_filter.serialized 7
|
70
70
|
end
|
71
71
|
|
72
|
-
Factory.define :cache_form do |
|
73
|
-
|
74
|
-
|
75
|
-
|
72
|
+
Factory.define :cache_form do |cache_form|
|
73
|
+
cache_form.expire 7
|
74
|
+
cache_form.created 7
|
75
|
+
cache_form.serialized 7
|
76
76
|
end
|
77
77
|
|
78
|
-
Factory.define :cache_menu do |
|
79
|
-
|
80
|
-
|
81
|
-
|
78
|
+
Factory.define :cache_menu do |cache_menu|
|
79
|
+
cache_menu.expire 7
|
80
|
+
cache_menu.created 7
|
81
|
+
cache_menu.serialized 7
|
82
82
|
end
|
83
83
|
|
84
|
-
Factory.define :cache_page do |
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
end
|
89
|
-
|
90
|
-
Factory.define :cache_update do |
|
91
|
-
|
92
|
-
|
93
|
-
|
84
|
+
Factory.define :cache_page do |cache_page|
|
85
|
+
cache_page.expire 7
|
86
|
+
cache_page.created 7
|
87
|
+
cache_page.serialized 7
|
88
|
+
end
|
89
|
+
|
90
|
+
Factory.define :cache_update do |cache_update|
|
91
|
+
cache_update.expire 7
|
92
|
+
cache_update.created 7
|
93
|
+
cache_update.serialized 7
|
94
94
|
end
|
95
95
|
|
96
|
-
Factory.define :comment do |
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
end
|
108
|
-
|
109
|
-
Factory.define :uploaded_files do |
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
end
|
118
|
-
|
119
|
-
Factory.define :filter_format do |
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
end
|
124
|
-
|
125
|
-
Factory.define :filter do |
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
end
|
131
|
-
|
132
|
-
Factory.define :flood do |
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
end
|
137
|
-
|
138
|
-
Factory.define :history do |
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
end
|
143
|
-
|
144
|
-
Factory.define :menu_custom do |
|
145
|
-
|
146
|
-
end
|
147
|
-
|
148
|
-
Factory.define :menu_link do |
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
end
|
173
|
-
|
174
|
-
Factory.define :menu_router do |
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
end
|
192
|
-
|
193
|
-
Factory.define :node do |
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
end
|
209
|
-
|
210
|
-
Factory.define :node_access do |
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
end
|
218
|
-
|
219
|
-
Factory.define :node_comment_statistic do |
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
end
|
224
|
-
|
225
|
-
Factory.define :node_counter do |
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
end
|
230
|
-
|
231
|
-
Factory.define :node_revision do |
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
end
|
241
|
-
|
242
|
-
Factory.define :node_type do |
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
end
|
257
|
-
|
258
|
-
Factory.define :permission do |
|
259
|
-
|
260
|
-
|
261
|
-
end
|
262
|
-
|
263
|
-
Factory.define :role do |
|
264
|
-
|
265
|
-
end
|
266
|
-
|
267
|
-
Factory.define :session do |
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
end
|
273
|
-
|
274
|
-
Factory.define :system do |
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
end
|
284
|
-
|
285
|
-
Factory.define :term_data do |
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
end
|
96
|
+
Factory.define :comment do |comment|
|
97
|
+
comment.pid 7
|
98
|
+
comment.nid 7
|
99
|
+
comment.uid 7
|
100
|
+
comment.subject 'some string'
|
101
|
+
comment.comment 'some text value'
|
102
|
+
comment.hostname 'some string'
|
103
|
+
comment.timestamp 7
|
104
|
+
comment.status 7
|
105
|
+
comment.format 7
|
106
|
+
comment.thread 'some string'
|
107
|
+
end
|
108
|
+
|
109
|
+
Factory.define :uploaded_files do |uploaded_files|
|
110
|
+
uploaded_files.uid 7
|
111
|
+
uploaded_files.filename 'some string'
|
112
|
+
uploaded_files.filepath 'some string'
|
113
|
+
uploaded_files.filemime 'some string'
|
114
|
+
uploaded_files.filesize 7
|
115
|
+
uploaded_files.status 7
|
116
|
+
uploaded_files.timestamp 7
|
117
|
+
end
|
118
|
+
|
119
|
+
Factory.define :filter_format do |filter_format|
|
120
|
+
filter_format.name 'some string'
|
121
|
+
filter_format.roles 'some string'
|
122
|
+
filter_format.cache 7
|
123
|
+
end
|
124
|
+
|
125
|
+
Factory.define :filter do |filter|
|
126
|
+
filter.format 7
|
127
|
+
filter.module 'some string'
|
128
|
+
filter.delta 7
|
129
|
+
filter.weight 7
|
130
|
+
end
|
131
|
+
|
132
|
+
Factory.define :flood do |flood|
|
133
|
+
flood.event 'some string'
|
134
|
+
flood.hostname 'some string'
|
135
|
+
flood.timestamp 7
|
136
|
+
end
|
137
|
+
|
138
|
+
Factory.define :history do |history|
|
139
|
+
history.uid 7
|
140
|
+
history.nid 7
|
141
|
+
history.timestamp 7
|
142
|
+
end
|
143
|
+
|
144
|
+
Factory.define :menu_custom do |menu_custom|
|
145
|
+
menu_custom.title 'some string'
|
146
|
+
end
|
147
|
+
|
148
|
+
Factory.define :menu_link do |menu_link|
|
149
|
+
menu_link.menu_name 'some string'
|
150
|
+
menu_link.plid 7
|
151
|
+
menu_link.link_path 'some string'
|
152
|
+
menu_link.router_path 'some string'
|
153
|
+
menu_link.link_title 'some string'
|
154
|
+
menu_link.module 'some string'
|
155
|
+
menu_link.hidden 7
|
156
|
+
menu_link.external 7
|
157
|
+
menu_link.has_children 7
|
158
|
+
menu_link.expanded 7
|
159
|
+
menu_link.weight 7
|
160
|
+
menu_link.depth 7
|
161
|
+
menu_link.customized 7
|
162
|
+
menu_link.p1 7
|
163
|
+
menu_link.p2 7
|
164
|
+
menu_link.p3 7
|
165
|
+
menu_link.p4 7
|
166
|
+
menu_link.p5 7
|
167
|
+
menu_link.p6 7
|
168
|
+
menu_link.p7 7
|
169
|
+
menu_link.p8 7
|
170
|
+
menu_link.p9 7
|
171
|
+
menu_link.updated 7
|
172
|
+
end
|
173
|
+
|
174
|
+
Factory.define :menu_router do |menu_router|
|
175
|
+
menu_router.load_functions 'some text value'
|
176
|
+
menu_router.to_arg_functions 'some text value'
|
177
|
+
menu_router.access_callback 'some string'
|
178
|
+
menu_router.page_callback 'some string'
|
179
|
+
menu_router.fit 7
|
180
|
+
menu_router.number_parts 7
|
181
|
+
menu_router.tab_parent 'some string'
|
182
|
+
menu_router.tab_root 'some string'
|
183
|
+
menu_router.title 'some string'
|
184
|
+
menu_router.title_callback 'some string'
|
185
|
+
menu_router.title_arguments 'some string'
|
186
|
+
menu_router.type 7
|
187
|
+
menu_router.block_callback 'some string'
|
188
|
+
menu_router.description 'some text value'
|
189
|
+
menu_router.position 'some string'
|
190
|
+
menu_router.weight 7
|
191
|
+
end
|
192
|
+
|
193
|
+
Factory.define :node do |node|
|
194
|
+
node.vid 7
|
195
|
+
node.type 'some string'
|
196
|
+
node.language 'some string'
|
197
|
+
node.title 'some string'
|
198
|
+
node.uid 7
|
199
|
+
node.status 7
|
200
|
+
node.created 7
|
201
|
+
node.changed 7
|
202
|
+
node.comment 7
|
203
|
+
node.promote 7
|
204
|
+
node.moderate 7
|
205
|
+
node.sticky 7
|
206
|
+
node.tnid 7
|
207
|
+
node.translate 7
|
208
|
+
end
|
209
|
+
|
210
|
+
Factory.define :node_access do |node_access|
|
211
|
+
node_access.nid 7
|
212
|
+
node_access.gid 7
|
213
|
+
node_access.realm 'some string'
|
214
|
+
node_access.grant_view 7
|
215
|
+
node_access.grant_update 7
|
216
|
+
node_access.grant_delete 7
|
217
|
+
end
|
218
|
+
|
219
|
+
Factory.define :node_comment_statistic do |node_comment_statistic|
|
220
|
+
node_comment_statistic.last_comment_timestamp 7
|
221
|
+
node_comment_statistic.last_comment_uid 7
|
222
|
+
node_comment_statistic.comment_count 7
|
223
|
+
end
|
224
|
+
|
225
|
+
Factory.define :node_counter do |node_counter|
|
226
|
+
node_counter.totalcount 7
|
227
|
+
node_counter.daycount 7
|
228
|
+
node_counter.timestamp 7
|
229
|
+
end
|
230
|
+
|
231
|
+
Factory.define :node_revision do |node_revision|
|
232
|
+
node_revision.nid 7
|
233
|
+
node_revision.uid 7
|
234
|
+
node_revision.title 'some string'
|
235
|
+
node_revision.body 'some text value'
|
236
|
+
node_revision.teaser 'some text value'
|
237
|
+
node_revision.log 'some text value'
|
238
|
+
node_revision.timestamp 7
|
239
|
+
node_revision.format 7
|
240
|
+
end
|
241
|
+
|
242
|
+
Factory.define :node_type do |node_type|
|
243
|
+
node_type.name 'some string'
|
244
|
+
node_type.module 'some string'
|
245
|
+
node_type.description 'some text value'
|
246
|
+
node_type.help 'some text value'
|
247
|
+
node_type.has_title 7
|
248
|
+
node_type.title_label 'some string'
|
249
|
+
node_type.has_body 7
|
250
|
+
node_type.body_label 'some string'
|
251
|
+
node_type.min_word_count 7
|
252
|
+
node_type.custom 7
|
253
|
+
node_type.modified 7
|
254
|
+
node_type.locked 7
|
255
|
+
node_type.orig_type 'some string'
|
256
|
+
end
|
257
|
+
|
258
|
+
Factory.define :permission do |permission|
|
259
|
+
permission.rid 7
|
260
|
+
permission.tid 7
|
261
|
+
end
|
262
|
+
|
263
|
+
Factory.define :role do |role|
|
264
|
+
role.name 'some string'
|
265
|
+
end
|
266
|
+
|
267
|
+
Factory.define :session do |session|
|
268
|
+
session.uid 7
|
269
|
+
session.hostname 'some string'
|
270
|
+
session.timestamp 7
|
271
|
+
session.cache 7
|
272
|
+
end
|
273
|
+
|
274
|
+
Factory.define :system do |system|
|
275
|
+
system.name 'some string'
|
276
|
+
system.type 'some string'
|
277
|
+
system.owner 'some string'
|
278
|
+
system.status 7
|
279
|
+
system.throttle 7
|
280
|
+
system.bootstrap 7
|
281
|
+
system.schema_version 7
|
282
|
+
system.weight 7
|
283
|
+
end
|
284
|
+
|
285
|
+
Factory.define :term_data do |term_data|
|
286
|
+
term_data.vid 7
|
287
|
+
term_data.name 'some string'
|
288
|
+
term_data.weight 7
|
289
|
+
end
|
290
290
|
|
291
|
-
Factory.define :term_hierarchy do |
|
292
|
-
|
293
|
-
|
294
|
-
end
|
295
|
-
|
296
|
-
Factory.define :term_node do |
|
297
|
-
|
298
|
-
|
299
|
-
|
291
|
+
Factory.define :term_hierarchy do |term_hierarchy|
|
292
|
+
term_hierarchy.tid 7
|
293
|
+
term_hierarchy.parent 7
|
294
|
+
end
|
295
|
+
|
296
|
+
Factory.define :term_node do |term_node|
|
297
|
+
term_node.nid 7
|
298
|
+
term_node.vid 7
|
299
|
+
term_node.tid 7
|
300
300
|
end
|
301
301
|
|
302
|
-
Factory.define :term_relation do |
|
303
|
-
|
304
|
-
|
302
|
+
Factory.define :term_relation do |term_relation|
|
303
|
+
term_relation.tid1 7
|
304
|
+
term_relation.tid2 7
|
305
305
|
end
|
306
306
|
|
307
|
-
Factory.define :term_synonym do |
|
308
|
-
|
309
|
-
|
307
|
+
Factory.define :term_synonym do |term_synonym|
|
308
|
+
term_synonym.tid 7
|
309
|
+
term_synonym.name 'some string'
|
310
310
|
end
|
311
311
|
|
312
|
-
Factory.define :url_alias do |
|
313
|
-
|
314
|
-
|
315
|
-
|
312
|
+
Factory.define :url_alias do |url_alias|
|
313
|
+
url_alias.src 'some string'
|
314
|
+
url_alias.dst 'some string'
|
315
|
+
url_alias.language 'some string'
|
316
316
|
end
|
317
317
|
|
318
|
-
Factory.define :user do |
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
318
|
+
Factory.define :user do |user|
|
319
|
+
user.name 'some string'
|
320
|
+
user.pass 'some string'
|
321
|
+
user.mode 7
|
322
|
+
user.theme 'some string'
|
323
|
+
user.signature 'some string'
|
324
|
+
user.signature_format 7
|
325
|
+
user.created 7
|
326
|
+
user.access 7
|
327
|
+
user.login 7
|
328
|
+
user.status 7
|
329
|
+
user.language 'some string'
|
330
|
+
user.picture 'some string'
|
331
331
|
end
|
332
332
|
|
333
|
-
Factory.define :users_role do |
|
334
|
-
|
335
|
-
|
333
|
+
Factory.define :users_role do |users_role|
|
334
|
+
users_role.uid 7
|
335
|
+
users_role.rid 7
|
336
336
|
end
|
337
337
|
|
338
|
-
Factory.define :variable do |
|
339
|
-
|
338
|
+
Factory.define :variable do |variable|
|
339
|
+
variable.value 'some text value'
|
340
340
|
end
|
341
341
|
|
342
|
-
Factory.define :vocabulary do |
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
342
|
+
Factory.define :vocabulary do |vocabulary|
|
343
|
+
vocabulary.name 'some string'
|
344
|
+
vocabulary.help 'some string'
|
345
|
+
vocabulary.relations 7
|
346
|
+
vocabulary.hierarchy 7
|
347
|
+
vocabulary.multiple 7
|
348
|
+
vocabulary.required 7
|
349
|
+
vocabulary.tags 7
|
350
|
+
vocabulary.module 'some string'
|
351
|
+
vocabulary.weight 7
|
352
352
|
end
|
353
353
|
|
354
|
-
Factory.define :vocabulary_node_type do |
|
355
|
-
|
356
|
-
|
354
|
+
Factory.define :vocabulary_node_type do |vocabulary_node_type|
|
355
|
+
vocabulary_node_type.vid 7
|
356
|
+
vocabulary_node_type.type 'some string'
|
357
357
|
end
|
358
358
|
|
359
|
-
Factory.define :watchdog do |
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
359
|
+
Factory.define :watchdog do |watchdog|
|
360
|
+
watchdog.uid 7
|
361
|
+
watchdog.type 'some string'
|
362
|
+
watchdog.message 'some text value'
|
363
|
+
watchdog.variables 'some text value'
|
364
|
+
watchdog.severity 7
|
365
|
+
watchdog.link 'some string'
|
366
|
+
watchdog.location 'some text value'
|
367
|
+
watchdog.hostname 'some string'
|
368
|
+
watchdog.timestamp 7
|
369
369
|
end
|
370
370
|
|