autoloaded 1.4.1 → 1.5.0

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 (75) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +4 -8
  3. data/.rspec +1 -1
  4. data/.travis.yml +10 -0
  5. data/Gemfile +9 -10
  6. data/Guardfile +21 -22
  7. data/History.md +10 -4
  8. data/README.md +43 -30
  9. data/Rakefile +4 -0
  10. data/autoloaded.gemspec +37 -36
  11. data/bin/console +10 -0
  12. data/bin/setup +8 -0
  13. data/lib/autoloaded/autoloader.rb +6 -0
  14. data/lib/autoloaded/constant.rb +1 -0
  15. data/lib/autoloaded/deprecation.rb +0 -2
  16. data/lib/autoloaded/inflection.rb +0 -2
  17. data/lib/autoloaded/load_pathed_directory.rb +1 -3
  18. data/lib/autoloaded/specification.rb +2 -0
  19. data/lib/autoloaded/specifications.rb +0 -2
  20. data/lib/autoloaded/version.rb +1 -1
  21. data/lib/autoloaded/warning.rb +0 -2
  22. data/lib/tasks/lib_each.rake +15 -3
  23. data/lib/tasks/spec.rake +3 -6
  24. metadata +23 -110
  25. data/spec/autoloaded/autoloader_spec.rb +0 -469
  26. data/spec/autoloaded/constant_spec.rb +0 -53
  27. data/spec/autoloaded/deprecation_spec.rb +0 -23
  28. data/spec/autoloaded/inflection_spec.rb +0 -30
  29. data/spec/autoloaded/load_pathed_directory_spec.rb +0 -120
  30. data/spec/autoloaded/refine/string/to_source_filename_spec.rb +0 -19
  31. data/spec/autoloaded/specification_spec.rb +0 -98
  32. data/spec/autoloaded/specifications_spec.rb +0 -191
  33. data/spec/autoloaded/version_spec.rb +0 -3
  34. data/spec/autoloaded/warning_spec.rb +0 -115
  35. data/spec/autoloaded_macro_sharedspec.rb +0 -24
  36. data/spec/autoloaded_spec.rb +0 -321
  37. data/spec/fixtures/autoloaded_with_conventional_filename.rb +0 -12
  38. data/spec/fixtures/autoloaded_with_conventional_filename/N-est-ed.rb +0 -1
  39. data/spec/fixtures/autoloaded_with_conventional_filename/nest_ed.rb +0 -1
  40. data/spec/fixtures/autoloaded_with_conventional_filename/nested.rb +0 -16
  41. data/spec/fixtures/autoloaded_with_conventional_filename/nested/doubly_nested.rb +0 -9
  42. data/spec/fixtures/autoloaded_with_conventional_filename/old_school_autoload.rb +0 -5
  43. data/spec/fixtures/autoloaded_with_unconventional_filename.rb +0 -12
  44. data/spec/fixtures/autoloaded_with_unconventional_filename/N-est-ed.rb +0 -7
  45. data/spec/fixtures/autoloaded_with_unconventional_filename/nest_ed.rb +0 -1
  46. data/spec/fixtures/autoloaded_with_unconventional_filename/old_school_autoload.rb +0 -5
  47. data/spec/fixtures/filenames/AFilename.rb +0 -0
  48. data/spec/fixtures/filenames/a-file-name.rb +0 -0
  49. data/spec/fixtures/filenames/a-filename.rb +0 -0
  50. data/spec/fixtures/filenames/a_file_name.rb +0 -0
  51. data/spec/fixtures/filenames/a_filename.rb +0 -0
  52. data/spec/fixtures/filenames/afile-name.rb +0 -0
  53. data/spec/fixtures/filenames/afile_name.rb +0 -0
  54. data/spec/fixtures/not_autoloaded.rb +0 -5
  55. data/spec/fixtures/not_autoloaded/nested.rb +0 -1
  56. data/spec/fixtures/not_autoloaded/old_school_autoload.rb +0 -5
  57. data/spec/fixtures/old_api/autoloaded_with_conventional_filename.rb +0 -10
  58. data/spec/fixtures/old_api/autoloaded_with_conventional_filename/N-est-ed.rb +0 -1
  59. data/spec/fixtures/old_api/autoloaded_with_conventional_filename/nest_ed.rb +0 -1
  60. data/spec/fixtures/old_api/autoloaded_with_conventional_filename/nested.rb +0 -5
  61. data/spec/fixtures/old_api/autoloaded_with_conventional_filename/old_school_autoload.rb +0 -5
  62. data/spec/fixtures/old_api/autoloaded_with_conventional_filename_only.rb +0 -10
  63. data/spec/fixtures/old_api/autoloaded_with_conventional_filename_only/nested.rb +0 -5
  64. data/spec/fixtures/old_api/autoloaded_with_conventional_filename_only/old_school_autoload.rb +0 -5
  65. data/spec/fixtures/old_api/autoloaded_with_unconventional_filenames.rb +0 -10
  66. data/spec/fixtures/old_api/autoloaded_with_unconventional_filenames/N-est-ed.rb +0 -5
  67. data/spec/fixtures/old_api/autoloaded_with_unconventional_filenames/nest_ed.rb +0 -0
  68. data/spec/fixtures/old_api/autoloaded_with_unconventional_filenames/old_school_autoload.rb +0 -5
  69. data/spec/fixtures/old_api/not_autoloaded.rb +0 -6
  70. data/spec/fixtures/old_api/not_autoloaded/nested.rb +0 -1
  71. data/spec/fixtures/old_api/not_autoloaded/old_school_autoload.rb +0 -5
  72. data/spec/matchers.rb +0 -85
  73. data/spec/spec_helper.rb +0 -91
  74. data/spec/support/util.rb +0 -43
  75. data/spec/support/without_side_effects.rb +0 -37
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 002e4e92fb2d2dde6fc2e0f00ece6e13df188b1e
4
- data.tar.gz: 0806960319493b98a01a0d8be789a32e519c2050
3
+ metadata.gz: b6f618df722d4ed99a713dfbcf0344a03eca3493
4
+ data.tar.gz: dc5dbdff9502b4c1988100f0fcf43e83cf69ee97
5
5
  SHA512:
