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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 998bba49132f5d6805135b181e5ce13cbc00555318f7c3e164c949527dc103df
4
- data.tar.gz: 58b182ce0395000d88a10ee09bbe251f9be5af668f8ed1f905e5a147d74066ee
3
+ metadata.gz: b5d7e2a33c90c19f03a85d1ae3e5fca2384a62d4c648372446cc62fb53b8a395
4
+ data.tar.gz: 1fcfcd988e63d90c4e8618d3aaf5347338a643dcdfa60cf26ee2d2bc3cf240cc
5
5
  SHA512:
6
- metadata.gz: 68e883397b9a44f78a1b8ab0717652b3a686767a8ce5473dfb1e0f2fabd33bba7749862516402db8215feb9f7ad00cdb98db4bff5f8b521feb5e1004e1aee387
7
- data.tar.gz: 7c9ed15bfa22c96dd580bd6420836a0a7b41f5fac1dbaef41ae37835c25745a6642f2950df8394bfdc8a0321ed915d9977c485ff3af5e2cbc8f9a57324ca620d
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
- # 20181106
5
- # 0.6.0
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'
@@ -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
@@ -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
- # 20140910
5
- # 0.13.0
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.0
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-06 00:00:00.000000000 Z
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/capture.rb
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
@@ -1,20 +0,0 @@
1
- # String/capture
2
- # String#capture
3
-
4
- # 20120812
5
- # 0.2.0
6
-
7
- # Changes since 0.1:
8
- # 1. Added some testing.
9
-
10
- class String
11
-
12
- def capture(regex)
13
- if md = self.match(regex)
14
- md[1]
15
- else
16
- nil
17
- end
18
- end
19
-
20
- end