i18n_screwdriver 9.3 → 9.4

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
  SHA1:
3
- metadata.gz: 494976232d84a1a9b9e5e5f5375ccd27b10d5c91
4
- data.tar.gz: 9ec2f827751a5874ba7abced143d3294c6aa8c9e
3
+ metadata.gz: 8c793ace9b49c488207c0562c26366522a3ac9a3
4
+ data.tar.gz: 6e7c68c20696295a4b9d6be4f5416d04203f9e7a
5
5
  SHA512:
6
- metadata.gz: 89755396a9bed8a473915f250f0f40af1566a6a0dc895bb0b76e31875ecffdc3ba1a2f1201002ee55310e0cb7b25baf90515dd9dc375a02da3029f3f6468b45c
7
- data.tar.gz: fecced1456e6fabdffe71161ade76c9ed11d226da61e5f5cbf0ca4e6edd6f4ed28a1e8508874c651dd5938e3ef08e2a6bc07e9fc832488b4ac56436a739a711e
6
+ metadata.gz: 014a343a55a9bef2e69754fe267e8ce989af1cbde36c362cb945f3318f989040cacc55907fb08025d1b8409263ae8a880f3d05ed33d3d8666cdad09d59441dd9
7
+ data.tar.gz: 9f9515957528dcfa2d2884edc595eb0faa81a839eeba1493b0558bb6c12437b46aa8b1267d16863f3cb2f646a60aabea5f7ffca26323a97a00f5754878a191e1
@@ -6,6 +6,12 @@ require "i18n_screwdriver/rails"
6
6
  module I18nScrewdriver
7
7
  Error = Class.new(StandardError)
8
8
 
9
+ class << self
10
+ attr_accessor :excluded_paths
11
+ end
12
+
13
+ self.excluded_paths = [%r{^tmp/}, %r{^node_modules/}]
14
+
9
15
  def self.filename_for_locale(locale)
10
16
  File.join("config", "locales", "application.#{locale}.yml")
11
17
  end
@@ -93,12 +99,18 @@ module I18nScrewdriver
93
99
  end
94
100
  end
95
101
 
102
+ def self.excluded_path?(path)
103
+ excluded_paths.detect{ |excluded_path| path =~ excluded_path }
104
+ end
105
+
96
106
  def self.gather_translations
97
107
  texts = []
98
108
  symbols = []
99
109
 
100
110
  Dir.glob("**/*.{haml,erb,slim,rb}").each do |file|
101
111
  next unless File.file?(file)
112
+ next if excluded_path?(file)
113
+ puts "Scanning #{file}..."
102
114
  input = File.read(file)
103
115
  texts.concat(grab_texts_to_be_translated(input))
104
116
  symbols.concat(grab_symbols_to_be_translated(input))
@@ -106,6 +118,8 @@ module I18nScrewdriver
106
118
 
107
119
  Dir.glob("**/*.{js,coffee,hamlc,ejs,erb}").each do |file|
108
120
  next unless File.file?(file)
121
+ next if excluded_path?(file)
122
+ puts "Scanning #{file}..."
109
123
  input = File.read(file)
110
124
  texts.concat(grab_js_texts_to_be_translated(input))
111
125
  end
@@ -1,3 +1,3 @@
1
1
  module I18nScrewdriver
2
- VERSION = "9.3"
2
+ VERSION = "9.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: i18n_screwdriver
3
3
  version: !ruby/object:Gem::Version
4
- version: '9.3'
4
+ version: '9.4'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tobias Miesel
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-04-26 00:00:00.000000000 Z
12
+ date: 2017-11-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
@@ -103,7 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
103
103
  version: '0'
104
104
  requirements: []
105
105
  rubyforge_project: i18n_screwdriver
106
- rubygems_version: 2.6.6
106
+ rubygems_version: 2.6.14
107
107
  signing_key:
108
108
  specification_version: 4
109
109
  summary: make translating with rails i18n fun again