tasks_scheduler 0.0.9 → 0.0.10
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/README.rdoc +3 -1
- data/app/models/scheduled_task/status.rb +1 -2
- data/lib/tasks_scheduler/version.rb +1 -1
- data/test/models/scheduled_task_test.rb +18 -0
- metadata +30 -30
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 63b28c22180672d1d3837ad74877ba3a254b9c25
         | 
| 4 | 
            +
              data.tar.gz: 6ed6a07e3c64af4c3122324c90016589555411e0
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 3e512a427ce0f7dd5190865d51c4f52c3fcc8f875354da52a3b83bec30da0622d8f241ccd1cbd43662f7582667421cd96f574b67d0ae1b23d3474dc5cff0099e
         | 
| 7 | 
            +
              data.tar.gz: feb9cb316900062618f4dc2d846d02c08319781a8b442e06df042981731204609417632fcd54da9cc97cf922c29e7466df8dfa30c87aa674d718c5960c7525d3
         | 
    
        data/README.rdoc
    CHANGED
    
    
| @@ -3,8 +3,7 @@ class ScheduledTask < ActiveRecord::Base | |
| 3 3 | 
             
                def status
         | 
| 4 4 | 
             
                  return STATUS_RUNNING if running?
         | 
| 5 5 | 
             
                  return STATUS_WAITING if waiting?
         | 
| 6 | 
            -
                   | 
| 7 | 
            -
                  raise "Unknown status (#{status_attributes_values})"
         | 
| 6 | 
            +
                  last_fail_status.present? ? last_fail_status : STATUS_FAILED
         | 
| 8 7 | 
             
                end
         | 
| 9 8 |  | 
| 10 9 | 
             
                def running?
         | 
| @@ -56,6 +56,24 @@ class ScheduledTaskTest < ActiveSupport::TestCase | |
| 56 56 | 
             
                assert_equal ScheduledTask::STATUS_TIMEOUT, @scheduled_task.status
         | 
| 57 57 | 
             
              end
         | 
| 58 58 |  | 
| 59 | 
            +
              test 'status 1' do
         | 
| 60 | 
            +
                @scheduled_task.update_attributes!(
         | 
| 61 | 
            +
                  scheduling: '*/5 * * * *',
         | 
| 62 | 
            +
                  next_run: 'Wed, 28 Feb 2018 15:35:00 UTC +00:00',
         | 
| 63 | 
            +
                  created_at: 'Tue, 06 Dec 2016 20:30:01 UTC +00:00',
         | 
| 64 | 
            +
                  updated_at: 'Wed, 28 Feb 2018 15:31:34 UTC +00:00',
         | 
| 65 | 
            +
                  last_run_start: nil,
         | 
| 66 | 
            +
                  last_run_successful_start: 'Wed, 28 Feb 2018 15:20:06 UTC +00:00',
         | 
| 67 | 
            +
                  last_run_successful_end: 'Wed, 28 Feb 2018 15:20:15 UTC +00:00',
         | 
| 68 | 
            +
                  last_run_unsuccessful_start: 'Wed, 28 Feb 2018 15:30:07 UTC +00:00',
         | 
| 69 | 
            +
                  last_run_unsuccessful_end: 'Wed, 28 Feb 2018 15:31:34 UTC +00:00',
         | 
| 70 | 
            +
                  pid: nil,
         | 
| 71 | 
            +
                  args: '1|1|1',
         | 
| 72 | 
            +
                  last_fail_status: nil
         | 
| 73 | 
            +
                )
         | 
| 74 | 
            +
                assert_equal ::ScheduledTask::STATUS_FAILED, @scheduled_task.status
         | 
| 75 | 
            +
              end
         | 
| 76 | 
            +
             | 
| 59 77 | 
             
              test 'task in list' do
         | 
