Skip to content

Commit d21a7d8

Browse files
author
Pavel Galkin
committed
chore: update infrastructure
1 parent 704ad6d commit d21a7d8

29 files changed

+162
-150
lines changed

.drone.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
build:
2+
test:
3+
image: abakpress/dind-testing
4+
pull: true
5+
privileged: true
6+
volumes:
7+
- /home/data/drone/images:/images
8+
- /home/data/drone/gems:/bundle
9+
environment:
10+
- COMPOSE_FILE_EXT=drone
11+
- POSTGRES_IMAGE_TAG=9.6-latest
12+
- RUBY_IMAGE_TAG=2.2-latest
13+
commands:
14+
- wrapdocker docker -v
15+
16+
- fetch-images
17+
--image abakpress/ruby-app:$RUBY_IMAGE_TAG
18+
--image abakpress/postgres-db:$POSTGRES_IMAGE_TAG
19+
20+
- dip provision
21+
- dip rspec

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
/pkg/
88
/spec/reports/
99
/tmp/
10+
/spec/internal/log
11+
/gemfiles
1012
*.bundle
1113
*.so
1214
*.o

Appraisals

+2-7
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
1-
appraise 'rails3.1' do
2-
gem 'activesupport', '~> 3.1.0'
3-
gem 'activerecord', '~> 3.1.0'
4-
end
5-
61
appraise 'rails3.2' do
7-
gem 'activesupport', '~> 3.2.0'
8-
gem 'activerecord', '~> 3.2.0'
2+
gem 'activesupport', '~> 3.2.14'
3+
gem 'activerecord', '~> 3.2.14'
94
end
105

116
appraise 'rails4.0' do

Gemfile

-10
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,3 @@
11
source 'https://rubygems.org'
22

3-
# Specify your gem's dependencies in redis_counters-dumpers.gemspec
4-
5-
group :development, :test do
6-
gem 'combustion', github: 'pat/combustion', ref: '7d0d24c3f36ce0eb336177fc493be0721bc26665'
7-
gem 'activerecord-postgres-hstore', require: false
8-
gem 'simple_hstore_accessor', '~> 0.2', require: false
9-
end
10-
11-
gem 'rack', '< 2' if RUBY_VERSION < '2.2.0'
12-
133
gemspec

Makefile

-28
This file was deleted.

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# RedisCounters::Dumpers
22

