Skip to content

Commit

Permalink
Basic setup for testing and quality assurance
Browse files Browse the repository at this point in the history
  • Loading branch information
maxmeyer committed Jan 7, 2015
1 parent c43e883 commit aa634a7
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 11 deletions.
3 changes: 3 additions & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
--format Fuubar
--order rand
--color
13 changes: 13 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
AllCops:
Exclude:
- 'tmp/**/*'

# Configuration parameters: MaxSlashes.
Style/RegexpLiteral:
MaxSlashes: 0

Metrics/AbcSize:
Enabled: false

Lint/Debugger:
Enabled: false
8 changes: 8 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,11 @@ source 'https://rubygems.org'

# Specify your gem's dependencies in geopatterns.gemspec
gemspec

group :development, :test do
gem 'rspec'
gem 'aruba'
gem 'rake'
gem 'rubocop'
gem 'simplecov'
end
5 changes: 4 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
require "bundler/gem_tasks"
require 'bundler/gem_tasks'
require 'rubocop/rake_task'

RuboCop::RakeTask.new
18 changes: 8 additions & 10 deletions geo_pattern.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,20 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'geo_pattern/version'

Gem::Specification.new do |spec|
spec.name = "geo_pattern"
spec.name = 'geo_pattern'
spec.version = GeoPattern::VERSION
spec.authors = ["Jason Long"]
spec.email = ["[email protected]"]
spec.authors = ['Jason Long']
spec.email = ['[email protected]']
spec.summary = %q{Generate SVG beautiful patterns}
spec.description = %q{Generate SVG beautiful patterns}
spec.homepage = "https://github.com/jasonlong/geo_pattern"
spec.license = "MIT"
spec.homepage = 'https://github.com/jasonlong/geo_pattern'
spec.license = 'MIT'

spec.files = `git ls-files -z`.split("\x0")
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ["lib"]
spec.require_paths = ['lib']

spec.add_dependency "color", "~> 1.5"

spec.add_development_dependency "bundler", "~> 1.5"
spec.add_development_dependency "rake"
spec.add_dependency 'color', '~> 1.5'
spec.add_development_dependency 'bundler', '~> 1.5'
end
19 changes: 19 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# encoding: utf-8
$LOAD_PATH << File.expand_path('../../lib', __FILE__)

require 'simplecov'
SimpleCov.command_name 'rspec'
SimpleCov.start

# Pull in all of the gems including those in the `test` group
require 'bundler'
Bundler.require :default, :test, :development

require 'geo_pattern'

# Loading support files
Dir.glob(::File.expand_path('../support/*.rb', __FILE__)).each { |f| require_relative f }
Dir.glob(::File.expand_path('../shared_examples/*.rb', __FILE__)).each { |f| require_relative f }

# Avoid writing "describe MyModule::MyClass do [..]" but "describe MyClass do [..]"
include GeoPattern

0 comments on commit aa634a7

Please sign in to comment.