Skip to content

Commit

Permalink
Merge branch 'feature/reorg' into develop
Browse files Browse the repository at this point in the history
* feature/reorg:
  A little housekeeping to improve the file organization
  • Loading branch information
ianchesal committed Feb 28, 2015
2 parents f3dd561 + 2626d90 commit 244b098
Show file tree
Hide file tree
Showing 10 changed files with 38 additions and 90 deletions.
9 changes: 9 additions & 0 deletions COPYRIGHT
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Unless specified otherwise, all content copyright the respective contributors.

Including, but not limited to:

Ian Chesal

For licensing information please see LICENSE. Copyright holders contributing to
this project agree to have their contributions licensed under the terms of the
LICENSE agreement.
14 changes: 0 additions & 14 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
# Copyright 2015 Ian Chesal
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# 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.

source 'https://rubygems.org'

gemspec
37 changes: 1 addition & 36 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,38 +1,3 @@
# Encoding: utf-8
# Copyright 2015 Ian Chesal
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# 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 'rubocop/rake_task'
require 'rspec/core/rake_task'
require 'rake/clean'

RuboCop::RakeTask.new(:lint)

Dir.glob('tasks/**/*.rake').each(&method(:import))
task :default => [:lint, 'test:spec']

task :build => [:lint, 'test:spec', 'test:integration'] do
sh "gem build --verbose lowered-expectations.gemspec"
end

namespace :test do
RSpec::Core::RakeTask.new(:spec) do |t|
t.pattern = Dir['spec/**/*_spec.rb'].reject{ |f| f['/integration'] }
end

RSpec::Core::RakeTask.new(:integration) do |t|
t.pattern = "spec/integration/**/*_spec.rb"
end
end

CLEAN.add FileList['lowered-expectations-*.gem']
15 changes: 2 additions & 13 deletions lib/lowered/expectations.rb
Original file line number Diff line number Diff line change
@@ -1,23 +1,12 @@
# Encoding: utf-8
# Copyright 2015 Ian Chesal
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# 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 'rubygems/dependency'
require 'open3'
require 'shellwords'
require 'pty'

class LoweredExpectations
VERSION = '1.0.0'

class VersionPatternError < StandardError
end

Expand Down
19 changes: 5 additions & 14 deletions lowered-expectations.gemspec
Original file line number Diff line number Diff line change
@@ -1,21 +1,11 @@
# Encoding: utf-8
# Copyright 2015 Ian Chesal
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# 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.
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'lowered/expectations'

Gem::Specification.new do |spec|
spec.name = "lowered-expectations"
spec.version = "1.0.0"
spec.version = LoweredExpectations::VERSION
# For deploying alpha versions via Travis CI
spec.version = "#{spec.version}-alpha-#{ENV['TRAVIS_BUILD_NUMBER']}" if ENV['TRAVIS']
spec.authors = ["Ian Chesal"]
Expand All @@ -42,4 +32,5 @@ END
spec.add_development_dependency "rspec", "~> 3.0"
spec.add_development_dependency "rspec-mocks", "~> 3.0"
spec.add_development_dependency "rubocop", "~> 0.24"
spec.add_development_dependency "rubygems-tasks", "~> 0.2"
end
13 changes: 0 additions & 13 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,17 +1,4 @@
# Encoding: utf-8
# Copyright 2015 Ian Chesal
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# 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 'lowered/expectations'

# RSpec.configure do |c|
Expand Down
3 changes: 3 additions & 0 deletions tasks/clean.rake
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Encoding: utf-8
require 'rake/clean'
CLEAN.add FileList['lowered-expectations-*.gem']
12 changes: 12 additions & 0 deletions tasks/rspec.rake
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Encoding: utf-8
require 'rspec/core/rake_task'
namespace :test do
RSpec::Core::RakeTask.new(:spec) do |t|
t.pattern = Dir['spec/**/*_spec.rb'].reject{ |f| f['/integration'] }
end

RSpec::Core::RakeTask.new(:integration) do |t|
t.pattern = "spec/integration/**/*_spec.rb"
end
end

3 changes: 3 additions & 0 deletions tasks/rubocop.rake
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Encoding: utf-8
require 'rubocop/rake_task'
RuboCop::RakeTask.new(:lint)
3 changes: 3 additions & 0 deletions tasks/rubygems.rake
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Encoding: utf-8
require 'rubygems/tasks'
Gem::Tasks.new

0 comments on commit 244b098

Please sign in to comment.