scout-essentials 1.6.12 → 1.6.14
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.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/scout/misc/filesystem.rb +32 -1
- data/lib/scout/open/final.rb +5 -0
- data/scout-essentials.gemspec +4 -4
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0586199497442010ccb5ea02066de21a220968857261f64799769e2af2233434'
|
4
|
+
data.tar.gz: c6d0e58c2a419e9a5afa1a0f6483ed5c6f816ceddb2deefd84c2b64f6fa694c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a1ca8a38e73ece435c2b2bc43fe2e35791ecc2015e5059e3ea571cfdd78f2c9fd98c816d03c7856b732fa9e3c74f21634bdc4b0962c422c9448b97aa396d65c
|
7
|
+
data.tar.gz: 4a11339327cb65af5f3d79491b51ac24b83ca2ebffbfd075738d9c6c77e1dc2627b78418f3742e14230b3c2eadf0380ccc30b6c5ca684405f3109c40a0e2ac70
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.6.
|
1
|
+
1.6.14
|
@@ -23,7 +23,7 @@ module Misc
|
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
26
|
-
def self.
|
26
|
+
def self.tarize_cmd(path, dest = nil)
|
27
27
|
Misc.in_dir(path) do
|
28
28
|
if dest
|
29
29
|
CMD.cmd("tar cvfz '#{dest}' '.'")
|
@@ -33,6 +33,37 @@ module Misc
|
|
33
33
|
end
|
34
34
|
end
|
35
35
|
|
36
|
+
def self.tarize(source_dir, archive_path)
|
37
|
+
require 'rubygems/package'
|
38
|
+
require 'zlib'
|
39
|
+
require 'stringio'
|
40
|
+
require 'fileutils'
|
41
|
+
|
42
|
+
tar_io = StringIO.new("")
|
43
|
+
|
44
|
+
Gem::Package::TarWriter.new(tar_io) do |tar|
|
45
|
+
Dir[File.join(source_dir, '**', '*')].each do |file|
|
46
|
+
relative_path = file.sub(/^#{Regexp.escape(source_dir)}\/?/, '')
|
47
|
+
|
48
|
+
if File.directory?(file)
|
49
|
+
tar.mkdir(relative_path, File.stat(file).mode)
|
50
|
+
else
|
51
|
+
tar.add_file(relative_path, File.stat(file).mode) do |tf|
|
52
|
+
File.open(file, 'rb') { |f| tf.write(f.read) }
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
tar_io.rewind
|
59
|
+
|
60
|
+
File.open(archive_path, 'wb') do |f|
|
61
|
+
gz = Zlib::GzipWriter.new(f)
|
62
|
+
gz.write(tar_io.string)
|
63
|
+
gz.close
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
36
67
|
def self.untar(file, target = '.')
|
37
68
|
target = target.find if Path === target
|
38
69
|
file = file.find if Path === file
|
data/lib/scout/open/final.rb
CHANGED
@@ -141,6 +141,11 @@ module Open
|
|
141
141
|
end
|
142
142
|
end
|
143
143
|
|
144
|
+
def self.size(file)
|
145
|
+
file = file.find if Path === file
|
146
|
+
File.size(file)
|
147
|
+
end
|
148
|
+
|
144
149
|
def self.ln_s(source, target, options = {})
|
145
150
|
source = source.find if Path === source
|
146
151
|
target = target.find if Path === target
|
data/scout-essentials.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: scout-essentials 1.6.
|
5
|
+
# stub: scout-essentials 1.6.14 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "scout-essentials".freeze
|
9
|
-
s.version = "1.6.
|
9
|
+
s.version = "1.6.14".freeze
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib".freeze]
|
13
13
|
s.authors = ["Miguel Vazquez".freeze]
|
14
|
-
s.date = "
|
14
|
+
s.date = "1980-01-02"
|
15
15
|
s.description = "Things a scout can use anywhere".freeze
|
16
16
|
s.email = "mikisvaz@gmail.com".freeze
|
17
17
|
s.extra_rdoc_files = [
|
@@ -146,7 +146,7 @@ Gem::Specification.new do |s|
|
|
146
146
|
]
|
147
147
|
s.homepage = "http://github.com/mikisvaz/scout-essentials".freeze
|
148
148
|
s.licenses = ["MIT".freeze]
|
149
|
-
s.rubygems_version = "3.6.
|
149
|
+
s.rubygems_version = "3.6.7".freeze
|
150
150
|
s.summary = "Scout essential tools".freeze
|
151
151
|
|
152
152
|
s.specification_version = 4
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scout-essentials
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miguel Vazquez
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: shoulda
|
@@ -271,7 +271,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
271
271
|
- !ruby/object:Gem::Version
|
272
272
|
version: '0'
|
273
273
|
requirements: []
|
274
|
-
rubygems_version: 3.6.
|
274
|
+
rubygems_version: 3.6.7
|
275
275
|
specification_version: 4
|
276
276
|
summary: Scout essential tools
|
277
277
|
test_files: []
|