File tree Expand file tree Collapse file tree 3 files changed +15
-12
lines changed Expand file tree Collapse file tree 3 files changed +15
-12
lines changed Original file line number Diff line number Diff line change 1
1
language : ruby
2
2
3
3
rvm :
4
- - 1.9.3
5
- - 2.0.0
6
- - 2.1.0
4
+ - 1.9
5
+ - 2.0
7
6
- 2.1
8
-
9
7
gemfile :
10
8
- gemfiles/Gemfile.ar-3.2
11
9
- gemfiles/Gemfile.ar-4.0
12
10
- gemfiles/Gemfile.ar-4.1
11
+ - gemfiles/Gemfile.ar-4.2
13
12
- gemfiles/Gemfile.ar-edge
14
13
15
14
env :
Original file line number Diff line number Diff line change 1
1
source 'https://rubygems.org'
2
2
3
- gem 'activerecord', '~> 4.2.0-rc1 '
3
+ gem 'activerecord', '~> 4.2.0-rc2 '
4
4
gem 'bundler', '~> 1.3'
5
5
gem 'rake'
6
6
gem 'rspec'
Original file line number Diff line number Diff line change @@ -72,8 +72,10 @@ def self.up
72
72
execute "create extension if not exists hstore"
73
73
recreate_table ( :postgres_hstore_typed_store_models ) { |t | t . hstore :settings ; t . text :untyped_settings }
74
74
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
77
79
end
78
80
end
79
81
@@ -140,11 +142,13 @@ class PostgresHstoreTypedStoreModel < ActiveRecord::Base
140
142
end
141
143
end
142
144
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
148
152
end
149
153
end
150
154
You can’t perform that action at this time.
0 commit comments