rake-funnel 0.3.2.pre → 0.4.0.pre

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. checksums.yaml +4 -4
  2. data/.rspec +2 -2
  3. data/Gemfile +4 -0
  4. data/README.md +2 -2
  5. data/lib/rake/funnel/ambiguous_file_error.rb +31 -29
  6. data/lib/rake/funnel/execution_error.rb +28 -26
  7. data/lib/rake/funnel/extensions/case/camel_case.rb +24 -19
  8. data/lib/rake/funnel/extensions/case/pascal_case.rb +24 -19
  9. data/lib/rake/funnel/extensions/case.rb +3 -3
  10. data/lib/rake/funnel/extensions/common_path.rb +60 -52
  11. data/lib/rake/funnel/extensions/disable_colors.rb +33 -27
  12. data/lib/rake/funnel/extensions/rexml.rb +27 -23
  13. data/lib/rake/funnel/extensions/shell.rb +92 -56
  14. data/lib/rake/funnel/extensions/windows_path.rb +15 -11
  15. data/lib/rake/funnel/framework.rb +11 -16
  16. data/lib/rake/funnel/integration/progress_report.rb +72 -70
  17. data/lib/rake/funnel/integration/sync_output.rb +12 -8
  18. data/lib/rake/funnel/integration/teamcity/nunit_plugin.rb +61 -55
  19. data/lib/rake/funnel/integration/teamcity/progress_report.rb +39 -33
  20. data/lib/rake/funnel/integration/teamcity/service_messages.rb +46 -40
  21. data/lib/rake/funnel/integration/teamcity/teamcity.rb +19 -15
  22. data/lib/rake/funnel/integration/teamcity.rb +3 -5
  23. data/lib/rake/funnel/support/argument_mapper/key_value_pair.rb +16 -10
  24. data/lib/rake/funnel/support/argument_mapper/styles/default.rb +39 -31
  25. data/lib/rake/funnel/support/argument_mapper/styles/msbuild.rb +41 -33
  26. data/lib/rake/funnel/support/argument_mapper/styles/msdeploy.rb +55 -47
  27. data/lib/rake/funnel/support/argument_mapper/styles/nunit.rb +41 -33
  28. data/lib/rake/funnel/support/argument_mapper/styles.rb +3 -5
  29. data/lib/rake/funnel/support/argument_mapper/switch.rb +16 -10
  30. data/lib/rake/funnel/support/argument_mapper/value.rb +16 -10
  31. data/lib/rake/funnel/support/assembly_version/from_version_files.rb +39 -35
  32. data/lib/rake/funnel/support/assembly_version/languages/cs +5 -5
  33. data/lib/rake/funnel/support/assembly_version/languages/fs +12 -12
  34. data/lib/rake/funnel/support/assembly_version/languages/vb +5 -5
  35. data/lib/rake/funnel/support/assembly_version_writer.rb +56 -52
  36. data/lib/rake/funnel/support/binary_version_reader.rb +37 -32
  37. data/lib/rake/funnel/support/copier.rb +31 -27
  38. data/lib/rake/funnel/support/environments/loader.rb +46 -40
  39. data/lib/rake/funnel/support/environments.rb +3 -3
  40. data/lib/rake/funnel/support/internal/finder.rb +55 -51
  41. data/lib/rake/funnel/support/internal/instantiate_symbol.rb +38 -34
  42. data/lib/rake/funnel/support/mapper.rb +57 -53
  43. data/lib/rake/funnel/support/mono.rb +21 -17
  44. data/lib/rake/funnel/support/msbuild/build_tool.rb +30 -24
  45. data/lib/rake/funnel/support/msbuild.rb +3 -3
  46. data/lib/rake/funnel/support/msdeploy/registry_patch.rb +90 -84
  47. data/lib/rake/funnel/support/msdeploy.rb +3 -3
  48. data/lib/rake/funnel/support/patch.rb +41 -37
  49. data/lib/rake/funnel/support/specs_remover.rb +66 -62
  50. data/lib/rake/funnel/support/template_engine.rb +30 -26
  51. data/lib/rake/funnel/support/timing/report.rb +95 -89
  52. data/lib/rake/funnel/support/timing/statistics.rb +32 -26
  53. data/lib/rake/funnel/support/timing.rb +3 -3
  54. data/lib/rake/funnel/support/version_info.rb +103 -72
  55. data/lib/rake/funnel/support/which.rb +19 -15
  56. data/lib/rake/funnel/support/zipper.rb +53 -49
  57. data/lib/rake/funnel/tasks/assembly_version.rb +44 -40
  58. data/lib/rake/funnel/tasks/bin_path.rb +45 -41
  59. data/lib/rake/funnel/tasks/copy.rb +43 -39
  60. data/lib/rake/funnel/tasks/environments.rb +89 -89
  61. data/lib/rake/funnel/tasks/msbuild.rb +55 -51
  62. data/lib/rake/funnel/tasks/msdeploy.rb +54 -50
  63. data/lib/rake/funnel/tasks/nunit.rb +52 -48
  64. data/lib/rake/funnel/tasks/paket.rb +51 -47
  65. data/lib/rake/funnel/tasks/quick_template.rb +53 -49
  66. data/lib/rake/funnel/tasks/side_by_side_specs.rb +41 -37
  67. data/lib/rake/funnel/tasks/timing.rb +108 -104
  68. data/lib/rake/funnel/tasks/zip.rb +46 -42
  69. data/lib/rake/funnel/version.rb +1 -1
  70. data/lib/rake/funnel.rb +7 -7
  71. data/rake-funnel.gemspec +12 -3
  72. data/spec/rake/funnel/execution_error_spec.rb +67 -67
  73. data/spec/rake/funnel/extensions/case/camel_case_spec.rb +17 -17
  74. data/spec/rake/funnel/extensions/case/pascal_case_spec.rb +17 -17
  75. data/spec/rake/funnel/extensions/common_path_spec.rb +56 -56
  76. data/spec/rake/funnel/extensions/disable_colors_spec.rb +33 -33
  77. data/spec/rake/funnel/extensions/rexml_spec.rb +20 -20
  78. data/spec/rake/funnel/extensions/shell_spec.rb +237 -237
  79. data/spec/rake/funnel/extensions/windows_path_spec.rb +5 -5
  80. data/spec/rake/funnel/integration/progress_report_spec.rb +149 -149
  81. data/spec/rake/funnel/integration/sync_output_spec.rb +16 -16
  82. data/spec/rake/funnel/integration/teamcity/nunit_plugin_spec.rb +110 -110
  83. data/spec/rake/funnel/integration/teamcity/progress_report_spec.rb +174 -174
  84. data/spec/rake/funnel/integration/teamcity/service_messages_spec.rb +136 -136
  85. data/spec/rake/funnel/integration/teamcity/teamcity_spec.rb +34 -34
  86. data/spec/rake/funnel/support/argument_mapper/styles/msdeploy_spec.rb +222 -222
  87. data/spec/rake/funnel/support/argument_mapper/styles/nunit_spec.rb +25 -25
  88. data/spec/rake/funnel/support/argument_mapper/styles/styles_spec.rb +214 -214
  89. data/spec/rake/funnel/support/assembly_version/from_version_files_spec.rb +66 -61
  90. data/spec/rake/funnel/support/assembly_version_writer_spec.rb +140 -140
  91. data/spec/rake/funnel/support/binary_version_reader_spec.rb +29 -29
  92. data/spec/rake/funnel/support/copier_spec.rb +58 -58
  93. data/spec/rake/funnel/support/environments/loader_spec.rb +143 -143
  94. data/spec/rake/funnel/support/internal/finder_spec.rb +229 -229
  95. data/spec/rake/funnel/support/internal/instantiate_symbol_spec.rb +182 -183
  96. data/spec/rake/funnel/support/mapper_spec.rb +87 -87
  97. data/spec/rake/funnel/support/mono_spec.rb +57 -57
  98. data/spec/rake/funnel/support/msbuild/build_tool_spec.rb +21 -21
  99. data/spec/rake/funnel/support/msdeploy/registry_patch_spec.rb +139 -139
  100. data/spec/rake/funnel/support/patch_spec.rb +108 -108
  101. data/spec/rake/funnel/support/specs_remover/Sample.csproj +28 -28
  102. data/spec/rake/funnel/support/specs_remover_spec.rb +116 -116
  103. data/spec/rake/funnel/support/template_engine_spec.rb +65 -65
  104. data/spec/rake/funnel/support/timing/report_spec.rb +129 -129
  105. data/spec/rake/funnel/support/version_info_spec.rb +333 -228
  106. data/spec/rake/funnel/support/which_spec.rb +65 -65
  107. data/spec/rake/funnel/support/zipper_spec.rb +77 -77
  108. data/spec/rake/funnel/tasks/assembly_version_spec.rb +45 -45
  109. data/spec/rake/funnel/tasks/bin_path_spec.rb +52 -52
  110. data/spec/rake/funnel/tasks/copy_spec.rb +44 -44
  111. data/spec/rake/funnel/tasks/environments_spec.rb +249 -247
  112. data/spec/rake/funnel/tasks/msbuild_spec.rb +91 -91
  113. data/spec/rake/funnel/tasks/msdeploy_spec.rb +220 -220
  114. data/spec/rake/funnel/tasks/nunit_spec.rb +74 -74
  115. data/spec/rake/funnel/tasks/paket_spec.rb +140 -142
  116. data/spec/rake/funnel/tasks/quick_template_spec.rb +62 -62
  117. data/spec/rake/funnel/tasks/side_by_side_specs_spec.rb +58 -58
  118. data/spec/rake/funnel/tasks/timing_spec.rb +133 -133
  119. data/spec/rake/funnel/tasks/zip_spec.rb +50 -50
  120. data/spec/spec_helper.rb +43 -33
  121. metadata +2 -3
  122. data/lib/rake/funnel/support/side_by_side_specs.rb +0 -3