6
- metadata.gz: b4e6409a4cea035bc9e7d2102de99a97e0202106715b6873aad6ca1fd68f06e9850063037f03fe9c7c8bd569321729aa4d7092ac0fa56b8a67c00a7ea8b865dd
7
- data.tar.gz: 2a0e5ba02e1a4ac86269c64bb5b788e3c5a29819284fef0ff258a73cabcb7a2ec01dec351d1395c8c1e223d9c2a8e42ebc359e5d5deb25a19d0cd68ab63261cb
6
+ metadata.gz: 1d7d80da2b33e2d1eebcfdd5d80d66790d7d9fcb173104114b530fb6d42437749d097e0347f9a7197e74ba1dd2c4ef41fcf03efcede9fc89f0088fd5a3696f0d
7
+ data.tar.gz: 7cccc5f5fe68de29fa48a07ceb18351e4e4b47d0a9c65fa911e8253ba7f8c6d025b544c64bf78d429c2d1bc12a3e52877624d0fdfb96de8581ea3f08061634e1
data/.gitignore CHANGED
@@ -1,16 +1,12 @@
1
1
  /.bundle/
2
- /.yardoc
2
+ /.rbx
3
+ /.ruby-*
4
+ /.yardoc/
3
5
  /Gemfile.lock
4
6
  /_yardoc/
5
7
  /coverage/
6
8
  /doc/
7
9
  /pkg/
10
+ /spec/examples.txt
8
11
  /spec/reports/
9
12
  /tmp/
