sequel-rails 0.9.6 → 0.9.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -0
- data/.travis.yml +2 -0
- data/History.md +6 -0
- data/README.md +1 -0
- data/lib/sequel_rails/railtie.rb +2 -1
- data/lib/sequel_rails/railties/i18n_support.rb +6 -0
- data/lib/sequel_rails/version.rb +1 -1
- data/spec/lib/sequel_rails/railtie_spec.rb +3 -1
- data/spec/spec_helper.rb +10 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: da3053022759b50cd6a007f51516a58bc8c7f81c
|
4
|
+
data.tar.gz: 4b973b667f554d668de301170030b8038fad9ac1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ff5816b3bfb73dc0e45a4332c978f134bcb51fd0fb58b3897ae6b4399f20691ec49fe202f2fb0cb685b4538605013c6c863cb53347263a85e486b4fb72442e8
|
7
|
+
data.tar.gz: c7625430e3807d77cc054da4fe6b27d408d43dc53a7bd9b619d9afe14bbfaff7e0e0a8f76485ca063d277a39f7cd30637061745929f3f098e54a03998d2023b5
|
data/.rubocop.yml
CHANGED
data/.travis.yml
CHANGED
data/History.md
CHANGED
data/README.md
CHANGED
data/lib/sequel_rails/railtie.rb
CHANGED
@@ -70,7 +70,8 @@ module SequelRails
|
|
70
70
|
end
|
71
71
|
|
72
72
|
def setup_i18n_support
|
73
|
-
::Sequel::Model.send :
|
73
|
+
::Sequel::Model.send :extend, ::ActiveModel::Translation
|
74
|
+
::Sequel::Model.send :extend, ::SequelRails::I18nSupport
|
74
75
|
end
|
75
76
|
|
76
77
|
def setup_controller_runtime
|
data/lib/sequel_rails/version.rb
CHANGED
@@ -56,7 +56,9 @@ describe SequelRails::Railtie do
|
|
56
56
|
end
|
57
57
|
|
58
58
|
it 'configures Sequel::Model instances for i18n' do
|
59
|
-
expect(User.
|
59
|
+
expect(User.i18n_scope).to be(:sequel)
|
60
|
+
expect(User).to respond_to(:lookup_ancestors)
|
61
|
+
expect(User.model_name.human).to eq('translated user')
|
60
62
|
end
|
61
63
|
|
62
64
|
it 'adds Sequel runtime to controller for logging' do
|
data/spec/spec_helper.rb
CHANGED
@@ -20,6 +20,16 @@ rspec_exclusions[:sqlite] = ENV['TEST_ADAPTER'] != 'sqlite3'
|
|
20
20
|
|
21
21
|
RSpec.configure do |config|
|
22
22
|
config.filter_run_excluding rspec_exclusions
|
23
|
+
|
24
|
+
config.before(:all) do
|
25
|
+
I18n.backend.store_translations(
|
26
|
+
:en,
|
27
|
+
'sequel' => {
|
28
|
+
'models' => {
|
29
|
+
'user' => 'translated user' }
|
30
|
+
})
|
31
|
+
end
|
32
|
+
|
23
33
|
config.around :each do |example|
|
24
34
|
if example.metadata[:no_transaction]
|
25
35
|
example.run
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sequel-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brasten Sager (brasten)
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-12-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activemodel
|