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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: f532d4e856de601cd5491f34a2ec3be1c3cad351
4
- data.tar.gz: c3186ae9e0a93a89af0364ee0dcd4174c476b086
2
+ SHA256:
3
+ metadata.gz: 9671e00730e7002e2b1efa1046531933be8008160c7e2828cf0ab7bdb0f17d39
4
+ data.tar.gz: 9cf5dc7806bcdab742a5d07adc3729104ebb50d7e7ecf698854b07accafe616c
5
5
  SHA512:
6
- metadata.gz: 0d27e0efb7b67fd8b27b155c0c6edcb4c09194352ed192c0aa255e3e43d3e5d03d22680afde3cea7a1e322c222519042d562114f14e8f1212d3ed95cd027cc6d
7
- data.tar.gz: bde20ce10342ce1be1fba26a7de16574d8855382216c5b31524313265dd0d43467402b4bfdc2ac681ce4f3917a1759093c588791a7410861ca0d0f916e4196f8
6
+ metadata.gz: 1b2f821a94e70a8cb9e40cb17cb050720cd8a9d3bbc404824837925f556b5bb52368b06c2f2883ce645feef0072c16415e0da2ff36fd92898da2c16c7777ad26
7
+ data.tar.gz: e6d5c9c9575d624e2a4860b059cbb8327f42c07747ad382b382cbd8176d5e429d40fc074233b41db237d23cfb709be91d2a8c7402aa8deabf647469e9c3df6c0
@@ -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 -v 1.11.2
15
+ before_install: gem install bundler
14
16
 
15
17
  services:
16
18
  - postgresql
@@ -2,5 +2,6 @@ source 'https://rubygems.org'
2
2
 
3
3
  gem 'activerecord', '~> 4.2.0'
4
4
  gem 'activesupport', '~> 4.2.0'
5
+ gem 'pg', '~> 0.21'
5
6
 
6
7
  gemspec path: '../'
@@ -0,0 +1,6 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'activerecord', '~> 5.2.0'
4
+ gem 'activesupport', '~> 5.2.0'
5
+
6
+ gemspec path: '../'
@@ -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('../templates', __FILE__)
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
@@ -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 destroy) } }
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
 
@@ -1,3 +1,3 @@
1
1
  module Translateable
2
- VERSION = '0.1.7'.freeze
2
+ VERSION = '0.1.8'.freeze
3
3
  end
@@ -1,6 +1,4 @@
1
- # coding: utf-8
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.7
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: 2017-08-13 00:00:00.000000000 Z
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: pg
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: i18n
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.6.11
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.