tolgee_liquid 0.1.1 → 0.1.9

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: 9cd9abf93aafe9fcbc1382685660eae4a7f6bb56fc7552559732f49833032892
4
- data.tar.gz: '08ea31a081f4aba7f8c55adf989ffbf4b3c591784eb76706984125de2e716c42'
3
+ metadata.gz: dca99fd61c6ef48a8ed0e9859d8bf699018694413886d2fcca125715ae469487
4
+ data.tar.gz: 6a87046ae897d9c133ff9b8f5898f0d10d0008faf7f5fb6ce1e92bac957226c0
5
5
  SHA512:
6
- metadata.gz: bf3feac6e7028c221788d4a25acae048db1bff38bda024516b98902deda0682b5879093f5a800673b6634c67944bdf6e594250d78379b209d9bcc6ceeb389dd4
7
- data.tar.gz: b4ec4b5de66a1e1927ed5e14c96e681894373fdbfb3151e8150b01ba7c6279c18df6a8714c868c73dd8c1626db38139672f084836331704081a03ae08dc98057
6
+ metadata.gz: 73eea62ed05227aa481dc869095f1beaad7ee32aa7f9079e15aebcfa4549e69a8ee7644692b089afd27f978d94047fbb248cab3f0ab3de0fb0e495a241c2a9b0
7
+ data.tar.gz: 03b837fa231f52f88fd2eeae62f1b059fb27684a20dd5ce21f23a6f844b31643fb14d38ab7ab5d5e98cd7a5adffe2e981f2434a25ab0f89c1456eeb8d11e0110
data/.rubocop.yml ADDED
@@ -0,0 +1,7 @@
1
+ AllCops:
2
+ NewCops: disable
3
+ SuggestExtensions: false
4
+
5
+ Metrics/BlockLength:
6
+ Exclude:
7
+ - spec/*.rb
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.6.10
data/.travis.yml CHANGED
@@ -4,4 +4,26 @@ language: ruby
4
4
  cache: bundler
5
5
  rvm:
6
6
  - 2.6.10
7
- before_install: gem install bundler -v 1.17.2
7
+
8
+ before_install:
9
+ - gem install bundler -v 1.17.2
10
+
11
+ script:
12
+ - bin/setup
13
+ - bundle exec rubocop
14
+ - bundle exec rake spec
15
+ - gem build tolgee_liquid.gemspec
16
+
17
+ before_deploy:
18
+ - export TRAVIS_TAG=$(git describe --tags --abbrev=0)
19
+
20
+ deploy:
21
+ provider: rubygems
22
+ api_key: "$RUBYGEMS_API_KEY"
23
+ on:
24
+ tags: true
25
+
26
+ branches:
27
+ only:
28
+ - main
29
+ - /^v\d+(\.\d+(\.\d+)?)?$/
data/Gemfile CHANGED
@@ -1,6 +1,8 @@
1
- source "https://rubygems.org"
1
+ # frozen_string_literal: true
2
2
 
3
- git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
3
+ source 'https://rubygems.org'
4
+
5
+ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
4
6
 
5
7
  # Specify your gem's dependencies in tolgee_liquid.gemspec
6
8
  gemspec
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- tolgee_liquid (0.1.1)
4
+ tolgee_liquid (0.1.9)
5
5
  message_format (~> 0.0.8)
6
6
 
7
7
  GEM
@@ -9,19 +9,30 @@ GEM
9
9
  specs:
10
10
  addressable (2.8.6)
11
11
  public_suffix (>= 2.0.2, < 6.0)
12
+ ast (2.4.2)
12
13
  bigdecimal (3.1.8)
13
14
  camertron-eprun (1.1.1)
14
15
  cldr-plurals-runtime-rb (1.1.0)
15
- concurrent-ruby (1.3.1)
16
+ concurrent-ruby (1.3.2)
16
17
  crack (1.0.0)
17
18
  bigdecimal
18
19
  rexml
19
20
  diff-lcs (1.5.1)
20
21
  hashdiff (1.1.0)
22
+ i18n (1.14.5)
23
+ concurrent-ruby (~> 1.0)
24
+ json (2.7.2)
21
25
  message_format (0.0.8)
22
26
  twitter_cldr (~> 6.0)
27
+ parallel (1.24.0)
28
+ parser (3.3.2.0)
29
+ ast (~> 2.4.1)
30
+ racc
23
31
  public_suffix (5.0.5)
32
+ racc (1.8.0)
33
+ rainbow (3.1.1)
24
34
  rake (10.5.0)
35
+ regexp_parser (2.9.2)
25
36
  rexml (3.2.8)
26
37
  strscan (>= 3.0.9)
27
38
  rspec (3.13.0)
@@ -37,6 +48,19 @@ GEM
37
48
  diff-lcs (>= 1.2.0, < 2.0)
38
49
  rspec-support (~> 3.13.0)
39
50
  rspec-support (3.13.1)
51
+ rubocop (1.50.2)
52
+ json (~> 2.3)
53
+ parallel (~> 1.10)
54
+ parser (>= 3.2.0.0)
55
+ rainbow (>= 2.2.2, < 4.0)
56
+ regexp_parser (>= 1.8, < 3.0)
57
+ rexml (>= 3.2.5, < 4.0)
58
+ rubocop-ast (>= 1.28.0, < 2.0)
59
+ ruby-progressbar (~> 1.7)
60
+ unicode-display_width (>= 2.4.0, < 3.0)
61
+ rubocop-ast (1.30.0)
62
+ parser (>= 3.2.1.0)
63
+ ruby-progressbar (1.13.0)
40
64
  strscan (3.1.0)
41
65
  twitter_cldr (6.12.1)
42
66
  camertron-eprun
@@ -44,6 +68,7 @@ GEM
44
68
  tzinfo
45
69
  tzinfo (2.0.6)
46
70
  concurrent-ruby (~> 1.0)
71
+ unicode-display_width (2.5.0)
47
72
  webmock (3.23.1)
48
73
  addressable (>= 2.8.0)
49
74
  crack (>= 0.3.2)
@@ -54,8 +79,10 @@ PLATFORMS
54
79
 
55
80
  DEPENDENCIES
56
81
  bundler (~> 1.17)
82
+ i18n (~> 1.14)
57
83
  rake (~> 10.0)
58
84
  rspec (~> 3.0)
85
+ rubocop (~> 1.50)
59
86
  tolgee_liquid!
60
87
  webmock (~> 3.23)
61
88
 
data/README.md CHANGED
@@ -1,11 +1,18 @@
1
1
  # TolgeeLiquid
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/tolgee_liquid`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ A Ruby gem that integrates the [Tolgee Platform](https://tolgee.io/integrations) with Shopify's [Liquid template language](https://github.com/Shopify/liquid).
4
4
 
5
- TODO: Delete this and the text above, and describe your gem
5
+ If you are developing a multilingual web application using the Liquid template language, check out the Tolgee Platform (translation as a service). It enhances your translation workflow, making it more efficient and accurate.
6
+
7
+ This gem focuses on the "In-Context" translation integration. See the example project at https://github.com/cccccroge/tolgee-rails-liquid.
6
8
 
7
9
  ## Installation
8
10
 
11
+ ### Prerequisite
12
+ Make sure you have liquid installed.
13
+
14
+ ### Install
15
+
9
16
  Add this line to your application's Gemfile:
10
17
 
11
18
  ```ruby
@@ -16,23 +23,99 @@ And then execute:
16
23
 
17
24
  $ bundle
18
25
 
19
- Or install it yourself as:
26
+ ## Usage
20
27
 
21
- $ gem install tolgee_liquid
28
+ ### Setup Credentials
29
+ Add the following block to your application initialization. If you are using Rails, place it in config/initializers/tolgee.rb:
22
30
 
23
- ## Usage
31
+ ```.rb
32
+ TolgeeLiquid.configure do |config|
33
+ config.api_url = 'https://example.tolgee.io'
34
+ config.api_key = <TOLGEE_API_KEY>
35
+ config.project_id = <TOLGEE_PROJECT_ID>
36
+ end
37
+ ```
38
+ This allows the gem to fetch data from the corresponding Tolgee project in development mode.
24
39
 
25
- TODO: Write usage instructions here
40
+ ### Register `t` method for Liquid
41
+ There are two ways to setup.
26
42
 
27
- ## Development
43
+ #### Use Decorator
44
+ If you already have your own translation method `t` defined.
45
+ ```.rb
46
+ module MyFilterContainsTranslationMethod
47
+ def t(name, vars = {})
48
+ # Own implementation
49
+ end
50
+ end
51
+
52
+ Liquid::Template.register_filter(MyFilterContainsTranslationMethod)
53
+ ```
54
+
55
+ Add the prefix `with_tolgee` on translation method:
56
+ ```.rb
57
+ module MyFilterContainsTranslationMethod
58
+ with_tolgee def t(name, vars = {})
59
+ # Own implementation
60
+ end
61
+ end
62
+ ```
63
+
64
+ Note that the arguments of the original t method must match the format above (the first argument being the translation key, and an optional hash argument providing variables for string interpolation). Otherwise, it won't work correctly.
28
65
 
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
66
+ #### Use gem's `t` method
67
+ You can use the t method provided by the gem, which utilizes ICU MessageFormat patterns under the hood.
68
+
69
+ ```.rb
70
+ Liquid::Template.register_filter(TolgeeFilter)
71
+ ```
72
+
73
+ ### Use `t` filter in Liquid template
74
+
75
+ Example Liquid snippet:
76
+ ```.html
77
+ <div>{{ 'key.nested_key' | t: fruit: 'Pitaya' }}</div>
78
+ ```
79
+
80
+ Example application's controller code for Rails project:
81
+ ```.rb
82
+ class PagesController < ApplicationController
83
+ def index
84
+ # get liquid template file...
85
+ template = Liquid::Template.parse(liquid)
86
+
87
+ # provide translations and meta data
88
+ tolgee_registers = TolgeeLiquid.registers({
89
+ locale: 'en',
90
+ mode: 'development',
91
+ static_data: {
92
+ en: YAML.load_file(Rails.root.join('config', 'locales', 'en.yml')),
93
+ },
94
+ })
95
+
96
+ html = template.render({}, registers: tolgee_registers)
97
+ # put html to view...
98
+ end
99
+ end
100
+ ```
101
+
102
+ Example translation yaml file:
103
+ ```.yml
104
+ key:
105
+ nested_key: "I like {fruit}!"
106
+ ```
107
+
108
+ ## Development
30
109
 
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
110
+ - Run `install dependencies` to install dependencies.
111
+ - Run `rake spec` to run the tests.
112
+ - Run `bin/console` for an interactive prompt that will allow you to experiment.
113
+ - Run `rubocop` to find code smells.
114
+ - Run `bin/deploy` to release a new version
32
115
 
33
116
  ## Contributing
34
117
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/tolgee_liquid.
118
+ Bug reports and pull requests are welcome.
36
119
 
37
120
  ## License
38
121
 
data/Rakefile CHANGED
@@ -1,6 +1,8 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
1
+ # frozen_string_literal: true
2
+
3
+ require 'bundler/gem_tasks'
4
+ require 'rspec/core/rake_task'
3
5
 
4
6
  RSpec::Core::RakeTask.new(:spec)
5
7
 
6
- task :default => :spec
8
+ task default: :spec
data/bin/console CHANGED
@@ -1,7 +1,8 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
- require "bundler/setup"
4
- require "tolgee_liquid"
4
+ require 'bundler/setup'
5
+ require 'tolgee_liquid'
5
6
 
6
7
  # You can add fixtures and/or initialization code here to make experimenting
7
8
  # with your gem easier. You can also use a different console, if you like.
@@ -10,5 +11,5 @@ require "tolgee_liquid"
10
11
  # require "pry"
11
12
  # Pry.start
12
13
 
13
- require "irb"
14
+ require 'irb'
14
15
  IRB.start(__FILE__)
data/bin/deploy ADDED
@@ -0,0 +1,61 @@
1
+ #!/bin/bash
2
+
3
+ set -e
4
+
5
+ current_branch=$(git rev-parse --abbrev-ref HEAD)
6
+
7
+ # Make sure we are on "main"
8
+ if [ "$current_branch" != "main" ]; then
9
+ echo "Error: You must be on 'main' to deploy."
10
+ exit 1
11
+ fi
12
+
13
+ # Get commits to release
14
+ last_release_tag=$(git describe --tags --abbrev=0)
15
+ commits=$(git log --pretty=format:"%h %s" $last_release_tag..HEAD)
16
+
17
+ if [ -z "$commits" ]; then
18
+ echo "No new commits to release."
19
+ exit 0
20
+ fi
21
+
22
+ # Preview commits
23
+ echo "Commits to be released:"
24
+ while read -r commit_hash commit_message; do
25
+ pr_title=$(git log -1 --pretty="%b" $commit_hash | sed -n '/^Pull Request Title:/s/^Pull Request Title: //p')
26
+ echo "$commit_hash $commit_message"
27
+ if [ -n "$pr_title" ]; then
28
+ echo " Pull Request Title: $pr_title"
29
+ fi
30
+ done <<< "$commits"
31
+
32
+ # Bump version
33
+ read -p "Bump version (major/minor/patch)? " version_bump
34
+ current_version=$(ruby -r ./lib/tolgee_liquid/version.rb -e "puts TolgeeLiquid::VERSION")
35
+ case "$version_bump" in
36
+ major)
37
+ new_version=$(ruby -e "puts Gem::Version.new('$current_version').bump.bump.to_s")
38
+ ;;
39
+ minor)
40
+ new_version=$(ruby -e "puts Gem::Version.new('$current_version').bump.to_s")
41
+ ;;
42
+ patch)
43
+ new_version=$(ruby -e "version = Gem::Version.new('$current_version'); segments = version.segments; segments[-1] += 1; puts segments.join('.')")
44
+ ;;
45
+ *)
46
+ echo "Invalid version bump type."
47
+ exit 1
48
+ ;;
49
+ esac
50
+
51
+ echo "Bumping version from $current_version to $new_version"
52
+ ruby -i -pe "gsub(/VERSION = '$current_version'/, \"VERSION = '$new_version'\")" lib/tolgee_liquid/version.rb
53
+
54
+ # Create commit and tag for new version
55
+ git add lib/tolgee_liquid/version.rb
56
+ bundle install
57
+ git add Gemfile.lock
58
+ git commit -m "Bump version to $new_version" --no-edit
59
+ git tag v$new_version
60
+ git push origin tag v$new_version
61
+ git push
@@ -1,6 +1,11 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'net/http'
2
4
  require 'message_format'
3
5
 
6
+ # A translator will try to get the translations, handle interpolations and convert it to static string.
7
+ # If it's in development mode it will fetch translations from tolgee's platform.
8
+ # Otherwise, it will use static translations provided by outside.
4
9
  class Translate
5
10
  def initialize
6
11
  @tolgee_api_url = TolgeeLiquid.configuration.api_url
@@ -8,11 +13,12 @@ class Translate
8
13
  @tolgee_project_id = TolgeeLiquid.configuration.project_id
9
14
  end
10
15
 
11
- def execute(name, vars = {}, opts)
16
+ # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
17
+ def execute(name, vars, opts)
12
18
  locale = opts[:locale]
13
19
  dev_mode = opts[:mode] == 'development'
14
20
  static_data = opts[:static_data]
15
- dict = dev_mode ? get_remote_dict(locale.to_s) : static_data[locale.to_sym]
21
+ dict = dev_mode ? remote_dict(locale.to_s) : static_data[locale.to_sym]
16
22
  value = fetch_translation(dict, name)
17
23
  return name if value.nil?
18
24
 
@@ -26,16 +32,18 @@ class Translate
26
32
  translation
27
33
  end
28
34
  end
35
+ # rubocop:enable Metrics/MethodLength, Metrics/AbcSize
29
36
 
30
37
  def fetch_translation(dict, name)
31
- name.split('.'.freeze).reduce(dict) do |level, cur|
38
+ name.split('.').reduce(dict) do |level, cur|
32
39
  return nil if level[cur].nil?
33
40
 
34
41
  level[cur]
35
42
  end
36
43
  end
37
44
 
38
- def get_remote_dict(locale)
45
+ # rubocop:disable Metrics/MethodLength
46
+ def remote_dict(locale)
39
47
  @remote_dict ||= begin
40
48
  url = URI("#{@tolgee_api_url}/v2/projects/#{@tolgee_project_id}/translations/#{locale}")
41
49
  http = Net::HTTP.new(url.host, url.port)
@@ -47,8 +55,9 @@ class Translate
47
55
 
48
56
  response = http.request(request)
49
57
  JSON.parse(response.body)[locale]
50
- rescue
58
+ rescue StandardError
51
59
  {}
52
60
  end
53
61
  end
62
+ # rubocop:enable Metrics/MethodLength
54
63
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module TolgeeLiquid
2
- VERSION = "0.1.1"
4
+ VERSION = '0.1.9'
3
5
  end
@@ -1,3 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ # An string encoder that will transform original message to invisible ASCII characters.
4
+ # See the detail in: https://tolgee.io/blog/2021/12/17/invisible-characters-for-better-localization
1
5
  class ZeroWidthCharacterEncoder
2
6
  INVISIBLE_CHARACTERS = ["\u200C", "\u200D"].freeze
3
7
 
data/lib/tolgee_liquid.rb CHANGED
@@ -1,14 +1,19 @@
1
- require "tolgee_liquid/version"
2
- require "tolgee_liquid/translate"
3
- require "tolgee_liquid/zero_width_character_encoder"
1
+ # frozen_string_literal: true
4
2
 
3
+ require 'tolgee_liquid/version'
4
+ require 'tolgee_liquid/translate'
5
+ require 'tolgee_liquid/zero_width_character_encoder'
6
+
7
+ # This allow user to configure Tolgee credentials
5
8
  module TolgeeLiquid
6
9
  class << self
7
10
  attr_accessor :configuration
8
11
 
12
+ # rubocop:disable Style/Documentation
9
13
  class Configuration
10
14
  attr_accessor :api_url, :api_key, :project_id
11
15
  end
16
+ # rubocop:enable Style/Documentation
12
17
 
13
18
  def configure
14
19
  self.configuration ||= Configuration.new
@@ -21,6 +26,7 @@ module TolgeeLiquid
21
26
  end
22
27
  end
23
28
 
29
+ # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
24
30
  def with_tolgee(method_name)
25
31
  original_method = instance_method(method_name)
26
32
  define_method(method_name) do |*args, &fn|
@@ -28,28 +34,30 @@ def with_tolgee(method_name)
28
34
  locale = @context.registers[:locale] || I18n.default_locale
29
35
 
30
36
  if mode == 'development'
31
- message = { k: args.first }.to_json
37
+ message = { k: args[0] }.to_json
32
38
  hidden_message = ZeroWidthCharacterEncoder.new.execute(message)
33
39
 
34
40
  t = Translate.new
35
- dict = t.get_remote_dict(locale)
36
- value = t.fetch_translation(dict, args.first)
37
- return args.first if value.nil?
41
+ dict = t.remote_dict(locale)
42
+ value = t.fetch_translation(dict, args[0])
43
+ return args[0] if value.nil?
38
44
 
39
- translation = MessageFormat.new(value, locale.to_s).format(args.second&.transform_keys(&:to_sym))
45
+ translation = MessageFormat.new(value, locale.to_s).format(args[1]&.transform_keys(&:to_sym))
40
46
  "#{translation}#{hidden_message}"
41
47
  else
42
48
  original_method.bind(self).call(*args, &fn)
43
49
  end
44
50
  end
45
51
  end
52
+ # rubocop:enable Metrics/MethodLength, Metrics/AbcSize
46
53
 
54
+ # Expose translation method that used in Liquid filters
47
55
  module TolgeeFilter
48
56
  def t(name, vars = {})
49
57
  opts = {
50
58
  locale: @context.registers[:locale] || I18n.default_locale,
51
59
  mode: @context.registers[:mode] || 'production',
52
- static_data: @context.registers[:static_data] || {},
60
+ static_data: @context.registers[:static_data] || {}
53
61
  }
54
62
  Translate.new.execute(name, vars, opts)
55
63
  end
@@ -1,31 +1,36 @@
1
+ # frozen_string_literal: true
1
2
 
2
- lib = File.expand_path("../lib", __FILE__)
3
+ lib = File.expand_path('lib', __dir__)
3
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require "tolgee_liquid/version"
5
+ require 'tolgee_liquid/version'
5
6
 
6
7
  Gem::Specification.new do |spec|
7
- spec.name = "tolgee_liquid"
8
+ spec.name = 'tolgee_liquid'
8
9
  spec.version = TolgeeLiquid::VERSION
9
- spec.authors = ["Allen He"]
10
- spec.email = ["pooopooo543@gmail.com"]
10
+ spec.authors = ['Allen He']
11
+ spec.email = ['pooopooo543@gmail.com']
11
12
 
12
- spec.summary = %q{Tolgee Integration for Liquid}
13
- spec.description = %q{A gem that integrate Tolgee Platform to Shopify Liquid template engine.}
14
- spec.license = "MIT"
13
+ spec.summary = 'Tolgee Integration for Liquid'
14
+ spec.description = 'A gem that integrate Tolgee Platform to Shopify Liquid template engine.'
15
+ spec.license = 'MIT'
15
16
 
16
17
  # Specify which files should be added to the gem when it is released.
17
18
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
18
- spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
19
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
19
20
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
20
21
  end
21
- spec.bindir = "exe"
22
+ spec.bindir = 'exe'
22
23
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
23
- spec.require_paths = ["lib"]
24
+ spec.require_paths = ['lib']
25
+
26
+ spec.required_ruby_version = '>= 2.6.10'
24
27
 
25
28
  spec.add_dependency 'message_format', '~> 0.0.8'
26
29
 
27
- spec.add_development_dependency "bundler", "~> 1.17"
28
- spec.add_development_dependency "rake", "~> 10.0"
29
- spec.add_development_dependency "rspec", "~> 3.0"
30
- spec.add_development_dependency "webmock", "~> 3.23"
30
+ spec.add_development_dependency 'bundler', '~> 1.17'
31
+ spec.add_development_dependency 'i18n', '~> 1.14'
32
+ spec.add_development_dependency 'rake', '~> 10.0'
33
+ spec.add_development_dependency 'rspec', '~> 3.0'
34
+ spec.add_development_dependency 'rubocop', '~> 1.50'
35
+ spec.add_development_dependency 'webmock', '~> 3.23'
31
36
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tolgee_liquid
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Allen He
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-06-01 00:00:00.000000000 Z
11
+ date: 2024-06-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: message_format
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.17'
41
+ - !ruby/object:Gem::Dependency
42
+ name: i18n
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '1.14'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '1.14'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: rake
43
57
  requirement: !ruby/object:Gem::Requirement
@@ -66,6 +80,20 @@ dependencies:
66
80
  - - "~>"
67
81
  - !ruby/object:Gem::Version
68
82
  version: '3.0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rubocop
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '1.50'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '1.50'
69
97
  - !ruby/object:Gem::Dependency
70
98
  name: webmock
71
99
  requirement: !ruby/object:Gem::Requirement
@@ -89,6 +117,8 @@ extra_rdoc_files: []
89
117
  files:
90
118
  - ".gitignore"
91
119
  - ".rspec"
120
+ - ".rubocop.yml"
121
+ - ".ruby-version"
92
122
  - ".travis.yml"
93
123
  - Gemfile
94
124
  - Gemfile.lock
@@ -96,6 +126,7 @@ files:
96
126
  - README.md
97
127
  - Rakefile
98
128
  - bin/console
129
+ - bin/deploy
99
130
  - bin/setup
100
131
  - lib/tolgee_liquid.rb
101
132
  - lib/tolgee_liquid/translate.rb
@@ -114,14 +145,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
114
145
  requirements:
115
146
  - - ">="
116
147
  - !ruby/object:Gem::Version
117
- version: '0'
148
+ version: 2.6.10
118
149
  required_rubygems_version: !ruby/object:Gem::Requirement
119
150
  requirements:
120
151
  - - ">="
121
152
  - !ruby/object:Gem::Version
122
153
  version: '0'
123
154
  requirements: []
124
- rubygems_version: 3.0.3.1
155
+ rubygems_version: 3.1.6
125
156
  signing_key:
126
157
  specification_version: 4
127
158
  summary: Tolgee Integration for Liquid