Commit 63280caf authored by Grzegorz Bizon's avatar Grzegorz Bizon

Fix namespaces, Gemfile and rake tasks

[ci skip]
parent 95141b32
require "bundler/gem_tasks"
require "rspec/core/rake_task"
require 'bundler/gem_tasks'
require 'rspec/core/rake_task'
require 'rubocop/rake_task'
RSpec::Core::RakeTask.new(:spec)
RSpec::Core::RakeTask.new('spec')
RuboCop::RakeTask.new
task :default => :spec
task :test do
Rake::Task['rubocop'].invoke
Rake::Task['spec'].invoke
end
task default: :test
#!/usr/bin/env ruby
require "bundler/setup"
require "gitlab/qa"
require 'bundler/setup'
require 'gitlab/qa'
require 'pry'
# You can add fixtures and/or initialization code here to make experimenting
# with your gem easier. You can also use a different console, if you like.
# (If you use this, don't forget to add pry to your Gemfile!)
# require "pry"
# Pry.start
require "irb"
IRB.start
Pry.start
#!/usr/bin/env ruby
require 'gitlab-qa'
require 'gitlab/qa'
Gitlab::QA::Scenario
.const_get(ARGV.shift)
......
......@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'gitlab/qa/version'
Gem::Specification.new do |spec|
spec.name = "gitlab-qa"
spec.name = 'gitlab-qa'
spec.version = Gitlab::QA::VERSION
spec.authors = ['Grzegorz Bizon']
spec.email = ['grzesiek.bizon@gmail.com']
......@@ -13,7 +13,8 @@ Gem::Specification.new do |spec|
spec.homepage = 'http://about.gitlab.com'
spec.license = 'MIT'
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^spec/}) }
spec.files = `git ls-files -z`
.split("\x0").reject { |f| f.match(%r{^spec/}) }
spec.bindir = 'exe'
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ['lib']
......@@ -22,4 +23,5 @@ Gem::Specification.new do |spec|
spec.add_development_dependency 'rake', '~> 10.0'
spec.add_development_dependency 'rspec', '~> 3.0'
spec.add_development_dependency 'rubocop', '~> 0.47.1'
spec.add_development_dependency 'pry', '~> 0.10.4'
end
$LOAD_PATH << File.expand_path(File.dirname(__FILE__))
module QA
module Scenario
autoload :Actable, 'qa/scenario/actable'
autoload :Template, 'qa/scenario/template'
module Gitlab
module QA
module Scenario
autoload :Actable, 'qa/scenario/actable'
autoload :Template, 'qa/scenario/template'
module Test
module Gitlab
autoload :Image, 'qa/scenario/test/gitlab/image'
autoload :Any, 'qa/scenario/test/gitlab/any'
end
module Test
module Gitlab
autoload :Image, 'qa/scenario/test/gitlab/image'
autoload :Any, 'qa/scenario/test/gitlab/any'
end
module Omnibus
autoload :Image, 'qa/scenario/test/omnibus/image'
autoload :Upgrade, 'qa/scenario/test/omnibus/upgrade'
module Omnibus
autoload :Image, 'qa/scenario/test/omnibus/image'
autoload :Upgrade, 'qa/scenario/test/omnibus/upgrade'
end
end
end
end
module Docker
autoload :Engine, 'qa/docker/engine'
autoload :Command, 'qa/docker/command'
autoload :Gitlab, 'qa/docker/gitlab'
autoload :Specs, 'qa/docker/specs'
module Docker
autoload :Engine, 'qa/docker/engine'
autoload :Command, 'qa/docker/command'
autoload :Gitlab, 'qa/docker/gitlab'
autoload :Specs, 'qa/docker/specs'
end
end
end
describe QA::Docker::Command do
describe Gitlab::QA::Docker::Command do
describe '#<<' do
it 'appends command arguments' do
subject << '--help'
......
require 'spec_helper'
describe Gitlab::Qa do
it 'has a version number' do
expect(Gitlab::Qa::VERSION).not_to be nil
end
it 'does something useful' do
expect(false).to eq(true)
end
end
describe QA::Scenario::Actable do
describe Gitlab::QA::Scenario::Actable do
subject do
Class.new do
include QA::Scenario::Actable
include Gitlab::QA::Scenario::Actable
attr_accessor :something
......
require_relative '../lib/qa'
require 'gitlab/qa'
RSpec.configure do |config|
config.expect_with :rspec do |expectations|
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment