hstore_translate 1.0.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
- ---
2
- SHA1:
3
- metadata.gz: 3d045d9ab64030c7dfb5ff92821e38aa427d670a
4
- data.tar.gz: 54d112f243c3bc7321bea17051e9c10281427ad7
5
- SHA512:
6
- metadata.gz: 04cacc0423c75b17e8162aef3c371eba9b9f7e71d9bb41f8d201a827446f04578d180056e6397a6899faafcdf426cc5e7ebae878c68c2d8512edd89e78e588bc
7
- data.tar.gz: fef04d9b61e0023728cad3caa080ba6e3d00b194775101ca5476aee3ac1a3c42bee0660ba9bc2db844891d252ce84aa62d3c636be0aeea4ae81f0433b7fb4076
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 4ccf1814041417c6af7784b55f1cf09ec07acdcc
4
+ data.tar.gz: 45616c313c135fd6cdbc4c671d97dc57f08b0ea6
5
+ SHA512:
6
+ metadata.gz: 7093f33b724267f415fd1508537d7a091709824d1c1cada5425ad09801bda7904d2e687bb7f11bf049b0a9f180a53fd7498c8f34a312a40ee8f3b9aa756f4cd3
7
+ data.tar.gz: fd1de0a6eaddc883d19e7b177e4b2b9d280a730c16ba7ce8eef0903ecda58ed2c3e2449b71b74cd0c09a54c3d34c4205276fa56d03f13e5700d6ec00fd6bc715
data/README.md CHANGED
@@ -5,13 +5,13 @@ hstore datatype. It provides an interface inspired by
5
5
  [Globalize3](https://github.com/svenfuchs/globalize3) but removes the need to
6
6
  maintain separate translation tables.
7
7
 
8
- [![Build Status](https://api.travis-ci.org/robworley/hstore_translate.png)](https://travis-ci.org/robworley/hstore_translate)
8
+ [![Build Status](https://api.travis-ci.org/cfabianski/hstore_translate.png)](https://travis-ci.org/cfabianski/hstore_translate)
9
9
  [![License](http://img.shields.io/badge/license-mit-brightgreen.svg)](COPYRIGHT)
10
- [![Code Climate](https://codeclimate.com/github/robworley/hstore_translate.png)](https://codeclimate.com/github/robworley/hstore_translate)
10
+ [![Code Climate](https://codeclimate.com/github/robworley/hstore_translate.png)](https://codeclimate.com/github/cfabianski/hstore_translate)
11
11
 
12
12
  ## Requirements
13
13
 
14
- * ActiveRecord > 3.1.0 (4+ for JRuby)
14
+ * ActiveRecord > 4.2.0
15
15
  * I18n
16
16
 
17
17
  ## Installation
@@ -25,16 +25,9 @@ source 'https://rubygems.org'
25
25
 
26
26
  gem 'activerecord'
27
27
  gem 'pg', :platform => :ruby
28
- gem 'activerecord-jdbcpostgresql-adapter', :platform => :jruby
29
28
  gem 'hstore_translate'
30
29
  ```
31
30
 
32
- For ActiveRecord < 4.0 you'll also want to add:
33
-
34
- ```ruby
35
- gem 'activerecord-postgres-hstore', '~> 0.7.0'
36
- ```
37
-
38
31
  ## Model translations
39
32
 
40
33
  Model translations allow you to translate your models' attribute values. E.g.
@@ -1,6 +1,8 @@
1
- require 'active_record'
2
- require 'active_record/connection_adapters/postgresql_adapter'
3
- require 'hstore_translate/translates'
1
+ require "active_record"
2
+ require "active_record/connection_adapters/postgresql_adapter"
3
+ require "hstore_translate/translates"
4
+ require "hstore_translate/translates/instance_methods"
5
+ require "hstore_translate/translates/active_record_with_hstore_translates"
4
6
 
5
7
  module HstoreTranslate
6
8
  def self.native_hstore?
@@ -1,14 +1,23 @@
1
1
  module HstoreTranslate
2
2
  module Translates
3
+ SUFFIX = "_translations".freeze
4
+
3
5
  def translates(*attrs)
4
6
  include InstanceMethods
5
7
 
6
- class_attribute :translated_attrs
7
- alias_attribute :translated_attribute_names, :translated_attrs # Improve compatibility with the gem globalize
8
- self.translated_attrs = attrs
8
+ class_attribute :translated_attribute_names, :permitted_translated_attributes
9
+
10
+ self.translated_attribute_names = attrs
11
+ self.permitted_translated_attributes = [
12
+ *self.ancestors
13
+ .select {|klass| klass.respond_to?(:permitted_translated_attributes) }
14
+ .map(&:permitted_translated_attributes),
15
+ *attrs.product(I18n.available_locales)
16
+ .map { |attribute, locale| :"#{attribute}_#{locale}" }
17
+ ].flatten.compact
9
18
 
10
19
  attrs.each do |attr_name|
11
- serialize "#{attr_name}_translations", ActiveRecord::Coders::Hstore unless HstoreTranslate::native_hstore?
20
+ serialize "#{attr_name}#{SUFFIX}", ActiveRecord::Coders::Hstore unless HstoreTranslate::native_hstore?
12
21
 
13
22
  define_method attr_name do
14
23
  read_hstore_translation(attr_name)
@@ -19,118 +28,16 @@ module HstoreTranslate
19
28
  end
20
29
 
21
30
  define_singleton_method "with_#{attr_name}_translation" do |value, locale = I18n.locale|
22
- quoted_translation_store = connection.quote_column_name("#{attr_name}_translations")
31
+ quoted_translation_store = connection.quote_column_name("#{attr_name}#{SUFFIX}")
23
32
  where("#{quoted_translation_store} @> hstore(:locale, :value)", locale: locale, value: value)
24
33
  end
25
34
  end
26
35
 
27
- alias_method_chain :respond_to?, :translates
28
- alias_method_chain :method_missing, :translates
36
+ send(:prepend, ActiveRecordWithHstoreTranslate)
29
37
  end
30
38
 
31
- # Improve compatibility with the gem globalize
32
39
  def translates?
33
40
  included_modules.include?(InstanceMethods)
34
41
  end
35
-
36
- module InstanceMethods
37
- def disable_fallback(&block)
38
- toggle_fallback(enabled = false, &block)
39
- end
40
-
41
- def enable_fallback(&block)
42
- toggle_fallback(enabled = true, &block)
43
- end
44
-
45
- protected
46
-
47
- def hstore_translate_fallback_locales(locale)
48
- return if @enabled_fallback == false || !I18n.respond_to?(:fallbacks)
49
- I18n.fallbacks[locale]
50
- end
51
-
52
- def read_hstore_translation(attr_name, locale = I18n.locale)
53
- translations = send("#{attr_name}_translations") || {}
54
- translation = translations[locale.to_s]
55
-
56
- if fallback_locales = hstore_translate_fallback_locales(locale)
57
- fallback_locales.each do |fallback_locale|
58
- t = translations[fallback_locale.to_s]
59
- if t && !t.empty? # differs from blank?
60
- translation = t
61
- break
62
- end
63
- end
64
- end
65
-
66
- translation
67
- end
68
-
69
- def write_hstore_translation(attr_name, value, locale = I18n.locale)
70
- translation_store = "#{attr_name}_translations"
71
- translations = send(translation_store) || {}
72
- send("#{translation_store}_will_change!") unless translations[locale.to_s] == value
73
- translations[locale.to_s] = value
74
- send("#{translation_store}=", translations)
75
- value
76
- end
77
-
78
- def respond_to_with_translates?(symbol, include_all = false)
79
- return true if parse_translated_attribute_accessor(symbol)
80
- respond_to_without_translates?(symbol, include_all)
81
- end
82
-
83
- def method_missing_with_translates(method_name, *args)
84
- translated_attr_name, locale, assigning = parse_translated_attribute_accessor(method_name)
85
-
86
- return method_missing_without_translates(method_name, *args) unless translated_attr_name
87
-
88
- if assigning
89
- write_hstore_translation(translated_attr_name, args.first, locale)
90
- else
91
- read_hstore_translation(translated_attr_name, locale)
92
- end
93
- end
94
-
95
- # Internal: Parse a translated convenience accessor name.
96
- #
97
- # method_name - The accessor name.
98
- #
99
- # Examples
100
- #
101
- # parse_translated_attribute_accessor("title_en=")
102
- # # => [:title, :en, true]
103
- #
104
- # parse_translated_attribute_accessor("title_fr")
105
- # # => [:title, :fr, false]
106
- #
107
- # Returns the attribute name Symbol, locale Symbol, and a Boolean
108
- # indicating whether or not the caller is attempting to assign a value.
109
- def parse_translated_attribute_accessor(method_name)
110
- return unless method_name =~ /\A([a-z_]+)_([a-z]{2})(=?)\z/
111
-
112
- translated_attr_name = $1.to_sym
113
- return unless translated_attrs.include?(translated_attr_name)
114
-
115
- locale = $2.to_sym
116
- assigning = $3.present?
117
-
118
- [translated_attr_name, locale, assigning]
119
- end
120
-
121
- def toggle_fallback(enabled, &block)
122
- if block_given?
123
- old_value = @enabled_fallback
124
- begin
125
- @enabled_fallback = enabled
126
- yield
127
- ensure
128
- @enabled_fallback = old_value
129
- end
130
- else
131
- @enabled_fallback = enabled
132
- end
133
- end
134
- end
135
42
  end
136
43
  end
@@ -0,0 +1,22 @@
1
+ module HstoreTranslate
2
+ module Translates
3
+ module ActiveRecordWithHstoreTranslate
4
+ def respond_to?(symbol, include_all = false)
5
+ return true if parse_translated_attribute_accessor(symbol)
6
+ super(symbol, include_all)
7
+ end
8
+
9
+ def method_missing(method_name, *args)
10
+ translated_attr_name, locale, assigning = parse_translated_attribute_accessor(method_name)
11
+
12
+ return super(method_name, *args) unless translated_attr_name
13
+
14
+ if assigning
15
+ write_hstore_translation(translated_attr_name, args.first, locale)
16
+ else
17
+ read_hstore_translation(translated_attr_name, locale)
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,97 @@
1
+ module HstoreTranslate
2
+ module Translates
3
+ module InstanceMethods
4
+ def disable_fallback
5
+ toggle_fallback(false)
6
+ end
7
+
8
+ def enable_fallback
9
+ toggle_fallback(true)
10
+ end
11
+
12
+ protected
13
+
14
+ attr_reader :enabled_fallback
15
+
16
+ def hstore_translate_fallback_locales(locale)
17
+ return locale if enabled_fallback == false || !I18n.respond_to?(:fallbacks)
18
+ I18n.fallbacks[locale]
19
+ end
20
+
21
+ def read_hstore_translation(attr_name, locale = I18n.locale)
22
+ translations = public_send("#{attr_name}#{SUFFIX}") || {}
23
+ available = Array(hstore_translate_fallback_locales(locale)).detect do |available_locale|
24
+ translations[available_locale.to_s].present?
25
+ end
26
+
27
+ translations[available.to_s]
28
+ end
29
+
30
+ def write_hstore_translation(attr_name, value, locale = I18n.locale)
31
+ translation_store = "#{attr_name}#{SUFFIX}"
32
+ translations = public_send(translation_store) || {}
33
+ public_send("#{translation_store}_will_change!") unless translations[locale.to_s] == value
34
+ translations[locale.to_s] = value
35
+ public_send("#{translation_store}=", translations)
36
+ value
37
+ end
38
+
39
+ def respond_to_with_translates?(symbol, include_all = false)
40
+ return true if parse_translated_attribute_accessor(symbol)
41
+ respond_to_without_translates?(symbol, include_all)
42
+ end
43
+
44
+ def method_missing_with_translates(method_name, *args)
45
+ translated_attr_name, locale, assigning = parse_translated_attribute_accessor(method_name)
46
+
47
+ return method_missing_without_translates(method_name, *args) unless translated_attr_name
48
+
49
+ if assigning
50
+ write_hstore_translation(translated_attr_name, args.first, locale)
51
+ else
52
+ read_hstore_translation(translated_attr_name, locale)
53
+ end
54
+ end
55
+
56
+ # Internal: Parse a translated convenience accessor name.
57
+ #
58
+ # method_name - The accessor name.
59
+ #
60
+ # Examples
61
+ #
62
+ # parse_translated_attribute_accessor("title_en=")
63
+ # # => [:title, :en, true]
64
+ #
65
+ # parse_translated_attribute_accessor("title_fr")
66
+ # # => [:title, :fr, false]
67
+ #
68
+ # Returns the attribute name Symbol, locale Symbol, and a Boolean
69
+ # indicating whether or not the caller is attempting to assign a value.
70
+ def parse_translated_attribute_accessor(method_name)
71
+ return unless /(?<attribute>[a-z_]+)_(?<locale>[a-z]{2})(?<assignment>=?)\z/ =~ method_name
72
+
73
+ translated_attr_name = attribute.to_sym
74
+ return unless translated_attribute_names.include?(translated_attr_name)
75
+
76
+ locale = locale.to_sym
77
+ assigning = assignment.present?
78
+
79
+ [translated_attr_name, locale, assigning]
80
+ end
81
+
82
+ def toggle_fallback(enabled)
83
+ if block_given?
84
+ old_value = @enabled_fallback
85
+ begin
86
+ @enabled_fallback = enabled
87
+ yield
88
+ ensure
89
+ @enabled_fallback = old_value
90
+ end
91
+ else
92
+ @enabled_fallback = enabled
93
+ end
94
+ end
95
+ end
96
+ end
97
+ end
@@ -1,3 +1,3 @@
1
1
  module HstoreTranslate
2
- VERSION = "1.0.0"
2
+ VERSION = "2.0.0"
3
3
  end
@@ -0,0 +1,5 @@
1
+ source 'https://rubygems.org'
2
+ gemspec :path => './../..'
3
+
4
+ gem 'activerecord', '~> 4.2.0'
5
+ gem 'pg', :platform => :ruby
@@ -0,0 +1,5 @@
1
+ source 'https://rubygems.org'
2
+ gemspec :path => './../..'
3
+
4
+ gem 'activerecord', '~> 5.0.0'
5
+ gem 'pg', :platform => :ruby
@@ -4,12 +4,16 @@ require 'hstore_translate'
4
4
  require 'database_cleaner'
5
5
  DatabaseCleaner.strategy = :transaction
6
6
 
7
- MiniTest::Test = MiniTest::Unit::TestCase unless MiniTest.const_defined?(:Test) # Rails 4.0.x
7
+ I18n.available_locales = [:en, :fr]
8
8
 
9
9
  class Post < ActiveRecord::Base
10
10
  translates :title
11
11
  end
12
12
 
13
+ class PostDetailed < Post
14
+ translates :comment
15
+ end
16
+
13
17
  class HstoreTranslate::Test < Minitest::Test
14
18
  class << self
15
19
  def prepare_database
@@ -55,6 +59,7 @@ class HstoreTranslate::Test < Minitest::Test
55
59
  connection = establish_connection(db_config)
56
60
  connection.create_table(:posts, :force => true) do |t|
57
61
  t.column :title_translations, 'hstore'
62
+ t.column :comment_translations, 'hstore'
58
63
  end
59
64
  end
60
65
  end
@@ -77,7 +77,7 @@ class TranslatesTest < HstoreTranslate::Test
77
77
  p = Post.new(:title_translations => { "en" => "English Title" })
78
78
  p.disable_fallback
79
79
  I18n.with_locale(:fr) do
80
- assert_equal(nil, p.title_fr)
80
+ assert_nil p.title_fr
81
81
  end
82
82
  end
83
83
 
@@ -144,5 +144,28 @@ class TranslatesTest < HstoreTranslate::Test
144
144
 
145
145
  def test_class_method_translates?
146
146
  assert_equal true, Post.translates?
147
+ assert_equal true, PostDetailed.translates?
148
+ end
149
+
150
+ def test_translate_post_detailed
151
+ p = PostDetailed.create!(
152
+ :title_translations => {
153
+ "en" => "Alice in Wonderland",
154
+ "fr" => "Alice au pays des merveilles"
155
+ },
156
+ :comment_translations => {
157
+ "en" => "Awesome book",
158
+ "fr" => "Un livre unique"
159
+ }
160
+ )
161
+
162
+ I18n.with_locale(:en) { assert_equal "Awesome book", p.comment }
163
+ I18n.with_locale(:en) { assert_equal "Alice in Wonderland", p.title }
164
+ I18n.with_locale(:fr) { assert_equal "Un livre unique", p.comment }
165
+ I18n.with_locale(:fr) { assert_equal "Alice au pays des merveilles", p.title }
166
+ end
167
+
168
+ def test_permitted_translated_attributes
169
+ assert_equal [:title_en, :title_fr, :comment_en, :comment_fr], PostDetailed.permitted_translated_attributes
147
170
  end
148
171
  end
metadata CHANGED
@@ -1,104 +1,120 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: hstore_translate
3
- version: !ruby/object:Gem::Version
4
- version: 1.0.0
3
+ version: !ruby/object:Gem::Version
4
+ version: 2.0.0
5
5
  platform: ruby
6
- authors:
6
+ authors:
7
7
  - Rob Worley
8
+ - Cédric Fabianski
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
-
12
- date: 2014-04-10 00:00:00 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
12
+ date: 2017-03-05 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
15
  name: activerecord
16
- prerelease: false
17
- requirement: &id001 !ruby/object:Gem::Requirement
18
- requirements:
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
19
18
  - - ">="
20
- - !ruby/object:Gem::Version
21
- version: 3.1.0
19
+ - !ruby/object:Gem::Version
20
+ version: 4.2.0
22
21
  type: :runtime
23
- version_requirements: *id001
24
- - !ruby/object:Gem::Dependency
25
- name: rake
26
22
  prerelease: false
27
- requirement: &id002 !ruby/object:Gem::Requirement
28
- requirements:
29
- - &id004
30
- - ">="
31
- - !ruby/object:Gem::Version
32
- version: "0"
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ version: 4.2.0
28
+ - !ruby/object:Gem::Dependency
29
+ name: rake
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - ">="
33
+ - !ruby/object:Gem::Version
34
+ version: '0'
33
35
  type: :development
34
- version_requirements: *id002
35
- - !ruby/object:Gem::Dependency
36
- name: minitest
37
36
  prerelease: false
38
- requirement: &id003 !ruby/object:Gem::Requirement
39
- requirements:
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ version: '0'
42
+ - !ruby/object:Gem::Dependency
43
+ name: minitest
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
40
46
  - - ">="
41
- - !ruby/object:Gem::Version
42
- version: "4.0"
47
+ - !ruby/object:Gem::Version
48
+ version: '4.0'
43
49
  type: :development
44
- version_requirements: *id003
45
- - !ruby/object:Gem::Dependency
46
- name: database_cleaner
47
50
  prerelease: false
48
- requirement: &id005 !ruby/object:Gem::Requirement
49
- requirements:
50
- - *id004
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ version: '4.0'
56
+ - !ruby/object:Gem::Dependency
57
+ name: database_cleaner
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
51
63
  type: :development
52
- version_requirements: *id005
53
- description: Rails I18n library for ActiveRecord model/data translation using PostgreSQL's hstore datatype. Translations are stored directly in the model table rather than shadow tables.
54
- email: robert.worley@gmail.com
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ description: Rails I18n library for ActiveRecord model/data translation using PostgreSQL's
71
+ hstore datatype. Translations are stored directly in the model table rather than
72
+ shadow tables.
73
+ email: cfabianski@me.com
55
74
  executables: []
56
-
57
75
  extensions: []
58
-
59
76
  extra_rdoc_files: []
60
-
61
- files:
77
+ files:
62
78
  - MIT-LICENSE
63
79
  - README.md
64
80
  - lib/hstore_translate.rb
65
81
  - lib/hstore_translate/translates.rb
82
+ - lib/hstore_translate/translates/active_record_with_hstore_translates.rb
83
+ - lib/hstore_translate/translates/instance_methods.rb
66
84
  - lib/hstore_translate/version.rb
67
85
  - test/database.yml
68
- - test/gemfiles/Gemfile.rails-3.1.x
69
- - test/gemfiles/Gemfile.rails-3.2.x
70
- - test/gemfiles/Gemfile.rails-4.0.x
71
- - test/gemfiles/Gemfile.rails-4.1.x
86
+ - test/gemfiles/Gemfile.rails-4.2.x
87
+ - test/gemfiles/Gemfile.rails-5.0.x
72
88
  - test/test_helper.rb
73
89
  - test/translates_test.rb
74
- homepage: https://github.com/robworley/hstore_translate
75
- licenses:
90
+ homepage: https://github.com/cfabianski/hstore_translate
91
+ licenses:
76
92
  - MIT
77
93
  metadata: {}
78
-
79
94
  post_install_message:
80
95
  rdoc_options: []
81
-
82
- require_paths:
96
+ require_paths:
83
97
  - lib
84
- required_ruby_version: !ruby/object:Gem::Requirement
85
- requirements:
86
- - *id004
87
- required_rubygems_version: !ruby/object:Gem::Requirement
88
- requirements:
89
- - *id004
98
+ required_ruby_version: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - ">="
101
+ - !ruby/object:Gem::Version
102
+ version: '0'
103
+ required_rubygems_version: !ruby/object:Gem::Requirement
104
+ requirements:
105
+ - - ">="
106
+ - !ruby/object:Gem::Version
107
+ version: '0'
90
108
  requirements: []
91
-
92
109
  rubyforge_project:
93
- rubygems_version: 2.2.2
110
+ rubygems_version: 2.6.10
94
111
  signing_key:
95
112
  specification_version: 4
96
- summary: Rails I18n library for ActiveRecord model/data translation using PostgreSQL's hstore datatype.
97
- test_files:
113
+ summary: Rails I18n library for ActiveRecord model/data translation using PostgreSQL's
114
+ hstore datatype.
115
+ test_files:
98
116
  - test/database.yml
117
+ - test/gemfiles/Gemfile.rails-4.2.x
118
+ - test/gemfiles/Gemfile.rails-5.0.x
99
119
  - test/test_helper.rb
100
120
  - test/translates_test.rb
101
- - test/gemfiles/Gemfile.rails-3.1.x
102
- - test/gemfiles/Gemfile.rails-3.2.x
103
- - test/gemfiles/Gemfile.rails-4.0.x
104
- - test/gemfiles/Gemfile.rails-4.1.x
@@ -1,6 +0,0 @@
1
- source 'https://rubygems.org'
2
- gemspec :path => './../..'
3
-
4
- gem 'pg'
5
- gem 'activerecord', '~> 3.1.0'
6
- gem 'activerecord-postgres-hstore', '~> 0.7.0'
@@ -1,6 +0,0 @@
1
- source 'https://rubygems.org'
2
- gemspec :path => './../..'
3
-
4
- gem 'pg'
5
- gem 'activerecord', '~> 3.2.0'
6
- gem 'activerecord-postgres-hstore', '~> 0.7.0'
@@ -1,6 +0,0 @@
1
- source 'https://rubygems.org'
2
- gemspec :path => './../..'
3
-
4
- gem 'activerecord', '~> 4.0.0'
5
- gem 'pg', :platform => :ruby
6
- gem 'activerecord-jdbcpostgresql-adapter', :platform => :jruby
@@ -1,6 +0,0 @@
1
- source 'https://rubygems.org'
2
- gemspec :path => './../..'
3
-
4
- gem 'activerecord', '~> 4.1.0'
5
- gem 'pg', :platform => :ruby
6
- gem 'activerecord-jdbcpostgresql-adapter', :platform => :jruby