Sha256: 606d9b25490e7df2b8993691e1306d66d34d06e109bb93451dcaa169123b6ef4

Contents?: true

Size: 1.47 KB

Versions: 5

Compression:

Stored size: 1.47 KB

Contents

# frozen_string_literal: true
begin
  require "bundler/setup"
rescue LoadError
  puts "You must `gem install bundler` and `bundle install` to run rake tasks"
end

APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__)

load "rails/tasks/engine.rake"
load "lib/tasks/seed.rake"

Bundler::GemHelper.install_tasks

Dir[File.join(File.dirname(__FILE__), "tasks/**/*.rake")].each { |f| load f }

require "rspec/core"
require "rspec/core/rake_task"

desc "Run all Ruby specs"
RSpec::Core::RakeTask.new(spec: "app:db:test:prepare")

desc "Run all JS specs"
task :js_spec do
  Rake::Task["app:spec:javascript"].invoke
end

desc "Run all specs"
task :all_spec do
  Rake::Task["spec"].invoke
  Rake::Task["js_spec"].invoke
end

require "jshintrb/jshinttask"
Jshintrb::JshintTask.new :jshint do |t|
  t.pattern = "app/assets/javascripts/**/*.js"
  t.options = :defaults
  t.globals = [:angular, :moment, "$"]
end

require "rubocop/rake_task"

RuboCop::RakeTask.new

desc "Run Brakeman"
task :brakeman do
  dir = File.dirname(__FILE__)
  puts `#{ File.join(dir, "bin", "brakeman") } #{ File.join(dir, ".") }`
end

desc "Run all linters"
task :lint do
  Rake::Task["brakeman"].invoke
  Rake::Task["jshint"].invoke
  Rake::Task["rubocop"].invoke
end

desc "Run all specs and linters"
task :spec_lint do
  Rake::Task["lint"].invoke
  Rake::Task["all_spec"].invoke
end

task default: :spec_lint

git_tagger = Gem::Specification.find_by_name "git_tagger"
load "#{git_tagger.gem_dir}/lib/tasks/deploy.rake"

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
social_networking-0.13.3 Rakefile
social_networking-0.13.2 Rakefile
social_networking-0.13.1 Rakefile
social_networking-0.13.0 Rakefile
social_networking-0.12.0 Rakefile