Skip to content

Commit

Permalink
#10 file paths
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Feb 26, 2024
1 parent 755ebec commit 22170a7
Show file tree
Hide file tree
Showing 14 changed files with 26 additions and 23 deletions.
4 changes: 2 additions & 2 deletions bin/xembly
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@

$stdout.sync = true

require 'xembly'
require 'xembly/version'
require 'slop'
require_relative '../lib/xembly'
require_relative '../lib/xembly/version'

opts = Slop.parse(ARGV, strict: true, help: true) do |o|
o.banner = "Usage (#{Xembly::VERSION}): xembly [options] [directives]"
Expand Down
6 changes: 3 additions & 3 deletions lib/xembly.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

require 'xembly/version'
require 'xembly/xembler'
require 'xembly/directives'
require 'nokogiri'
require 'logger'
require 'time'
require_relative 'xembly/version'
require_relative 'xembly/xembler'
require_relative 'xembly/directives'

# Xembly main module.
# Author:: Yegor Bugayenko (yegor256@gmail.com)
Expand Down
2 changes: 1 addition & 1 deletion lib/xembly/add.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

require 'xembly'
require 'nokogiri'
require_relative '../xembly'

module Xembly
# ADD directive
Expand Down
2 changes: 1 addition & 1 deletion lib/xembly/addif.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

require 'xembly'
require 'nokogiri'
require_relative '../xembly'

module Xembly
# ADDIF directive
Expand Down
2 changes: 1 addition & 1 deletion lib/xembly/attr.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

require 'xembly'
require_relative '../xembly'

module Xembly
# ATTR directive
Expand Down
16 changes: 8 additions & 8 deletions lib/xembly/directives.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

require 'xembly/add'
require 'xembly/addif'
require 'xembly/attr'
require 'xembly/remove'
require 'xembly/set'
require 'xembly/strict'
require 'xembly/up'
require 'xembly/xpath'
require_relative 'add'
require_relative 'addif'
require_relative 'attr'
require_relative 'remove'
require_relative 'set'
require_relative 'strict'
require_relative 'up'
require_relative 'xpath'

module Xembly
# Directives
Expand Down
2 changes: 1 addition & 1 deletion lib/xembly/remove.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

require 'xembly'
require_relative '../xembly'

module Xembly
# REMOVE directive
Expand Down
2 changes: 1 addition & 1 deletion lib/xembly/set.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# SOFTWARE.

require 'nokogiri'
require 'xembly'
require_relative '../xembly'

module Xembly
# SET directive
Expand Down
1 change: 1 addition & 0 deletions lib/xembly/strict.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
# SOFTWARE.

require 'nokogiri'
require_relative '../xembly'

module Xembly
# STRICT directive
Expand Down
1 change: 1 addition & 0 deletions lib/xembly/up.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
# SOFTWARE.

require 'nokogiri'
require_relative '../xembly'

module Xembly
# UP directive
Expand Down
2 changes: 1 addition & 1 deletion lib/xembly/xembler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

require 'xembly'
require_relative '../xembly'

module Xembly
# Xembler
Expand Down
1 change: 1 addition & 0 deletions lib/xembly/xpath.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
# SOFTWARE.

require 'nokogiri'
require_relative '../xembly'

module Xembly
# XPATH directive
Expand Down
2 changes: 1 addition & 1 deletion test/test_xembler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
require 'nokogiri'
require 'xembly/xembler'
require 'xembly/directives'
require 'test__helper'
require_relative 'test__helper'

# Xembly::Xembler module tests.
# Author:: Yegor Bugayenko (yegor256@gmail.com)
Expand Down
6 changes: 3 additions & 3 deletions test/test_xembly.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@

require 'minitest/autorun'
require 'nokogiri'
require 'xembly'
require 'tmpdir'
require 'slop'
require 'test__helper'
require_relative '../lib/xembly'
require_relative 'test__helper'

# Xembly main module test.
# Author:: Yegor Bugayenko (yegor256@gmail.com)
Expand Down Expand Up @@ -69,7 +69,7 @@ def test_reading_from_file
private

def opts(args)
Slop.parse args do |o|
Slop.parse(args, help: true) do |o|
o.on '-v', '--verbose'
o.string '-x', '--xml', argument: :required
o.string '-d', '--dirs', argument: :required
Expand Down

0 comments on commit 22170a7

Please sign in to comment.