Skip to content
This repository has been archived by the owner on Oct 22, 2020. It is now read-only.

Commit

Permalink
Remove namespaces file, clean up env
Browse files Browse the repository at this point in the history
  • Loading branch information
rastating committed Nov 26, 2016
1 parent 94aef4c commit 8f4f21c
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 53 deletions.
42 changes: 8 additions & 34 deletions env.rb
@@ -1,3 +1,11 @@
require 'colorize'
require 'date'
require 'json'
require 'require_all'
require 'time'
require 'typhoeus'
require 'zip'

wpxfbase = __FILE__

while File.symlink?(wpxfbase)
Expand All @@ -9,45 +17,11 @@
$LOAD_PATH.unshift(File.join(app_path, 'lib'))
$LOAD_PATH.unshift(File.join(app_path, 'modules'))

require 'colorize'
require 'date'
require 'json'
require 'require_all'
require 'time'
require 'typhoeus'
require 'zip'

require 'wpxf/core'
require 'wpxf/utility/body_builder'
require 'wpxf/utility/text'
require 'wpxf/utility/reference_inflater'

require_relative 'github_updater'

module Wpxf
def self.data_directory=(val)
@@data_directory = val
end

def self.data_directory
@@data_directory
end

def self.app_path=(val)
@@app_path = val
end

def self.app_path
@@app_path
end

def self.change_stdout_sync(enabled)
original_setting = STDOUT.sync
STDOUT.sync = true
yield(enabled)
STDOUT.sync = original_setting
end
end

Wpxf.app_path = app_path
Wpxf.data_directory = File.join(app_path, 'data/')
42 changes: 41 additions & 1 deletion lib/wpxf/core.rb
@@ -1,4 +1,44 @@
require 'wpxf/namespaces'
# The root namespace.
module Wpxf
# The namespace for WordPress mixins and classes.
module WordPress
end

# The namespace for network related mixins and classes.
module Net
end

# The namespace for version generation mixins and classes.
module Versioning
end

# The namespace for utility classes and modules.
module Utility
end

def self.data_directory=(val)
@@data_directory = val
end

def self.data_directory
@@data_directory
end

def self.app_path=(val)
@@app_path = val
end

def self.app_path
@@app_path
end

def self.change_stdout_sync(enabled)
original_setting = STDOUT.sync
STDOUT.sync = true
yield(enabled)
STDOUT.sync = original_setting
end
end

require 'wpxf/core/data_file'
require 'wpxf/core/options'
Expand Down
18 changes: 0 additions & 18 deletions lib/wpxf/namespaces.rb

This file was deleted.

0 comments on commit 8f4f21c

Please sign in to comment.