10
- *.bundle
11
- *.so
12
- *.o
13
- *.a
14
- .ruby-gemset
15
- .ruby-version
16
- mkmf.log
data/.rspec CHANGED
@@ -1,3 +1,3 @@
1
1
  --color
2
- --format doc
2
+ --format documentation
3
3
  --require spec_helper
@@ -1,12 +1,22 @@
1
1
  language: ruby
2
+ before_install: gem install bundler
2
3
  bundler_args: --without debug doc tooling
3
4
  rvm:
4
5
  - 2.0
5
6
  - 2.1
7
+ - 2.2
8
+ - 2.3
6
9
  - ruby-head
7
10
  - jruby-head
11
+ - rbx
12
+ - rbx-2
8
13
  script: "bundle exec rake test"
9
14
  matrix:
10
15
  allow_failures:
11
16
  - rvm: ruby-head
12
17
  - rvm: jruby-head
18
+ - rvm: rbx
19
+ - rvm: rbx-2
20
+ branches:
21
+ except:
22
+ - /^gh-pages.*$/
data/Gemfile CHANGED
@@ -3,22 +3,21 @@ source 'https://rubygems.org'
3
3
  gemspec
4
4
 
5
5
  group :debug do
6
- gem 'pry-byebug', '~> 2', platforms: [:mri_20, :mri_21]
7
- gem 'pry-debugger', '~> 0', platforms: :mri_19
6
+ gem 'pry-byebug', '~> 3', platforms: [:mri_20,
7
+ :mri_21,
8
+ :mri_22,
9
+ :mri_23]
10
+ gem 'pry-debugger', '~> 0', platforms: :mri_19
8
11
  end
9
12
 
10
13
  group :doc do
11
- gem 'yard', '~> 0', require: false
12
- gem 'rdiscount', '~> 2', require: false, platforms: :mri
13
- end
14
-
15
- group :test do
16
- gem 'codeclimate-test-reporter', '~> 0', require: false
14
+ gem 'yard', '~> 0', require: false
15
+ gem 'rdiscount', '~> 2', require: false
17
16
  end
18
17
 
19
18
  group :tooling do
20
- gem 'guard-rspec', '~> 4', require: false
19
+ gem 'guard-rspec', '~> 4', require: false
21
20
  if RUBY_PLATFORM =~ /darwin/i
22
- gem 'rb-fsevent', '~> 0', require: false
21
+ gem 'rb-fsevent', '~> 0', require: false
23
22
  end
24
23
  end
data/Guardfile CHANGED
@@ -1,38 +1,37 @@
1
- interactor :off
1
+ require 'guard/rspec/dsl'
2
2
 
3
3
  debugger_gem = %w(pry-byebug pry-debugger).detect do |gem|
4
4
  `bundle show #{gem} 2>&1 >/dev/null`
5
5
  $?.success?
6
6
  end
7
7
  debugger_require = debugger_gem ? " --require #{debugger_gem}" : nil
8
- guard :rspec, all_after_pass: true,
9
- all_on_start: true,
10
- cmd: "bundle exec rspec#{debugger_require} --format progress" do
11
- # Run the corresponding spec (or all specs) when code changes.
12
- watch( %r{^lib/(.+)\.rb$} ) do |match|
13
- Dir["spec/#{match[1]}_spec.rb"].first || 'spec'
14
- end
15
8
 
16
- # Run a spec when it changes.
17
- watch %r{^spec/.+_spec\.rb$}
9
+ guard :rspec, all_on_start: true,
10
+ all_after_pass: true,
11
+ cmd: "bundle exec rspec --format progress#{debugger_require}" do
12
+ dsl = Guard::RSpec::Dsl.new(self)
13
+ rspec, ruby = dsl.rspec, dsl.ruby
18
14
 
