caboose-cms 0.5.186 → 0.5.187

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YzdmNDFiZTE2ZmE1OGE1N2IyYTVkZWFiNzE2OTUwNDZmZGUwODA3Yw==
4
+ YjZkZTQxZjA1MDMyYjdjY2Y1MGVjYjU2ZGY5ZjdjNjM4ODAxZWZjOQ==
5
5
  data.tar.gz: !binary |-
6
- MjkxNmViODAzMWM1ZmYzYWFlODcxNTA1ZTA4ZTc3YjNkMWI2ZjljNw==
6
+ MzkzOWYyOWEwMmRlNzRhOTJiMDU1MDg2ODZjZmM4ZTAwYzY0OGI3Zg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZTJmZGZmY2NlMTlhNjJjMTgxMjczZmFkMTU0MjAxYjdiZjFhMGMyOTk1MmMy
10
- NTM2M2ExMzc0MmY2YzE4NWRhN2EyMjkxNDNjMGM2Y2Q2MWU3NjVjNjI0ZGM1
11
- MTFkYjA2NDNjOTA0Y2ZmYWM0NTgwYjViYjQxMWMzODk3Y2E0MTM=
9
+ MmVhNThmZDcxYTE3NTFkNGMxOTE0NTNlYmRhZWM1YTJlZWI2ZTQ5OTBhYTUw
10
+ MTlkY2M4MWUwNGJiNzFlNzc4MzdlM2MwMDM0Zjk5YWNlMGMwNDQyYjIyZTM4
11
+ YWUxMDA0Yzk3NjQ1ZDAyZWJlOGQ3YTYyODQwOWVlN2JjODEyM2U=
12
12
  data.tar.gz: !binary |-
13
- YzZlZmU0OGEwNWJmMzgxNzc5MWVkOGQyODUxNWQ0YTI3ZjU1ZDhjODViMTYw
14
- OGUyNGUzYmJjMDY0OGQ0MTQ0Y2QwNmUxMjVhZTU4NGQ3NmQxNWE5NTI0MDJj
15
- Y2RjNmE2MjI3NjliOWQxMWY4ZWI3YWVhMWEwNjBjMWUwZDU4ZDU=
13
+ YTAwNGJmZTI2N2U5ZWIxYjk4ZjlkYmRjN2I0MTAyYzU4YjkyMjZkYTU2YmNi
14
+ YTIzMmFjYmNlOGNiYTE3YWY4NDZiMjBjOWQ3ZjVjYjc2Y2IyMzc4OThlYzkx
15
+ ZTk1YmEyNTI2ZmIxZjc2NDE5M2MwOTZlMDYwZGU2YjMzMTI2NWM=
@@ -51,14 +51,13 @@ module Caboose
51
51
 
52
52
  # Create an admin user for the account
53
53
  if !User.where(:username => 'admin', :site_id => @site.id).exists?
54
- admin_user = User.create(:username => 'admin', :site_id => @site.id, :password => Digest::SHA1.hexdigest(Caboose::salt + 'caboose'))
55
- admin_role = Role.where(:name => 'Admin').first
56
- if admin_role
57
- RoleMembership.create(:user_id => admin_user.id, :role_id => admin_role.id)
58
- else
59
- Caboose.log("Error: no admin role exists.")
54
+ admin_user = User.create(:username => 'admin', :email => 'admin@nine.is', :site_id => @site.id, :password => Digest::SHA1.hexdigest(Caboose::salt + 'caboose'))
55
+ admin_role = Role.where(:name => 'Admin').first
56
+ if admin_user && admin_role
57
+ RoleMembership.create(:user_id => admin_user.id, :role_id => admin_role.id)
60
58
  end
61
59
  end
60
+
62
61
  end
63
62
 
64
63
  # GET /admin/sites/:id/block-types
@@ -101,13 +100,11 @@ module Caboose
101
100
  end
102
101
 
103
102
  # Create an admin user for the account
104
- if !User.where(:username => 'admin', :site_id => site.id).exists?
105
- admin_user = User.create(:username => 'admin', :site_id => site.id, :password => Digest::SHA1.hexdigest(Caboose::salt + 'caboose'))
103
+ if !User.where(:username => 'admin', :site_id => site.id).exists?
104
+ admin_user = User.create(:username => 'admin', :email => 'admin@nine.is', :site_id => site.id, :password => Digest::SHA1.hexdigest(Caboose::salt + 'caboose'))
106
105
  admin_role = Role.where(:name => 'Admin').first
107
106
  if admin_role
108
- RoleMembership.create(:user_id => admin_user.id, :role_id => admin_role.id)
109
- else
110
- Caboose.log("Error: no admin role exists.")
107
+ RoleMembership.create(:user_id => admin_user.id, :role_id => admin_role.id)
111
108
  end
112
109
  end
113
110
 
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.5.186'
2
+ VERSION = '0.5.187'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caboose-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.186
4
+ version: 0.5.187
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry