Skip to content

Commit

Permalink
Add Gem configuration files & setup code
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick Campbell authored and nickcampbell18 committed Nov 11, 2019
1 parent 537fe60 commit 33e70da
Show file tree
Hide file tree
Showing 7 changed files with 161 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
version: 2

jobs:
build:
docker:
- image: ruby:2.6
steps:
- checkout

- type: cache-restore
key: anony-bundler-{{ checksum "anony.gemspec" }}

- run: gem install bundler -v 2.0.2
- run: bundle install --path vendor/bundle

- type: cache-save
key: anony-bundler-{{ checksum "anony.gemspec" }}
paths:
- vendor/bundle

- type: shell
command: |
bundle exec rspec --profile 10 \
--format RspecJunitFormatter \
--out /tmp/test-results/rspec.xml \
--format progress \
spec
- type: store_test_results
path: /tmp/test-results

workflows:
version: 2
tests:
jobs:
- build
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/.bundle/
/.yardoc
/_yardoc/
/coverage/
/doc/
/pkg/
/spec/reports/
/tmp/

# rspec failure tracking
.rspec_status
6 changes: 6 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
source "https://rubygems.org"

git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }

# Specify your gem's dependencies in anony.gemspec
gemspec
64 changes: 64 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
PATH
remote: .
specs:
anony (0.1)
activesupport
rubocop (~> 0.76)

GEM
remote: https://rubygems.org/
specs:
activesupport (6.0.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
zeitwerk (~> 2.2)
ast (2.4.0)
concurrent-ruby (1.1.5)
diff-lcs (1.3)
i18n (1.7.0)
concurrent-ruby (~> 1.0)
jaro_winkler (1.5.4)
minitest (5.13.0)
parallel (1.18.0)
parser (2.6.5.0)
ast (~> 2.4.0)
rainbow (3.0.0)
rspec (3.9.0)
rspec-core (~> 3.9.0)
rspec-expectations (~> 3.9.0)
rspec-mocks (~> 3.9.0)
rspec-core (3.9.0)
rspec-support (~> 3.9.0)
rspec-expectations (3.9.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0)
rspec-mocks (3.9.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0)
rspec-support (3.9.0)
rubocop (0.76.0)
jaro_winkler (~> 1.5.1)
parallel (~> 1.10)
parser (>= 2.6)
rainbow (>= 2.2.2, < 4.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 1.7)
ruby-progressbar (1.10.1)
thread_safe (0.3.6)
tzinfo (1.2.5)
thread_safe (~> 0.1)
unicode-display_width (1.6.0)
zeitwerk (2.2.1)

PLATFORMS
ruby

DEPENDENCIES
anony!
bundler (~> 2.0.2)
rspec (~> 3.9)

BUNDLED WITH
2.0.2
30 changes: 30 additions & 0 deletions anony.gemspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@

lib = File.expand_path("../lib", __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require "anony/version"

Gem::Specification.new do |spec|
spec.name = "anony"
spec.version = Anony::VERSION
spec.authors = ["GoCardless Engineering"]
spec.email = ["[email protected]"]

spec.summary = %q{A small library that defines how ActiveRecord models should be anonymised for deletion purposes.}
spec.homepage = "https://github.com/gocardless/anony"
spec.license = "MIT"

# Specify which files should be added to the gem when it is released.
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
end
spec.require_paths = ["lib"]

spec.add_development_dependency "bundler", "~> 2.0.2"
spec.add_development_dependency "rspec", "~> 3.9"
spec.add_development_dependency "rubocop", "~> 0.76"
spec.add_development_dependency "rspec_junit_formatter", "~> 0.4"

spec.add_dependency "activesupport"

end
3 changes: 3 additions & 0 deletions lib/anony/version.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module Anony
VERSION = "0.1".freeze
end
11 changes: 11 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
require "bundler/setup"
require "anony"

RSpec.configure do |config|
# Disable RSpec exposing methods globally on `Module` and `main`
config.disable_monkey_patching!

config.expect_with :rspec do |c|
c.syntax = :expect
end
end

0 comments on commit 33e70da

Please sign in to comment.