cronjobs 0.1.0 → 4.0.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,67 +1,61 @@
1
1
  <!DOCTYPE html>
2
2
  <html>
3
- <head>
4
- <title>The page you were looking for doesn't exist (404)</title>
5
- <meta name="viewport" content="width=device-width,initial-scale=1">
6
- <style>
7
- body {
8
- background-color: #EFEFEF;
9
- color: #2E2F30;
10
- text-align: center;
11
- font-family: arial, sans-serif;
12
- margin: 0;
13
- }
14
-
15
- div.dialog {
16
- width: 95%;
17
- max-width: 33em;
18
- margin: 4em auto 0;
19
- }
20
-
21
- div.dialog > div {
22
- border: 1px solid #CCC;
23
- border-right-color: #999;
24
- border-left-color: #999;
25
- border-bottom-color: #BBB;
26
- border-top: #B00100 solid 4px;
27
- border-top-left-radius: 9px;
28
- border-top-right-radius: 9px;
29
- background-color: white;
30
- padding: 7px 12% 0;
31
- box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
- }
33
-
34
- h1 {
35
- font-size: 100%;
36
- color: #730E15;
37
- line-height: 1.5em;
38
- }
39
-
40
- div.dialog > p {
41
- margin: 0 0 1em;
42
- padding: 1em;
43
- background-color: #F7F7F7;
44
- border: 1px solid #CCC;
45
- border-right-color: #999;
46
- border-left-color: #999;
47
- border-bottom-color: #999;
48
- border-bottom-left-radius: 4px;
49
- border-bottom-right-radius: 4px;
50
- border-top-color: #DADADA;
51
- color: #666;
52
- box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
- }
54
- </style>
55
- </head>
56
-
57
- <body>
58
- <!-- This file lives in public/404.html -->
59
- <div class="dialog">
60
- <div>
61
- <h1>The page you were looking for doesn't exist.</h1>
62
- <p>You may have mistyped the address or the page may have moved.</p>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ body {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+ div.dialog {
15
+ width: 95%;
16
+ max-width: 33em;
17
+ margin: 4em auto 0;
18
+ }
19
+ div.dialog > div {
20
+ border: 1px solid #CCC;
21
+ border-right-color: #999;
22
+ border-left-color: #999;
23
+ border-bottom-color: #BBB;
24
+ border-top: #B00100 solid 4px;
25
+ border-top-left-radius: 9px;
26
+ border-top-right-radius: 9px;
27
+ background-color: white;
28
+ padding: 7px 12% 0;
29
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
30
+ }
31
+ h1 {
32
+ font-size: 100%;
33
+ color: #730E15;
34
+ line-height: 1.5em;
35
+ }
36
+ div.dialog > p {
37
+ margin: 0 0 1em;
38
+ padding: 1em;
39
+ background-color: #F7F7F7;
40
+ border: 1px solid #CCC;
41
+ border-right-color: #999;
42
+ border-left-color: #999;
43
+ border-bottom-color: #999;
44
+ border-bottom-left-radius: 4px;
45
+ border-bottom-right-radius: 4px;
46
+ border-top-color: #DADADA;
47
+ color: #666;
48
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
49
+ }
50
+ </style>
51
+ </head>
52
+ <body>
53
+ <div class="dialog">
54
+ <div>
55
+ <h1>The page you were looking for doesn't exist.</h1>
56
+ <p>You may have mistyped the address or the page may have moved.</p>
57
+ </div>
58
+ <p>If you are the application owner check the logs for more information.</p>
63
59
  </div>
64
- <p>If you are the application owner check the logs for more information.</p>
65
- </div>
66
- </body>
60
+ </body>
67
61
  </html>
@@ -1,67 +1,61 @@
1
1
  <!DOCTYPE html>
2
2
  <html>
3
- <head>
4
- <title>The change you wanted was rejected (422)</title>
5
- <meta name="viewport" content="width=device-width,initial-scale=1">
6
- <style>
7
- body {
8
- background-color: #EFEFEF;
9
- color: #2E2F30;
10
- text-align: center;
11
- font-family: arial, sans-serif;
12
- margin: 0;
13
- }
14
-
15
- div.dialog {
16
- width: 95%;
17
- max-width: 33em;
18
- margin: 4em auto 0;
19
- }
20
-
21
- div.dialog > div {
22
- border: 1px solid #CCC;
23
- border-right-color: #999;
24
- border-left-color: #999;
25
- border-bottom-color: #BBB;
26
- border-top: #B00100 solid 4px;
27
- border-top-left-radius: 9px;
28
- border-top-right-radius: 9px;
29
- background-color: white;
30
- padding: 7px 12% 0;
31
- box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
- }
33
-
34
- h1 {
35
- font-size: 100%;
36
- color: #730E15;
37
- line-height: 1.5em;
38
- }
39
-
40
- div.dialog > p {
41
- margin: 0 0 1em;
42
- padding: 1em;
43
- background-color: #F7F7F7;
44
- border: 1px solid #CCC;
45
- border-right-color: #999;
46
- border-left-color: #999;
47
- border-bottom-color: #999;
48
- border-bottom-left-radius: 4px;
49
- border-bottom-right-radius: 4px;
50
- border-top-color: #DADADA;
51
- color: #666;
52
- box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
- }
54
- </style>
55
- </head>
56
-
57
- <body>
58
- <!-- This file lives in public/422.html -->
59
- <div class="dialog">
60
- <div>
61
- <h1>The change you wanted was rejected.</h1>
62
- <p>Maybe you tried to change something you didn't have access to.</p>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ body {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+ div.dialog {
15
+ width: 95%;
16
+ max-width: 33em;
17
+ margin: 4em auto 0;
18
+ }
19
+ div.dialog > div {
20
+ border: 1px solid #CCC;
21
+ border-right-color: #999;
22
+ border-left-color: #999;
23
+ border-bottom-color: #BBB;
24
+ border-top: #B00100 solid 4px;
25
+ border-top-left-radius: 9px;
26
+ border-top-right-radius: 9px;
27
+ background-color: white;
28
+ padding: 7px 12% 0;
29
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
30
+ }
31
+ h1 {
32
+ font-size: 100%;
33
+ color: #730E15;
34
+ line-height: 1.5em;
35
+ }
36
+ div.dialog > p {
37
+ margin: 0 0 1em;
38
+ padding: 1em;
39
+ background-color: #F7F7F7;
40
+ border: 1px solid #CCC;
41
+ border-right-color: #999;
42
+ border-left-color: #999;
43
+ border-bottom-color: #999;
44
+ border-bottom-left-radius: 4px;
45
+ border-bottom-right-radius: 4px;
46
+ border-top-color: #DADADA;
47
+ color: #666;
48
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
49
+ }
50
+ </style>
51
+ </head>
52
+ <body>
53
+ <div class="dialog">
54
+ <div>
55
+ <h1>The change you wanted was rejected.</h1>
56
+ <p>Maybe you tried to change something you didn't have access to.</p>
57
+ </div>
58
+ <p>If you are the application owner check the logs for more information.</p>
63
59
  </div>
