simple_calendar 2.2.7 → 2.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 +5 -5
- data/.github/FUNDING.yml +12 -0
- data/.github/workflows/ci.yml +43 -0
- data/Appraisals +11 -0
- data/CHANGELOG.md +22 -0
- data/Gemfile +3 -0
- data/README.md +68 -31
- data/Rakefile +1 -1
- data/app/views/simple_calendar/_calendar.html.erb +3 -3
- data/app/views/simple_calendar/_month_calendar.html.erb +3 -3
- data/app/views/simple_calendar/_week_calendar.html.erb +8 -8
- data/gemfiles/rails_6.gemfile +9 -0
- data/gemfiles/rails_6.gemfile.lock +195 -0
- data/gemfiles/rails_6_1.gemfile +9 -0
- data/gemfiles/rails_6_1.gemfile.lock +198 -0
- data/gemfiles/rails_master.gemfile +9 -0
- data/gemfiles/rails_master.gemfile.lock +207 -0
- data/lib/generators/simple_calendar/views_generator.rb +2 -2
- data/lib/simple_calendar/calendar.rb +61 -61
- data/lib/simple_calendar/month_calendar.rb +3 -6
- data/lib/simple_calendar/railtie.rb +3 -1
- data/lib/simple_calendar/version.rb +1 -1
- data/lib/simple_calendar/view_helpers.rb +6 -6
- data/lib/simple_calendar/week_calendar.rb +6 -8
- data/simple_calendar.gemspec +12 -13
- data/spec/calendar_spec.rb +84 -52
- data/spec/calendars/month_calendar_spec.rb +22 -4
- data/spec/simple_calendar_spec.rb +4 -4
- data/spec/spec_helper.rb +53 -53
- data/spec/support/fake_event.rb +9 -0
- data/spec/support/view_context.rb +20 -0
- data/spec/views_generators_spec.rb +3 -3
- metadata +21 -8
- data/.travis.yml +0 -4
| @@ -0,0 +1,20 @@ | |
| 1 | 
            +
            class ViewContext
         | 
| 2 | 
            +
              attr_accessor :start_date, :start_date_param
         | 
| 3 | 
            +
             | 
| 4 | 
            +
              def initialize(start_date = nil, options = {})
         | 
| 5 | 
            +
                @start_date = start_date
         | 
| 6 | 
            +
                @start_date_param = options.fetch(:start_date_param, :start_date)
         | 
| 7 | 
            +
              end
         | 
| 8 | 
            +
             | 
| 9 | 
            +
              def params
         | 
| 10 | 
            +
                if @start_date.present?
         | 
| 11 | 
            +
                  ActionController::Parameters.new({start_date_param => @start_date})
         | 
| 12 | 
            +
                else
         | 
| 13 | 
            +
                  ActionController::Parameters.new
         | 
| 14 | 
            +
                end
         | 
| 15 | 
            +
              end
         | 
| 16 | 
            +
             | 
| 17 | 
            +
              def render(options = {})
         | 
| 18 | 
            +
                options
         | 
| 19 | 
            +
              end
         | 
| 20 | 
            +
            end
         | 
| @@ -2,6 +2,6 @@ require "spec_helper" | |
| 2 2 | 
             
            require "generators/simple_calendar/views_generator"
         | 
| 3 3 |  | 
| 4 4 | 
             
            describe SimpleCalendar::Generators::ViewsGenerator do
         | 
| 5 | 
            -
             | 
| 6 | 
            -
             | 
| 7 | 
            -
            end
         | 
| 5 | 
            +
              it "copies the files to app/views/simple_calendar"
         | 
| 6 | 
            +
              it "verifies the content"
         | 
| 7 | 
            +
            end
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: simple_calendar
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 2. | 
| 4 | 
            +
              version: 2.4.3
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Chris Oliver
         | 
| 8 | 
            -
            autorequire: | 
| 8 | 
            +
            autorequire:
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date:  | 
| 11 | 
            +
            date: 2021-07-07 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: rails
         | 
| @@ -45,10 +45,14 @@ executables: [] | |
| 45 45 | 
             
            extensions: []
         | 