19
- # Run all specs when a shared spec changes.
20
- watch( %r{^spec/.+_sharedspec\.rb$} ) { 'spec' }
15
+ # RSpec files
16
+ watch('.rspec') { rspec.spec_dir }
17
+ watch rspec.spec_helper { rspec.spec_dir }
18
+ watch rspec.spec_support { rspec.spec_dir }
19
+ watch(%r{^spec/support}) { rspec.spec_dir } # This should not be necessary.
20
+ watch rspec.spec_files
21
21
 
22
22
  # Run all specs when a matcher changes.
23
- watch( 'spec/matchers.rb' ) { 'spec' }
23
+ watch('spec/matchers.rb') { 'spec' }
24
24
 
25
- # Run all specs when a support file changes.
26
- watch( %r{^spec/support} ) { 'spec' }
25
+ # Run all specs when a shared spec changes.
26
+ watch(%r{^spec/.+_sharedspec\.rb$}) { rspec.spec_dir }
27
27
 
28
28
  # Run all specs when a fixture changes.
29
- watch( %r{^spec/fixtures} ) { 'spec' }
30
-
31
- # Run all specs when the RSpec configuration changes.
32
- watch( '.rspec' ) { 'spec' }
33
- watch( 'spec/spec_helper.rb' ) { 'spec' }
29
+ watch(%r{^spec/fixtures}) { rspec.spec_dir }
34
30
 
35
31
  # Run all specs when the bundle changes.
36
- watch( 'Gemfile.lock' ) { 'spec' }
37
- watch( %r{^(.+)\.gemspec$} ) { 'spec' }
32
+ watch('Gemfile.lock') { rspec.spec_dir }
33
+ watch(%r{^(.+)\.gemspec$}) { rspec.spec_dir }
34
+
35
+ # Ruby files
36
+ dsl.watch_spec_files_for ruby.lib_files
38
37
  end
data/History.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Version history for the _Autoloaded_ project
2
2
 
3
+ ## <a name="v1.5.0"></a>v1.5.0, Wed 2/22/2017
4
+
5
+ * Add support for Ruby load paths (`$:`) that contain one or more
6
+ [_Pathname_][Ruby-Stdlib-Pathname] objects
7
+
3
8
  ## <a name="v1.4.1"></a>v1.4.1, Sat 1/24/2015
4
9
 
5
10
  * Don’t warn about a _VERSION_ constant presumably loaded by a _.gemspec_
@@ -32,7 +37,8 @@
32
37
  (First release)
33
38
 
34
39
  [JRuby]: http://jruby.org
35
- [Ruby-Core-Module-autoload]: http://ruby-doc.org/core/Module.html#method-i-autoload-3F "‘Module#autoload’ method in the Ruby Core Library"
36
- [Ruby-Core-Module-constants]: http://ruby-doc.org/core/Module.html#method-i-constants "‘Module#constants’ method in the Ruby Core Library"
37
- [readme]: http://github.com/njonsson/autoloaded/blob/master/README.md "Autoloaded readme"
38
- [inline-documentation]: http://www.rubydoc.info/github/njonsson/autoloaded "Autoloaded inline documentation"
40
+ [Ruby-Core-Module-autoload]: http://ruby-doc.org/core/Module.html#method-i-autoload-3F "‘Module#autoload’ method in the Ruby Core Library"
41
+ [Ruby-Core-Module-constants]: http://ruby-doc.org/core/Module.html#method-i-constants "‘Module#constants’ method in the Ruby Core Library"
42
+ [Ruby-Stdlib-Pathname]: http://ruby-doc.org/stdlib/libdoc/pathname/rdoc/Pathname.html "‘Pathname’ class in the Ruby Standard Library"
43
+ [readme]: http://github.com/njonsson/autoloaded/blob/master/README.md "Autoloaded readme"
44
+ [inline-documentation]: http://www.rubydoc.info/github/njonsson/autoloaded "Autoloaded inline documentation"
data/README.md CHANGED
@@ -173,21 +173,21 @@ You can specify `with` multiple times, and its effects are cumulative.
173
173
  # lib/my_awesome_gem.rb
174
174
  module MyAwesomeGem