| 60 78 | 
             
                valid_invalid_column_values_test(
         | 
| 61 79 | 
             
                  @scheduled_task, :task, ['test', 'about', 'db:migrate'], [nil, '  ', '123notatask']
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: tasks_scheduler
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.0. | 
| 4 | 
            +
              version: 0.0.10
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Eduardo H. Bogoni
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: exe
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2018- | 
| 11 | 
            +
            date: 2018-03-16 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: active_scaffold
         | 
| @@ -185,46 +185,46 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 185 185 | 
             
                  version: '0'
         | 
| 186 186 | 
             
            requirements: []
         | 
| 187 187 | 
             
            rubyforge_project: 
         | 
| 188 | 
            -
            rubygems_version: 2. | 
| 188 | 
            +
            rubygems_version: 2.6.12
         | 
| 189 189 | 
             
            signing_key: 
         | 
| 190 190 | 
             
            specification_version: 4
         | 
| 191 191 | 
             
            summary: Scheduler for Rake tasks.
         | 
| 192 192 | 
             
            test_files:
         | 
| 193 | 
            -
            - test/fixtures/scheduled_tasks.yml
         | 
| 194 | 
            -
            - test/models/scheduled_task_test.rb
         | 
| 195 | 
            -
            - test/dummy/config.ru
         | 
| 196 | 
            -
            - test/dummy/README.rdoc
         | 
| 197 | 
            -
            - test/dummy/db/schema.rb
         | 
| 198 | 
            -
            - test/dummy/app/views/layouts/application.html.erb
         | 
| 199 | 
            -
            - test/dummy/app/assets/stylesheets/application.css
         | 
| 200 | 
            -
            - test/dummy/app/assets/javascripts/application.js
         | 
| 201 | 
            -
            - test/dummy/app/helpers/application_helper.rb
         | 
| 202 | 
            -
            - test/dummy/app/controllers/application_controller.rb
         | 
| 203 | 
            -
            - test/dummy/bin/bundle
         | 
| 204 | 
            -
            - test/dummy/bin/rails
         | 
| 205 | 
            -
            - test/dummy/bin/setup
         | 
| 206 | 
            -
            - test/dummy/bin/rake
         | 
| 207 193 | 
             
            - test/dummy/Rakefile
         | 
| 208 | 
            -
            - test/dummy/ | 
| 209 | 
            -
            - test/dummy/config | 
| 210 | 
            -
            - test/dummy/config/environments/development.rb
         | 
| 211 | 
            -
            - test/dummy/config/application.rb
         | 
| 194 | 
            +
            - test/dummy/README.rdoc
         | 
| 195 | 
            +
            - test/dummy/config.ru
         | 
| 212 196 | 
             
            - test/dummy/config/boot.rb
         | 
| 197 | 
            +
            - test/dummy/config/database.yml
         | 
| 198 | 
            +
            - test/dummy/config/secrets.yml
         | 
| 213 199 | 
             
            - test/dummy/config/locales/en.yml
         | 
| 200 | 
            +
            - test/dummy/config/application.rb
         | 
| 201 | 
            +
            - test/dummy/config/environments/development.rb
         | 
| 202 | 
            +
            - test/dummy/config/environments/test.rb
         | 
| 203 | 
            +
            - test/dummy/config/environments/production.rb
         | 
| 204 | 
            +
            - test/dummy/config/environment.rb
         | 
| 205 | 
            +
            - test/dummy/config/routes.rb
         | 
| 206 | 
            +
            - test/dummy/config/initializers/assets.rb
         | 
| 207 | 
            +
            - test/dummy/config/initializers/cookies_serializer.rb
         | 
| 208 | 
            +
            - test/dummy/config/initializers/inflections.rb
         | 
| 214 209 | 
             
            - test/dummy/config/initializers/session_store.rb
         | 
| 215 | 
            -
            - test/dummy/config/initializers/filter_parameter_logging.rb
         | 
| 216 210 | 
             
            - test/dummy/config/initializers/wrap_parameters.rb
         | 
| 211 | 
            +
            - test/dummy/config/initializers/filter_parameter_logging.rb
         | 
| 217 212 | 
             
            - test/dummy/config/initializers/backtrace_silencers.rb
         | 
| 218 | 
            -
            - test/dummy/config/initializers/inflections.rb
         | 
| 219 | 
            -
            - test/dummy/config/initializers/assets.rb
         | 
| 220 | 
            -
            - test/dummy/config/initializers/cookies_serializer.rb
         | 
| 221 213 | 
             
            - test/dummy/config/initializers/mime_types.rb
         | 
| 222 | 
            -
            - test/dummy/ | 
| 223 | 
            -
            - test/dummy/ | 
| 224 | 
            -
            - test/dummy/ | 
| 225 | 
            -
            - test/dummy/ | 
| 214 | 
            +
            - test/dummy/db/schema.rb
         | 
| 215 | 
            +
            - test/dummy/app/views/layouts/application.html.erb
         | 
| 216 | 
            +
            - test/dummy/app/controllers/application_controller.rb
         | 
| 217 | 
            +
            - test/dummy/app/helpers/application_helper.rb
         | 
| 218 | 
            +
            - test/dummy/app/assets/stylesheets/application.css
         | 
| 219 | 
            +
            - test/dummy/app/assets/javascripts/application.js
         | 
| 226 220 | 
             
            - test/dummy/public/422.html
         | 
| 227 | 
            -
            - test/dummy/public/favicon.ico
         | 
| 228 221 | 
             
            - test/dummy/public/404.html
         | 
| 222 | 
            +
            - test/dummy/public/favicon.ico
         | 
| 229 223 | 
             
            - test/dummy/public/500.html
         | 
| 224 | 
            +
            - test/dummy/bin/bundle
         | 
| 225 | 
            +
            - test/dummy/bin/setup
         | 
| 226 | 
            +
            - test/dummy/bin/rails
         | 
| 227 | 
            +
            - test/dummy/bin/rake
         | 
| 230 228 | 
             
            - test/test_helper.rb
         | 
| 229 | 
            +
            - test/fixtures/scheduled_tasks.yml
         | 
| 230 | 
            +
            - test/models/scheduled_task_test.rb
         |