files 0.3.1 → 0.4.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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 60f348fdce5ac31f9850d2fd8172c9723a15d7e3
4
+ data.tar.gz: 75a4617b28de2d22dd27ec029aa4d9330bf97426
5
+ SHA512:
6
+ metadata.gz: c2d3e4a3ecf3b4f73a589f4d810edfa600769b155c3a272c2798a2dc85866d1c8351ac95891e9a0417dba58160f6848da969ba398b993115b4400eb03d08f957
7
+ data.tar.gz: 4cbcd950be320efa713ba35337be7dd2cbe7e8552b2919e5b834c0158ddc75371a26abdfbe17727d36a6b00d0e3404aeb6748b8671d5b12e8679518df55cb8e4
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2017 Alex Chaffee
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md CHANGED
@@ -62,6 +62,14 @@ see `test/files_test.rb` for more usage examples
62
62
  * if the argument to `file` is a Ruby `File` object, then it copies the named file into the new location
63
63
  * To copy another directory to one created by this module, specifying `:src` to `dir` method
64
64
  * [Not sure if this is implemented right... should it copy the *dir* or its *contents*?]
65
+ * the `dir do` block is executed in the scope of the `Dir` object, so it can't call methods on your object directly.
66
+ Instead, set a temporary local variable, like this:
67
+
68
+ my_cheese = cheese()
69
+ dir do
70
+ file "which_cheese.txt", my_cheese
71
+ end
72
+
65
73
 
66
74
  ## TODO
67
75
 
@@ -66,7 +66,7 @@ module Files
66
66
  else
67
67
  path = File.join(current, name)
68
68
  end
69
- Dir.mkdir path
69
+ FileUtils.mkdir_p path
70
70
  @dirs << name if name
71
71
 
72
72
  if options[:src]
@@ -1,3 +1,3 @@
1
1
  module Files
2
- VERSION = "0.3.1"
2
+ VERSION = "0.4.0"
3
3
  end
metadata CHANGED
@@ -1,15 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: files
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
5
- prerelease:
4
+ version: 0.4.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Alex Chaffee
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-10-15 00:00:00.000000000 Z
11
+ date: 2018-09-13 00:00:00.000000000 Z
13
12
  dependencies: []
14
13
  description: Ever want to create a whole bunch of files at once? Like when you're
15
14
  writing tests for a tool that processes files? The Files gem lets you cleanly specify
@@ -22,8 +21,9 @@ executables: []
22
21
  extensions: []
23
22
  extra_rdoc_files: []
24
23
  files:
25
- - .gitignore
24
+ - ".gitignore"
26
25
  - Gemfile
26
+ - LICENSE.txt
27
27
  - README.md
28
28
  - Rakefile
29
29
  - files.gemspec
@@ -33,33 +33,26 @@ files:
33
33
  - test/files_test.rb
34
34
  homepage: ''
35
35
  licenses: []
36
+ metadata: {}
36
37
  post_install_message:
37
38
  rdoc_options: []
38
39
  require_paths:
39
40
  - lib
40
41
  required_ruby_version: !ruby/object:Gem::Requirement
41
- none: false
42
42
  requirements:
43
- - - ! '>='
43
+ - - ">="
44
44
  - !ruby/object:Gem::Version
45
45
  version: '0'
46
- segments:
47
- - 0
48
- hash: 1058874154212753118
49
46
  required_rubygems_version: !ruby/object:Gem::Requirement
50
- none: false
51
47
  requirements:
52
- - - ! '>='
48
+ - - ">="
53
49
  - !ruby/object:Gem::Version
54
50
  version: '0'
55
- segments:
56
- - 0
57
- hash: 1058874154212753118
58
51
  requirements: []
59
52
  rubyforge_project: files
60
- rubygems_version: 1.8.24
53
+ rubygems_version: 2.6.10
61
54
  signing_key:
62
- specification_version: 3
55
+ specification_version: 4
63
56
  summary: a simple DSL for creating temporary files and directories
64
57
  test_files:
65
58
  - test/data/cheez_doing_it_wrong.jpg