64
- <p>If you are the application owner check the logs for more information.</p>
65
- </div>
66
- </body>
60
+ </body>
67
61
  </html>
@@ -1,66 +1,60 @@
1
1
  <!DOCTYPE html>
2
2
  <html>
3
- <head>
4
- <title>We're sorry, but something went wrong (500)</title>
5
- <meta name="viewport" content="width=device-width,initial-scale=1">
6
- <style>
7
- body {
8
- background-color: #EFEFEF;
9
- color: #2E2F30;
10
- text-align: center;
11
- font-family: arial, sans-serif;
12
- margin: 0;
13
- }
14
-
15
- div.dialog {
16
- width: 95%;
17
- max-width: 33em;
18
- margin: 4em auto 0;
19
- }
20
-
21
- div.dialog > div {
22
- border: 1px solid #CCC;
23
- border-right-color: #999;
24
- border-left-color: #999;
25
- border-bottom-color: #BBB;
26
- border-top: #B00100 solid 4px;
27
- border-top-left-radius: 9px;
28
- border-top-right-radius: 9px;
29
- background-color: white;
30
- padding: 7px 12% 0;
31
- box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
- }
33
-
34
- h1 {
35
- font-size: 100%;
36
- color: #730E15;
37
- line-height: 1.5em;
38
- }
39
-
40
- div.dialog > p {
41
- margin: 0 0 1em;
42
- padding: 1em;
43
- background-color: #F7F7F7;
44
- border: 1px solid #CCC;
45
- border-right-color: #999;
46
- border-left-color: #999;
47
- border-bottom-color: #999;
48
- border-bottom-left-radius: 4px;
49
- border-bottom-right-radius: 4px;
50
- border-top-color: #DADADA;
51
- color: #666;
52
- box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
- }
54
- </style>
55
- </head>
56
-
57
- <body>
58
- <!-- This file lives in public/500.html -->
59
- <div class="dialog">
60
- <div>
61
- <h1>We're sorry, but something went wrong.</h1>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ body {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+ div.dialog {
15
+ width: 95%;
16
+ max-width: 33em;
17
+ margin: 4em auto 0;
18
+ }
19
+ div.dialog > div {
20
+ border: 1px solid #CCC;
21
+ border-right-color: #999;
22
+ border-left-color: #999;
23
+ border-bottom-color: #BBB;
24
+ border-top: #B00100 solid 4px;
25
+ border-top-left-radius: 9px;
26
+ border-top-right-radius: 9px;
27
+ background-color: white;
28
+ padding: 7px 12% 0;
29
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
30
+ }
31
+ h1 {
32
+ font-size: 100%;
33
+ color: #730E15;
34
+ line-height: 1.5em;
35
+ }
36
+ div.dialog > p {
37
+ margin: 0 0 1em;
38
+ padding: 1em;
39
+ background-color: #F7F7F7;
40
+ border: 1px solid #CCC;
41
+ border-right-color: #999;
42
+ border-left-color: #999;
43
+ border-bottom-color: #999;
44
+ border-bottom-left-radius: 4px;
45
+ border-bottom-right-radius: 4px;
46
+ border-top-color: #DADADA;
47
+ color: #666;
48
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
49
+ }
50
+ </style>
51
+ </head>
52
+ <body>
53
+ <div class="dialog">
54
+ <div>
55
+ <h1>We're sorry, but something went wrong.</h1>
56
+ </div>
57
+ <p>If you are the application owner check the logs for more information.</p>
62
58
  </div>
