simplec 0.4.2 → 0.4.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 85834cd98566e08165b97aa2e35228d25a2b6766
4
- data.tar.gz: 87f2d85723b22e9df0afe7139aa985d1ee24bafe
3
+ metadata.gz: ce0da33bd0574dc9288baa128b2918d05d74c3fb
4
+ data.tar.gz: 9c8341d59b7c72583b58ea732d8d908a3dca44f3
5
5
  SHA512:
6
- metadata.gz: 17fec805b2d7413219980808e7b336c03c82686cc6156f4aaa4fd7eaf74c14295ef9fed1066c44cf740e492ab3bfd4260a8bb8fa39b855145df235fa6af96c01
7
- data.tar.gz: f16c4db1b883c0e569e0cdc1387f5ffa77c8c41c827dc458808db9bd6fd825b50d1703409055a6e4a2e48c8511dd21c0a67127684d7f4dcc267fc70ad0e9ffcf
6
+ metadata.gz: e84bdb48ac2c173c24f1e3e90374af79eb8b5766b98aa757faa63b2dd4e63e3326e5fe141f9e3c77979ca9c29b7b9bbccb42162b49f1567122146b89f4cbd426
7
+ data.tar.gz: 83b7f65eef77523950a15c38f1ca6738c7019655f9c2fc4703d004c52d51555adfe909ab3cd9cccb779f4fd6b012e933c93adffa40cc20ccf82173dc4ce584dd
@@ -1,30 +1,30 @@
1
1
  module Simplec
2
2
  class Subdomain < ApplicationRecord
3
- has_many :pages
4
- has_and_belongs_to_many :document_sets
5
- has_and_belongs_to_many :documents
3
+ has_many :pages
4
+ has_and_belongs_to_many :document_sets
5
+ has_and_belongs_to_many :documents
6
6
 
7
- validates :name,
8
- presence: true,
9
- exclusion: { in: %w(admin) }
10
- validates :default_layout,
11
- inclusion: {in: :layouts, allow_blank: true}
7
+ validates :name,
8
+ presence: true,
9
+ exclusion: { in: %w(admin) }
10
+ validates :default_layout,
11
+ inclusion: {in: :layouts, allow_blank: true}
12
12
 
13
- def layouts
14
- @layouts ||= Dir[Rails.root.join('app/views/layouts').to_s + "/*.html.*"].
15
- map{|n| File.basename(n).split('.', 2).first }.
16
- reject{|n| n =~ /\A_/ || n =~ /mailer/ || n =~ /application/ || n =~ /sessions/}.
17
- sort
18
- end
13
+ def layouts
14
+ @layouts ||= Dir[Rails.root.join('app/views/layouts').to_s + "/*.html.*"].
15
+ map{|n| File.basename(n).split('.', 2).first }.
16
+ reject{|n| n =~ /\A_/ || n =~ /mailer/ || n =~ /application/ || n =~ /sessions/}. # TODO application and session should be removed and added to a config option
17
+ sort
18
+ end
19
19
 
20
- module Normalizers
20
+ module Normalizers
21
21
 
22
- # Force lowercase name
23
- #
24
- def name=(val)
25
- super (val ? val.to_s.strip.downcase : val)
26
- end
27
- end
28
- prepend Normalizers
22
+ # Force lowercase name
23
+ #
24
+ def name=(val)
25
+ super (val ? val.to_s.strip.downcase : val)
26
+ end
27
+ end
28
+ prepend Normalizers
29
29
  end
30
30
  end
@@ -106,7 +106,7 @@ module Simplec
106
106
  return @_subpages[key] = Array.new
107
107
  end
108
108
 
109
- @_subpages[key] = page.subpages
109
+ @_subpages[key] = page.children
110
110
  end
111
111
 
112
112
  @_subpages[key].respond_to?(:merge) && options[:conditions] ?
@@ -1,3 +1,3 @@
1
1
  module Simplec
2
- VERSION = '0.4.2'
2
+ VERSION = '0.4.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simplec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Smith