diff --git a/lib/xcake.rb b/lib/xcake.rb index 969f1582..874a2ef7 100644 --- a/lib/xcake.rb +++ b/lib/xcake.rb @@ -1,4 +1,3 @@ -require 'xcake/core_ext/array' require 'xcake/core_ext/class' require 'xcake/core_ext/string' diff --git a/lib/xcake/core_ext/array.rb b/lib/xcake/core_ext/array.rb deleted file mode 100644 index 2f186248..00000000 --- a/lib/xcake/core_ext/array.rb +++ /dev/null @@ -1,5 +0,0 @@ -class Array - def to_h - Hash[*flatten(1)] - end -end diff --git a/lib/xcake/dependency_provider.rb b/lib/xcake/dependency_provider.rb index fe150a35..fbe87f8b 100644 --- a/lib/xcake/dependency_provider.rb +++ b/lib/xcake/dependency_provider.rb @@ -7,9 +7,9 @@ class DependencyProvider def initialize(dependency_class) plugins = dependency_class.load_plugins - @dependency_graph = plugins.map do |p| - [p, p.dependencies] - end.to_h + @dependency_graph = plugins.each_with_object({}) do |p, hash| + hash[p] = p.dependencies + end end def tsort_each_node(&block) diff --git a/spec/core_ext/array_spec.rb b/spec/core_ext/array_spec.rb deleted file mode 100644 index 83d5e2e1..00000000 --- a/spec/core_ext/array_spec.rb +++ /dev/null @@ -1,7 +0,0 @@ -require 'spec_helper' - -describe Array do - it 'should convert to hash' do - expect(%w(key value).to_h).to eq('key' => 'value') - end -end