Skip to content

Commit 83f8dc8

Browse files
committed
fix travis build
1 parent 2fe5c92 commit 83f8dc8

File tree

3 files changed

+15
-12
lines changed

3 files changed

+15
-12
lines changed

.travis.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
language: ruby
22

33
rvm:
4-
- 1.9.3
5-
- 2.0.0
6-
- 2.1.0
4+
- 1.9
5+
- 2.0
76
- 2.1
8-
97
gemfile:
108
- gemfiles/Gemfile.ar-3.2
119
- gemfiles/Gemfile.ar-4.0
1210
- gemfiles/Gemfile.ar-4.1
11+
- gemfiles/Gemfile.ar-4.2
1312
- gemfiles/Gemfile.ar-edge
1413

1514
env:

gemfiles/Gemfile.ar-4.2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
source 'https://rubygems.org'
22

3-
gem 'activerecord', '~> 4.2.0-rc1'
3+
gem 'activerecord', '~> 4.2.0-rc2'
44
gem 'bundler', '~> 1.3'
55
gem 'rake'
66
gem 'rspec'

spec/support/models.rb

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,10 @@ def self.up
7272
execute "create extension if not exists hstore"
7373
recreate_table(:postgres_hstore_typed_store_models) { |t| t.hstore :settings; t.text :untyped_settings }
7474

75-
#execute "create extension if not exists json"
76-
recreate_table(:postgres_json_typed_store_models) { |t| t.json :settings; t.text :untyped_settings }
75+
if ENV['POSTGRES_JSON']
76+
execute "create extension if not exists json"
77+
recreate_table(:postgres_json_typed_store_models) { |t| t.json :settings; t.text :untyped_settings }
78+
end
7779
end
7880
end
7981

@@ -140,11 +142,13 @@ class PostgresHstoreTypedStoreModel < ActiveRecord::Base
140142
end
141143
end
142144

143-
class PostgresJsonTypedStoreModel < ActiveRecord::Base
144-
establish_connection ENV['POSTGRES_URL'] || :test_postgresql
145-
store :untyped_settings, accessors: [:title]
146-
typed_store :settings, coder: ColumnCoder.new(AsJson) do |s|
147-
define_store_columns(s)
145+
if ENV['POSTGRES_JSON']
146+
class PostgresJsonTypedStoreModel < ActiveRecord::Base
147+
establish_connection ENV['POSTGRES_URL'] || :test_postgresql
148+
store :untyped_settings, accessors: [:title]
149+
typed_store :settings, coder: ColumnCoder.new(AsJson) do |s|
150+
define_store_columns(s)
151+
end
148152
end
149153
end
150154

0 commit comments

Comments
 (0)