63
- <p>If you are the application owner check the logs for more information.</p>
64
- </div>
65
- </body>
59
+ </body>
66
60
  </html>
@@ -1,17 +1,16 @@
1
1
  require 'test_helper'
2
2
  require 'rails/generators'
3
- require 'generators/cronjobs/install_generator'
3
+ require 'generators/cronjobs/install/install_generator'
4
4
 
5
- class GeneratorsTest < Rails::Generators::TestCase
6
-
7
- tests Cronjobs::Generators::InstallGenerator
5
+ class GeneratorTest < Rails::Generators::TestCase
8
6
  destination Rails.root.join('tmp')
9
7
 
10
8
  teardown do
11
9
  FileUtils.rm_rf destination_root
12
10
  end
13
11
 
14
- test 'file generation' do
12
+ test 'install' do
13
+ self.class.tests Cronjobs::Generators::InstallGenerator
15
14
  run_generator
16
15
  assert_file 'config/cronjobs.rb'
17
16
  end
@@ -1,6 +1,6 @@
1
1
  require 'test_helper'
2
2
 
3
- class TasksTest < ActiveSupport::TestCase
3
+ class TaskTest < ActiveSupport::TestCase
4
4
 
5
5
  setup do
6
6
  load File.expand_path('../../lib/tasks/cronjobs.rake', __FILE__)
@@ -11,16 +11,16 @@ class TasksTest < ActiveSupport::TestCase
11
11
  FileUtils.rm_rf Rails.root.join('tmp')
12
12
  end
13
13
 
14
- test 'check' do
15
- Cronjobs.expects(:write).once
16
- Rake::Task['cronjobs:check'].invoke
14
+ test 'update' do
15
+ Cronjobs.expects(:update).once
16
+ Rake::Task['cronjobs:update'].invoke
17
17
 
18
18
  digest = Digest::MD5.file(Rails.root.join('config/cronjobs.rb'))
19
19
  digest_path = Rails.root.join('tmp/digests/cronjobs')
20
20
  FileUtils.mkdir_p digest_path.dirname
21
21
  File.write digest_path, digest
22
- Cronjobs.expects(:write).never
23
- Rake::Task['cronjobs:check'].invoke
22
+ Cronjobs.expects(:update).never
23
+ Rake::Task['cronjobs:update'].invoke
24
24
  end
25
25
 
26
26
  end
data/test/test_helper.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # Configure Rails Environment
2
2
  ENV['RAILS_ENV'] = 'test'
3
3
 
4
- require File.expand_path('../dummy/config/environment.rb', __FILE__)
4
+ require File.expand_path('../../test/dummy/config/environment.rb', __FILE__)
5
5
  require 'rails/test_help'
6
6
  require 'mocha/mini_test'
7
7
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cronjobs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 4.0.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - mmontossi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-17 00:00:00.000000000 Z
11
+ date: 2016-12-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -46,7 +46,7 @@ dependencies:
46
46
  version: '1.1'
47
47
  description: DSL to manage cronjobs in rails.
48
48
  email:
49
- - mmontossi@buyin.io
49
+ - mmontossi@gmail.com
50
50
  executables: []
51
51
  extensions: []