175
175
 
176
- Autoloaded.module do |autoloaded|
177
- autoloaded.with :DB, :VERSION
176
+ Autoloaded.module do |autoloading|
177
+ autoloading.with :DB, :VERSION
178
178
  # Or:
179
- # autoloaded.with :DB
180
- # autoloaded.with :VERSION
179
+ # autoloading.with :DB
180
+ # autoloading.with :VERSION
181
181
  # Or:
182
- # autoloaded.with DB: 'db', VERSION: 'version'
182
+ # autoloading.with DB: 'db', VERSION: 'version'
183
183
  # Or:
184
- # autoloaded.with DB: 'db'
185
- # autoloaded.with VERSION: 'version'
184
+ # autoloading.with DB: 'db'
185
+ # autoloading.with VERSION: 'version'
186
186
  # Or:
187
- # autoloaded.with 'db' => :DB, 'version' => :VERSION
187
+ # autoloading.with 'db' => :DB, 'version' => :VERSION
188
188
  # Or:
189
- # autoloaded.with 'db' => :DB
190
- # autoloaded.with 'version' => :VERSION
189
+ # autoloading.with 'db' => :DB
190
+ # autoloading.with 'version' => :VERSION
191
191
  end
192
192
 
193
193
  # The above is the equivalent of:
@@ -202,20 +202,20 @@ module MyAwesomeGem
202
202
 
203
203
  class DB
204
204
 
205
- Autoloaded.class do |autoloaded|
206
- autoloaded.with :MySQL, :PostgreSQL, [:Access, :SQLServer] => 'MicroSoft'
205
+ Autoloaded.class do |autoloading|
206
+ autoloading.with :MySQL, :PostgreSQL, [:Access, :SQLServer] => 'MicroSoft'
207
207
  # Or:
208
- # autoloaded.with :MySQL,
209
- # :PostgreSQL,
210
- # Access: 'MicroSoft',
211
- # SQLServer: 'MicroSoft'
208
+ # autoloading.with :MySQL,
209
+ # :PostgreSQL,
210
+ # Access: 'MicroSoft',
211
+ # SQLServer: 'MicroSoft'
212
212
  # Or:
213
- # autoloaded.with :MySQL, :PostgreSQL, 'MicroSoft' => [:Access, :SQLServer]
213
+ # autoloading.with :MySQL, :PostgreSQL, 'MicroSoft' => [:Access, :SQLServer]
214
214
  # Or:
215
- # autoloaded.with :MySQL,
216
- # :PostgreSQL,
217
- # 'MicroSoft' => :Access,
218
- # 'MicroSoft' => :SQLServer
215
+ # autoloading.with :MySQL,
216
+ # :PostgreSQL,
217
+ # 'MicroSoft' => :Access,
218
+ # 'MicroSoft' => :SQLServer
219
219
  # Or ...
220
220
  end
221
221
 
@@ -283,12 +283,12 @@ module MyAwesomeGem
283
283
 
284
284
  class DB
285
285
 
286
- Autoloaded.class do |autoloaded|
287
- autoloaded.with :MySQL, :PostgreSQL, [:Access, :SQLServer] => 'MicroSoft'
286
+ Autoloaded.class do |autoloading|
287
+ autoloading.with :MySQL, :PostgreSQL, [:Access, :SQLServer] => 'MicroSoft'
288
288
 
289
- autoloaded.except 'SELF-DESTRUCT!'
289
+ autoloading.except 'SELF-DESTRUCT!'
290
290
  # Or:
291
- # autoloaded.except :SELF_DESTRUCT_
291
+ # autoloading.except :SELF_DESTRUCT_
292
292
  # Or ...
293
293
  end
294
294
 
@@ -357,12 +357,12 @@ which source files should be autoloaded.
357
357
 
358
358
  module MyAwesomeGem
359
359
 
360
- Autoloaded.module do |autoloaded|
360
+ Autoloaded.module do |autoloading|
361
361
  # The following code is not actually very useful since the installed location
