aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortelyn <telyn@bytemark.co.uk>2018-01-25 11:14:03 +0000
committertelyn <telyn@bytemark.co.uk>2018-01-25 11:14:03 +0000
commitd9946b8c3fdddb95f4cb7457abf163afd65bee6b (patch)
treee4bf2d2200c070d0f1319d532ed491610efd1c02
parent545e1fe086c2df69ebf45c6b2f6a61932a5b6637 (diff)
add codeclimate job and build thegem
-rw-r--r--.gitlab-ci.yml22
-rw-r--r--mauve.gemspec68
2 files changed, 90 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 07b992b..967e78e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -3,6 +3,17 @@ stages:
- package
- publish
+codeclimate:
+ image: $CI_REGISTRY/docker-images/layers:stretch-codeclimate
+ stage: test
+ tags:
+ - docker-socket
+ script:
+ - codeclimate analyze -f json > codeclimate.json
+ artifacts:
+ paths: [codeclimate.json]
+
+
.test: &test
image: $CI_REGISTRY/docker-images/layers:$DISTRO-ruby
stage: test
@@ -38,6 +49,17 @@ test:stretch:
paths:
- pkg/
+package:gem:
+ stage: package
+ image: $CI_REGISTRY/docker-images/layers:jessie-ruby
+ artifacts:
+ paths:
+ - pkg
+ script:
+ - package
+ variables:
+ GEMFILE: mauve.gemspec
+
package:jessie:
<<: *package
variables:
diff --git a/mauve.gemspec b/mauve.gemspec
new file mode 100644
index 0000000..01515f1
--- /dev/null
+++ b/mauve.gemspec
@@ -0,0 +1,68 @@
+
+lib = File.expand_path('../lib', __FILE__)
+$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
+require 'mauve/version'
+
+Gem::Specification.new do |spec|
+ spec.name = 'mauve'
+ spec.version = Mauve::VERSION
+ spec.authors = ['Patrick Cherry', 'Telyn Roat']
+ spec.email = ['telyn@bytemark.co.uk']
+
+ spec.summary = 'an alert system for system and network administrators to help you sleep better, and be attentive to your computers.'
+ spec.homepage = 'https://github.com/BytemarkHosting/mauvealert'
+
+ # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
+ # to allow pushing to a single host or delete this section to allow pushing to any host.
+ if spec.respond_to?(:metadata)
+ spec.metadata['allowed_push_host'] = 'http://src.bytemark.co.uk'
+ else
+ raise 'RubyGems 2.0 or newer is required to protect against ' \
+ 'public gem pushes.'
+ end
+
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
+ f.match(%r{^(test|spec|features)/})
+ end
+ spec.bindir = 'exe'
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
+ spec.require_paths = ['lib']
+
+ spec.add_development_dependency 'bundler', '~> 1.16'
+ spec.add_development_dependency 'rake', '~> 10.0'
+
+ spec.add_runtime_dependency 'datamapper'
+ spec.add_runtime_dependency 'dm-aggregates'
+ spec.add_runtime_dependency 'dm-do-adapter'
+ spec.add_runtime_dependency 'dm-migrations'
+ spec.add_runtime_dependency 'dm-postgres-adapter'
+ spec.add_runtime_dependency 'dm-sqlite-adapter'
+ spec.add_runtime_dependency 'dm-transactions'
+ spec.add_runtime_dependency 'dm-types'
+ spec.add_runtime_dependency 'dm-validations'
+ spec.add_runtime_dependency 'ruby_protobuf', '~> 0.4.11'
+
+ #
+ # The versions here are to match Jessie
+ #
+ spec.add_runtime_dependency 'haml', '~> 4.0.5'
+ spec.add_runtime_dependency 'haml-contrib', '~> 1.0.0'
+ spec.add_runtime_dependency 'ipaddress', '~> 0.8.0'
+ spec.add_runtime_dependency 'json', '~> 1.8.1'
+ spec.add_runtime_dependency 'locale', '~> 2.1.0'
+ spec.add_runtime_dependency 'log4r', '~> 1.1.10'
+ spec.add_runtime_dependency 'rack', '~> 1.5.2'
+ spec.add_runtime_dependency 'rack-flash3', '~> 1.0.5'
+ spec.add_runtime_dependency 'rack-protection', '~> 1.5.2'
+ spec.add_runtime_dependency 'RedCloth', '~> 4.2.9'
+ spec.add_runtime_dependency 'rmail', '~> 1.1.0'
+ spec.add_runtime_dependency 'sanitize', '~> 2.1.0'
+ spec.add_runtime_dependency 'sinatra', '~> 1.4.5'
+ spec.add_runtime_dependency 'thin', '~> 1.6.3'
+ spec.add_runtime_dependency 'tilt', '~> 1.4.1'
+
+ spec.add_development_dependency 'rack-test', '~> 0.6.3'
+ spec.add_development_dependency 'simplecov'
+ spec.add_development_dependency 'timecop', '~> 0.7.1'
+ spec.add_development_dependency 'webmock', '~> 1.19.0'
+end