Class: Stratosphere::Generators::InstallGenerator

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#bucketObject

Returns the value of attribute bucket.



4
5
6
# File 'lib/generators/stratosphere/install/install_generator.rb', line 4

def bucket
  @bucket
end

#keyObject

Returns the value of attribute key.



4
5
6
# File 'lib/generators/stratosphere/install/install_generator.rb', line 4

def key
  @key
end

#secretObject

Returns the value of attribute secret.



4
5
6
# File 'lib/generators/stratosphere/install/install_generator.rb', line 4

def secret
  @secret
end

Instance Method Details

#create_initializerObject



16
17
18
# File 'lib/generators/stratosphere/install/install_generator.rb', line 16

def create_initializer
  template 'lib/generators/stratosphere/install/templates/stratosphere.rb.erb', 'config/initializers/stratosphere.rb'
end

#create_viewsObject



20
21
22
23
# File 'lib/generators/stratosphere/install/install_generator.rb', line 20

def create_views
  copy_file 'app/views/_attachment_field.html.erb', 'app/views/stratosphere/_attachment_field.html.erb'
  copy_file 'app/assets/javascripts/stratosphere/stratosphere.bundled.min.js', 'vendor/assets/javascripts/stratosphere.bundled.min.js'
end

#set_optionsObject



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

def set_options
  STDOUT.flush
  print 'What is your S3 bucket name?: '
  @bucket = gets.chomp
end