fun_with_files 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YjBjMTU1NDdlNDRhMmM5YmRhOGQ2MDJiMTFhM2QwMjZmM2ZjMmQwYw==
4
+ MTc4NmU5MmI0MGZmMWYzNDEzOGFjNDBlZDNkZjM0MTA1ZWI5MWVlNw==
5
5
  data.tar.gz: !binary |-
6
- NmRiMGRmZmE1YzRkYTRhZjMyNzI4MDYyZTkyMWFjNmVhMTQ4ZGJjZA==
6
+ YWJmODhjZWZhMDdmMjViNTU5ZWI1ZmI5Y2RhZGU3MzRkMTZlOWQ3Zg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NzAxZjhmYTA2NzIyNjkwNmVlNTMwMjNiZmQ3MjhlYTc5ZWM5ZDMyOTUwNmY1
10
- YTAyMTNiMDkwZTgzY2FiMTMyMzMwMTk2NzBiMTcyNDBiNTQ2YTMyNmQwNjMw
11
- MmM0ODdiYWM3Yjk3ZDBkZTI4ZjA1MDdmYWYxYzM0NDBhODE3MTI=
9
+ MzZhNWUyZDhlYmVmZDcwODg0MzJjNzYzZDFlMmZhZDg5NmE3MjJlMWVmM2Qw
10
+ ODdiNGQ0NzRlNTVmMDE2ODRiY2Q4YzRiZTMzNTRhMmQwNTkxNmJiY2I0NTJm
11
+ MDMzODdlNTI0ODY0N2NmMTIxZTNkMDY5MTc2NmJjYzU4ZjI4NDE=
12
12
  data.tar.gz: !binary |-
13
- YjhlYjRhODBmMzc3NDNkZGE4NDM3MzgwMTFlMDgyMWZjY2U5MTdjZjI0NDU5
14
- M2VmNzAxOGU2NmQ4N2ZlN2Y4NTE4NWQ1OWUwZDMxODE3ODJkYmNhMGU3MWRh
15
- YjFhMDc3NTZkODRkMTBiMDc4N2I4YTZiYTVhZGFhNDQ4MmZlZDY=
13
+ NTAzNzg0Y2Y4NDJkZjQ1NjNhY2UyNTk1OTc5OGE0YmJlYWNhOTFmMGJhMzI2
14
+ MzI3OTRmYzY3OWRmMmU5YTdiZmFhZTE0NGQ3YmViZWNmNzgyYmUxN2IwMTkw
15
+ YzA2OGQzZDM1NTM2NWUwNzU2MWM0M2Y5MGQ5NTVhZTYxMWU0MDE=
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.8
1
+ 0.0.9
@@ -2,4 +2,8 @@ class String
2
2
  def fwf_blank?
3
3
  self.strip.length == 0
4
4
  end
5
+
6
+ def fwf_filepath( *args )
7
+ FunWith::Files::FilePath.new( self, *args )
8
+ end
5
9
  end
@@ -1,6 +1,6 @@
1
1
  module FunWith
2
2
  module Files
3
- module FilePathLocationMethods
3
+ module FilePathClassMethods
4
4
  # args implicitly joined to cwd
5
5
  def cwd( *args )
6
6
  Dir.pwd.fwf_filepath.join( *args )
@@ -3,25 +3,27 @@ require 'digest' # stdlib
3
3
  require 'pathname' # stdlib
4
4
  require 'tmpdir' # Dir.tmpdir
5
5
 
6
- files = Dir.glob( File.join( File.dirname(__FILE__), "fun_with", "**", "*.rb" ) )
7
6
 
8
- for file in files.map{ |f| f.gsub(/\.rb$/, '') }
9
- require file
7
+ for fil in ["string", "array", "false", "hash", "nil", "object"]
8
+ require_relative File.join( "fun_with", "files", "core_extensions", fil )
10
9
  end
11
10
 
12
- FunWith::Files::RootPath.rootify( FunWith::Files, __FILE__.fwf_filepath.dirname.up )
11
+ for fil in ["file_path", "string_behavior", "file_manipulation_methods", "file_permission_methods", "digest_methods"]
12
+ require_relative File.join( "fun_with", "files", fil )
13
+ end
13
14
 
14
- module FunWith
15
- module Files
16
- class FilePath
17
- for moduul in [ StringBehavior,
18
- FileManipulationMethods,
19
- FilePermissionMethods,
20
- DigestMethods ]
21
- include moduul
22
- end
23
- end
24
- end
15
+ # These have some FilePath methods required by .requir()
16
+ for moduul in [ FunWith::Files::StringBehavior,
17
+ FunWith::Files::FileManipulationMethods,
18
+ FunWith::Files::FilePermissionMethods,
19
+ FunWith::Files::DigestMethods ]
20
+ FunWith::Files::FilePath.send( :include, moduul )
25
21
  end
26
22
 
27
- FunWith::Files::FilePath.extend( FunWith::Files::FilePathLocationMethods )
23
+ lib_dir = File.join( File.dirname(__FILE__), "fun_with" ).fwf_filepath
24
+
25
+ # And requir() everything else
26
+ lib_dir.requir
27
+
28
+ FunWith::Files::RootPath.rootify( FunWith::Files, __FILE__.fwf_filepath.dirname.up )
29
+ FunWith::Files::FilePath.extend( FunWith::Files::FilePathClassMethods )
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fun_with_files
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bryce Anderson
@@ -65,13 +65,12 @@ files:
65
65
  - ./lib/fun_with/files/file_manipulation_methods.rb
66
66
  - ./lib/fun_with/files/file_orderer.rb
67
67
  - ./lib/fun_with/files/file_path.rb
68
- - ./lib/fun_with/files/file_path_location_methods.rb
68
+ - ./lib/fun_with/files/file_path_class_methods.rb
69
69
  - ./lib/fun_with/files/file_permission_methods.rb
70
70
  - ./lib/fun_with/files/pathname_extensions.rb
71
71
  - ./lib/fun_with/files/remote_path.rb
72
72
  - ./lib/fun_with/files/root_path.rb
73
73
  - ./lib/fun_with/files/string_behavior.rb
74
- - ./lib/fun_with/files/string_extensions.rb
75
74
  - ./lib/fun_with/files/xdg_extensions.rb
76
75
  - ./lib/fun_with_files.rb
77
76
  - ./test/data/empty.txt
@@ -1,5 +0,0 @@
1
- class String
2
- def fwf_filepath( *args )
3
- FunWith::Files::FilePath.new( self, *args )
4
- end
5
- end