Skip to content

Commit

Permalink
Merge pull request #11 from Napolskih/remove-hstore
Browse files Browse the repository at this point in the history
Remove hstore dependency
  • Loading branch information
Napolskih authored Nov 13, 2017
2 parents 366ae6a + 1c79931 commit edce26d
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 6 deletions.
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
source 'https://rubygems.org'

gem 'activerecord-postgres-hstore', require: false
gem 'simple_hstore_accessor', '~> 0.2', require: false

gemspec
3 changes: 2 additions & 1 deletion dip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,6 @@ interaction:
provision:
- docker volume create --name bundler_data
- dip bundle config --local https://gems.railsc.ru/ ${APRESS_GEMS_CREDENTIALS}
- dip bundle install --full-index
- dip clean
- dip bundle install
- dip appraisal install
2 changes: 1 addition & 1 deletion lib/redis_counters/dumpers/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module RedisCounters
module Dumpers
VERSION = '1.1.0'.freeze
VERSION = '1.2.0'.freeze
end
end
2 changes: 0 additions & 2 deletions redis_counters-dumpers.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ Gem::Specification.new do |spec|
spec.add_runtime_dependency 'redis-namespace', '>= 1.3'
spec.add_runtime_dependency 'callbacks_rb', '>= 0.0.1'
spec.add_runtime_dependency 'redis_counters', '>= 1.3'
spec.add_runtime_dependency 'activerecord-postgres-hstore'
spec.add_runtime_dependency 'simple_hstore_accessor', '~> 0.2'

spec.add_development_dependency 'bundler', '>= 1.7'
spec.add_development_dependency 'rake', '>= 10.0'
Expand Down
4 changes: 2 additions & 2 deletions spec/internal/db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
t.hstore :params
end

add_index :stats_by_days, [:record_id, :column_id, :date], unique: true
add_index :stats_by_days, [:record_id, :column_id, :date, :params], unique: true, name: :uq

create_table :stats_totals do |t|
t.integer :record_id, null: false
Expand All @@ -37,7 +37,7 @@
t.hstore :params
end

add_index :stats_totals, [:record_id, :column_id], unique: true
add_index :stats_totals, [:record_id, :column_id, :params], unique: true

create_table :stats_agg_totals do |t|
t.integer :record_id, null: false
Expand Down
1 change: 1 addition & 0 deletions spec/lib/redis_counters/dumpers/engine_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
key_fields :record_id, :column_id, :params
increment_fields :hits
map :hits, to: :value
map :params, to: "COALESCE(params, '')"
end

destination do
Expand Down

0 comments on commit edce26d

Please sign in to comment.