acidic_job 1.0.0.pre3 → 1.0.0.pre4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/lib/acidic_job/version.rb +1 -1
- data/lib/generators/acidic_job/drop_tables_generator.rb +9 -14
- data/lib/generators/acidic_job/install_generator.rb +27 -0
- data/lib/generators/{templates → acidic_job/templates}/create_acidic_job_runs_migration.rb.erb +1 -1
- data/lib/generators/{templates → acidic_job/templates}/drop_acidic_job_keys_migration.rb.erb +1 -1
- metadata +4 -4
- data/lib/generators/acidic_job_generator.rb +0 -25
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d549814b3b04592d10c716f8715e67d15eb7383c3235ecb5d74319ab568b5507
|
4
|
+
data.tar.gz: 5279750f02439d8fe453d6e5c430c3611513010bebbbdb18c2853d0d5b8d2764
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7fa1a9fff8203a7a426738f8559d4f7afbcedc9e35832508a9550a113e348f158adc3c28ab58fb4f0ce6ca0fb3c9cc08c7f17d84cb2e574323e376d78188b18e
|
7
|
+
data.tar.gz: 001dd65449fdc56b3ca2bd9b74be00bb0646b3875986844392b31ec4536a7135c23da66fa7b32e20b7a893ecfc255caaefd423a72bfdaa8d3b39a68fe469329f
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
data/lib/acidic_job/version.rb
CHANGED
@@ -1,30 +1,25 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "rails/generators"
|
4
3
|
require "rails/generators/active_record"
|
5
4
|
|
6
5
|
module AcidicJob
|
7
6
|
module Generators
|
8
|
-
class DropTablesGenerator <
|
9
|
-
|
7
|
+
class DropTablesGenerator < ::Rails::Generators::Base
|
8
|
+
include ActiveRecord::Generators::Migration
|
9
|
+
source_root File.expand_path("templates", __dir__)
|
10
10
|
|
11
|
-
desc "
|
12
|
-
|
13
|
-
# ActiveRecord::Generators::Base inherits from Rails::Generators::NamedBase
|
14
|
-
# which requires a NAME parameter for the new table name.
|
15
|
-
# Our generator always uses "acidic_job_runs", so we just set a random name here.
|
16
|
-
argument :name, type: :string, default: "random_name"
|
11
|
+
desc "Drops the pre-1.0 tables for the AcidicJob::Key and AcidicJob::Staged models."
|
17
12
|
|
18
|
-
|
19
|
-
def copy_acidic_job_runs_migration_files
|
13
|
+
def copy_migration
|
20
14
|
migration_template "drop_acidic_job_keys_migration.rb.erb",
|
21
|
-
"db/migrate/drop_old_acidic_job_tables.rb"
|
15
|
+
"db/migrate/drop_old_acidic_job_tables.rb",
|
16
|
+
migration_version: migration_version
|
22
17
|
end
|
23
18
|
|
24
19
|
protected
|
25
20
|
|
26
|
-
def
|
27
|
-
|
21
|
+
def migration_version
|
22
|
+
"[#{ActiveRecord::VERSION::MAJOR}.#{ActiveRecord::VERSION::MINOR}]"
|
28
23
|
end
|
29
24
|
end
|
30
25
|
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "rails/generators/active_record"
|
4
|
+
|
5
|
+
module AcidicJob
|
6
|
+
module Generators
|
7
|
+
class InstallGenerator < ::Rails::Generators::Base
|
8
|
+
include ActiveRecord::Generators::Migration
|
9
|
+
source_root File.expand_path("templates", __dir__)
|
10
|
+
|
11
|
+
desc "Generates a migration for the AcidicJob::Run table."
|
12
|
+
|
13
|
+
# Copies the migration template to db/migrate.
|
14
|
+
def copy_acidic_job_runs_migration_files
|
15
|
+
migration_template "create_acidic_job_runs_migration.rb.erb",
|
16
|
+
"db/migrate/create_acidic_job_runs.rb",
|
17
|
+
migration_version: migration_version
|
18
|
+
end
|
19
|
+
|
20
|
+
protected
|
21
|
+
|
22
|
+
def migration_version
|
23
|
+
"[#{ActiveRecord::VERSION::MAJOR}.#{ActiveRecord::VERSION::MINOR}]"
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: acidic_job
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.
|
4
|
+
version: 1.0.0.pre4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- fractaledmind
|
@@ -90,9 +90,9 @@ files:
|
|
90
90
|
- lib/acidic_job/upgrade_service.rb
|
91
91
|
- lib/acidic_job/version.rb
|
92
92
|
- lib/generators/acidic_job/drop_tables_generator.rb
|
93
|
-
- lib/generators/
|
94
|
-
- lib/generators/templates/create_acidic_job_runs_migration.rb.erb
|
95
|
-
- lib/generators/templates/drop_acidic_job_keys_migration.rb.erb
|
93
|
+
- lib/generators/acidic_job/install_generator.rb
|
94
|
+
- lib/generators/acidic_job/templates/create_acidic_job_runs_migration.rb.erb
|
95
|
+
- lib/generators/acidic_job/templates/drop_acidic_job_keys_migration.rb.erb
|
96
96
|
homepage: https://github.com/fractaledmind/acidic_job
|
97
97
|
licenses:
|
98
98
|
- MIT
|
@@ -1,25 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "rails/generators"
|
4
|
-
require "rails/generators/active_record"
|
5
|
-
|
6
|
-
class AcidicJobGenerator < ActiveRecord::Generators::Base
|
7
|
-
# ActiveRecord::Generators::Base inherits from Rails::Generators::NamedBase
|
8
|
-
# which requires a NAME parameter for the new table name.
|
9
|
-
# Our generator always uses "acidic_job_runs", so we just set a random name here.
|
10
|
-
argument :name, type: :string, default: "random_name"
|
11
|
-
|
12
|
-
source_root File.expand_path("templates", __dir__)
|
13
|
-
|
14
|
-
# Copies the migration template to db/migrate.
|
15
|
-
def copy_acidic_job_runs_migration_files
|
16
|
-
migration_template "create_acidic_job_runs_migration.rb.erb",
|
17
|
-
"db/migrate/create_acidic_job_runs.rb"
|
18
|
-
end
|
19
|
-
|
20
|
-
protected
|
21
|
-
|
22
|
-
def migration_class
|
23
|
-
ActiveRecord::Migration["#{ActiveRecord::VERSION::MAJOR}.#{ActiveRecord::VERSION::MINOR}"]
|
24
|
-
end
|
25
|
-
end
|