rosetta 1.1.1 → 1.1.2

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
2
  SHA256:
3
- metadata.gz: 00126b0010fc67571301c60501085cfc4f5b7b24a5018898aa69ed5838aa8dab
4
- data.tar.gz: 94e139c15399152cc9873be0dc49468a6ed857cd21f877e8888327c44eeb0ab3
3
+ metadata.gz: 4939ebddde4d6f8ab24a095d019ee49af96d1ff3f4aee0a2e71f171a0b532040
4
+ data.tar.gz: 347134e0fabcf5e10378eab7dea3164fed81475b143fd0e16f414ce25a530fe5
5
5
  SHA512:
6
- metadata.gz: b621efdc6079463080d11c2af4d55a35c78f0817642f3fd64f2a99fb349b4e209347fa6c84462df0491b7926ad84d31836addb3b5e2b8a301cb381986acd2ac0
7
- data.tar.gz: a9407323c95d75ce0bf6514d67edc938f1f586041a7195eb79f1b50d75047573978763073bf19fd0374e82e9ecf4aec07b5618e8a666c1861b7173ec881c925c
6
+ metadata.gz: 172fbb557043634017fa060faa54b2e3ade2c5e194e7c532ca64ba014eecff9e5a5761ad9f661c16efad1e1b7eb15896af82831840a4240d5402eaab57cc3b90
7
+ data.tar.gz: 0f946893470c16bc6713acf8fab2a397c433bc9d4fe373c57feb2e62a121caa6592d2b1b904f668a3d6a5e9772032892f454cfbb6347e2d446e2183a1a2da6a7
data/README.md CHANGED
@@ -36,7 +36,7 @@ It requires 2 configuration options:
36
36
  Add this to your Gemfile:
37
37
 
38
38
  ```ruby
39
- gem 'rosetta', '~> 1.0'
39
+ gem 'rosetta', '~> 1.1'
40
40
  ```
41
41
 
42
42
  and run the `bundle install` command.
@@ -22,8 +22,7 @@ module Rosetta
22
22
  end
23
23
 
24
24
  def add_phrase(**args)
25
- fail ArgumentError, 'missing keys argument' if args[:keys].blank?
26
- fail ArgumentError, 'missing phrase argument' if args[:phrase].blank?
25
+ fail ArgumentError, 'Rosetta: missing keys argument' if args[:keys].blank?
27
26
 
28
27
  repository_link = config.repository.build_link(args[:keys], locale: locale)
29
28
  phrases << Phrase.new(args[:keys], args[:phrase], repository_link)
@@ -21,6 +21,6 @@ module Rosetta
21
21
  end
22
22
  end
23
23
 
24
- ActiveSupport.on_load(:action_controller) do
25
- include Rosetta::ControllerAdditions
24
+ ActiveSupport.on_load(:action_controller) do |klass|
25
+ include Rosetta::ControllerAdditions if klass == ActionController::Base
26
26
  end
@@ -7,7 +7,7 @@ module Rosetta
7
7
  keys = normalize_keys('', args.dig(0), args.dig(1, :scope))
8
8
  code = keys.join('.')
9
9
 
10
- Rosetta.add_phrase(keys: keys, phrase: output) if exists?(code, config.locale)
10
+ Rosetta.add_phrase(keys: keys, phrase: output.to_s) if exists?(code, config.locale)
11
11
 
12
12
  output
13
13
  end
@@ -1,3 +1,3 @@
1
1
  module Rosetta
2
- VERSION = '1.1.1'.freeze
2
+ VERSION = '1.1.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rosetta
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - MarsBased
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-10 00:00:00.000000000 Z
11
+ date: 2019-03-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails