foreman_docker 4.1.0 → 4.1.1

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
  SHA1:
3
- metadata.gz: 742be737268d18e9406b2e44b41fe3f8a76add83
4
- data.tar.gz: 020370eb15873e7527a2efd2d3577d48b84ad00d
3
+ metadata.gz: 43cd7668767c5440916fba9caa6a3167865fea60
4
+ data.tar.gz: 1f908ee9c8983e0f34a7011bc595a51743fff14e
5
5
  SHA512:
6
- metadata.gz: 3ebeae9695d4cf06e6e22485c14252864a57416bfc8f4db3ffbb79f15359c1648a51fe7332a74f87e50a77e12a3092637562b693972ef84e786a7156ca17e9d3
7
- data.tar.gz: 02b9638cbe1075186286781625210fd3112c41b593be3886843f895efbe93409dcfb7a029f66fae03a70d5bdbe3cb8b1775fd8780d6033b74c2f732eacbeeb64
6
+ metadata.gz: 8367d15c8bb793bcf2e7d98c1ef82a6b45254b80a966d45e422770d6976685663e337842f355d80804f8a4d24be890963a0dab8902ddfad21b192de43df98862
7
+ data.tar.gz: c363e982dc9849c38eea03865465a083c886c1c1815a5d1aaa35351d727ed021c93b46f36275a0482208879feb4f43951e84c9fe926ed41fad91c0ef54eec455
@@ -1,3 +1,3 @@
1
1
  module ForemanDocker
2
- VERSION = '4.1.0'
2
+ VERSION = '4.1.1'
3
3
  end
@@ -0,0 +1,36 @@
1
+ namespace :foreman_docker do
2
+ desc 'Clean default data created by this plugin, this will permanently delete the data!'
3
+ task :cleanup => :environment do
4
+ puts 'Cleaning data...'
5
+
6
+ User.as_anonymous_admin do
7
+ puts '... deleting records from taxable_taxonomies'
8
+ TaxableTaxonomy.where(:taxable_type => [ 'Container', 'DockerRegistry', 'Preliminary', 'ForemanDocker::Docker' ]).delete_all
9
+ puts '... deleting filters'
10
+ Filter.joins(:permissions).where('permissions.resource_type' => Foreman::Plugin.find(:foreman_docker).registered_permissions.map { |p, attrs| attrs[:resource_type] }.uniq!).destroy_all
11
+ puts '... deleting permissions'
12
+ Permission.where(:name => Foreman::Plugin.find(:foreman_docker).registered_permissions.map(&:first)).destroy_all
13
+ puts '... deleting docker compute resources'
14
+ ForemanDocker::Docker.destroy_all
15
+ puts 'data from all tables deleted'
16
+ end
17
+
18
+ tables = [
19
+ :containers,
20
+ :docker_registries,
21
+ :docker_container_wizard_states,
22
+ :docker_container_wizard_states_preliminaries,
23
+ :docker_container_wizard_states_images,
24
+ :docker_container_wizard_states_configurations,
25
+ :docker_container_wizard_states_environments,
26
+ :docker_parameters
27
+ ]
28
+ tables.each do |table|
29
+ puts "... dropping table #{table}"
30
+ ActiveRecord::Migration.drop_table table
31
+ end
32
+
33
+ puts 'Clean up finished, you can now remove the plugin from your system'
34
+ end
35
+ end
36
+
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_docker
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.0
4
+ version: 4.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Lobato, Amos Benari
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-16 00:00:00.000000000 Z
11
+ date: 2019-02-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: docker-api
@@ -195,6 +195,7 @@ files:
195
195
  - lib/foreman_docker.rb
196
196
  - lib/foreman_docker/engine.rb
197
197
  - lib/foreman_docker/version.rb
198
+ - lib/tasks/cleanup.rake
198
199
  - lib/tasks/test.rake
199
200
  - locale/Makefile
200
201
  - locale/de/LC_MESSAGES/foreman_docker.mo
@@ -261,31 +262,31 @@ required_rubygems_version: !ruby/object:Gem::Requirement
261
262
  version: '0'
262
263
  requirements: []
263
264
  rubyforge_project:
264
- rubygems_version: 2.6.12
265
+ rubygems_version: 2.6.14.1
265
266
  signing_key:
266
267
  specification_version: 4
267
268
  summary: Provision and manage Docker containers and images from Foreman
268
269
  test_files:
269
- - test/factories/compute_resources.rb
270
- - test/factories/containers.rb
271
- - test/factories/docker_registry.rb
272
270
  - test/functionals/api/v2/containers_controller_test.rb
273
271
  - test/functionals/api/v2/registries_controller_test.rb
274
- - test/functionals/containers_steps_controller_test.rb
275
- - test/functionals/containers_controller_test.rb
276
272
  - test/functionals/image_search_controller_test.rb
277
- - test/integration/container_test.rb
273
+ - test/functionals/containers_controller_test.rb
274
+ - test/functionals/containers_steps_controller_test.rb
278
275
  - test/integration/container_steps_test.rb
276
+ - test/integration/container_test.rb
279
277
  - test/integration/registry_creation_test.rb
280
- - test/units/container_remover_test.rb
281
- - test/units/foreman_docker/compute_resource_extensions_test.rb
282
- - test/units/foreman_docker/docker_test.rb
283
- - test/units/utility_service_test.rb
278
+ - test/factories/containers.rb
279
+ - test/factories/docker_registry.rb
280
+ - test/factories/compute_resources.rb
284
281
  - test/units/container_test.rb
285
- - test/units/image_search_service_test.rb
286
- - test/units/containers_service_test.rb
287
282
  - test/units/docker_container_wizard_states/image_test.rb
288
- - test/units/docker_registry_test.rb
283
+ - test/units/containers_service_test.rb
289
284
  - test/units/registry_api_test.rb
285
+ - test/units/image_search_service_test.rb
286
+ - test/units/docker_registry_test.rb
287
+ - test/units/foreman_docker/compute_resource_extensions_test.rb
288
+ - test/units/foreman_docker/docker_test.rb
289
+ - test/units/container_remover_test.rb
290
+ - test/units/utility_service_test.rb
290
291
  - test/test_plugin_helper.rb
291
292
  - ".rubocop.yml"