Class: ReactRailsWebpack::NewForkGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- ReactRailsWebpack::NewForkGenerator
- Defined in:
- lib/react_rails_webpack/new_fork_generator.rb
Instance Method Summary collapse
Instance Method Details
#copy_environment_json_file ⇒ Object
10 11 12 13 14 |
# File 'lib/react_rails_webpack/new_fork_generator.rb', line 10 def copy_environment_json_file inside 'client' do copy_file 'environment.json' end end |
#set_environment_hostname ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/react_rails_webpack/new_fork_generator.rb', line 16 def set_environment_hostname localhost_name = `scutil --get LocalHostName`.strip puts "Setting localhost name to #{localhost_name}..." gsub_file 'client/environment.json', /<<<LOCALHOST_NAME>>>/, localhost_name end |