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

Commit 8f4f21c

Browse files
committed
Remove namespaces file, clean up env
1 parent 94aef4c commit 8f4f21c

File tree

3 files changed

+49
-53
lines changed

3 files changed

+49
-53
lines changed

env.rb

Lines changed: 8 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
require 'colorize'
2+
require 'date'
3+
require 'json'
4+
require 'require_all'
5+
require 'time'
6+
require 'typhoeus'
7+
require 'zip'
8+
19
wpxfbase = __FILE__
210

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

12-
require 'colorize'
13-
require 'date'
14-
require 'json'
15-
require 'require_all'
16-
require 'time'
17-
require 'typhoeus'
18-
require 'zip'
19-
2020
require 'wpxf/core'
2121
require 'wpxf/utility/body_builder'
2222
require 'wpxf/utility/text'
2323
require 'wpxf/utility/reference_inflater'
24-
2524
require_relative 'github_updater'
2625

27-
module Wpxf
28-
def self.data_directory=(val)
29-
@@data_directory = val
30-
end
31-
32-
def self.data_directory
33-
@@data_directory
34-
end
35-
36-
def self.app_path=(val)
37-
@@app_path = val
38-
end
39-
40-
def self.app_path
41-
@@app_path
42-
end
43-
44-
def self.change_stdout_sync(enabled)
45-
original_setting = STDOUT.sync
46-
STDOUT.sync = true
47-
yield(enabled)
48-
STDOUT.sync = original_setting
49-
end
50-
end
51-
5226
Wpxf.app_path = app_path
5327
Wpxf.data_directory = File.join(app_path, 'data/')

lib/wpxf/core.rb

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,44 @@
1-
require 'wpxf/namespaces'
1+
# The root namespace.
2+
module Wpxf
3+
# The namespace for WordPress mixins and classes.
4+
module WordPress
5+
end
6+
7+
# The namespace for network related mixins and classes.
8+
module Net
9+
end
10+
11+
# The namespace for version generation mixins and classes.
12+
module Versioning
13+
end
14+
15+
# The namespace for utility classes and modules.
16+
module Utility
17+
end
18+
19+
def self.data_directory=(val)
20+
@@data_directory = val
21+
end
22+
23+
def self.data_directory
24+
@@data_directory
25+
end
26+
27+
def self.app_path=(val)
28+
@@app_path = val
29+
end
30+
31+
def self.app_path
32+
@@app_path
33+
end
34+
35+
def self.change_stdout_sync(enabled)
36+
original_setting = STDOUT.sync
37+
STDOUT.sync = true
38+
yield(enabled)
39+
STDOUT.sync = original_setting
40+
end
41+
end
242

343
require 'wpxf/core/data_file'
444
require 'wpxf/core/options'

lib/wpxf/namespaces.rb

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)