ish_lib_engine 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +3 -0
- data/Rakefile +34 -0
- data/app/assets/javascripts/ish_lib_engine/application.js +13 -0
- data/app/assets/javascripts/ish_lib_engine/articles.js +2 -0
- data/app/assets/stylesheets/ish_lib_engine/application.css +15 -0
- data/app/assets/stylesheets/ish_lib_engine/articles.css +4 -0
- data/app/assets/stylesheets/scaffold.css +56 -0
- data/app/controllers/ish_lib_engine/application_controller.rb +4 -0
- data/app/controllers/ish_lib_engine/articles_controller.rb +62 -0
- data/app/controllers/ish_lib_engine/manager/cities_controller.rb +95 -0
- data/app/controllers/ish_lib_engine/manager/cities_controller.rb~ +95 -0
- data/app/controllers/ish_lib_engine/manager/features_controller.rb +122 -0
- data/app/controllers/ish_lib_engine/manager/features_controller.rb~ +122 -0
- data/app/controllers/ish_lib_engine/manager/galleries_controller.rb +78 -0
- data/app/controllers/ish_lib_engine/manager/galleries_controller.rb~ +78 -0
- data/app/controllers/ish_lib_engine/manager/manager_controller.rb +31 -0
- data/app/controllers/ish_lib_engine/manager/manager_controller.rb~ +31 -0
- data/app/controllers/ish_lib_engine/manager/newsitems_controller.rb +47 -0
- data/app/controllers/ish_lib_engine/manager/newsitems_controller.rb~ +47 -0
- data/app/controllers/ish_lib_engine/manager/photos_controller.rb +20 -0
- data/app/controllers/ish_lib_engine/manager/photos_controller.rb~ +20 -0
- data/app/controllers/ish_lib_engine/manager/reports_controller.rb +62 -0
- data/app/controllers/ish_lib_engine/manager/reports_controller.rb~ +62 -0
- data/app/controllers/ish_lib_engine/manager/sites_controller.rb +72 -0
- data/app/controllers/ish_lib_engine/manager/sites_controller.rb~ +72 -0
- data/app/controllers/ish_lib_engine/manager/tags_controller.rb +54 -0
- data/app/controllers/ish_lib_engine/manager/tags_controller.rb~ +54 -0
- data/app/controllers/ish_lib_engine/manager/users_controller.rb +13 -0
- data/app/controllers/ish_lib_engine/manager/users_controller.rb~ +13 -0
- data/app/controllers/ish_lib_engine/manager/welcome_controller.rb +8 -0
- data/app/controllers/ish_lib_engine/manager/welcome_controller.rb~ +9 -0
- data/app/helpers/ish_lib_engine/application_helper.rb +4 -0
- data/app/helpers/ish_lib_engine/articles_helper.rb +4 -0
- data/app/models/ability.rb +152 -0
- data/app/models/ability.rb~ +151 -0
- data/app/models/admin_user.rb +113 -0
- data/app/models/app_model2.rb +33 -0
- data/app/models/auth_token.rb +17 -0
- data/app/models/aux_model.rb +22 -0
- data/app/models/cities_user.rb +17 -0
- data/app/models/city.rb +117 -0
- data/app/models/country.rb +13 -0
- data/app/models/day.rb +21 -0
- data/app/models/decoded_auth_token.rb +6 -0
- data/app/models/event.rb +21 -0
- data/app/models/feature.rb +38 -0
- data/app/models/gallery.rb +59 -0
- data/app/models/ish_lib_engine/article.rb +4 -0
- data/app/models/ish_lib_engine/comment.rb +4 -0
- data/app/models/manager.rb +10 -0
- data/app/models/manager_city.rb +4 -0
- data/app/models/manager_feature.rb +4 -0
- data/app/models/manager_gallery.rb +3 -0
- data/app/models/manager_newsitem.rb +5 -0
- data/app/models/manager_photo.rb +3 -0
- data/app/models/manager_report.rb +4 -0
- data/app/models/manager_site.rb +4 -0
- data/app/models/manager_tag.rb +6 -0
- data/app/models/manager_user.rb +3 -0
- data/app/models/manager_venue.rb +4 -0
- data/app/models/message.rb +14 -0
- data/app/models/newsitem.rb +50 -0
- data/app/models/nodeitem.rb +18 -0
- data/app/models/photo.rb +68 -0
- data/app/models/rate_me.rb +13 -0
- data/app/models/report.rb +144 -0
- data/app/models/review.rb +4 -0
- data/app/models/site.rb +83 -0
- data/app/models/tag.rb +78 -0
- data/app/models/user.rb +122 -0
- data/app/models/user_profile.rb +20 -0
- data/app/models/venue.rb +69 -0
- data/app/models/video.rb +48 -0
- data/app/models/welcome.rb +6 -0
- data/app/models/wikitravel_page.rb +19 -0
- data/app/views/application/_flash_messages.haml +24 -0
- data/app/views/application/_flash_messages.haml~ +24 -0
- data/app/views/ish_lib_engine/articles/_form.html.erb +25 -0
- data/app/views/ish_lib_engine/articles/edit.html.erb +6 -0
- data/app/views/ish_lib_engine/articles/index.html.erb +29 -0
- data/app/views/ish_lib_engine/articles/new.html.erb +5 -0
- data/app/views/ish_lib_engine/articles/show.html.erb +14 -0
- data/app/views/layouts/ish_lib_engine/application.html.erb +14 -0
- data/config/routes.rb +3 -0
- data/db/migrate/20160501041837_create_ish_lib_engine_articles.rb +10 -0
- data/db/migrate/20160501041940_create_ish_lib_engine_comments.rb +10 -0
- data/lib/addressbookitems_tasks.rb +33 -0
- data/lib/cities_tasks.rb +143 -0
- data/lib/core_extensions.rb +21 -0
- data/lib/features_tasks.rb +17 -0
- data/lib/float.rb +14 -0
- data/lib/galleries_tasks.rb +91 -0
- data/lib/ish_lib_engine.rb +4 -0
- data/lib/ish_lib_engine/engine.rb +5 -0
- data/lib/ish_lib_engine/version.rb +3 -0
- data/lib/reports_tasks.rb +53 -0
- data/lib/sitemaps_tasks.rb +108 -0
- data/lib/sites_tasks.rb +31 -0
- data/lib/string.rb +15 -0
- data/lib/tags_tasks.rb +104 -0
- data/lib/tasks/cities.rake +29 -0
- data/lib/tasks/galleries.rake +19 -0
- data/lib/tasks/ish_lib_engine_tasks.rake +4 -0
- data/lib/tasks/reports.rake +37 -0
- data/lib/tasks/resque.rake +8 -0
- data/lib/tasks/sitemaps.rake +12 -0
- data/lib/tasks/sites.rake +12 -0
- data/lib/tasks/tags.rake +17 -0
- data/lib/tasks/users.rake +14 -0
- data/lib/tasks/venues.rake +13 -0
- data/lib/tasks/videos.rake +18 -0
- data/lib/tasks/wikitravel_pages.rake +40 -0
- data/lib/test_extensions.rb +9 -0
- data/lib/u.rb +34 -0
- data/lib/users_tasks.rb +88 -0
- data/lib/venues_tasks.rb +15 -0
- data/lib/videos_tasks.rb +71 -0
- data/lib/wikitravel_tasks.rb +139 -0
- data/spec/factories/cities.rb +89 -0
- data/spec/factories/galleries.rb +133 -0
- data/spec/factories/photo.rb +20 -0
- data/spec/factories/reports.rb +379 -0
- data/spec/factories/site.rb +26 -0
- data/spec/factories/tag.rb +42 -0
- data/spec/factories/user.rb +87 -0
- data/spec/factories/user_profiles.rb +33 -0
- data/spec/factories/venues.rb +25 -0
- data/spec/factories/videos.rb +38 -0
- data/test/controllers/ish_lib_engine/articles_controller_test.rb +52 -0
- data/test/dummy/README.rdoc +28 -0
- data/test/dummy/Rakefile +6 -0
- data/test/dummy/app/assets/javascripts/application.js +13 -0
- data/test/dummy/app/assets/stylesheets/application.css +15 -0
- data/test/dummy/app/controllers/application_controller.rb +5 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/bin/bundle +3 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/bin/setup +29 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/config/application.rb +26 -0
- data/test/dummy/config/boot.rb +5 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +41 -0
- data/test/dummy/config/environments/production.rb +79 -0
- data/test/dummy/config/environments/test.rb +42 -0
- data/test/dummy/config/initializers/assets.rb +11 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/mime_types.rb +4 -0
- data/test/dummy/config/initializers/session_store.rb +3 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +23 -0
- data/test/dummy/config/routes.rb +4 -0
- data/test/dummy/config/secrets.yml +22 -0
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/schema.rb +30 -0
- data/test/dummy/log/development.log +15 -0
- data/test/dummy/public/404.html +67 -0
- data/test/dummy/public/422.html +67 -0
- data/test/dummy/public/500.html +66 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/fixtures/ish_lib_engine/articles.yml +9 -0
- data/test/fixtures/ish_lib_engine/comments.yml +9 -0
- data/test/integration/navigation_test.rb +8 -0
- data/test/ish_lib_engine_test.rb +7 -0
- data/test/models/ish_lib_engine/article_test.rb +9 -0
- data/test/models/ish_lib_engine/comment_test.rb +9 -0
- data/test/test_helper.rb +21 -0
- metadata +361 -0
@@ -0,0 +1,20 @@
|
|
1
|
+
|
2
|
+
url_1 = 'https://s3.amazonaws.com/ISh-trashy/photos/thumb/52587525b6c0d0a0f0000027/vec.jpg'
|
3
|
+
|
4
|
+
FactoryGirl.define do
|
5
|
+
|
6
|
+
factory :photo do
|
7
|
+
name 'blah blah'
|
8
|
+
is_public 1
|
9
|
+
is_trash 0
|
10
|
+
# photo File.open('spec/data/photo_1.jpg')
|
11
|
+
photo File.open('spec/data/photo_2.gif')
|
12
|
+
user User.all.first
|
13
|
+
end
|
14
|
+
|
15
|
+
factory :photo_without_name, :parent => :photo do
|
16
|
+
name ''
|
17
|
+
end
|
18
|
+
|
19
|
+
|
20
|
+
end
|
@@ -0,0 +1,379 @@
|
|
1
|
+
|
2
|
+
FactoryGirl.define do
|
3
|
+
|
4
|
+
factory :report do
|
5
|
+
name 'Report name'
|
6
|
+
name_seo 'Report-name'
|
7
|
+
created_at '2012-01-01'
|
8
|
+
is_feature true
|
9
|
+
is_public true
|
10
|
+
is_trash false
|
11
|
+
username 'username'
|
12
|
+
# association :tag
|
13
|
+
after(:build) do |r|
|
14
|
+
r.user = User.first || User.new
|
15
|
+
r.site = Site.first
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
factory :cac1, :parent => :report do
|
20
|
+
name 'blah blah ssss'
|
21
|
+
name_seo 'blah-blah_544'
|
22
|
+
created_at '2012-01-01'
|
23
|
+
username 'username'
|
24
|
+
after(:build) do |r|
|
25
|
+
r.tag = Tag.where( :name_seo => 'cac' ).first
|
26
|
+
r.user = User.first
|
27
|
+
r.site = Site.first
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
|
32
|
+
factory :r1, :class => Report do
|
33
|
+
name 'blah blah 3 saa'
|
34
|
+
name_seo 'blah-blah344443'
|
35
|
+
created_at '2012-01-01'
|
36
|
+
is_trash false
|
37
|
+
is_public true
|
38
|
+
username 'username'
|
39
|
+
after(:build) do |r|
|
40
|
+
r.tag = Tag.where( :domain => 'test.local' ).first
|
41
|
+
r.user = User.first
|
42
|
+
r.site = Site.first
|
43
|
+
end
|
44
|
+
|
45
|
+
end
|
46
|
+
|
47
|
+
factory :r2, :class => Report do
|
48
|
+
name 'blah blah.2'
|
49
|
+
name_seo 'blah-blah244'
|
50
|
+
created_at '2012-02-01'
|
51
|
+
is_trash false
|
52
|
+
is_public true
|
53
|
+
username 'username'
|
54
|
+
|
55
|
+
after(:build) do |r|
|
56
|
+
r.tag = Tag.where( :domain => 'test.local' ).first
|
57
|
+
r.user = User.first
|
58
|
+
r.site = Site.first
|
59
|
+
r.save
|
60
|
+
end
|
61
|
+
|
62
|
+
end
|
63
|
+
|
64
|
+
factory :r3, :class => Report do
|
65
|
+
name 'blah blah 3'
|
66
|
+
name_seo 'blah-blah-3'
|
67
|
+
created_at '2012-01-02'
|
68
|
+
is_trash false
|
69
|
+
is_public true
|
70
|
+
username 'username'
|
71
|
+
|
72
|
+
after(:build) do |r|
|
73
|
+
r.tag = Tag.where( :domain => 'test.local' ).first
|
74
|
+
r.user = User.first
|
75
|
+
r.site = Site.first
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
factory :r4, :class => Report do
|
80
|
+
name 'blah blah 4'
|
81
|
+
name_seo 'blah-blah-4'
|
82
|
+
created_at '2012-01-10'
|
83
|
+
username 'username'
|
84
|
+
|
85
|
+
after(:build) do |r|
|
86
|
+
r.tag = Tag.where( :name => 'Tag 2' ).first
|
87
|
+
r.user = User.first
|
88
|
+
r.site = Site.first
|
89
|
+
end
|
90
|
+
|
91
|
+
end
|
92
|
+
|
93
|
+
factory :r5, :class => Report do
|
94
|
+
name 'blah 1-'
|
95
|
+
name_seo 'blah_1'
|
96
|
+
created_at '2012-01-10'
|
97
|
+
username 'username'
|
98
|
+
|
99
|
+
after(:build) do |r|
|
100
|
+
r.tag = Tag.where( :name => 'Tag 2' ).first
|
101
|
+
r.user = User.first
|
102
|
+
r.site = Site.first
|
103
|
+
end
|
104
|
+
|
105
|
+
end
|
106
|
+
factory :r6, :class => Report do
|
107
|
+
name 'blah 2-'
|
108
|
+
name_seo 'blah_2'
|
109
|
+
created_at '2012-01-10'
|
110
|
+
username 'username'
|
111
|
+
|
112
|
+
after(:build) do |r|
|
113
|
+
r.tag = Tag.where( :name => 'Tag 2' ).first
|
114
|
+
r.user = User.first
|
115
|
+
r.site = Site.first
|
116
|
+
end
|
117
|
+
|
118
|
+
end
|
119
|
+
|
120
|
+
factory :r7, :class => Report do
|
121
|
+
name 'blah 3-'
|
122
|
+
name_seo 'blah_3'
|
123
|
+
created_at '2012-01-10'
|
124
|
+
username 'username'
|
125
|
+
|
126
|
+
after(:build) do |r|
|
127
|
+
r.tag = Tag.where( :name => 'Tag 2' ).first
|
128
|
+
r.user = User.first
|
129
|
+
r.site = Site.first
|
130
|
+
end
|
131
|
+
|
132
|
+
end
|
133
|
+
factory :r8, :class => Report do
|
134
|
+
name 'blah 4-'
|
135
|
+
name_seo 'blah_4'
|
136
|
+
created_at '2012-01-10'
|
137
|
+
username 'username'
|
138
|
+
|
139
|
+
after(:build) do |r|
|
140
|
+
r.tag = Tag.where( :name => 'Tag 2' ).first
|
141
|
+
r.user = User.first
|
142
|
+
r.site = Site.first
|
143
|
+
end
|
144
|
+
|
145
|
+
end
|
146
|
+
|
147
|
+
factory :r9, :class => Report do
|
148
|
+
name 'blah 9'
|
149
|
+
name_seo 'blah_9'
|
150
|
+
created_at '2012-01-10'
|
151
|
+
is_trash 0
|
152
|
+
is_public 1
|
153
|
+
username 'username'
|
154
|
+
|
155
|
+
after(:build) do |r|
|
156
|
+
r.user = User.first
|
157
|
+
r.site = Site.first
|
158
|
+
end
|
159
|
+
|
160
|
+
end
|
161
|
+
|
162
|
+
factory :r11, :class => Report do
|
163
|
+
name 'blah 9 ola'
|
164
|
+
name_seo 'ola'
|
165
|
+
created_at '2012-01-10'
|
166
|
+
is_trash 0
|
167
|
+
is_public 1
|
168
|
+
username 'username'
|
169
|
+
|
170
|
+
after(:build) do |r|
|
171
|
+
r.user = User.first
|
172
|
+
r.site = Site.first
|
173
|
+
end
|
174
|
+
|
175
|
+
end
|
176
|
+
|
177
|
+
factory :r12, :class => Report do
|
178
|
+
name 'blah 12 ola'
|
179
|
+
name_seo 'ola12'
|
180
|
+
created_at '2012-01-10'
|
181
|
+
is_trash false
|
182
|
+
is_public true
|
183
|
+
username 'username'
|
184
|
+
|
185
|
+
after(:build) do |r|
|
186
|
+
r.user = User.first
|
187
|
+
r.site = Site.first
|
188
|
+
end
|
189
|
+
|
190
|
+
end
|
191
|
+
|
192
|
+
factory :r13, :class => Report do
|
193
|
+
name 'blah 13 ola'
|
194
|
+
name_seo 'ola13'
|
195
|
+
created_at '2012-01-10'
|
196
|
+
is_trash false
|
197
|
+
is_public true
|
198
|
+
username 'username'
|
199
|
+
|
200
|
+
after(:build) do |r|
|
201
|
+
r.user = User.first
|
202
|
+
r.site = Site.first
|
203
|
+
end
|
204
|
+
|
205
|
+
end
|
206
|
+
|
207
|
+
factory :r_pt_1, :class => Report do
|
208
|
+
name 'blah 13 ola'
|
209
|
+
name_seo 'ola11113'
|
210
|
+
created_at '2012-01-10'
|
211
|
+
is_trash 0
|
212
|
+
descr 'texto'
|
213
|
+
is_public 1
|
214
|
+
lang 'pt'
|
215
|
+
username 'username'
|
216
|
+
|
217
|
+
after(:build) do |r|
|
218
|
+
r.user = User.first
|
219
|
+
r.site = Site.first
|
220
|
+
end
|
221
|
+
end
|
222
|
+
|
223
|
+
factory :r_pt_2, :class => Report do
|
224
|
+
name 'blah 1322 ola'
|
225
|
+
name_seo 'ola213'
|
226
|
+
descr 'texto'
|
227
|
+
created_at '2012-01-10'
|
228
|
+
is_trash 0
|
229
|
+
is_public 1
|
230
|
+
lang 'pt'
|
231
|
+
username 'username'
|
232
|
+
|
233
|
+
after(:build) do |r|
|
234
|
+
r.user = User.first
|
235
|
+
r.site = Site.first
|
236
|
+
end
|
237
|
+
end
|
238
|
+
|
239
|
+
factory :r_pt_3, :class => Report do
|
240
|
+
name 'blah1111 13 ola'
|
241
|
+
name_seo 'ol11a313'
|
242
|
+
created_at '2012-01-10'
|
243
|
+
is_trash 0
|
244
|
+
descr 'texto'
|
245
|
+
is_public 1
|
246
|
+
lang 'pt'
|
247
|
+
username 'username'
|
248
|
+
|
249
|
+
after(:build) do |r|
|
250
|
+
r.user = User.first
|
251
|
+
r.site = Site.first
|
252
|
+
end
|
253
|
+
end
|
254
|
+
|
255
|
+
factory :report_blog, :class => Report do
|
256
|
+
name 'blah 13 ola'
|
257
|
+
name_seo 'o1la13'
|
258
|
+
created_at '2012-01-10'
|
259
|
+
is_trash false
|
260
|
+
is_public true
|
261
|
+
username 'username'
|
262
|
+
|
263
|
+
after(:build) do |r|
|
264
|
+
r.user = User.first
|
265
|
+
r.site = Site.first
|
266
|
+
end
|
267
|
+
|
268
|
+
end
|
269
|
+
|
270
|
+
factory :feature_pt_1, :class => Report do
|
271
|
+
name 'Feature pt 1'
|
272
|
+
name_seo 'feature-pt-1'
|
273
|
+
is_trash false
|
274
|
+
is_feature true
|
275
|
+
is_public true
|
276
|
+
lang 'pt'
|
277
|
+
username 'username'
|
278
|
+
|
279
|
+
after :build do |r|
|
280
|
+
r.user = User.first
|
281
|
+
r.site = Site.first
|
282
|
+
end
|
283
|
+
|
284
|
+
end
|
285
|
+
|
286
|
+
factory :feature_ru_1, :class => Report do
|
287
|
+
name 'Feature ru 1'
|
288
|
+
name_seo 'feature-ru-1'
|
289
|
+
is_trash false
|
290
|
+
is_feature true
|
291
|
+
is_public true
|
292
|
+
lang 'ru'
|
293
|
+
username 'username'
|
294
|
+
|
295
|
+
after :build do |r|
|
296
|
+
r.user = User.first
|
297
|
+
r.site = Site.first
|
298
|
+
end
|
299
|
+
|
300
|
+
end
|
301
|
+
|
302
|
+
factory :feature_1, :class => Report do
|
303
|
+
name 'Feature 11'
|
304
|
+
name_seo '111'
|
305
|
+
is_trash false
|
306
|
+
is_feature true
|
307
|
+
is_public true
|
308
|
+
lang 'en'
|
309
|
+
username 'username'
|
310
|
+
after :build do |r|
|
311
|
+
r.user = User.first
|
312
|
+
r.site = Site.first
|
313
|
+
end
|
314
|
+
end
|
315
|
+
|
316
|
+
factory :feature_2, :class => Report do
|
317
|
+
name 'Feature 12'
|
318
|
+
name_seo '112'
|
319
|
+
is_trash false
|
320
|
+
is_feature true
|
321
|
+
is_public true
|
322
|
+
lang 'en'
|
323
|
+
username 'username'
|
324
|
+
after :build do |r|
|
325
|
+
r.user = User.first
|
326
|
+
r.site = Site.first
|
327
|
+
end
|
328
|
+
end
|
329
|
+
|
330
|
+
factory :feature_3, :class => Report do
|
331
|
+
name 'Feature 13'
|
332
|
+
name_seo '113'
|
333
|
+
is_trash false
|
334
|
+
is_feature true
|
335
|
+
is_public true
|
336
|
+
lang 'en'
|
337
|
+
username 'username'
|
338
|
+
after :build do |r|
|
339
|
+
r.user = User.first
|
340
|
+
r.site = Site.first
|
341
|
+
end
|
342
|
+
end
|
343
|
+
|
344
|
+
factory :feature_4, :class => Report do
|
345
|
+
name 'Feature 14'
|
346
|
+
name_seo '114'
|
347
|
+
is_trash false
|
348
|
+
is_feature true
|
349
|
+
is_public true
|
350
|
+
lang 'en'
|
351
|
+
username 'username'
|
352
|
+
after :build do |r|
|
353
|
+
r.user = User.first
|
354
|
+
r.site = Site.first
|
355
|
+
end
|
356
|
+
end
|
357
|
+
|
358
|
+
factory :report_private, :class => Report do
|
359
|
+
name 'blah blah 3 saa1'
|
360
|
+
name_seo 'blah-blah3444431-asdf'
|
361
|
+
created_at '2012-01-01'
|
362
|
+
is_trash false
|
363
|
+
is_public false
|
364
|
+
username 'username'
|
365
|
+
|
366
|
+
after(:build) do |r|
|
367
|
+
r.tag = Tag.where( :domain => 'test.local' ).first
|
368
|
+
r.user = User.first
|
369
|
+
r.site = Site.first
|
370
|
+
end
|
371
|
+
|
372
|
+
end
|
373
|
+
|
374
|
+
end
|
375
|
+
|
376
|
+
|
377
|
+
|
378
|
+
|
379
|
+
|
@@ -0,0 +1,26 @@
|
|
1
|
+
|
2
|
+
FactoryGirl.define do
|
3
|
+
|
4
|
+
factory :site do
|
5
|
+
domain 'piousbox.com'
|
6
|
+
lang 'en'
|
7
|
+
end
|
8
|
+
|
9
|
+
factory :site_ru, :class => Site do
|
10
|
+
domain 'piousbox.com'
|
11
|
+
lang 'ru'
|
12
|
+
end
|
13
|
+
|
14
|
+
factory :site_pt, :class => Site do
|
15
|
+
domain 'piousbox.com'
|
16
|
+
lang 'pt'
|
17
|
+
end
|
18
|
+
|
19
|
+
factory :site_wdz, :class => Site do
|
20
|
+
domain 'webdevzine.com'
|
21
|
+
lang 'en'
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
25
|
+
|
26
|
+
|
@@ -0,0 +1,42 @@
|
|
1
|
+
|
2
|
+
FactoryGirl.define do
|
3
|
+
|
4
|
+
#
|
5
|
+
# right now, neither is_public nor is_trash exists in Tag
|
6
|
+
#
|
7
|
+
|
8
|
+
factory :tag do
|
9
|
+
name 'Tag name'
|
10
|
+
is_trash false
|
11
|
+
is_public true
|
12
|
+
after(:build) do |r|
|
13
|
+
r.site = Site.first
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
factory :tag1, :parent => :tag do
|
18
|
+
name 'Tag 1'
|
19
|
+
end
|
20
|
+
|
21
|
+
factory :tag2, :parent => :tag do
|
22
|
+
name 'Tag 2'
|
23
|
+
end
|
24
|
+
|
25
|
+
factory :tag_technology, :parent => :tag do
|
26
|
+
name 'technology'
|
27
|
+
name_seo 'technology'
|
28
|
+
end
|
29
|
+
|
30
|
+
factory :tag_1, :parent => :tag do
|
31
|
+
name 'Tag-1'
|
32
|
+
end
|
33
|
+
factory :tag_2, :parent => :tag do
|
34
|
+
name 'Tag-2'
|
35
|
+
end
|
36
|
+
factory :tag_3, :parent => :tag do
|
37
|
+
name 'Tag-3'
|
38
|
+
end
|
39
|
+
|
40
|
+
end
|
41
|
+
|
42
|
+
|