ops_backups 0.1.2 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3024502438b6655823c65f47d783165f1d91718f98ee68b1b0ff945f20497ffe
4
- data.tar.gz: d5dfa0b6d4b128a557213e30591d7121245b1544cf1f58a7617cfb102de61584
3
+ metadata.gz: e4e2a6f47e6200d22308f484a5ecd86d265743899e7f5a6664238323d2354062
4
+ data.tar.gz: 7e47517ec9119b19052aef80b82cbbc4f09b6c74f75fabba2b22de72c22971a2
5
5
  SHA512:
6
- metadata.gz: 420151cb8f9cd51361d45525f80409ea535957f9c54702826ef93f5e32f370515a4ffd3e799a8e9c4731db9b8f2fa616a40702ca0421d5e334d313cdcb0aa5a5
7
- data.tar.gz: 329f8fbbbcda7b9052cc4760afce2141ddb9120ad77dfd08c5fcc066cfdcb5b71f0e1e10b3a27157ade75dd3e8ece8635adf59db1a5b141f821c3efd751b23e2
6
+ metadata.gz: 9154d7ddc5f6a14f86d023792265683a44f6a91ad89c036cada4223330a187e9112b5eeeb1f08c31459ab42852b8dc73d9b4e4cb878d512e7884e674d0fd82d2
7
+ data.tar.gz: a00cdee4f2be8ebed57ada779ccc4f232318d6ace48f767216a5258c4e6d662e2b2885274b2fdb8f71337fd26672f1dcd17b946e00451d4b00521657ec43cc78
@@ -0,0 +1,7 @@
1
+ ---
2
+ en:
3
+ admin:
4
+ ops:
5
+ backup: "Backup"
6
+ backup_scheduled: "Backup scheduled"
7
+ backup_db: "Backup database"
@@ -1,5 +1,7 @@
1
1
  class CreateOpsBackups < ActiveRecord::Migration[8.0]
2
2
  def change
3
+ # check if the table already exists
4
+ return if table_exists?(:ops_backups)
3
5
  create_table :ops_backups do |t|
4
6
  t.string :name, null: false
5
7
  t.string :tag, null: false
@@ -1,12 +1,13 @@
1
1
  class OpsBackups::InstallGenerator < Rails::Generators::Base
2
2
  source_root File.expand_path("templates", __dir__)
3
3
 
4
- desc "Copies migrations and adds a storage service configuration to storage.yml"
4
+ desc "Adds a storage service configuration to storage.yml"
5
5
 
6
- def copy_migrations
7
- rake "railties:install:migrations FROM=ops_backups"
8
- say "Migrations copied to your application.", :green
9
- end
6
+ # it seems the migrations already are available in the host app
7
+ # def copy_migrations
8
+ # rake "railties:install:migrations FROM=ops_backups"
9
+ # say "Migrations copied to your application.", :green
10
+ # end
10
11
 
11
12
  def add_storage_service
12
13
  storage_file = Rails.root.join("config", "storage.yml")
@@ -7,5 +7,9 @@ module OpsBackups
7
7
  app.config.paths["db/migrate"].concat(config.paths["db/migrate"].expanded)
8
8
  end
9
9
  end
10
+
11
+ initializer :i18n do |app|
12
+ app.config.i18n.load_path += Dir[root.join("config", "locales", "**", "*.{rb,yml}")]
13
+ end
10
14
  end
11
15
  end
@@ -1,3 +1,3 @@
1
1
  module OpsBackups
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ops_backups
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Koen Handekyn
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-11-19 00:00:00.000000000 Z
11
+ date: 2024-11-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -46,6 +46,7 @@ files:
46
46
  - app/models/ops_backups/application_record.rb
47
47
  - app/models/ops_backups/backup.rb
48
48
  - app/views/layouts/ops_backups/application.html.erb
49
+ - config/locales/en.yml
49
50
  - config/routes.rb
50
51
  - db/migrate/20241114173612_create_ops_backups.rb
51
52
  - lib/generators/ops_backups/activeadmin/activeadmin_generator.rb