effective_regions 1.5.0 → 1.6.0
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/assets/javascripts/effective/snippets/current_date_time.js.coffee +23 -0
- data/app/models/effective/region.rb +1 -1
- data/app/models/effective/snippets/current_date_time.rb +12 -0
- data/app/views/effective/snippets/_current_date_time.html.haml +1 -0
- data/lib/effective_regions/version.rb +1 -1
- metadata +5 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 842e9996a7447adc9e1f92a6c07cd00741689a36
         | 
| 4 | 
            +
              data.tar.gz: f29291a7456d709be4180f9c0dc40826ddf3fbcd
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: fa1d3ff025cbd20ea2b288a1088dfd96e922b1abd365a1b139ac7f868d0f52e79083064aeb27bad7ae89c4de9b860043ab1d39821c76bbfd7214c367e1028ab3
         | 
| 7 | 
            +
              data.tar.gz: d0b9b57580ae5392c38158b5c2750fb083d331de3c970aa421bddaa4267c9eea93d88f018f4e1ba1e63b6eafb8dc3ea06afa765a3465dbfb51b7d433e69ad3a0
         | 
| @@ -0,0 +1,23 @@ | |
| 1 | 
            +
            CKEDITOR.dialog.add 'current_date_time', (editor) ->
         | 
| 2 | 
            +
              title: 'Current Date / Time',
         | 
| 3 | 
            +
              minWidth: 250,
         | 
| 4 | 
            +
              minHeight: 200,
         | 
| 5 | 
            +
              contents: [
         | 
| 6 | 
            +
                {
         | 
| 7 | 
            +
                  id: 'current_date_time',
         | 
| 8 | 
            +
                  elements: [
         | 
| 9 | 
            +
                    {
         | 
| 10 | 
            +
                      id: 'format',
         | 
| 11 | 
            +
                      type: 'text',
         | 
| 12 | 
            +
                      label: 'Date / Time Format',
         | 
| 13 | 
            +
                      setup: (widget) -> this.setValue(widget.data.format),
         | 
| 14 | 
            +
                      commit: (widget) -> widget.setData('format', this.getValue())
         | 
| 15 | 
            +
                    },
         | 
| 16 | 
            +
                    {
         | 
| 17 | 
            +
                      id: 'help-text',
         | 
| 18 | 
            +
                      type: 'html',
         | 
| 19 | 
            +
                      html: '<p>Examples:</p><br><table width="100%"><tr><td>%Y-%m-%d</td><td width="100%">   </td><td>2015-12-25</td></tr><tr><td>%d-%b-%Y</td><td>   </td><td>25-Dec-2015</td></tr><tr><td> </td><td></td><td></td></tr><tr><td>%H:%M:%S</td><td>   </td><td>18:30:15</td></tr><tr><td>%I:%M%P</td><td>   </td><td>6:30pm</td></tr></table><br><p>For a complete reference, please visit:<br><a href="http://apidock.com/ruby/DateTime/strftime" target="_blank">http://apidock.com/ruby/DateTime/strftime</a></p>'
         | 
| 20 | 
            +
                    }
         | 
| 21 | 
            +
                  ]
         | 
| 22 | 
            +
                }
         | 
| 23 | 
            +
              ]
         | 
| @@ -2,7 +2,7 @@ module Effective | |
| 2 2 | 
             
              class Region < ActiveRecord::Base
         | 
| 3 3 | 
             
                self.table_name = EffectiveRegions.regions_table_name.to_s
         | 
| 4 4 |  | 
| 5 | 
            -
                belongs_to :regionable, :polymorphic => true | 
| 5 | 
            +
                belongs_to :regionable, :polymorphic => true
         | 
| 6 6 |  | 
| 7 7 | 
             
                structure do
         | 
| 8 8 | 
             
                  title             :string, :validates => [:presence]
         | 
| @@ -0,0 +1 @@ | |
| 1 | 
            +
            = (Time.zone.now.strftime(current_date_time.format.to_s) rescue 'invalid date format string')
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: effective_regions
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 1. | 
| 4 | 
            +
              version: 1.6.0
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Code and Effect
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2015-05- | 
| 11 | 
            +
            date: 2015-05-22 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: rails
         | 
| @@ -78,6 +78,7 @@ files: | |
| 78 78 | 
             
            - README.md
         | 
| 79 79 | 
             
            - Rakefile
         | 
| 80 80 | 
             
            - app/assets/images/effective/templates/image_and_title.png
         | 
| 81 | 
            +
            - app/assets/javascripts/effective/snippets/current_date_time.js.coffee
         | 
| 81 82 | 
             
            - app/assets/javascripts/effective/snippets/current_user_info.js.coffee
         | 
| 82 83 | 
             
            - app/controllers/effective/regions_controller.rb
         | 
| 83 84 | 
             
            - app/helpers/effective_regions_controller_helper.rb
         | 
| @@ -85,10 +86,12 @@ files: | |
| 85 86 | 
             
            - app/models/concerns/acts_as_regionable.rb
         | 
| 86 87 | 
             
            - app/models/effective/access_denied.rb
         | 
| 87 88 | 
             
            - app/models/effective/region.rb
         | 
| 89 | 
            +
            - app/models/effective/snippets/current_date_time.rb
         | 
| 88 90 | 
             
            - app/models/effective/snippets/current_user_info.rb
         | 
| 89 91 | 
             
            - app/models/effective/snippets/snippet.rb
         | 
| 90 92 | 
             
            - app/models/effective/templates/image_and_title.rb
         | 
| 91 93 | 
             
            - app/models/effective/templates/template.rb
         | 
| 94 | 
            +
            - app/views/effective/snippets/_current_date_time.html.haml
         | 
| 92 95 | 
             
            - app/views/effective/snippets/_current_user_info.html.haml
         | 
| 93 96 | 
             
            - app/views/effective/templates/_image_and_title.html.haml
         | 
| 94 97 | 
             
            - app/views/effective_regions/_include_tags_javascript.html.haml
         |