@@ -1,27 +1,31 @@
1
- module Rake::Funnel::Support
2
- class Copier
3
- class << self
4
- def copy(files, target)
5
- raise 'Target not defined' unless target
6
-
7
- common_path = files.common_path
8
- files.each do |source|
9
- next if File.directory?(source)
10
-
11
- target_path = target_path(source, common_path, target)
12
-
13
- dir = File.dirname(target_path)
14
- RakeFileUtils.mkdir_p(dir) unless File.directory?(dir)
15
-
16
- RakeFileUtils.cp(source, target_path, { preserve: true })
17
- end
18
- end
19
-
20
- private
21
- def target_path(file, common_path, target)
22
- target_relative = Pathname.new(file).relative_path_from(Pathname.new(common_path)).to_s
23
- File.join(target, target_relative)
24
- end
25
- end
26
- end
27
- end
1
+ module Rake
2
+ module Funnel
3
+ module Support
4
+ class Copier
5
+ class << self
6
+ def copy(files, target)
7
+ raise 'Target not defined' unless target
8
+
9
+ common_path = files.common_path
10
+ files.each do |source|
11
+ next if File.directory?(source)
12
+
13
+ target_path = target_path(source, common_path, target)
14
+
15
+ dir = File.dirname(target_path)
16
+ RakeFileUtils.mkdir_p(dir) unless File.directory?(dir)
17
+
18
+ RakeFileUtils.cp(source, target_path, preserve: true)
19
+ end
20
+ end
21
+
22
+ private
23
+ def target_path(file, common_path, target)
24
+ target_relative = Pathname.new(file).relative_path_from(Pathname.new(common_path)).to_s
25
+ File.join(target, target_relative)
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
@@ -1,40 +1,46 @@
1
- require 'configatron'
2
- require 'yaml'
3
-
4
- module Rake::Funnel::Support::Environments
5
- class Loader
6
- class << self
7
- def load_configuration(config, store = configatron, customizer = nil)
8
- Rake.rake_output_message("Configuring for #{config[:name]}")
9
- store.unlock!
10
- store.reset!
11
-
12
- store.env = config[:name]
13
-
14
- operation = 'Loading'
15
- config.fetch(:config_files, []).each do |file|
16
- Rake.rake_output_message("#{operation} #{file}")
17
- operation = 'Merging'
18
-
19
- yaml = File.read(file)
20
- yaml = evaluate_erb(yaml, file)
21
- yaml = YAML.load(yaml) || {}
22
- store.configure_from_hash(yaml)
23
- end
24
-
25
- customizer.call(store) if customizer && customizer.respond_to?(:call)
26
-
27
- store.lock!
28
-
29
- Rake.rake_output_message('')
30
- Rake.rake_output_message(store.inspect)
31
- end
32
-
33
- def evaluate_erb(yaml, filename)
34
- render = ERB.new(yaml)
35
- render.filename = filename
36
- render.result
37
- end
38
- end
39
- end
40
- end
1
+ require 'configatron'
2
+ require 'yaml'
3
+
4
+ module Rake
5
+ module Funnel
6
+ module Support
7
+ module Environments
8
+ class Loader
9
+ class << self
10
+ def load_configuration(config, store = configatron, customizer = nil)
11
+ Rake.rake_output_message("Configuring for #{config[:name]}")
12
+ store.unlock!
13
+ store.reset!
14
+
15
+ store.env = config[:name]
16
+
17
+ operation = 'Loading'
18
+ config.fetch(:config_files, []).each do |file|
19
+ Rake.rake_output_message("#{operation} #{file}")
20
+ operation = 'Merging'
21
+
22
+ yaml = File.read(file)
23
+ yaml = evaluate_erb(yaml, file)
24
+ yaml = YAML.load(yaml) || {}
25
+ store.configure_from_hash(yaml)
26
+ end
27
+
28
+ customizer.call(store) if customizer && customizer.respond_to?(:call)
29
+
30
+ store.lock!
31
+
32
+ Rake.rake_output_message('')
33
+ Rake.rake_output_message(store.inspect)
34
+ end
35
+
36
+ def evaluate_erb(yaml, filename)
37
+ render = ERB.new(yaml)
38
+ render.filename = filename
39
+ render.result
40
+ end
41
+ end
42
+ end
43
+ end
44
+ end
45
+ end
46
+ end
@@ -1,3 +1,3 @@
1
- Dir[File.join(File.dirname(__FILE__), File.basename(__FILE__, '.rb'), '*.rb')].each do |path|
2
- require path
3
- end
1
+ Dir[File.join(File.dirname(__FILE__), File.basename(__FILE__, '.rb'), '*.rb')].each do |path|
2
+ require path
3
+ end
@@ -1,51 +1,55 @@
1
- module Rake::Funnel::Support
2
- class Finder
3
- include Enumerable
4
-
5
- def initialize(search_pattern, task, message = nil)
6
- @search_pattern = search_pattern
7
- @task = task
8
- @message = message
9
- end
10
-
11
- def each
12
- block_given? or return enum_for(__method__)
13
- all_or_default.each { |x| yield x }
14
- end
15
-
16
- def single_or_default
17
- first_sln
18
- end
19
-
20
- def single
21
- if first_sln.nil?
22
- raise Rake::Funnel::AmbiguousFileError.new(@message, @task.name, @search_pattern, candidates)
23
- end
24
-
25
- first_sln
26
- end
27
-
28
- def all_or_default
29
- candidates
30
- end
31
-
32
- def all
33
- if candidates.empty?
34
- raise Rake::Funnel::AmbiguousFileError.new(@message, @task.name, @search_pattern, candidates)
35
- end
36
-
37
- candidates
38
- end
39
-
40
- private
41
- def first_sln
42
- return candidates.first if candidates.one?
43
-
44
- nil
45
- end
46
-
47
- def candidates
48
- Dir[*@search_pattern.dup].select { |f| File.file?(f) }.uniq
49
- end
50
- end
51
- end
1
+ module Rake
2
+ module Funnel
3
+ module Support
4
+ class Finder
5
+ include Enumerable
6
+
7
+ def initialize(search_pattern, task, message = nil)
8
+ @search_pattern = search_pattern
9
+ @task = task
10
+ @message = message
11
+ end
12
+
13
+ def each
14
+ block_given? or return enum_for(__method__)
15
+ all_or_default.each { |x| yield x }
16
+ end
17
+
18
+ def single_or_default
19
+ first_sln
20
+ end
21
+
22
+ def single
23
+ if first_sln.nil?
24
+ raise Rake::Funnel::AmbiguousFileError.new(@message, @task.name, @search_pattern, candidates)
25
+ end
26
+
27
+ first_sln
28
+ end
29
+
30
+ def all_or_default
31
+ candidates
32
+ end
33
+
34
+ def all
35
+ if candidates.empty?
36
+ raise Rake::Funnel::AmbiguousFileError.new(@message, @task.name, @search_pattern, candidates)
37
+ end
38
+
39
+ candidates
40
+ end
41
+
42
+ private
43
+ def first_sln
44
+ return candidates.first if candidates.one?
45
+
46
+ nil
47
+ end
48
+
49
+ def candidates
50
+ Dir[*@search_pattern.dup].select { |f| File.file?(f) }.uniq
51
+ end
52
+ end
53
+ end
54
+ end
55
+ end
@@ -1,34 +1,38 @@
1
- module Rake::Funnel::Support
2
- module InstantiateSymbol
3
- def self.included(klass)
4
- klass.extend(ClassMethods)
5
- klass.send(:instantiate, klass)
6
- end
7
-
8
- module ClassMethods
9
- attr_reader :module
10
-
11
- private
12
- def instantiate(mod)
13
- @module = mod
14
- end
15
- end
16
-
17
- private
18
- def create(sym, *args)
19
- return sym unless sym.kind_of?(Symbol)
20
-
21
- begin
22
- type = self.class.module.const_get(sym)
23
- rescue NameError
24
- raise NameError, "Unknown type to instantiate: #{sym.inspect}. Available types are: #{available.inspect}"
25
- end
26
-
27
- type.new(*args)
28
- end
29
-
30
- def available
31
- return self.class.module.constants.sort
32
- end
33
- end
34
- end
1
+ module Rake
2
+ module Funnel
3
+ module Support
4
+ module InstantiateSymbol
5
+ def self.included(klass)
6
+ klass.extend(ClassMethods)
7
+ klass.send(:instantiate, klass)
8
+ end
9
+
10
+ module ClassMethods
11
+ attr_reader :module
12
+
13
+ private
14
+ def instantiate(mod)
15
+ @module = mod
16
+ end
17
+ end
18
+
19
+ private
20
+ def create(sym, *args)
21
+ return sym unless sym.is_a?(Symbol)
22
+
23
+ begin
24
+ type = self.class.module.const_get(sym)
25
+ rescue NameError
26
+ raise NameError, "Unknown type to instantiate: #{sym.inspect}. Available types are: #{available.inspect}"
27
+ end
28
+
29
+ type.new(*args)
30
+ end
31
+
32
+ def available
33
+ self.class.module.constants.sort
34
+ end
35
+ end
36
+ end
37
+ end
38
+ end
@@ -1,53 +1,57 @@
1
- Dir[File.join(File.dirname(__FILE__), 'argument_mapper', '*.rb')].each do |path|
2
- require path
3
- end
4
-
5
- module Rake::Funnel::Support
6
- class Mapper
7
- include Rake::Funnel::Support::ArgumentMapper
8
- include InstantiateSymbol
9
- instantiate Styles
10
-
11
- def initialize(style = :Default)
12
- raise "You cannot use the 'nil' mapper style. Available mappers are: #{available.inspect}" if style.nil?
13
-
14
- @style = create(style)
15
- end
16
-
17
- def map(args = {})
18
- model = (args || {}).map { |switch, value|
19
- value = [value] unless value.kind_of?(Array)
20
-
21
- values = value.map do |val|
22
- get_values(val)
23
- end
24
-
25
- Switch.new(switch, values)
26
- }.flatten
27
-
28
- @style
29
- .generate_from(model)
30
- .map { |args| args.map { |arg| camel_case_symbols(arg) }}
31
- .map(&:join)
32
- end
33
-
34
- private
35
- def get_values(value)
36
- if value.kind_of?(Enumerable)
37
- pairs = value.map { |k, v|
38
- KeyValuePair.new(k, v)
39
- }
40
-
41
- return Array.new(pairs) if value.kind_of?(Array)
42
- pairs
43
- else
44
- Value.new(value)
45
- end
46
- end
47
-
48
- def camel_case_symbols(value)
49
- return value unless value.kind_of?(Symbol)
50
- value.camelize
51
- end
52
- end
53
- end
1
+ Dir[File.join(File.dirname(__FILE__), 'argument_mapper', '*.rb')].each do |path|
2
+ require path
3
+ end
4
+
5
+ module Rake
6
+ module Funnel
7
+ module Support
8
+ class Mapper
9
+ include ArgumentMapper
10
+ include InstantiateSymbol
11
+ instantiate Styles
12
+
13
+ def initialize(style = :Default)
14
+ raise "You cannot use the 'nil' mapper style. Available mappers are: #{available.inspect}" if style.nil?
15
+
16
+ @style = create(style)
17
+ end
18
+
19
+ def map(args = {})
20
+ model = (args || {}).map { |switch, value|
21
+ value = [value] unless value.is_a?(Array)
22
+
23
+ values = value.map do |val|
24
+ get_values(val)
25
+ end
26
+
27
+ Switch.new(switch, values)
28
+ }.flatten
29
+
30
+ @style
31
+ .generate_from(model)
32
+ .map { |args| args.map { |arg| camel_case_symbols(arg) } }
33
+ .map(&:join)
34
+ end
35
+
36
+ private
37
+ def get_values(value)
38
+ if value.is_a?(Enumerable)
39
+ pairs = value.map { |k, v|
40
+ KeyValuePair.new(k, v)
41
+ }
42
+
43
+ return Array.new(pairs) if value.is_a?(Array)
44
+ pairs
45
+ else
46
+ Value.new(value)
47
+ end
48
+ end
49
+
50
+ def camel_case_symbols(value)
51
+ return value unless value.is_a?(Symbol)
52
+ value.camelize
53
+ end
54
+ end
55
+ end
56
+ end
57
+ end
@@ -1,17 +1,21 @@
1
- module Rake::Funnel::Support
2
- class Mono
3
- class << self
4
- def invocation(executable, *args)
5
- exe_args = ([executable] << args).flatten.compact
6
-
7
- if Rake::Win32.windows?
8
- return exe_args
9
- end
10
-
11
- executable = exe_args.shift
12
- found = Which.which(executable) || executable
13
- exe_args.unshift('mono', found)
14
- end
15
- end
16
- end
17
- end
1
+ module Rake
2
+ module Funnel
3
+ module Support
4
+ class Mono
5
+ class << self
6
+ def invocation(executable, *args)
7
+ exe_args = ([executable] << args).flatten.compact
8
+
9
+ if Rake::Win32.windows?
10
+ return exe_args
11
+ end
12
+
13
+ executable = exe_args.shift
14
+ found = Which.which(executable) || executable
15
+ exe_args.unshift('mono', found)
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
@@ -1,24 +1,30 @@
1
- module Rake::Funnel::Support::MSBuild
2
- class BuildTool
3
- class << self
4
- def find
5
- return 'xbuild' unless Rake::Win32.windows?
6
-
7
- require 'win32/registry'
8
-
9
- %w(12.0 4.0 3.5 2.0).collect { |version|
10
- key = "SOFTWARE\\Microsoft\\MSBuild\\ToolsVersions\\#{version}"
11
-
12
- begin
13
- Win32::Registry::HKEY_LOCAL_MACHINE.open(key) do |reg|
14
- candidate = File.join(reg['MSBuildToolsPath'] || '', 'msbuild.exe')
15
- next candidate if File.exists?(candidate)
16
- end
17
- rescue
18
- next
19
- end
20
- }.compact.first
21
- end
22
- end
23
- end
24
- end
1
+ module Rake
2
+ module Funnel
3
+ module Support
4
+ module MSBuild
5
+ class BuildTool
6
+ class << self
7
+ def find
8
+ return 'xbuild' unless Rake::Win32.windows?
9
+
10
+ require 'win32/registry'
11
+
12
+ %w(12.0 4.0 3.5 2.0).collect { |version|
13
+ key = "SOFTWARE\\Microsoft\\MSBuild\\ToolsVersions\\#{version}"
14
+
15
+ begin
16
+ ::Win32::Registry::HKEY_LOCAL_MACHINE.open(key) do |reg|
17
+ candidate = File.join(reg['MSBuildToolsPath'] || '', 'msbuild.exe')
18
+ next candidate if File.exist?(candidate)
19
+ end
20
+ rescue
21
+ next
22
+ end
23
+ }.compact.first
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
@@ -1,3 +1,3 @@
1
- Dir[File.join(File.dirname(__FILE__), File.basename(__FILE__, '.rb'), '*.rb')].each do |path|
2
- require path
3
- end
1
+ Dir[File.join(File.dirname(__FILE__), File.basename(__FILE__, '.rb'), '*.rb')].each do |path|
2
+ require path
3
+ end