puttext-rails 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +50 -0
- data/.rubocop.yml +30 -0
- data/.ruby-version +1 -0
- data/.travis.yml +16 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +116 -0
- data/LICENSE +21 -0
- data/README.md +57 -0
- data/Rakefile +8 -0
- data/lib/puttext-rails.rb +9 -0
- data/lib/puttext-rails/extractor.rb +64 -0
- data/lib/puttext-rails/railtie.rb +11 -0
- data/lib/tasks/puttext-rails.rake +17 -0
- data/puttext-rails.gemspec +36 -0
- data/spec/spec_helper.rb +11 -0
- data/spec/unit/extractor_spec.rb +84 -0
- metadata +197 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 11e9982df0995678d310dc8d6669db2b9a8cc933
|
4
|
+
data.tar.gz: 898dad4aa2bf916a4c52f6869c663227de7e532c
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 3c3f7262d39854e899fc06a96df569dd7ba33e19339eb7de1d1d3a1e042fe04606697bf3489739dd0624a350681184c05f7e948810476c3f06378120e5200750
|
7
|
+
data.tar.gz: 8b142333f0a41a01acc93abeeec8cf28110f2da2149fa879cedd07c11ebc3b7e08030a027d4313542412a8b3e21e5ef3b6eaec0600d2e25a4b435637cf0c53fe
|
data/.gitignore
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
/.config
|
4
|
+
/coverage/
|
5
|
+
/InstalledFiles
|
6
|
+
/pkg/
|
7
|
+
/spec/reports/
|
8
|
+
/spec/examples.txt
|
9
|
+
/test/tmp/
|
10
|
+
/test/version_tmp/
|
11
|
+
/tmp/
|
12
|
+
|
13
|
+
# Used by dotenv library to load environment variables.
|
14
|
+
# .env
|
15
|
+
|
16
|
+
## Specific to RubyMotion:
|
17
|
+
.dat*
|
18
|
+
.repl_history
|
19
|
+
build/
|
20
|
+
*.bridgesupport
|
21
|
+
build-iPhoneOS/
|
22
|
+
build-iPhoneSimulator/
|
23
|
+
|
24
|
+
## Specific to RubyMotion (use of CocoaPods):
|
25
|
+
#
|
26
|
+
# We recommend against adding the Pods directory to your .gitignore. However
|
27
|
+
# you should judge for yourself, the pros and cons are mentioned at:
|
28
|
+
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
|
29
|
+
#
|
30
|
+
# vendor/Pods/
|
31
|
+
|
32
|
+
## Documentation cache and generated files:
|
33
|
+
/.yardoc/
|
34
|
+
/_yardoc/
|
35
|
+
/doc/
|
36
|
+
/rdoc/
|
37
|
+
|
38
|
+
## Environment normalization:
|
39
|
+
/.bundle/
|
40
|
+
/vendor/bundle
|
41
|
+
/lib/bundler/man/
|
42
|
+
|
43
|
+
# for a library or gem, you might want to ignore these files since the code is
|
44
|
+
# intended to run in multiple environments; otherwise, check them in:
|
45
|
+
# Gemfile.lock
|
46
|
+
# .ruby-version
|
47
|
+
# .ruby-gemset
|
48
|
+
|
49
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
50
|
+
.rvmrc
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
# This is the configuration used to check the rubocop source code.
|
2
|
+
|
3
|
+
AllCops:
|
4
|
+
Exclude:
|
5
|
+
- 'spec/fixtures/**/*'
|
6
|
+
TargetRubyVersion: 2.0
|
7
|
+
|
8
|
+
Documentation:
|
9
|
+
Enabled: false
|
10
|
+
|
11
|
+
Metrics/BlockLength:
|
12
|
+
Exclude:
|
13
|
+
- 'spec/**/*.rb'
|
14
|
+
|
15
|
+
Metrics/ClassLength:
|
16
|
+
Max: 150
|
17
|
+
|
18
|
+
Metrics/ModuleLength:
|
19
|
+
Exclude:
|
20
|
+
- 'spec/**/*.rb'
|
21
|
+
|
22
|
+
Style/EndOfLine:
|
23
|
+
Enabled: false
|
24
|
+
|
25
|
+
Style/NumericPredicate:
|
26
|
+
EnforcedStyle: comparison
|
27
|
+
|
28
|
+
Style/FileName:
|
29
|
+
Exclude:
|
30
|
+
- lib/puttext-rails.rb
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.4.0
|
data/.travis.yml
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
language: ruby
|
2
|
+
|
3
|
+
addons:
|
4
|
+
code_climate:
|
5
|
+
repo_token: 123c6c222f854357832855a68eb7e1e43e7a286dc9cecef556f8729ca062141d
|
6
|
+
|
7
|
+
after_success:
|
8
|
+
- bundle exec codeclimate-test-reporter
|
9
|
+
|
10
|
+
notifications:
|
11
|
+
email: false
|
12
|
+
|
13
|
+
rvm:
|
14
|
+
- 2.2.7
|
15
|
+
- 2.3.4
|
16
|
+
- 2.4.1
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,116 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
puttext-rails (0.0.1)
|
5
|
+
puttext (>= 0.2.1, < 1)
|
6
|
+
railties (>= 5.0, < 6)
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://rubygems.org/
|
10
|
+
specs:
|
11
|
+
actionpack (5.1.1)
|
12
|
+
actionview (= 5.1.1)
|
13
|
+
activesupport (= 5.1.1)
|
14
|
+
rack (~> 2.0)
|
15
|
+
rack-test (~> 0.6.3)
|
16
|
+
rails-dom-testing (~> 2.0)
|
17
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
18
|
+
actionview (5.1.1)
|
19
|
+
activesupport (= 5.1.1)
|
20
|
+
builder (~> 3.1)
|
21
|
+
erubi (~> 1.4)
|
22
|
+
rails-dom-testing (~> 2.0)
|
23
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
24
|
+
activesupport (5.1.1)
|
25
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
26
|
+
i18n (~> 0.7)
|
27
|
+
minitest (~> 5.1)
|
28
|
+
tzinfo (~> 1.1)
|
29
|
+
ast (2.3.0)
|
30
|
+
builder (3.2.3)
|
31
|
+
codeclimate-test-reporter (1.0.8)
|
32
|
+
simplecov (<= 0.13)
|
33
|
+
concurrent-ruby (1.0.5)
|
34
|
+
diff-lcs (1.3)
|
35
|
+
docile (1.1.5)
|
36
|
+
erubi (1.6.0)
|
37
|
+
i18n (0.8.4)
|
38
|
+
json (2.1.0)
|
39
|
+
loofah (2.0.3)
|
40
|
+
nokogiri (>= 1.5.9)
|
41
|
+
method_source (0.8.2)
|
42
|
+
mini_portile2 (2.2.0)
|
43
|
+
minitest (5.10.2)
|
44
|
+
nokogiri (1.8.0)
|
45
|
+
mini_portile2 (~> 2.2.0)
|
46
|
+
parser (2.4.0.0)
|
47
|
+
ast (~> 2.2)
|
48
|
+
powerpack (0.1.1)
|
49
|
+
puttext (0.2.1)
|
50
|
+
parser (>= 2.4.0.0, < 3.0)
|
51
|
+
unindent
|
52
|
+
rack (2.0.3)
|
53
|
+
rack-test (0.6.3)
|
54
|
+
rack (>= 1.0)
|
55
|
+
rails-dom-testing (2.0.3)
|
56
|
+
activesupport (>= 4.2.0)
|
57
|
+
nokogiri (>= 1.6)
|
58
|
+
rails-html-sanitizer (1.0.3)
|
59
|
+
loofah (~> 2.0)
|
60
|
+
railties (5.1.1)
|
61
|
+
actionpack (= 5.1.1)
|
62
|
+
activesupport (= 5.1.1)
|
63
|
+
method_source
|
64
|
+
rake (>= 0.8.7)
|
65
|
+
thor (>= 0.18.1, < 2.0)
|
66
|
+
rainbow (2.2.2)
|
67
|
+
rake
|
68
|
+
rake (12.0.0)
|
69
|
+
rspec (3.6.0)
|
70
|
+
rspec-core (~> 3.6.0)
|
71
|
+
rspec-expectations (~> 3.6.0)
|
72
|
+
rspec-mocks (~> 3.6.0)
|
73
|
+
rspec-core (3.6.0)
|
74
|
+
rspec-support (~> 3.6.0)
|
75
|
+
rspec-expectations (3.6.0)
|
76
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
77
|
+
rspec-support (~> 3.6.0)
|
78
|
+
rspec-mocks (3.6.0)
|
79
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
80
|
+
rspec-support (~> 3.6.0)
|
81
|
+
rspec-support (3.6.0)
|
82
|
+
rubocop (0.46.0)
|
83
|
+
parser (>= 2.3.1.1, < 3.0)
|
84
|
+
powerpack (~> 0.1)
|
85
|
+
rainbow (>= 1.99.1, < 3.0)
|
86
|
+
ruby-progressbar (~> 1.7)
|
87
|
+
unicode-display_width (~> 1.0, >= 1.0.1)
|
88
|
+
ruby-progressbar (1.8.1)
|
89
|
+
simplecov (0.13.0)
|
90
|
+
docile (~> 1.1.0)
|
91
|
+
json (>= 1.8, < 3)
|
92
|
+
simplecov-html (~> 0.10.0)
|
93
|
+
simplecov-html (0.10.1)
|
94
|
+
thor (0.19.4)
|
95
|
+
thread_safe (0.3.6)
|
96
|
+
timecop (0.8.1)
|
97
|
+
tzinfo (1.2.3)
|
98
|
+
thread_safe (~> 0.1)
|
99
|
+
unicode-display_width (1.2.1)
|
100
|
+
unindent (1.0)
|
101
|
+
|
102
|
+
PLATFORMS
|
103
|
+
ruby
|
104
|
+
|
105
|
+
DEPENDENCIES
|
106
|
+
codeclimate-test-reporter (~> 1.0.0)
|
107
|
+
puttext-rails!
|
108
|
+
rake
|
109
|
+
rspec (~> 3.5)
|
110
|
+
rubocop (~> 0.46.0)
|
111
|
+
simplecov
|
112
|
+
timecop
|
113
|
+
unindent
|
114
|
+
|
115
|
+
BUNDLED WITH
|
116
|
+
1.15.1
|
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2017 Mantas Norvaiša
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,57 @@
|
|
1
|
+
# puttext-rails
|
2
|
+
|
3
|
+
Rails integrations for the puttext gem (https://github/mntnorv/puttext).
|
4
|
+
|
5
|
+
What this provides for Rails applications, compared to the plain Ruby gem:
|
6
|
+
- Simplified usage.
|
7
|
+
- Extracts validation error messages from Rails validator and all used gems.
|
8
|
+
|
9
|
+
## Installation
|
10
|
+
|
11
|
+
Add it to your `Gemfile`:
|
12
|
+
```ruby
|
13
|
+
group :development do
|
14
|
+
# Other development gems
|
15
|
+
# ...
|
16
|
+
|
17
|
+
gem 'puttext-rails'
|
18
|
+
end
|
19
|
+
```
|
20
|
+
|
21
|
+
## Usage
|
22
|
+
|
23
|
+
Just run the `puttext:extract` rake task in your Rails root directory:
|
24
|
+
```bash
|
25
|
+
$ rake puttext:extract
|
26
|
+
```
|
27
|
+
|
28
|
+
The translations will be saved in `config/locale/template.pot`. For example:
|
29
|
+
```po
|
30
|
+
#: ./app/views/hello_world/index.slim:8
|
31
|
+
msgid "Hello world!"
|
32
|
+
msgstr ""
|
33
|
+
```
|
34
|
+
|
35
|
+
## Contributing
|
36
|
+
|
37
|
+
Before submitting an Issue or Pull Request always check if your issue is already being discussed or if someone has already submitted a pull request with the feature you want to add. Also, before doing bigger changes, it's always good to discuss the changes you're going to make in an Issue.
|
38
|
+
|
39
|
+
### Code style
|
40
|
+
|
41
|
+
PutText::Rails uses RuboCop (https://github.com/bbatsov/rubocop) to check and enforce code style. Before submitting a pull request, make sure that RuboCop does not find any offenses.
|
42
|
+
|
43
|
+
#### Running RuboCop
|
44
|
+
|
45
|
+
```bash
|
46
|
+
$ bundle exec rubocop
|
47
|
+
```
|
48
|
+
|
49
|
+
### Testing
|
50
|
+
|
51
|
+
PutText::Rails uses RSpec (http://rspec.info/) for testing. Pull requests with Ruby code changes must include RSpec tests that check the new functionality or changed code. Also, make sure that your changes do not break any existing tests.
|
52
|
+
|
53
|
+
#### Running RSpec
|
54
|
+
|
55
|
+
```bash
|
56
|
+
$ bundle exec rspec
|
57
|
+
```
|
data/Rakefile
ADDED
@@ -0,0 +1,64 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'puttext'
|
4
|
+
require 'rails'
|
5
|
+
|
6
|
+
module PutText
|
7
|
+
module Rails
|
8
|
+
class Extractor
|
9
|
+
# Extract string from the Rails project this gem is included in.
|
10
|
+
# @return [POFile] a POFile object containing the extracted strings.
|
11
|
+
def extract
|
12
|
+
puttext_extractor = PutText::Extractor.new
|
13
|
+
po_file = puttext_extractor.extract(root_path)
|
14
|
+
|
15
|
+
errors_file = extract_errors
|
16
|
+
po_file.merge(errors_file)
|
17
|
+
|
18
|
+
po_file
|
19
|
+
end
|
20
|
+
|
21
|
+
private
|
22
|
+
|
23
|
+
def root_path
|
24
|
+
::Rails.root.relative_path_from(Pathname.new(Dir.pwd))
|
25
|
+
end
|
26
|
+
|
27
|
+
def extract_errors
|
28
|
+
entries = i18n_error_messages.map do |_key, value|
|
29
|
+
create_entry_from_translation(value)
|
30
|
+
end
|
31
|
+
|
32
|
+
POFile.new(entries)
|
33
|
+
end
|
34
|
+
|
35
|
+
def i18n_error_messages
|
36
|
+
i18n_backend = I18n.backend
|
37
|
+
|
38
|
+
unless i18n_backend.is_a? I18n::Backend::Simple
|
39
|
+
raise 'only I18n::Backend::Simple is supported'
|
40
|
+
end
|
41
|
+
|
42
|
+
i18n_backend.available_locales # Force I18n to load translations
|
43
|
+
|
44
|
+
translations = i18n_backend.send(:translations)
|
45
|
+
translations.fetch(I18n.default_locale, {})
|
46
|
+
.fetch(:errors, {})
|
47
|
+
.fetch(:messages, {})
|
48
|
+
end
|
49
|
+
|
50
|
+
def create_entry_from_translation(translation)
|
51
|
+
case translation
|
52
|
+
when String
|
53
|
+
POEntry.new(msgctxt: PutText::Rails::MSG_CONTEXT, msgid: translation)
|
54
|
+
when Hash
|
55
|
+
POEntry.new(
|
56
|
+
msgctxt: PutText::Rails::MSG_CONTEXT,
|
57
|
+
msgid: translation[:one] || translation[:other],
|
58
|
+
msgid_plural: translation[:other]
|
59
|
+
)
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'puttext-rails/extractor'
|
4
|
+
|
5
|
+
namespace :puttext do
|
6
|
+
desc 'Extract strings from source to config/locales/template.pot'
|
7
|
+
task extract: :environment do
|
8
|
+
locales_path = ::Rails.root.join('config/locales')
|
9
|
+
template_path = File.join(locales_path, 'template.pot')
|
10
|
+
|
11
|
+
po_file = PutText::Rails::Extractor.new.extract
|
12
|
+
|
13
|
+
File.open(template_path, 'w') do |f|
|
14
|
+
po_file.write_to(f)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'date'
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = 'puttext-rails'
|
7
|
+
s.version = '0.0.1'
|
8
|
+
s.date = Date.today.to_s
|
9
|
+
s.summary = 'Extract gettext strings from a Rails application'
|
10
|
+
s.authors = ['Mantas Norvaiša']
|
11
|
+
s.email = 'mntnorv@gmail.com'
|
12
|
+
s.homepage = 'https://github.com/mntnorv/puttext-rails'
|
13
|
+
s.license = 'MIT'
|
14
|
+
|
15
|
+
s.files = `git ls-files`.split
|
16
|
+
s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
17
|
+
s.require_paths = ['lib']
|
18
|
+
|
19
|
+
s.required_ruby_version = '>= 2.2.2'
|
20
|
+
|
21
|
+
s.add_runtime_dependency('puttext', '>= 0.2.1', '< 1')
|
22
|
+
s.add_runtime_dependency('railties', '>= 5.0', '< 6')
|
23
|
+
|
24
|
+
# Tools
|
25
|
+
s.add_development_dependency('rake')
|
26
|
+
|
27
|
+
# Testing
|
28
|
+
s.add_development_dependency('rspec', '~> 3.5')
|
29
|
+
s.add_development_dependency('unindent')
|
30
|
+
s.add_development_dependency('timecop')
|
31
|
+
|
32
|
+
# Linters and code policies
|
33
|
+
s.add_development_dependency('rubocop', '~> 0.46.0')
|
34
|
+
s.add_development_dependency('simplecov')
|
35
|
+
s.add_development_dependency('codeclimate-test-reporter', '~> 1.0.0')
|
36
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,84 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
require 'fileutils'
|
5
|
+
require 'puttext-rails/extractor'
|
6
|
+
|
7
|
+
describe PutText::Rails::Extractor do
|
8
|
+
describe '#extract' do
|
9
|
+
before do
|
10
|
+
FileUtils.mkdir_p('/tmp/puttext-rails/config/locales')
|
11
|
+
|
12
|
+
allow(Rails).to receive(:root).and_return(
|
13
|
+
Pathname.new('/tmp/puttext-rails')
|
14
|
+
)
|
15
|
+
|
16
|
+
Timecop.freeze(Time.utc(2017))
|
17
|
+
Time.zone = 'UTC'
|
18
|
+
end
|
19
|
+
|
20
|
+
after do
|
21
|
+
Timecop.return
|
22
|
+
end
|
23
|
+
|
24
|
+
let(:extracted_entries) { subject.extract.entries }
|
25
|
+
|
26
|
+
context 'I18n backend is I18n::Backend::Simple' do
|
27
|
+
let(:backend) { I18n::Backend::Simple.new }
|
28
|
+
|
29
|
+
before { allow(I18n).to receive(:backend).and_return(backend) }
|
30
|
+
|
31
|
+
context 'Backend has translations for validation errors' do
|
32
|
+
before do
|
33
|
+
allow(backend).to receive(:translations).and_return(
|
34
|
+
en: {
|
35
|
+
errors: {
|
36
|
+
messages: {
|
37
|
+
message_1: 'Something is invalid',
|
38
|
+
message_2: {
|
39
|
+
one: '1 error occurred',
|
40
|
+
other: '%{count} errors occurred'
|
41
|
+
}
|
42
|
+
}
|
43
|
+
}
|
44
|
+
}
|
45
|
+
)
|
46
|
+
end
|
47
|
+
|
48
|
+
it 'returns POFile with the extracted error messages' do
|
49
|
+
expect(extracted_entries).to contain_exactly(
|
50
|
+
PutText::POEntry.new(
|
51
|
+
msgctxt: 'Validation error',
|
52
|
+
msgid: 'Something is invalid'
|
53
|
+
),
|
54
|
+
PutText::POEntry.new(
|
55
|
+
msgctxt: 'Validation error',
|
56
|
+
msgid: '1 error occurred',
|
57
|
+
msgid_plural: '%{count} errors occurred'
|
58
|
+
)
|
59
|
+
)
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
context 'Backend doesn\'t have validation error translations' do
|
64
|
+
before { allow(backend).to receive(:translations).and_return({}) }
|
65
|
+
|
66
|
+
it 'returns empty POFile' do
|
67
|
+
expect(extracted_entries).to eq []
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
context 'I18n backed is not a I18n::Backend::Simple' do
|
73
|
+
let(:backend) { double('Unsupported backend') }
|
74
|
+
|
75
|
+
before { allow(I18n).to receive(:backend).and_return(backend) }
|
76
|
+
|
77
|
+
it 'raises an error' do
|
78
|
+
expect { subject.extract }.to raise_error(
|
79
|
+
'only I18n::Backend::Simple is supported'
|
80
|
+
)
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
metadata
ADDED
@@ -0,0 +1,197 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: puttext-rails
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Mantas Norvaiša
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-06-06 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: puttext
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.2.1
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '1'
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 0.2.1
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '1'
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: railties
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - ">="
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '5.0'
|
40
|
+
- - "<"
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: '6'
|
43
|
+
type: :runtime
|
44
|
+
prerelease: false
|
45
|
+
version_requirements: !ruby/object:Gem::Requirement
|
46
|
+
requirements:
|
47
|
+
- - ">="
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '5.0'
|
50
|
+
- - "<"
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: '6'
|
53
|
+
- !ruby/object:Gem::Dependency
|
54
|
+
name: rake
|
55
|
+
requirement: !ruby/object:Gem::Requirement
|
56
|
+
requirements:
|
57
|
+
- - ">="
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: '0'
|
60
|
+
type: :development
|
61
|
+
prerelease: false
|
62
|
+
version_requirements: !ruby/object:Gem::Requirement
|
63
|
+
requirements:
|
64
|
+
- - ">="
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: '0'
|
67
|
+
- !ruby/object:Gem::Dependency
|
68
|
+
name: rspec
|
69
|
+
requirement: !ruby/object:Gem::Requirement
|
70
|
+
requirements:
|
71
|
+
- - "~>"
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: '3.5'
|
74
|
+
type: :development
|
75
|
+
prerelease: false
|
76
|
+
version_requirements: !ruby/object:Gem::Requirement
|
77
|
+
requirements:
|
78
|
+
- - "~>"
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
version: '3.5'
|
81
|
+
- !ruby/object:Gem::Dependency
|
82
|
+
name: unindent
|
83
|
+
requirement: !ruby/object:Gem::Requirement
|
84
|
+
requirements:
|
85
|
+
- - ">="
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: '0'
|
88
|
+
type: :development
|
89
|
+
prerelease: false
|
90
|
+
version_requirements: !ruby/object:Gem::Requirement
|
91
|
+
requirements:
|
92
|
+
- - ">="
|
93
|
+
- !ruby/object:Gem::Version
|
94
|
+
version: '0'
|
95
|
+
- !ruby/object:Gem::Dependency
|
96
|
+
name: timecop
|
97
|
+
requirement: !ruby/object:Gem::Requirement
|
98
|
+
requirements:
|
99
|
+
- - ">="
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '0'
|
102
|
+
type: :development
|
103
|
+
prerelease: false
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
requirements:
|
106
|
+
- - ">="
|
107
|
+
- !ruby/object:Gem::Version
|
108
|
+
version: '0'
|
109
|
+
- !ruby/object:Gem::Dependency
|
110
|
+
name: rubocop
|
111
|
+
requirement: !ruby/object:Gem::Requirement
|
112
|
+
requirements:
|
113
|
+
- - "~>"
|
114
|
+
- !ruby/object:Gem::Version
|
115
|
+
version: 0.46.0
|
116
|
+
type: :development
|
117
|
+
prerelease: false
|
118
|
+
version_requirements: !ruby/object:Gem::Requirement
|
119
|
+
requirements:
|
120
|
+
- - "~>"
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: 0.46.0
|
123
|
+
- !ruby/object:Gem::Dependency
|
124
|
+
name: simplecov
|
125
|
+
requirement: !ruby/object:Gem::Requirement
|
126
|
+
requirements:
|
127
|
+
- - ">="
|
128
|
+
- !ruby/object:Gem::Version
|
129
|
+
version: '0'
|
130
|
+
type: :development
|
131
|
+
prerelease: false
|
132
|
+
version_requirements: !ruby/object:Gem::Requirement
|
133
|
+
requirements:
|
134
|
+
- - ">="
|
135
|
+
- !ruby/object:Gem::Version
|
136
|
+
version: '0'
|
137
|
+
- !ruby/object:Gem::Dependency
|
138
|
+
name: codeclimate-test-reporter
|
139
|
+
requirement: !ruby/object:Gem::Requirement
|
140
|
+
requirements:
|
141
|
+
- - "~>"
|
142
|
+
- !ruby/object:Gem::Version
|
143
|
+
version: 1.0.0
|
144
|
+
type: :development
|
145
|
+
prerelease: false
|
146
|
+
version_requirements: !ruby/object:Gem::Requirement
|
147
|
+
requirements:
|
148
|
+
- - "~>"
|
149
|
+
- !ruby/object:Gem::Version
|
150
|
+
version: 1.0.0
|
151
|
+
description:
|
152
|
+
email: mntnorv@gmail.com
|
153
|
+
executables: []
|
154
|
+
extensions: []
|
155
|
+
extra_rdoc_files: []
|
156
|
+
files:
|
157
|
+
- ".gitignore"
|
158
|
+
- ".rubocop.yml"
|
159
|
+
- ".ruby-version"
|
160
|
+
- ".travis.yml"
|
161
|
+
- Gemfile
|
162
|
+
- Gemfile.lock
|
163
|
+
- LICENSE
|
164
|
+
- README.md
|
165
|
+
- Rakefile
|
166
|
+
- lib/puttext-rails.rb
|
167
|
+
- lib/puttext-rails/extractor.rb
|
168
|
+
- lib/puttext-rails/railtie.rb
|
169
|
+
- lib/tasks/puttext-rails.rake
|
170
|
+
- puttext-rails.gemspec
|
171
|
+
- spec/spec_helper.rb
|
172
|
+
- spec/unit/extractor_spec.rb
|
173
|
+
homepage: https://github.com/mntnorv/puttext-rails
|
174
|
+
licenses:
|
175
|
+
- MIT
|
176
|
+
metadata: {}
|
177
|
+
post_install_message:
|
178
|
+
rdoc_options: []
|
179
|
+
require_paths:
|
180
|
+
- lib
|
181
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
182
|
+
requirements:
|
183
|
+
- - ">="
|
184
|
+
- !ruby/object:Gem::Version
|
185
|
+
version: 2.2.2
|
186
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
187
|
+
requirements:
|
188
|
+
- - ">="
|
189
|
+
- !ruby/object:Gem::Version
|
190
|
+
version: '0'
|
191
|
+
requirements: []
|
192
|
+
rubyforge_project:
|
193
|
+
rubygems_version: 2.6.8
|
194
|
+
signing_key:
|
195
|
+
specification_version: 4
|
196
|
+
summary: Extract gettext strings from a Rails application
|
197
|
+
test_files: []
|