lib/gjp/project.rb in gjp-0.36.0 vs lib/gjp/project.rb in gjp-0.37.0
- old
+ new
@@ -1,8 +1,8 @@
# encoding: UTF-8
-require 'find'
+require "find"
module Gjp
# encapsulates a Gjp project directory
class Project
include Logger
@@ -47,10 +47,12 @@
def get_package_name(dir)
begin
dir_path = Pathname.new(File.expand_path(dir)).relative_path_from(Pathname.new(@full_path))
components = dir_path.to_s.split(File::SEPARATOR)
- if components.count >= 2 && components.first == "src" && Dir.exist?(File.join(@full_path, components[0], components[1]))
+ if components.count >= 2 &&
+ components.first == "src" &&
+ Dir.exist?(File.join(@full_path, components[0], components[1]))
components[1]
else
raise NoPackageDirectoryError
end
rescue ArgumentError, NoProjectDirectoryError