dimples 1.2 → 1.2.1
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/lib/dimples/frontable.rb +2 -4
 - data/lib/dimples/page.rb +3 -4
 - data/lib/dimples/post.rb +4 -4
 - data/lib/dimples/publishable.rb +1 -1
 - data/lib/dimples/version.rb +1 -1
 - metadata +2 -2
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 6744f1532ff98a72c8223b34b3a8854fcae1eaf3
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 599b462adcd549c6b9f6a1e8b6c8d9d7232c4345
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 04342d92fbe4f2afc843eec7ed660d1c396ad546afe51e33811b645a540fd07a0661531a02eec2fcdaeebf75b19e0ae38a4401a01676d3ff675b0843444ef3f6
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 81c07fd8de2e2eda0b66fd953eb8bd0d1129872a3b9ecbf9c507d13a2e197ffa9da89fb4ff79146c32eae22d6771fe67614be90dce178ed292c0ef2db958b7ba
         
     | 
    
        data/lib/dimples/frontable.rb
    CHANGED
    
    | 
         @@ -16,10 +16,8 @@ module Dimples 
     | 
|
| 
       16 
16 
     | 
    
         | 
| 
       17 
17 
     | 
    
         
             
                  if metadata
         
     | 
| 
       18 
18 
     | 
    
         
             
                    metadata.each_pair do |key, value|
         
     | 
| 
       19 
     | 
    
         
            -
                      unless instance_variable_get("@#{key}")
         
     | 
| 
       20 
     | 
    
         
            -
             
     | 
| 
       21 
     | 
    
         
            -
                        instance_variable_set("@#{key}", value)
         
     | 
| 
       22 
     | 
    
         
            -
                      end
         
     | 
| 
      
 19 
     | 
    
         
            +
                      self.class.send(:attr_accessor, key.to_sym) unless instance_variable_get("@#{key}")
         
     | 
| 
      
 20 
     | 
    
         
            +
                      instance_variable_set("@#{key}", value)
         
     | 
| 
       23 
21 
     | 
    
         
             
                    end
         
     | 
| 
       24 
22 
     | 
    
         
             
                  end
         
     | 
| 
       25 
23 
     | 
    
         | 
    
        data/lib/dimples/page.rb
    CHANGED
    
    | 
         @@ -15,16 +15,15 @@ module Dimples 
     | 
|
| 
       15 
15 
     | 
    
         | 
| 
       16 
16 
     | 
    
         
             
                def initialize(site, path = nil)
         
     | 
| 
       17 
17 
     | 
    
         
             
                  @site = site
         
     | 
| 
       18 
     | 
    
         
            -
                  
         
     | 
| 
      
 18 
     | 
    
         
            +
                  @extension = @site.config['file_extensions']['pages']
         
     | 
| 
      
 19 
     | 
    
         
            +
             
     | 
| 
       19 
20 
     | 
    
         
             
                  if path
         
     | 
| 
       20 
21 
     | 
    
         
             
                    @path = path
         
     | 
| 
       21 
     | 
    
         
            -
                    @contents = read_with_yaml(path)
         
     | 
| 
       22 
22 
     | 
    
         
             
                    @filename = File.basename(path, File.extname(path))
         
     | 
| 
      
 23 
     | 
    
         
            +
                    @contents = read_with_yaml(path)
         
     | 
| 
       23 
24 
     | 
    
         
             
                  else
         
     | 
| 
       24 
25 
     | 
    
         
             
                    @filename = 'index'
         
     | 
| 
       25 
26 
     | 
    
         
             
                  end
         
     | 
| 
       26 
     | 
    
         
            -
             
     | 
| 
       27 
     | 
    
         
            -
                  @extension = @site.config['file_extensions']['pages']
         
     | 
| 
       28 
27 
     | 
    
         
             
                end
         
     | 
| 
       29 
28 
     | 
    
         | 
| 
       30 
29 
     | 
    
         
             
                def contents
         
     | 
    
        data/lib/dimples/post.rb
    CHANGED
    
    | 
         @@ -21,9 +21,7 @@ module Dimples 
     | 
|
| 
       21 
21 
     | 
    
         | 
| 
       22 
22 
     | 
    
         
             
                def initialize(site, path)
         
     | 
| 
       23 
23 
     | 
    
         
             
                  @site = site
         
     | 
| 
       24 
     | 
    
         
            -
             
     | 
| 
       25 
24 
     | 
    
         
             
                  @path = path
         
     | 
| 
       26 
     | 
    
         
            -
                  @contents = read_with_yaml(path)
         
     | 
| 
       27 
25 
     | 
    
         | 
| 
       28 
26 
     | 
    
         
             
                  @filename = 'index'
         
     | 
| 
       29 
27 
     | 
    
         
             
                  @extension = @site.config['file_extensions']['posts']
         
     | 
| 
         @@ -33,12 +31,14 @@ module Dimples 
     | 
|
| 
       33 
31 
     | 
    
         
             
                  @slug = parts[4]
         
     | 
| 
       34 
32 
     | 
    
         
             
                  @date = Time.mktime(parts[1], parts[2], parts[3])
         
     | 
| 
       35 
33 
     | 
    
         | 
| 
       36 
     | 
    
         
            -
                  @layout  
     | 
| 
       37 
     | 
    
         
            -
                  @categories  
     | 
| 
      
 34 
     | 
    
         
            +
                  @layout = @site.config['layouts']['post']
         
     | 
| 
      
 35 
     | 
    
         
            +
                  @categories = []
         
     | 
| 
       38 
36 
     | 
    
         | 
| 
       39 
37 
     | 
    
         
             
                  @year = @date.strftime('%Y')
         
     | 
| 
       40 
38 
     | 
    
         
             
                  @month = @date.strftime('%m')
         
     | 
| 
       41 
39 
     | 
    
         
             
                  @day = @date.strftime('%d')
         
     | 
| 
      
 40 
     | 
    
         
            +
             
     | 
| 
      
 41 
     | 
    
         
            +
                  @contents = read_with_yaml(path)
         
     | 
| 
       42 
42 
     | 
    
         
             
                end
         
     | 
| 
       43 
43 
     | 
    
         | 
| 
       44 
44 
     | 
    
         
             
                def contents
         
     | 
    
        data/lib/dimples/publishable.rb
    CHANGED
    
    
    
        data/lib/dimples/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: dimples
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version:  
     | 
| 
      
 4 
     | 
    
         
            +
              version: 1.2.1
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Daniel Bogan
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2015-03- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2015-03-22 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: tilt
         
     |