| 46 46 | 
             
            extra_rdoc_files: []
         | 
| 47 47 | 
             
            files:
         | 
| 48 | 
            +
            - ".github/FUNDING.yml"
         | 
| 49 | 
            +
            - ".github/workflows/ci.yml"
         | 
| 48 50 | 
             
            - ".gitignore"
         | 
| 49 51 | 
             
            - ".rspec"
         | 
| 50 | 
            -
            -  | 
| 52 | 
            +
            - Appraisals
         | 
| 53 | 
            +
            - CHANGELOG.md
         | 
| 51 54 | 
             
            - Gemfile
         | 
| 55 | 
            +
            - Gemfile.lock
         | 
| 52 56 | 
             
            - LICENSE.txt
         | 
| 53 57 | 
             
            - README.md
         | 
| 54 58 | 
             
            - Rakefile
         | 
| @@ -58,6 +62,12 @@ files: | |
| 58 62 | 
             
            - app/views/simple_calendar/_week_calendar.html.erb
         | 
| 59 63 | 
             
            - bin/console
         | 
| 60 64 | 
             
            - bin/setup
         | 
| 65 | 
            +
            - gemfiles/rails_6.gemfile
         | 
| 66 | 
            +
            - gemfiles/rails_6.gemfile.lock
         | 
| 67 | 
            +
            - gemfiles/rails_6_1.gemfile
         | 
| 68 | 
            +
            - gemfiles/rails_6_1.gemfile.lock
         | 
| 69 | 
            +
            - gemfiles/rails_master.gemfile
         | 
| 70 | 
            +
            - gemfiles/rails_master.gemfile.lock
         | 
| 61 71 | 
             
            - lib/generators/simple_calendar/views_generator.rb
         | 
| 62 72 | 
             
            - lib/simple_calendar.rb
         | 
| 63 73 | 
             
            - lib/simple_calendar/calendar.rb
         | 
| @@ -71,12 +81,14 @@ files: | |
| 71 81 | 
             
            - spec/calendars/month_calendar_spec.rb
         | 
| 72 82 | 
             
            - spec/simple_calendar_spec.rb
         | 
| 73 83 | 
             
            - spec/spec_helper.rb
         | 
| 84 | 
            +
            - spec/support/fake_event.rb
         | 
| 85 | 
            +
            - spec/support/view_context.rb
         | 
| 74 86 | 
             
            - spec/views_generators_spec.rb
         | 
| 75 87 | 
             
            homepage: https://github.com/excid3/simple_calendar
         | 
| 76 88 | 
             
            licenses:
         | 
| 77 89 | 
             
            - MIT
         | 
| 78 90 | 
             
            metadata: {}
         | 
| 79 | 
            -
            post_install_message: | 
| 91 | 
            +
            post_install_message:
         | 
| 80 92 | 
             
            rdoc_options: []
         | 
| 81 93 | 
             
            require_paths:
         | 
| 82 94 | 
             
            - lib
         | 
| @@ -91,9 +103,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 91 103 | 
             
                - !ruby/object:Gem::Version
         | 
| 92 104 | 
             
                  version: '0'
         | 
| 93 105 | 
             
            requirements: []
         | 
| 94 | 
            -
             | 
| 95 | 
            -
             | 
| 96 | 
            -
            signing_key: 
         | 
| 106 | 
            +
            rubygems_version: 3.2.15
         | 
| 107 | 
            +
            signing_key:
         | 
| 97 108 | 
             
            specification_version: 4
         | 
| 98 109 | 
             
            summary: A simple Rails calendar
         | 
| 99 110 | 
             
            test_files:
         | 
| @@ -101,4 +112,6 @@ test_files: | |
| 101 112 | 
             
            - spec/calendars/month_calendar_spec.rb
         | 
| 102 113 | 
             
            - spec/simple_calendar_spec.rb
         | 
| 103 114 | 
             
            - spec/spec_helper.rb
         | 
| 115 | 
            +
            - spec/support/fake_event.rb
         | 
| 116 | 
            +
            - spec/support/view_context.rb
         | 
| 104 117 | 
             
            - spec/views_generators_spec.rb
         | 
    
        data/.travis.yml
    DELETED