Sha256: 62c554447e02240f958a764b3f96210dd8efbbee6e7fd8f375d960b7bbbd6159

Contents?: true

Size: 1.06 KB

Versions: 29

Compression:

Stored size: 1.06 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/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: [:test, :rubocop, :fix_perms]

task default: :all

Version data entries

29 entries across 29 versions & 2 rubygems

Version Path
fluent-plugin-google-cloud-0.6.7.pre.1 Rakefile
fluent-plugin-google-cloud-0.6.6 Rakefile
fluent-plugin-google-cloud-0.6.5 Rakefile
fluent-plugin-google-cloud-0.6.5.pre.1 Rakefile
fluent-plugin-google-cloud-0.6.4.pre.3 Rakefile
fluent-plugin-google-cloud-0.6.4.pre.2 Rakefile
fluent-plugin-google-cloud-0.6.4 Rakefile
vmik-fluent-plugin-google-cloud-0.6.4.pre.alpha Rakefile
fluent-plugin-google-cloud-0.6.4.pre.1 Rakefile
fluent-plugin-google-cloud-0.6.3 Rakefile
fluent-plugin-google-cloud-0.6.2 Rakefile
fluent-plugin-google-cloud-0.6.1 Rakefile
fluent-plugin-google-cloud-0.6.0 Rakefile
vmik-fluent-plugin-google-cloud-0.5.5.alpha3 Rakefile
vmik-fluent-plugin-google-cloud-0.5.5.alpha2 Rakefile
fluent-plugin-google-cloud-0.6.0.v2.alpha.1 Rakefile
fluent-plugin-google-cloud-0.5.6 Rakefile
vmik-fluent-plugin-google-cloud-0.5.5.alpha1 Rakefile
vmik-fluent-plugin-google-cloud-0.5.5 Rakefile
fluent-plugin-google-cloud-0.5.5.pre.2 Rakefile