3+
[![Build Status](https://drone.railsc.ru/api/badges/abak-press/redis_counters-dumpers/status.svg)](https://drone.railsc.ru/abak-press/redis_counters-dumpers)
4+
35
Dump statistics from Redis to DB
46

57
## Installation

Rakefile

-2
This file was deleted.

dip.yml

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
version: '1'
2+
3+
environment:
4+
DOCKER_RUBY_VERSION: 2.2
5+
RUBY_IMAGE_TAG: 2.2-latest
6+
POSTGRES_IMAGE_TAG: 9.6-latest
7+
COMPOSE_FILE_EXT: development
8+
9+
compose:
10+
files:
11+
- docker-compose.yml
12+
- docker-compose.${COMPOSE_FILE_EXT}.yml
13+
14+
interaction:
15+
sh:
16+
service: app
17+
18+
irb:
19+
service: app
20+
command: irb
21+
22+
bundle:
23+
service: app
24+
command: bundle
25+
26+
rake:
27+
service: app
28+
command: bundle exec rake
29+
30+
appraisal:
31+
service: app
32+
command: bundle exec appraisal
33+
34+
rspec:
35+
service: app
36+
command: bundle exec appraisal bundle exec rspec
37+
38+
clean:
39+
service: app
40+
command: rm -f Gemfile.lock gemfiles/*.gemfile.*
41+
42+
provision:
43+
- docker volume create --name bundler_data
44+
- dip bundle config --local https://gems.railsc.ru/ ${APRESS_GEMS_CREDENTIALS}
45+
- dip bundle install --full-index
46+
- dip appraisal install

docker-compose.development.yml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
version: '2'
2+
3+
services:
4+
app:
5+
volumes:
6+
- .:/app
7+
- ../:/localgems
8+
- bundler-data:/bundle
9+
10+
volumes:
11+
bundler-data:
12+
external:
13+
name: bundler_data

docker-compose.drone.yml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version: '2'
2+
3+
services:
4+
app:
5+
volumes:
6+
- .:/app
7+
- /bundle:/bundle

docker-compose.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
version: '2'
2+
3+
services:
4+
app:
5+
image: abakpress/ruby-app:$RUBY_IMAGE_TAG
6+
environment:
7+
- BUNDLE_PATH=/bundle/$DOCKER_RUBY_VERSION
8+
- BUNDLE_CONFIG=/app/.bundle/config
9+
- TEST_DB_HOST=db
10+
- TEST_DB_NAME=docker
11+
- TEST_DB_USERNAME=postgres
12+
command: bash
13+
depends_on:
14+
- db
15+
16+
db:
17+
image: abakpress/postgres-db:$POSTGRES_IMAGE_TAG
18+
environment:
19+
- POSTGRES_DB=docker

gemfiles/.gitignore

-1
This file was deleted.

gemfiles/rails3.1.gemfile

-12
This file was deleted.

gemfiles/rails3.2.gemfile

-12
This file was deleted.

gemfiles/rails4.0.gemfile

-12
This file was deleted.

gemfiles/rails4.1.gemfile

-12
This file was deleted.

lib/redis_counters/dumpers/destination.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# coding: utf-8
21
require 'forwardable'
32
require 'active_support/core_ext/hash/indifferent_access'
43
require 'active_support/core_ext/object/blank'

lib/redis_counters/dumpers/dsl/base.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# coding: utf-8
21
module RedisCounters
32
module Dumpers
43
module Dsl

lib/redis_counters/dumpers/dsl/destination.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# coding: utf-8
21
require 'active_support/concern'
32
require_relative 'base'
43

lib/redis_counters/dumpers/dsl/engine.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# coding: utf-8
21
require 'active_support/concern'
32
require_relative 'base'
43

lib/redis_counters/dumpers/dsl/list.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# coding: utf-8
21
require 'active_support/concern'
32
require 'redis_counters/dumpers/engine'
43

lib/redis_counters/dumpers/engine.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# coding: utf-8
21
require 'forwardable'
32
require 'callbacks_rb'
43
require 'active_support/core_ext/hash/indifferent_access'

lib/redis_counters/dumpers/list.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# coding: utf-8
21
require 'active_support/core_ext/hash/indifferent_access'
32
require_relative 'dsl/list'
43

redis_counters-dumpers.gemspec

+12-10
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# coding: utf-8
21
lib = File.expand_path('../lib', __FILE__)
32
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
43
require 'redis_counters/dumpers/version'
@@ -17,20 +16,23 @@ Gem::Specification.new do |spec|
1716
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
1817
spec.require_paths = ['lib']
1918

20-
spec.add_dependency 'activesupport', '>= 3.0'
21-
spec.add_dependency 'activerecord', '>= 3.0'
22-
spec.add_dependency 'pg'
23-
spec.add_dependency 'redis', '>= 3.0'
24-
spec.add_dependency 'redis-namespace', '>= 1.3'
25-
spec.add_dependency 'callbacks_rb', '>= 0.0.1'
26-
spec.add_dependency 'redis_counters', '>= 1.3'
19+
spec.add_runtime_dependency 'activesupport', '>= 3.0'
20+
spec.add_runtime_dependency 'activerecord', '>= 3.0'
21+
spec.add_runtime_dependency 'pg'
22+
spec.add_runtime_dependency 'redis', '>= 3.0'
23+
spec.add_runtime_dependency 'redis-namespace', '>= 1.3'
24+
spec.add_runtime_dependency 'callbacks_rb', '>= 0.0.1'
25+
spec.add_runtime_dependency 'redis_counters', '>= 1.3'
26+
spec.add_runtime_dependency 'activerecord-postgres-hstore'
27+
spec.add_runtime_dependency 'simple_hstore_accessor', '~> 0.2'
2728

2829
spec.add_development_dependency 'bundler', '>= 1.7'
2930
spec.add_development_dependency 'rake', '>= 10.0'
3031
spec.add_development_dependency 'rspec', '>= 3.2'
3132
spec.add_development_dependency 'rspec-rails', '>= 3.2'
32-
spec.add_development_dependency 'rspec-given', '>= 3.5'
3333
spec.add_development_dependency 'appraisal', '>= 1.0.2'
3434
spec.add_development_dependency 'mock_redis'
35-
spec.add_development_dependency 'apress-changelogger'
35+
spec.add_development_dependency 'combustion'
36+
spec.add_development_dependency 'pry-byebug'
37+
spec.add_development_dependency 'test-unit'
3638
end

spec/internal/config/.gitignore

-1
This file was deleted.

spec/internal/config/database.yml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
test:
2+
adapter: postgresql
3+
host: <%= ENV.fetch('TEST_DB_HOST', 'localhost') %>
4+
database: <%= ENV.fetch('TEST_DB_NAME', 'docker') %>
5+
username: <%= ENV.fetch('TEST_DB_USERNAME', 'docker') %>

spec/internal/log/.gitignore

-1
This file was deleted.

0 commit comments

Comments
 (0)