Class: Rori18n::Generators::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/rori18n/install/install_generator.rb

Instance Method Summary collapse

Instance Method Details

#create_binstubObject



10
11
12
13
# File 'lib/generators/rori18n/install/install_generator.rb', line 10

def create_binstub
  template "binstub.tt", "bin/rori18n"
  chmod "bin/rori18n", 0o755
end


15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/generators/rori18n/install/install_generator.rb', line 15

def print_instructions
  say "\n"
  say "  rori18n installed!", :green
  say "\n"
  say "  Usage:"
  say "    bin/rori18n report --root ."
  say "    bin/rori18n generate --fix --root ."
  say "    bin/rori18n translate --root . --to es,fr"
  say "\n"
  say "  Or via Rake:"
  say "    bundle exec rake rori18n:run ARGS='generate --fix --root .'"
  say "\n"
  say "  The Go binary is cached at ~/.rori18n/bin/ and downloaded on first run."
  say "  Add that path to .gitignore if you don't want it tracked."
  say "\n"
end