haml-i18n-extractor 0.0.20 → 0.0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- OTBmMTFhZDE4NTI3ZjQ1ZjlkNjJiMTgxOGZhZjc0ODI4MzM0M2YxOQ==
4
+ NTUxZGE3Mzk4ZWNhNTQ1NmI2ZmYzOGFkNTc0ZDYxMTM3Y2U3NDY3Mw==
5
5
  data.tar.gz: !binary |-
6
- MjVmYTU2MTY3ZjcxMDAzYTM2MjAzZDEzMWM3MmRkNGM1YTVlNzYxYg==
6
+ ZTA1MDJlOWZiZmZjZWFkNTFiZmFjOWE3MWI2YzM4ZGIzZmYzZjA4YQ==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- MWMyMzQyNmQ5YWNiZGUxOWVkYzA1NDdhZjJkYzY2ZWUyYjdjNzk3MjQwNzhk
10
- MmU1MzBjZjkyNjMyMTlhMDcxZTIyNWZhNjNlZGVmM2E0NzNmYjk0NGU1YTUx
11
- YTJlNTFkYTRjOTY1ZmNiZThhODlkMmUyZTQ1NDg1NzRiMjE4M2Y=
9
+ YjJiYzFhZWNiZjhkODQxYTU3YTQ3MzhmYjJiY2I4MDA1ZmJjNzJmNTVhMDZi
10
+ ZGY3ODJlMDc1ZThmM2M1NDJlZWExODZlMzg2YThmMDM2Y2VmZDQ0ZGJlMTU1
11
+ NmYxNWIyNjgyNzJlNzA3N2JmYTJlMDYzZTE5MDYyNDVlMzQwMmE=
12
12
  data.tar.gz: !binary |-
13
- ZTcwMWFiYTI5ZmM0ZmMwNzUyNGU4Y2Y2OTIzZTBjODE1MDUzYmU0MmJhYTYw
14
- ODQ0MzE4YTM3ZjBhZDYxZjU1OTQ4YjRlOTBlYWNkZjdiZjlkYTc4MzJmYTBk
15
- OGVkMTAzMTQ5ZGQ2ZmRkY2VkZmZjNWFmZGJiZjdlMmM2Yjk1NTg=
13
+ MWVhMGQ0ZmIzZTE5NGI3YWMwYjk4YzFmYzQ1OTdmNjBiNjg5NGU4ZDI5Yjkw
14
+ OGY3ODA2ZWFkNTYzM2ZhYTJkNzg2MDYyZjFlMjJhNGM4Njk4NTQyZGVmNDU3
15
+ ZjE4MWY3NjA5YzJmMDRmNzZiODllYTA1MjI5YTcwNDdjNmUxM2E=
data/TODO CHANGED
@@ -3,12 +3,15 @@
3
3
  - Remove the ex1.output ex1.i18n-extractor duplication. (or move to tmp dir): Move to test/tmp a-la the way workflow is working.
4
4
  - Add {} to disallowed characters
5
5
  - Add yaml fixtures and compare those
6
- - admin/bla should be namespaced such as: en.admin.bla vs just en.bla in the yml file?
7
6
  - Refactor tests: split out what is integration vs unit, too much coupling.
8
7
  - Prompter.new should just be a singleton.
9
8
  - rm hax_shit, move to setup/teardown, shutdown/startup
10
9
  - rm the :overwrite, :dump stuff to UserAction?
11
10
 
11
+ * Issues
12
+
13
+ - CLI options: Extractor.new accepts options. pass through workflow. First up: i18n_scope (issue#5)
14
+
12
15
  * Ideas
13
16
 
14
17
  - handled email suffixes (foo.en.html.haml etc)
@@ -5,6 +5,7 @@ require 'haml-i18n-extractor'
5
5
  if ARGV.empty?
6
6
  puts "Usage: <haml-i18n-extractor> --version"
7
7
  puts "Usage: <haml-i18n-extractor> [path]"
8
+ puts "Usage: <haml-i18n-extractor> [filename] --no-prompt"
8
9
  abort
9
10
  end
10
11
 
@@ -13,5 +14,15 @@ if ARGV[0] == "--version"
13
14
  abort
14
15
  end
15
16
 
16
- workflow = Haml::I18n::Extractor::Workflow.new(File.expand_path(ARGV[0]))
17
- workflow.run
17
+ pth = File.expand_path(ARGV[0])
18
+
19
+ if File.directory?(pth)
20
+ workflow = Haml::I18n::Extractor::Workflow.new(pth)
21
+ workflow.run
22
+ elsif File.exists?(pth) && ARGV[1] == "--no-prompt"
23
+ extractor = Haml::I18n::Extractor.new(pth, :type => :overwrite, :prompt_per_line => false)
24
+ extractor.run
25
+ elsif File.exists?(pth)
26
+ extractor = Haml::I18n::Extractor.new(pth, :type => :overwrite, :prompt_per_line => true)
27
+ extractor.run
28
+ end
@@ -1,7 +1,7 @@
1
1
  module Haml
2
2
  module I18n
3
3
  class Extractor
4
- VERSION = "0.0.20"
4
+ VERSION = "0.0.21"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: haml-i18n-extractor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.20
4
+ version: 0.0.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shai Rosenfeld