moby.rb 2.0.0 → 2.0.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6f4bd8e1d75dd3b141595bf678fb267890c5554a26999b147485bda0eaac40f7
4
- data.tar.gz: c49e5c7240d47a06656b91c1108dacdd1016248d86d1b5eb4843beecb092fa33
3
+ metadata.gz: 1465b74a2b0afa48c9b362c216ed5805cc071fb6d7eb3a747719c9fdd2ed0aef
4
+ data.tar.gz: d071e6da9037c65a6938e8e6ef892a0299bd0baf924a3ac3e397c59d6e9de5d1
5
5
  SHA512:
6
- metadata.gz: '029f6229354cdc1746db60befce2a266092c647dbd861c72871ad04b0abda2f46aa7568465a21b5c75543442456d03fd9979cce96a433fbc2a6ffe3898444fe7'
7
- data.tar.gz: 8329d384ab5ff2ce15563cd07ddcda4ddecc97458558ecac9a3199607cb7dfdc240e56646cbaf479ee6bba9dda049da15abf0fbb24bd0adb7088da33fc8425a9
6
+ metadata.gz: c91b4244e49d8307c95f834606a5a986c21de651643d3de4f0697620ae131f77f6a5150ef30e0a0cd4aae6310b0fdcd4dd72108481a121fa9b68fa3cc2480397
7
+ data.tar.gz: 2091c48b06c880523eaa00ae3be858b3b13a87316c5af506e25adce3b6b9ff6867918fdbe88b5744c7c1f4a70510e648f7a634ce2a13d0371042585e576d59ac
data/CHANGELOG CHANGED
@@ -1,5 +1,20 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 20260812
4
+
5
+ 2.0.2: Adopt the CHANGELOG-matching version test.
6
+
7
+ 1. ~ test/Moby/VERSION_test.rb: replace the hardcoded "version is X.Y.Z" assertion and the loose semver check with the standard form — VERSION is a String, an anchored X.Y.Z, and matches the newest CHANGELOG entry. It no longer needs a per-release edit and it guards against VERSION.rb ↔ CHANGELOG drift.
8
+ 2. ~ lib/Moby/VERSION.rb: VERSION: /2.0.1/2.0.2/
9
+
10
+ 2.0.1: Tidy the gemspec and guard it with a test.
11
+
12
+ 1. ~ moby.rb.gemspec: declare the dependencies as data — spec.dependencies = [...] and spec.development_dependencies = [...], via setters added in a local reopening of Gem::Specification — in place of the add_dependency/add_development_dependency calls; - spec.date, which was a stale literal (2.0.0 shipped the gem with it), letting RubyGems' default stand (rubygems.org uses the push time regardless).
13
+ 2. + test/gemspec_test.rb: loads moby.rb.gemspec and checks that it validates, pins no date (spec.date left at RubyGems' default), takes its version from Moby::VERSION, and declares the expected runtime and development dependencies — a guard for the declarative gemspec above, whose custom setters are where a dependency could silently go missing, and against re-pinning the stale date that 2.0.0 shipped with.
14
+ 3. ~ lib/Moby/VERSION.rb: VERSION: /2.0.0/2.0.1/
15
+ 4. ~ test/Moby/VERSION_test.rb: /2.0.0/2.0.1/
16
+
17
+
3
18
  ## 20260811
4
19
 
5
20
  2.0.0: Move the Mechanize engine into a pluggable backend and add a Selenium backend alongside it.
data/lib/Moby/VERSION.rb CHANGED
@@ -2,5 +2,5 @@
2
2
  # Moby::VERSION
3
3
 
4
4
  class Moby
5
- VERSION = '2.0.0'
5
+ VERSION = '2.0.2'
6
6
  end
data/moby.rb.gemspec CHANGED
@@ -2,11 +2,19 @@
2
2
 
3
3
  require_relative './lib/Moby/VERSION'
4
4
 
5
+ class Gem::Specification
6
+ def dependencies=(gems)
7
+ gems.each{|gem| add_dependency(*gem)}
8
+ end
9
+
10
+ def development_dependencies=(gems)
11
+ gems.each{|gem| add_development_dependency(*gem)}
12
+ end
13
+ end
14
+
5
15
  Gem::Specification.new do |spec|
6
16
  spec.name = 'moby.rb'
7
-
8
17
  spec.version = Moby::VERSION
9
- spec.date = '2026-01-08'
10
18
 
11
19
  spec.summary = "Moby is a credentials poisoning tool which floods phishing forms with fake credentials."
12
20
  spec.description = "Sometimes when they go fishing, they get a whale and it sinks their boat. Moby is a counter-phishing tool that floods phishing websites with fake login credentials, making harvested data useless."
@@ -18,14 +26,18 @@ Gem::Specification.new do |spec|
18
26
 
19
27
  spec.required_ruby_version = ">= 3.3.0"
20
28
 
21
- spec.add_dependency('mechanize', '~> 2')
22
- spec.add_dependency('selenium-webdriver', '~> 4')
23
- spec.add_dependency('switches.rb', '~> 0')
29
+ spec.dependencies = [
30
+ ['mechanize', '~> 2'],
31
+ ['selenium-webdriver', '~> 4'],
32
+ ['switches.rb', '~> 0'],
33
+ ]
24
34
 
25
- spec.add_development_dependency('minitest')
26
- spec.add_development_dependency('minitest-spec-context')
27
- spec.add_development_dependency('rake')
28
- spec.add_development_dependency('webmock')
35
+ spec.development_dependencies = [
36
+ 'minitest',
37
+ 'minitest-spec-context',
38
+ 'rake',
39
+ 'webmock'
40
+ ]
29
41
 
30
42
  spec.files = Dir[
31
43
  'bin/*',
@@ -4,20 +4,17 @@ require_relative '../test_helper'
4
4
 
5
5
  describe Moby do
6
6
  describe "VERSION" do
7
- it "has VERSION constant" do
8
- _(defined?(Moby::VERSION)).wont_be_nil
7
+ it "is a string" do
8
+ _(Moby::VERSION).must_be_instance_of String
9
9
  end
10
10
 
11
- it "version is a string" do
12
- _(Moby::VERSION).must_be_kind_of(String)
11
+ it "is three numbers separated by dots" do
12
+ _(Moby::VERSION).must_match(/\A\d+\.\d+\.\d+\z/)
13
13
  end
14
14
 
15
- it "version follows semver pattern" do
16
- _(Moby::VERSION).must_match(/\d+\.\d+\.\d+/)
17
- end
18
-
19
- it "version is 2.0.0" do
20
- _(Moby::VERSION).must_equal('2.0.0')
15
+ it "matches the newest entry in the CHANGELOG" do
16
+ changelog = File.read(File.expand_path('../../CHANGELOG', __dir__))
17
+ _(changelog[/^(\d+\.\d+\.\d+):/, 1]).must_equal Moby::VERSION
21
18
  end
22
19
  end
23
20
  end
@@ -0,0 +1,27 @@
1
+ # test/gemspec_test.rb
2
+
3
+ require_relative './test_helper'
4
+
5
+ describe 'moby.rb.gemspec' do
6
+ let(:spec){Gem::Specification.load(File.expand_path('../moby.rb.gemspec', __dir__))}
7
+
8
+ it "is a valid specification" do
9
+ _(spec.validate).must_equal(true)
10
+ end
11
+
12
+ it "does not pin a date" do
13
+ _(spec.date).must_equal(Gem::Specification.new.date)
14
+ end
15
+
16
+ it "takes its version from Moby::VERSION" do
17
+ _(spec.version.to_s).must_equal(Moby::VERSION)
18
+ end
19
+
20
+ it "declares its runtime dependencies" do
21
+ _(spec.runtime_dependencies.map(&:name).sort).must_equal(%w{mechanize selenium-webdriver switches.rb})
22
+ end
23
+
24
+ it "declares its development dependencies" do
25
+ _(spec.development_dependencies.map(&:name).sort).must_equal(%w{minitest minitest-spec-context rake webmock})
26
+ end
27
+ end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: moby.rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - thoran
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2026-01-08 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: mechanize
@@ -140,6 +140,7 @@ files:
140
140
  - test/Moby/Configuration_test.rb
141
141
  - test/Moby/RandomInputGenerator_test.rb
142
142
  - test/Moby/VERSION_test.rb
143
+ - test/gemspec_test.rb
143
144
  - test/moby_test.rb
144
145
  - test/test_helper.rb
145
146
  homepage: https://github.com/thoran/moby