Class: Egads::Extract
- Includes:
- Thor::Actions
- Defined in:
- lib/egads/command/extract.rb
Instance Attribute Summary collapse
-
#seed_path ⇒ Object
Returns the value of attribute seed_path.
-
#seed_sha ⇒ Object
Returns the value of attribute seed_sha.
Instance Method Summary collapse
Methods inherited from Group
Instance Attribute Details
#seed_path ⇒ Object
Returns the value of attribute seed_path.
9 10 11 |
# File 'lib/egads/command/extract.rb', line 9 def seed_path @seed_path end |
#seed_sha ⇒ Object
Returns the value of attribute seed_sha.
9 10 11 |
# File 'lib/egads/command/extract.rb', line 9 def seed_sha @seed_sha end |
Instance Method Details
#extract ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/egads/command/extract.rb', line 15 def extract if should_extract? # Download_patch do_download(sha, File.join(patch_dir, "#{sha}.tar.gz"), 'patch') do_extract patch_path # If the seed path exists, the patch was build w/ egads <= 4.0 # Newer patch files include the seed seed_pointer = Pathname.new(patch_dir).join("egads-seed") if seed_pointer.exist? # Download seed self.seed_sha = seed_pointer.read.strip self.seed_path = File.join(RemoteConfig.seed_dir, "#{seed_sha}.tar.gz") do_download(seed_sha, seed_path, 'seed') do_extract seed_path apply_patch else say_status :done, 'Patch tarball is complete, no seed to extract.' end finish_extraction else say_status :done, "#{sha} already extracted. Use --force to overwrite" end end |
#setup_environment ⇒ Object
11 12 13 |
# File 'lib/egads/command/extract.rb', line 11 def setup_environment RemoteConfig.setup_environment end |