362
362
  # of a RubyGem varies with the operating system and user preferences. How to
363
363
  # compute the path properly is outside the scope of this readme and is left
364
364
  # as an exercise for the reader.
365
- autoloaded.from '/absolute/path/to/my_awesome_gem'
365
+ autoloading.from '/absolute/path/to/my_awesome_gem'
366
366
  end
367
367
 
368
368
  end
@@ -448,9 +448,9 @@ module MyAwesomeGem
448
448
 
449
449
  class DB
450
450
 
451
- results = Autoloaded.class do |autoloaded|
452
- autoloaded.with :MySQL, :PostgreSQL, [:Access, :SQLServer] => 'MicroSoft'
453
- autoloaded.except 'SELF-DESTRUCT!'
451
+ results = Autoloaded.class do |autoloading|
452
+ autoloading.with :MySQL, :PostgreSQL, [:Access, :SQLServer] => 'MicroSoft'
453
+ autoloading.except 'SELF-DESTRUCT!'
454
454
  end
455
455
  STDOUT.puts results.inspect # See output below.
456
456
 
@@ -489,6 +489,19 @@ directories. This is by design.
489
489
  4. Push to the branch: `git push origin my-new-feature`.
490
490
  5. [Create][compare-Autoloaded-branches] a new pull request.
491
491
 
492
+ Development
493
+ -----------
494
+
495
+ After cloning the repository, `bin/setup` to install dependencies. Then `rake` to
496
+ run the tests. You can also `bin/console` to get an interactive prompt that will
497
+ allow you to experiment.
498
+
499
+ To install this gem onto your local machine, `bundle exec rake install`. To
500
+ release a new version, update the version number in _lib/autoloaded/version.rb_,
501
+ and then `bundle exec rake release`, which will create a Git tag for the version,
502
+ push Git commits and tags, and push the _.gem_ file to
503
+ [RubyGems.org](RubyGems-release).
504
+
492
505
  ## License
493
506
 
494
507
  Released under the [MIT License][MIT-License].
data/Rakefile CHANGED
@@ -1,2 +1,6 @@
1
1
  require 'bundler/gem_tasks'
2
2
  require_relative 'lib/tasks'
3
+
4
+ desc 'Run all specs'
5
+ task '' => :spec
6
+ task default: :spec
@@ -1,46 +1,47 @@
1
1
  # coding: utf-8
2
-
3
2
  lib = File.expand_path('../lib', __FILE__)
4
3
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
-
6
- require 'autoloaded'
4
+ require 'autoloaded/version'
7
5
 
8
6
  Gem::Specification.new do |spec|
9
- spec.name = 'autoloaded'
10
- spec.version = Autoloaded::VERSION
11
- spec.authors = ['Nils Jonsson']
12
- spec.email = ['autoloaded@nilsjonsson.com']
13
- spec.summary = <<-end_summary.chomp.gsub(/^\s+/, '').gsub("\n", ' ')
14
- Eliminates the drudgery of handcrafting a Ruby Core
15
- library `autoload` statement for each Ruby source code
16
- file in your project. It also avoids the limitations of
17
- rigid convention-driven facilities such as those
18
- provided by the ActiveSupport RubyGem.
19
- end_summary
20
- spec.description = <<-end_description.chomp.gsub(/^\s+/, '').gsub("\n", ' ')
21
- If you like the ‘Module#autoload’ feature of the Ruby
22
- Core library, you may have wished for Autoloaded. It
23
- eliminates the drudgery of handcrafting an `autoload`
24
- statement for each Ruby source code file in your
25
- project. It also avoids the limitations of rigid
26
- convention-driven facilities such as those provided by
27
- the ActiveSupport RubyGem. Autoloaded assumes, but does
28
- not enforce, `CamelCase`-to-`snake_case` correspondence
29
- between the names of constants and source files. You can
30
- combine conventions, even putting multiple autoloaded
31
- constants in a single source file.
32
- end_description
33
- spec.homepage = 'http://njonsson.github.io/autoloaded'
34
- spec.license = 'MIT'
7
+ spec.name = 'autoloaded'
8
+ spec.version = Autoloaded::VERSION
9
+ spec.authors = ['Nils Jonsson']
10
+ spec.email = ['autoloaded@nilsjonsson.com']
35
11
 
