translateable 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +3 -1
- data/gemfiles/4.2.gemfile +1 -0
- data/gemfiles/5.2.gemfile +6 -0
- data/lib/generators/translateable/migration_generator.rb +1 -1
- data/lib/translateable.rb +2 -2
- data/lib/translateable/version.rb +1 -1
- data/translateable.gemspec +2 -4
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 9671e00730e7002e2b1efa1046531933be8008160c7e2828cf0ab7bdb0f17d39
|
4
|
+
data.tar.gz: 9cf5dc7806bcdab742a5d07adc3729104ebb50d7e7ecf698854b07accafe616c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b2f821a94e70a8cb9e40cb17cb050720cd8a9d3bbc404824837925f556b5bb52368b06c2f2883ce645feef0072c16415e0da2ff36fd92898da2c16c7777ad26
|
7
|
+
data.tar.gz: e6d5c9c9575d624e2a4860b059cbb8327f42c07747ad382b382cbd8176d5e429d40fc074233b41db237d23cfb709be91d2a8c7402aa8deabf647469e9c3df6c0
|
data/.travis.yml
CHANGED
@@ -1,16 +1,18 @@
|
|
1
1
|
language: ruby
|
2
2
|
rvm:
|
3
3
|
- 2.2.2
|
4
|
+
- 2.5.0
|
4
5
|
|
5
6
|
gemfile:
|
6
7
|
- gemfiles/4.2.gemfile
|
7
8
|
- gemfiles/5.0.gemfile
|
9
|
+
- gemfiles/5.2.gemfile
|
8
10
|
|
9
11
|
script:
|
10
12
|
- bundle exec rspec
|
11
13
|
- bundle exec rubocop
|
12
14
|
|
13
|
-
before_install: gem install bundler
|
15
|
+
before_install: gem install bundler
|
14
16
|
|
15
17
|
services:
|
16
18
|
- postgresql
|
data/gemfiles/4.2.gemfile
CHANGED
@@ -5,7 +5,7 @@ if defined?(Rails)
|
|
5
5
|
module Translateable
|
6
6
|
class MigrationGenerator < ActiveRecord::Generators::Base
|
7
7
|
desc 'Create sample migration with translateable field'
|
8
|
-
source_root File.expand_path('
|
8
|
+
source_root File.expand_path('templates', __dir__)
|
9
9
|
|
10
10
|
argument :field_name, type: :string
|
11
11
|
argument :locale, type: :string, default: I18n.default_locale
|
data/lib/translateable.rb
CHANGED
@@ -28,13 +28,13 @@ module Translateable
|
|
28
28
|
|
29
29
|
def define_translateable_strong_params(*attrs)
|
30
30
|
define_singleton_method('translateable_permitted_attributes') do
|
31
|
-
attrs.each_with_object([]) { |i, obj| obj << { "#{i}_translateable_attributes" => %i(locale data
|
31
|
+
attrs.each_with_object([]) { |i, obj| obj << { "#{i}_translateable_attributes" => %i(locale data _destroy) } }
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
35
35
|
def database_connection_exists?
|
36
36
|
ActiveRecord::Base.connection_pool.with_connection(&:active?)
|
37
|
-
rescue
|
37
|
+
rescue StandardError
|
38
38
|
false
|
39
39
|
end
|
40
40
|
|
data/translateable.gemspec
CHANGED
@@ -1,6 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
lib = File.expand_path('../lib', __FILE__)
|
1
|
+
lib = File.expand_path('lib', __dir__)
|
4
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
3
|
require 'translateable/version'
|
6
4
|
|
@@ -27,6 +25,6 @@ Gem::Specification.new do |spec|
|
|
27
25
|
|
28
26
|
spec.add_dependency 'activerecord', '>= 4.2'
|
29
27
|
spec.add_dependency 'activesupport', '>= 4.2'
|
30
|
-
spec.add_dependency 'pg'
|
31
28
|
spec.add_dependency 'i18n'
|
29
|
+
spec.add_dependency 'pg'
|
32
30
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: translateable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Oleg Antonyan
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-06-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -95,7 +95,7 @@ dependencies:
|
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '4.2'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
98
|
+
name: i18n
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - ">="
|
@@ -109,7 +109,7 @@ dependencies:
|
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
112
|
+
name: pg
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
115
|
- - ">="
|
@@ -143,6 +143,7 @@ files:
|
|
143
143
|
- bin/setup
|
144
144
|
- gemfiles/4.2.gemfile
|
145
145
|
- gemfiles/5.0.gemfile
|
146
|
+
- gemfiles/5.2.gemfile
|
146
147
|
- lib/generators/translateable/migration_generator.rb
|
147
148
|
- lib/generators/translateable/templates/migration.rb.erb
|
148
149
|
- lib/translateable.rb
|
@@ -168,7 +169,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
168
169
|
version: '0'
|
169
170
|
requirements: []
|
170
171
|
rubyforge_project:
|
171
|
-
rubygems_version: 2.
|
172
|
+
rubygems_version: 2.7.3
|
172
173
|
signing_key:
|
173
174
|
specification_version: 4
|
174
175
|
summary: Allows to store text data in different languages.
|