Rakefile in lorj-0.2.0 vs Rakefile in lorj-1.0.0
- old
+ new
@@ -12,13 +12,23 @@
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-require "bundler/gem_tasks"
+require 'bundler/gem_tasks'
require 'rspec/core/rake_task'
+require 'rubocop/rake_task'
+task :default => [:lint, :spec]
+
desc 'Run the specs.'
-RSpec::Core::RakeTask.new do |t|
+RSpec::Core::RakeTask.new do |t|
t.pattern = 'spec/*_spec.rb'
+ t.rspec_opts = '-f doc'
end
+desc 'Run RuboCop on the project'
+RuboCop::RakeTask.new(:lint) do |task|
+ task.formatters = ['progress']
+ task.verbose = true
+ task.fail_on_error = true
+end