36
- spec.files = `git ls-files -z`.split("\x0")
37
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename f }
38
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
39
- spec.require_paths = ['lib']
12
+ spec.summary = <<-end_summary.chomp.gsub(/^\s+/, '').gsub("\n", ' ')
13
+ Eliminates the drudgery of handcrafting a Ruby Core
14
+ library `autoload` statement for each Ruby source code
15
+ file in your project. It also avoids the limitations of
16
+ rigid convention-driven facilities such as those provided
17
+ by the ActiveSupport RubyGem.
18
+ end_summary
19
+ spec.description = <<-end_description.chomp.gsub(/^\s+/, '').gsub("\n", ' ')
20
+ If you like the ‘Module#autoload’ feature of the Ruby Core
21
+ library, you may have wished for Autoloaded. It eliminates
22
+ the drudgery of handcrafting an `autoload` statement for
23
+ each Ruby source code file in your project. It also avoids
24
+ the limitations of rigid convention-driven facilities such
25
+ as those provided by the ActiveSupport RubyGem. Autoloaded
26
+ assumes, but does not enforce, `CamelCase`-to-`snake_case`
27
+ correspondence between the names of constants and source
28
+ files. You can combine conventions, even putting multiple
29
+ autoloaded constants in a single source file.
30
+ end_description
31
+ spec.homepage = 'http://njonsson.github.io/autoloaded'
32
+ spec.license = 'MIT'
40
33
 
41
34
  spec.required_ruby_version = '~> 2'
42
35
 
43
- spec.add_development_dependency 'bundler', '~> 1'
44
- spec.add_development_dependency 'rake', '~> 10'
45
- spec.add_development_dependency 'rspec', '~> 3'
36
+ spec.add_development_dependency 'bundler', '~> 1'
37
+ spec.add_development_dependency 'codeclimate-test-reporter', '~> 0'
38
+ spec.add_development_dependency 'rake', '~> 10'
39
+ spec.add_development_dependency 'rspec', '~> 3.3'
40
+
41
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
42
+ f.match(%r{^(test|spec|features)/})
43
+ end
44
+ spec.bindir = 'exe'
45
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename f }
46
+ spec.require_paths = %w(lib)
46
47
  end
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'bundler/setup'
4
+ require 'autoloaded'
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ require 'pry'
10
+ Pry.start
@@ -0,0 +1,8 @@
1
+ #!/bin/bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+
5
+ which bundle || gem install bundler
6
+ bundle
7
+
8
+ # Do any other automated setup that you need to do here
@@ -1,3 +1,9 @@
1
+ require 'autoloaded/inflection'
2
+ require 'autoloaded/load_pathed_directory'
3
+ require 'autoloaded/specification'
4
+ require 'autoloaded/specifications'
5
+ require 'autoloaded/warning'
6
+
1
7
  module Autoloaded
2
8
 
3
9
  # Autoloads files in a source directory.
@@ -1,3 +1,4 @@
1
+ require 'autoloaded/refine/string/to_source_filename'
1
2
  require 'set'
2
3
 
3
4
  using ::Autoloaded::Refine::String::ToSourceFilename
@@ -1,5 +1,3 @@
1
- module Autoloaded; end
2
-
3
1
  # Prints deprecation messages to _stderr_.
4
2
  #
5
3
  # @since 1.3
@@ -1,5 +1,3 @@
1
- module Autoloaded; end
2
-
3
1
  # Translates source filenames into constants.
4
2
  #
5
3
  # @since 1.3