52
52
  extra_rdoc_files: []
@@ -54,14 +54,15 @@ files:
54
54
  - MIT-LICENSE
55
55
  - Rakefile
56
56
  - lib/cronjobs.rb
57
+ - lib/cronjobs/definitions.rb
57
58
  - lib/cronjobs/dsl/actions.rb
58
59
  - lib/cronjobs/proxy.rb
59
60
  - lib/cronjobs/railtie.rb
60
61
  - lib/cronjobs/version.rb
61
- - lib/generators/cronjobs/install_generator.rb
62
- - lib/generators/cronjobs/templates/definitions.rb
62
+ - lib/generators/cronjobs/install/install_generator.rb
63
+ - lib/generators/cronjobs/install/templates/configuration.rb
63
64
  - lib/tasks/cronjobs.rake
64
- - test/cronjobs_test.rb
65
+ - test/definition_test.rb
65
66
  - test/dummy/Rakefile
66
67
  - test/dummy/app/assets/javascripts/application.js
67
68
  - test/dummy/app/assets/stylesheets/application.css
@@ -91,14 +92,13 @@ files:
91
92
  - test/dummy/config/locales/en.yml
92
93
  - test/dummy/config/routes.rb
93
94
  - test/dummy/config/secrets.yml
94
- - test/dummy/log/development.log
95
95
  - test/dummy/log/test.log
96
96
  - test/dummy/public/404.html
97
97
  - test/dummy/public/422.html
98
98
  - test/dummy/public/500.html
99
99
  - test/dummy/public/favicon.ico
100
100
  - test/generator_test.rb
101
- - test/tasks_test.rb
101
+ - test/task_test.rb
102
102
  - test/test_helper.rb
103
103
  homepage: https://github.com/mmontossi/cronjobs
104
104
  licenses:
@@ -125,7 +125,7 @@ signing_key:
125
125
  specification_version: 4
126
126
  summary: Cronjobs for rails.
127
127
  test_files:
128
- - test/cronjobs_test.rb
128
+ - test/definition_test.rb
129
129
  - test/dummy/app/assets/javascripts/application.js
130
130
  - test/dummy/app/assets/stylesheets/application.css
131
131
  - test/dummy/app/controllers/application_controller.rb
@@ -154,7 +154,6 @@ test_files:
154
154
  - test/dummy/config/routes.rb
155
155
  - test/dummy/config/secrets.yml
156
156
  - test/dummy/config.ru
157
- - test/dummy/log/development.log
158
157
  - test/dummy/log/test.log
159
158
  - test/dummy/public/404.html
160
159
  - test/dummy/public/422.html
@@ -162,5 +161,5 @@ test_files:
162
161
  - test/dummy/public/favicon.ico
163
162
  - test/dummy/Rakefile
164
163
  - test/generator_test.rb
165
- - test/tasks_test.rb
164
+ - test/task_test.rb
166
165
  - test/test_helper.rb
@@ -1,15 +0,0 @@
1
- require 'rails/generators/base'
2
-
3
- module Cronjobs
4
- module Generators
5
- class InstallGenerator < Rails::Generators::Base
6
-
7
- source_root File.expand_path('../templates', __FILE__)
8
-
9
- def create_definitions_file
10
- copy_file 'definitions.rb', 'config/cronjobs.rb'
11
- end
12
-
13
- end
14
- end
15
- end
@@ -1,35 +0,0 @@
1
-  (19.9ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL) 
2
-  (4.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
3
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
4
- Migrating to CreateUsers (20160918232127)
5
-  (0.2ms) BEGIN
6
-  (14.2ms) CREATE TABLE "users" ("id" serial primary key, "name" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
7
- SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160918232127"]]
8
-  (6.4ms) COMMIT
9
- ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
10
-  (3.3ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
11
- FROM pg_constraint c
12
- JOIN pg_class t1 ON c.conrelid = t1.oid
13
- JOIN pg_class t2 ON c.confrelid = t2.oid
14
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
15
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
16
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
17
- WHERE c.contype = 'f'
18
- AND t1.relname = 'users'
19
- AND t3.nspname = ANY (current_schemas(false))
20
- ORDER BY c.conname
21
- 
22
- ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
23
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
24
-  (3.2ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
25
- FROM pg_constraint c
26
- JOIN pg_class t1 ON c.conrelid = t1.oid
27
- JOIN pg_class t2 ON c.confrelid = t2.oid
28
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
29
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
30
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
31
- WHERE c.contype = 'f'
32
- AND t1.relname = 'users'
33
- AND t3.nspname = ANY (current_schemas(false))
34
- ORDER BY c.conname
35
-