Sha256: 3b8ddee9f1ae2781ee2dd63f9bac0a0864b5319c1195ed8d6a78c735a4c51bdb

Contents?: true

Size: 1.1 KB

Versions: 36

Compression:

Stored size: 1.1 KB

Contents

#!/usr/bin/env rake

require 'bundler'
Bundler::GemHelper.install_tasks

require 'rake/testtask'
require 'rubocop/rake_task'

desc 'Run Rubocop to check for style violations'
RuboCop::RakeTask.new

desc 'Run unit tests'
Rake::TestTask.new(:test) do |test|
  test.libs << 'lib' << 'test'
  test.test_files = FileList['test/plugin/*.rb']
  test.verbose = true
end

# Building the gem will use the local file mode, so ensure it's world-readable.
# https://github.com/GoogleCloudPlatform/fluent-plugin-google-cloud/issues/53
desc 'Fix file permissions'
task :fix_perms do
  files = [
    'lib/fluent/plugin/out_google_cloud.rb',
    'lib/fluent/plugin/monitoring.rb',
    'lib/google/**/*.rb'
  ].flat_map do |file|
    file.include?('*') ? Dir.glob(file) : [file]
  end

  files.each do |file|
    mode = File.stat(file).mode & 0777
    next unless mode & 0444 != 0444
    puts "Changing mode of #{file} from #{mode.to_s(8)} to "\
         "#{(mode | 0444).to_s(8)}"
    chmod mode | 0444, file
  end
end

desc 'Run unit tests and RuboCop to check for style violations'
task all: [:rubocop, :test, :fix_perms]

task default: :all

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
fluent-plugin-google-cloud-0.6.25.pre.1 Rakefile
fluent-plugin-google-cloud-0.6.24 Rakefile
fluent-plugin-google-cloud-0.7.0.pre.2 Rakefile
fluent-plugin-google-cloud-0.7.0.pre.1 Rakefile
fluent-plugin-google-cloud-0.6.23 Rakefile
fluent-plugin-google-cloud-0.6.22 Rakefile
fluent-plugin-google-cloud-0.6.21 Rakefile
fluent-plugin-google-cloud-0.6.20 Rakefile
fluent-plugin-google-cloud-0.6.19 Rakefile
fluent-plugin-google-cloud-0.6.18 Rakefile
fluent-plugin-google-cloud-0.6.18.pre.2 Rakefile
fluent-plugin-google-cloud-0.6.18.pre.1 Rakefile
fluent-plugin-google-cloud-0.6.17 Rakefile
fluent-plugin-google-cloud-0.6.16 Rakefile
fluent-plugin-google-cloud-0.6.15 Rakefile
fluent-plugin-google-cloud-0.6.14 Rakefile
fluent-plugin-google-cloud-0.6.13 Rakefile
fluent-plugin-google-cloud-0.6.13.pre.memory.2 Rakefile
fluent-plugin-google-cloud-0.6.13.pre.memory.1 Rakefile
fluent-plugin-google-cloud-0.6.12 Rakefile