odania_core 0.0.4 → 0.0.5
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.
- checksums.yaml +4 -4
- data/app/controllers/admin_controller.rb +1 -1
- data/app/controllers/odania/contents_controller.rb +1 -1
- data/app/models/odania/site.rb +2 -0
- data/app/models/odania/user.rb +5 -2
- data/app/models/odania/user_role.rb +5 -0
- data/db/migrate/20140313225260_create_content.rb +0 -1
- data/db/migrate/20140313225265_create_user.rb +1 -0
- data/db/migrate/20140323201042_create_odania_tags.rb +2 -1
- data/db/migrate/20140425195051_create_odania_user_roles.rb +10 -0
- data/db/migrate/20140425202800_add_site_id_to_user.rb +5 -0
- data/lib/odania/controllers/helpers.rb +7 -0
- data/lib/odania/taggable/tag_module.rb +3 -3
- data/lib/odania_core/version.rb +1 -1
- data/test/controllers/odania/contents_controller_test.rb +1 -1
- data/test/dummy/bin/rails +0 -4
- data/test/dummy/bin/rake +0 -4
- data/test/dummy/db/schema.rb +10 -2
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/development.log +1769 -0
- data/test/dummy/log/test.log +88532 -0
- data/test/factories/odania_user_roles.rb +8 -0
- data/test/factories/odania_users.rb +4 -0
- data/test/support/test_setup.rb +6 -0
- metadata +6 -6
- data/db/migrate/20140413151353_add_current_menu_item_to_content.rb +0 -5
- data/db/migrate/20140425164032_remove_menu_item_from_content.rb +0 -6
- data/db/migrate/20140425190306_add_language_to_tag.rb +0 -5
- data/test/dummy/tmp/pids/server.pid +0 -1
data/test/support/test_setup.rb
CHANGED
@@ -6,6 +6,12 @@ module OdaniaTestMock
|
|
6
6
|
|
7
7
|
def self.current_user
|
8
8
|
@@mock_current_user ||= Odania::User.find_or_create_by(name: 'Admin', email: 'mail@example.com')
|
9
|
+
|
10
|
+
if @@mock_current_user.roles.count == 0
|
11
|
+
@@mock_current_user.roles.create(role: Odania::UserRole.roles[:admin])
|
12
|
+
end
|
13
|
+
|
14
|
+
return @@mock_current_user
|
9
15
|
end
|
10
16
|
|
11
17
|
mattr_accessor :user_authenticated
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: odania_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Petersen
|
@@ -264,6 +264,7 @@ files:
|
|
264
264
|
- app/models/odania/tag_xref.rb
|
265
265
|
- app/models/odania/target_type.rb
|
266
266
|
- app/models/odania/user.rb
|
267
|
+
- app/models/odania/user_role.rb
|
267
268
|
- app/views/admin/dashboard/index.html.erb
|
268
269
|
- app/views/admin/odania/contents/_choose_content.html.erb
|
269
270
|
- app/views/admin/odania/contents/_choose_content_list.html.erb
|
@@ -330,9 +331,8 @@ files:
|
|
330
331
|
- db/migrate/20140313225265_create_user.rb
|
331
332
|
- db/migrate/20140323201042_create_odania_tags.rb
|
332
333
|
- db/migrate/20140323201249_create_odania_tag_xrefs.rb
|
333
|
-
- db/migrate/
|
334
|
-
- db/migrate/
|
335
|
-
- db/migrate/20140425190306_add_language_to_tag.rb
|
334
|
+
- db/migrate/20140425195051_create_odania_user_roles.rb
|
335
|
+
- db/migrate/20140425202800_add_site_id_to_user.rb
|
336
336
|
- db/seeds.rb
|
337
337
|
- lib/odania.rb
|
338
338
|
- lib/odania/admin.rb
|
@@ -7819,13 +7819,13 @@ files:
|
|
7819
7819
|
- test/dummy/tmp/cache/assets/test/sprockets/ffb4e3c08cd390e6c34ecb8986a80042
|
7820
7820
|
- test/dummy/tmp/cache/assets/test/sprockets/ffb88b74367cc52503ed6c38dcc55576
|
7821
7821
|
- test/dummy/tmp/cache/assets/test/sprockets/ffe28ecf6034094189c88aa8d34d995c
|
7822
|
-
- test/dummy/tmp/pids/server.pid
|
7823
7822
|
- test/factories/contents.rb
|
7824
7823
|
- test/factories/languages.rb
|
7825
7824
|
- test/factories/menu_items.rb
|
7826
7825
|
- test/factories/menus.rb
|
7827
7826
|
- test/factories/odania_tag_xrefs.rb
|
7828
7827
|
- test/factories/odania_tags.rb
|
7828
|
+
- test/factories/odania_user_roles.rb
|
7829
7829
|
- test/factories/odania_users.rb
|
7830
7830
|
- test/factories/sites.rb
|
7831
7831
|
- test/integration/helper_test.rb
|
@@ -15319,7 +15319,6 @@ test_files:
|
|
15319
15319
|
- test/dummy/tmp/cache/assets/test/sprockets/b6a2fa0f3219d0551f8eddcb3fde524d
|
15320
15320
|
- test/dummy/tmp/cache/assets/test/sprockets/5a87c17b3c5e6209890da9d8fea08911
|
15321
15321
|
- test/dummy/tmp/cache/24C/7A1/views%2Flvh.me%3A3000%2Fde%2Fm1%2Ff188e6e90cf2009ed49591a40fdd2329
|
15322
|
-
- test/dummy/tmp/pids/server.pid
|
15323
15322
|
- test/dummy/db/test.sqlite3
|
15324
15323
|
- test/dummy/db/production.sqlite3
|
15325
15324
|
- test/dummy/db/schema.rb
|
@@ -15343,6 +15342,7 @@ test_files:
|
|
15343
15342
|
- test/integration/helper_test.rb
|
15344
15343
|
- test/integration/menu_route_test.rb
|
15345
15344
|
- test/factories/contents.rb
|
15345
|
+
- test/factories/odania_user_roles.rb
|
15346
15346
|
- test/factories/odania_users.rb
|
15347
15347
|
- test/factories/languages.rb
|
15348
15348
|
- test/factories/odania_tag_xrefs.rb
|
@@ -1 +0,0 @@
|
|
1
|
-
20209
|