diff --git a/Rakefile b/Rakefile index 05fb845..1a7d1a8 100644 --- a/Rakefile +++ b/Rakefile @@ -14,7 +14,7 @@ RSpec::Core::RakeTask.new :spec do |task| task.rspec_opts = '--format documentation' end -Distrubution.configure do |config| +Distribution.configure do |config| config.package_name = 'octodown' config.version = Octodown::VERSION config.rb_version = '20141215-2.1.5' diff --git a/tasks/distrubution/configuration.rb b/tasks/distrubution/configuration.rb index a18a497..80ce927 100644 --- a/tasks/distrubution/configuration.rb +++ b/tasks/distrubution/configuration.rb @@ -1,4 +1,4 @@ -module Distrubution +module Distribution class << self attr_accessor :configuration end diff --git a/tasks/distrubution/executable.rb b/tasks/distrubution/executable.rb index 4341207..f5c0d07 100644 --- a/tasks/distrubution/executable.rb +++ b/tasks/distrubution/executable.rb @@ -1,6 +1,6 @@ Dir[File.join(Dir.pwd, 'tasks', '**', '*.rb')].each { |f| require f } -module Distrubution +module Distribution class Executable attr_reader :package @@ -21,7 +21,7 @@ def copy_wrapper FileUtils.cp( 'packaging/wrapper.sh', - "#{package.dir}/#{Distrubution.configuration.package_name}" + "#{package.dir}/#{Distribution.configuration.package_name}" ) end end diff --git a/tasks/distrubution/package.rb b/tasks/distrubution/package.rb index 8b8c32b..3fff13b 100644 --- a/tasks/distrubution/package.rb +++ b/tasks/distrubution/package.rb @@ -3,7 +3,7 @@ Dir[File.join(Dir.pwd, 'tasks', '**', '*.rb')].each { |f| require f } -module Distrubution +module Distribution class Package include PackageHelpers @@ -13,9 +13,9 @@ def initialize(arch) abort 'Ruby 2.1.x required' if RUBY_VERSION !~ /^2\.1\./ @arch = arch - @version = Distrubution.configuration.version - @rb_version = Distrubution.configuration.rb_version - @dir = "#{Distrubution.configuration.package_name}-" \ + @version = Distribution.configuration.version + @rb_version = Distribution.configuration.rb_version + @dir = "#{Distribution.configuration.package_name}-" \ "#{version}-#{arch}" @package = self end @@ -40,7 +40,7 @@ def post_cleanup print_to_console 'Cleaning up...' files = [ - "#{Distrubution.configuration.packaging_dir}/" \ + "#{Distribution.configuration.packaging_dir}/" \ "traveling-ruby-#{rb_version}-#{arch}.tar.gz" ] diff --git a/tasks/distrubution/package_helpers.rb b/tasks/distrubution/package_helpers.rb index 3a35a20..a7f5600 100644 --- a/tasks/distrubution/package_helpers.rb +++ b/tasks/distrubution/package_helpers.rb @@ -1,4 +1,4 @@ -module Distrubution +module Distribution module PackageHelpers def curl(file) system "curl -L -O --fail --silent #{file}" diff --git a/tasks/distrubution/release.rb b/tasks/distrubution/release.rb index 487679a..05d4bce 100644 --- a/tasks/distrubution/release.rb +++ b/tasks/distrubution/release.rb @@ -3,7 +3,7 @@ require 'octokit' require 'pathname' -module Distrubution +module Distribution class Release attr_reader :tarball, :github, :package diff --git a/tasks/distrubution/tarball.rb b/tasks/distrubution/tarball.rb index 8026e9c..254e22d 100644 --- a/tasks/distrubution/tarball.rb +++ b/tasks/distrubution/tarball.rb @@ -1,6 +1,6 @@ Dir[File.join(Dir.pwd, 'tasks', '**', '*.rb')].each { |f| require f } -module Distrubution +module Distribution class Tarball attr_accessor :arch, :file, :version, :dir, :package diff --git a/tasks/distrubution/travelling_ruby.rb b/tasks/distrubution/travelling_ruby.rb index e081a69..392e31f 100644 --- a/tasks/distrubution/travelling_ruby.rb +++ b/tasks/distrubution/travelling_ruby.rb @@ -1,6 +1,6 @@ Dir[File.join(Dir.pwd, 'tasks', '**', '*.rb')].each { |f| require f } -module Distrubution +module Distribution class TravellingRuby attr_reader :package @@ -45,7 +45,7 @@ def download_runtime print_to_console 'Downloading Ruby...' ruby = "traveling-ruby-#{package.rb_version}-#{package.arch}.tar.gz" - FileUtils.cd Distrubution.configuration.packaging_dir do + FileUtils.cd Distribution.configuration.packaging_dir do unless File.exist? ruby curl "http://d6r77u77i8pq3.cloudfront.net/releases/#{ruby}" end diff --git a/tasks/package.rake b/tasks/package.rake index b47f5d4..4e38967 100644 --- a/tasks/package.rake +++ b/tasks/package.rake @@ -1,4 +1,4 @@ -include Distrubution +include Distribution desc 'Package octodown into self-contained programs' task :package do diff --git a/tasks/upload.rake b/tasks/upload.rake index 6782cec..16fc773 100644 --- a/tasks/upload.rake +++ b/tasks/upload.rake @@ -1,4 +1,4 @@ -include Distrubution +include Distribution desc 'Upload tarballs to GitHub' task :upload do