knife-tidy 1.2.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile DELETED
@@ -1,58 +0,0 @@
1
- #!/usr/bin/env rake
2
-
3
- # require_relative 'tasks/maintainers'
4
-
5
- # Style tests. cookstyle (rubocop) and Foodcritic
6
- namespace :style do
7
- begin
8
- require 'cookstyle'
9
- require 'rubocop/rake_task'
10
-
11
- desc 'Run Ruby style checks'
12
- RuboCop::RakeTask.new(:ruby)
13
- rescue LoadError => e
14
- puts ">>> Gem load error: #{e}, omitting style:ruby" unless ENV['CI']
15
- end
16
-
17
- begin
18
- require 'foodcritic'
19
-
20
- desc 'Run Chef style checks'
21
- FoodCritic::Rake::LintTask.new(:chef) do |t|
22
- t.options = {
23
- fail_tags: ['any'],
24
- progress: true,
25
- }
26
- end
27
- rescue LoadError
28
- puts ">>> Gem load error: #{e}, omitting style:chef" unless ENV['CI']
29
- end
30
- end
31
-
32
- desc 'Run all style checks'
33
- task style: ['style:chef', 'style:ruby']
34
-
35
- # ChefSpec
36
- begin
37
- require 'rspec/core/rake_task'
38
-
39
- desc 'Run ChefSpec examples'
40
- RSpec::Core::RakeTask.new(:spec)
41
- rescue LoadError => e
42
- puts ">>> Gem load error: #{e}, omitting spec" unless ENV['CI']
43
- end
44
-
45
- # Changelog
46
- namespace :changelog do
47
- begin
48
- require 'github_changelog_generator/task'
49
-
50
- GitHubChangelogGenerator::RakeTask.new :changelog do |config|
51
- config.since_tag = '1.0.1'
52
- config.future_release = '1.1.0'
53
- end
54
- end
55
- end
56
-
57
- # Default
58
- task default: %w(style spec)
data/TODO.md DELETED
@@ -1,5 +0,0 @@
1
- ## ec-backup
2
- - add Metadata with last backup timestamp
3
-
4
- ## tidy
5
- - disallow server clean operation unless recent backup exists
@@ -1,10 +0,0 @@
1
- {
2
- "your-problem-descriptor":{
3
- "organizations/*/cookbooks/*/metadata.rb":[
4
- {
5
- "pattern":"^version .*GO_PIPELINE_LABEL",
6
- "replace":"version !COOKBOOK_VERSION!"
7
- }
8
- ]
9
- }
10
- }
@@ -1,32 +0,0 @@
1
- $:.push File.expand_path("../lib", __FILE__)
2
- require 'knife-tidy/version'
3
-
4
- Gem::Specification.new do |s|
5
- s.name = "knife-tidy"
6
- s.version = KnifeTidy::VERSION
7
- s.version = "#{s.version}-pre#{ENV['TRAVIS_BUILD_NUMBER']}" if ENV["TRAVIS"]
8
- s.has_rdoc = true
9
- s.authors = ["Jeremy Miller"]
10
- s.email = ["jmiller@chef.io"]
11
- s.summary = "Report on stale Chef Server nodes and cookbooks and clean up data integrity issues in a knife-ec-backup object based backup"
12
- s.description = s.summary
13
- s.homepage = "https://github.com/chef-customers/knife-tidy"
14
- s.license = "Apache License, v2.0"
15
- s.files = `git ls-files`.split("\n")
16
- s.require_paths = ["lib"]
17
-
18
- s.required_ruby_version = ">= 2.0.0"
19
-
20
- s.add_development_dependency "rake", "~> 11.0"
21
- s.add_development_dependency "rspec", "~> 3.4"
22
- s.add_development_dependency "aruba", "~> 0.6"
23
- s.add_development_dependency "simplecov", "~> 0.9"
24
- s.add_development_dependency "simplecov-console", "~> 0.2"
25
- if ENV.key?("TRAVIS_BUILD") && RUBY_VERSION == "2.1.9"
26
- # Test version of Chef with Chef Zero before
27
- # /orgs/org/users/user/keys endpoint was added.
28
- s.add_development_dependency "chef", "12.8.1"
29
- else # Test most current version of Chef on 2.2.2
30
- s.add_development_dependency :chef
31
- end
32
- end
File without changes
@@ -1,25 +0,0 @@
1
- require File.expand_path(File.join(File.dirname(__FILE__), "..", "..", "spec_helper"))
2
- require 'chef/knife/tidy_base'
3
- require 'chef/knife'
4
- require 'chef/config'
5
- require 'stringio'
6
-
7
- class Tester
8
- end
9
-
10
- describe Chef::Knife::TidyBase do
11
- before(:each) do
12
- @t = Tester.new
13
- @t.extend(Chef::Knife::TidyBase)
14
- @rest = double('rest')
15
- allow(Chef::ServerAPI).to receive(:new).and_return(@rest)
16
- @out = StringIO.new("** Finished **\n")
17
- allow(@t).to receive(:ui).and_return(@out)
18
- end
19
-
20
- describe "#completion_message" do
21
- it "lets the user know we're Finished" do
22
- expect(@t.completion_message).to eq(@out)
23
- end
24
- end
25
- end
@@ -1,17 +0,0 @@
1
- $:.unshift File.expand_path('../../lib', __FILE__)
2
- require 'chef'
3
- require 'chef/knife/tidy_base'
4
- require 'chef/knife/tidy_backup_clean'
5
- require 'chef/knife/tidy_server_report'
6
- require 'chef/knife/tidy_server_clean'
7
-
8
- # Clear config between each example
9
- # to avoid dependencies between examples
10
- RSpec.configure do |c|
11
- c.raise_errors_for_deprecations!
12
- c.filter_run_excluding :exclude => true
13
- c.before(:each) do
14
- Chef::Config.reset
15
- Chef::Config[:knife] ={}
16
- end
17
- end