startor 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/startor +10 -2
- data/lib/String/each.rb +20 -0
- data/lib/String/each_char.rb +14 -0
- data/lib/String/each_line.rb +15 -0
- data/lib/String/grep.rb +26 -0
- data/lib/Version.rb +5 -3
- metadata +6 -3
- data/lib/String/capture.rb +0 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b5d7e2a33c90c19f03a85d1ae3e5fca2384a62d4c648372446cc62fb53b8a395
|
4
|
+
data.tar.gz: 1fcfcd988e63d90c4e8618d3aaf5347338a643dcdfa60cf26ee2d2bc3cf240cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 71723ec70040110524db9f82bf5a15c4c87294ec6c210509d41a0e15895c53f7ec3d2f38b60178e94202db0b645d10f5389b7feab40607216cc0038d0b0b6bda
|
7
|
+
data.tar.gz: 323d3f17bbafa7bb06eb1e208c8c616a8a997c9cdf1d721a613e63cd8d11ca7edd4d42f778fc80c0176aacc4e88bbe69506c45d77f3885e2488970de69093b0d
|
data/bin/startor
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# startor
|
3
3
|
|
4
|
-
#
|
5
|
-
# 0.6.
|
4
|
+
# 20181107
|
5
|
+
# 0.6.1
|
6
6
|
|
7
7
|
# History: Derived from https://kremalicious.com/simple-tor-setup-on-mac-os-x/...
|
8
8
|
|
@@ -40,6 +40,14 @@
|
|
40
40
|
# Gemification and further tidying...
|
41
41
|
# 1. + startor.gemspec
|
42
42
|
# 2. Added to the section of comments entitled "Installation", which includes making use of the startor gem.
|
43
|
+
# 0/1
|
44
|
+
# 3. + lib/String/grep.rb, which had been left out after attempting to gather together all the requisite libraries for each version of startor prior to putting into a git repo and publishing yesterday. I am needing to just create a repo from dot, have tests in place, and/or a sandbox to ensure that libraries I already have installed don't mislead me into thinking that I have all the dependencies intalled.
|
45
|
+
# 4. + lib/String/each.rb, which is a dependency of String#grep's.
|
46
|
+
# 5. + lib/String/each_char.rb, which is a dependency of String#each's.
|
47
|
+
# 6. + lib/String/each_line.rb, which is a dependency of String#each's.
|
48
|
+
# 7. Updated lib/Version.rb, so that: /require 'String/capture'/require 'Thoran/String/Capture/capture'/, which I should have done as of startor 0.3.0 when gathering the libraries, since that post-dates the change to Version.rb.
|
49
|
+
# 8. - lib/String/capture.rb
|
50
|
+
# 9. ~ .gitignore: + *.gem, so that gem builds don't go in the repo without me having to remove them manually when I do `git add .`.
|
43
51
|
|
44
52
|
require 'FileUtils/which'
|
45
53
|
require 'Kernel/run'
|
data/lib/String/each.rb
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
# String#each
|
2
|
+
|
3
|
+
# 20120330
|
4
|
+
# 0.0.0
|
5
|
+
|
6
|
+
# Description: Ruby 1.9 no longer mixes in Enumerable, so here's String's missing #each method. See String#each_line and String#each_char for the specific implementations.
|
7
|
+
|
8
|
+
require 'String/each_char'
|
9
|
+
require 'String/each_line'
|
10
|
+
|
11
|
+
class String
|
12
|
+
|
13
|
+
def each(unit = :line, &block)
|
14
|
+
case unit
|
15
|
+
when :line; each_line(&block)
|
16
|
+
when :char; each_char(&block)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# String#each_char
|
2
|
+
|
3
|
+
# 20070101
|
4
|
+
# 0.0.0
|
5
|
+
|
6
|
+
# History: When doing String#any_space? I needed a way to iterate through each character in a string for comparison but not using the ascii representation such as with #each_byte.
|
7
|
+
|
8
|
+
class String
|
9
|
+
|
10
|
+
def each_char
|
11
|
+
(0..(self.size - 1)).each{|i| yield self[i, 1]}
|
12
|
+
end
|
13
|
+
|
14
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# String#each_line
|
2
|
+
|
3
|
+
# 20120330
|
4
|
+
# 0.0.0
|
5
|
+
|
6
|
+
# Description: Ruby 1.9 no longer mixes in Enumerable, so there's no #each method. Here's the equivalent 1.8 version of String's missing #each method, but renamed to describe it's functionality more correctly. See String#each, which calls this method as the default behaviour. Also see String#each_char.
|
7
|
+
|
8
|
+
class String
|
9
|
+
|
10
|
+
def each_line
|
11
|
+
lines = self.split("\n")
|
12
|
+
0.upto(lines.size - 1){|i| yield lines[i]}
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
data/lib/String/grep.rb
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
# String#grep
|
2
|
+
|
3
|
+
# 20120330
|
4
|
+
# 0.1.1
|
5
|
+
|
6
|
+
# Changes:
|
7
|
+
# 1. + require 'String/each', since Ruby 1.9 no longer mixes in Enumerable.
|
8
|
+
# 2. + include Enumerable, since Ruby 1.9 no longer mixes in Enumerable.
|
9
|
+
# 0/1
|
10
|
+
# 3. ~ grep(), so as it joins the lines with linefeeds.
|
11
|
+
|
12
|
+
# Note:
|
13
|
+
# 1. It still doesn't do the replace bit yet...
|
14
|
+
# 2. There's probably a faster way to do this but for small strings it is plenty good.
|
15
|
+
|
16
|
+
require 'String/each'
|
17
|
+
|
18
|
+
class String
|
19
|
+
|
20
|
+
include Enumerable
|
21
|
+
|
22
|
+
def grep(pattern)
|
23
|
+
self.select{|line| line =~ pattern}.join("\n")
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
data/lib/Version.rb
CHANGED
@@ -1,21 +1,23 @@
|
|
1
1
|
# Version.rb
|
2
2
|
# Version
|
3
3
|
|
4
|
-
#
|
5
|
-
# 0.13.
|
4
|
+
# 20180209
|
5
|
+
# 0.13.1
|
6
6
|
|
7
7
|
# Description: This class is able to compare strings containing version numbers.
|
8
8
|
|
9
9
|
# Changes since 0.12:
|
10
10
|
# 1. Version.each now returns Version instances.
|
11
11
|
# 2. Version.sorted now returns a collection with either strings or Version instances, depending on what was supplied.
|
12
|
+
# 0/1
|
13
|
+
# 3. - require 'String/capture' && + require 'Thoran/String/Capture/capture'
|
12
14
|
|
13
15
|
lib_dir = File.dirname(File.expand_path(__FILE__))
|
14
16
|
$LOAD_PATH.unshift(lib_dir) unless $LOAD_PATH.include?(lib_dir)
|
15
17
|
|
16
18
|
require 'Module/alias_methods'
|
17
19
|
require 'Ordinal/Array'
|
18
|
-
require 'String/capture'
|
20
|
+
require 'Thoran/String/Capture/capture'
|
19
21
|
|
20
22
|
class Version
|
21
23
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: startor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- thoran
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-11-
|
11
|
+
date: 2018-11-07 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Easily install, start, and stop tor.
|
14
14
|
email: code@thoran.com
|
@@ -40,7 +40,10 @@ files:
|
|
40
40
|
- lib/Platform/OS/nt_basedQ.rb
|
41
41
|
- lib/Platform/OS/osxQ.rb
|
42
42
|
- lib/Platform/OS/windowsQ.rb
|
43
|
-
- lib/String/
|
43
|
+
- lib/String/each.rb
|
44
|
+
- lib/String/each_char.rb
|
45
|
+
- lib/String/each_line.rb
|
46
|
+
- lib/String/grep.rb
|
44
47
|
- lib/Thoran/String/Capture/capture.rb
|
45
48
|
- lib/Thoran/String/Captures/captures.rb
|
46
49
|
- lib/Version.rb
|
data/lib/String/capture.rb
DELETED