abstractify 1.0.0 → 1.1.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: 67ba8d4c2be1303327565c093e22518a82fd6022550273f7d072e982dc3773e2
4
- data.tar.gz: bd774084acf3d62196cdebe909f82c310facd18a209dc024f943e8f66f36b582
3
+ metadata.gz: 5768f68ee52c9bf85364c1dcb7fd2f6cd221ce4e02581cd4b32ed8e0f3264901
4
+ data.tar.gz: 5c869fe2bdfccabe7c40342038c015c0d4d723cedac7798e04345480a84c5369
5
5
  SHA512:
6
- metadata.gz: 67b11a60c11a8a2c8b9e13f6dedf79e59d2b6df9560d13aa9a759f3153a22ed6029b4d2ba52d96eecaed692c4b1a2d77b4cd13cd3a54f6de667e8850bd807a59
7
- data.tar.gz: 21ab3094ffcc2bf1bfc1326ca392ad91035a686441fb1d903f048ef45d4a27b57debb39d0beadeb5afc33f81f97f9e6f55544549187e848eb82f98f3ef43a927
6
+ metadata.gz: 9ecd4967d40eba1f1bf64e5e046ba0d63d0673ebd7668afe9a12ae175c94d6dc80f0e58a0ceeb620307974b034025c43f1beec8c691d0ab341d18e0684800e3e
7
+ data.tar.gz: e0b9f2e947260f3bb292b2c1fde9c92951c6d408f30958b85123bfe00e026385da602c0b97052446c5d18cd4e5e7a3d136de68d1b63b6b4a715ffc0097772808
data/.gitignore CHANGED
@@ -6,3 +6,4 @@ Gemfile.lock
6
6
  .idea/
7
7
  *.gem
8
8
  /public/
9
+ /vendor/
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.1.1
4
+
5
+ * Fixed bindir parameter in gemspec.
6
+
7
+ ## 1.1.0
8
+
9
+ * Made it so a more specific error is thrown when abstract class isnt overridden (now throws AbstractClassError).
10
+
3
11
  ## 1.0.0
4
12
 
5
13
  * Initial release
data/README.md CHANGED
@@ -24,6 +24,12 @@ TODO: Write usage instructions here
24
24
 
25
25
  To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
26
26
 
27
+ In order to run the tests issue the following command.
28
+
29
+ ```bash
30
+ bundle exec rspec
31
+ ```
32
+
27
33
  ## Contributing
28
34
 
29
35
  Bug reports and pull requests are welcome on GitHub at https://git.qoto.org/abstractify/abstractify
data/abstractify.gemspec CHANGED
@@ -25,12 +25,9 @@ Gem::Specification.new do |spec|
25
25
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
26
26
  f.match(%r{^(test|spec|features)/})
27
27
  end
28
- spec.bindir = 'exe'
29
28
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
30
29
  spec.require_paths = ['lib']
31
30
 
32
- #spec.add_dependency 'abstraction', '~> 0.0.4'
33
- #spec.add_dependency 'serialport', '~> 1.3'
34
31
  spec.add_development_dependency 'bundler', '~> 2.3'
35
32
  spec.add_development_dependency 'rake', '~> 13.0'
36
33
  spec.add_development_dependency 'rspec', '~> 3.12'
@@ -5,6 +5,12 @@ module Abstractify
5
5
  end
6
6
  end
7
7
 
8
+ class AbstractClassError < AbstractError
9
+ def initialize(msg="Can't instantiate abstract class directly")
10
+ super
11
+ end
12
+ end
13
+
8
14
  class AbstractMethodError < AbstractError
9
15
  def initialize(msg="Can't instantiate abstract class because some of its abstract methods have not been defined")
10
16
  super
@@ -35,7 +41,7 @@ module Abstractify
35
41
  end
36
42
 
37
43
  class_methods.define_method :new do |*args, **kwargs|
38
- raise AbstractError.new("Class #{self} is abstract") unless self < mod
44
+ raise AbstractClassError.new("Class #{self} is abstract") unless self < mod
39
45
 
40
46
  abstract_methods.each do |name|
41
47
  raise AbstractMethodMustExistError.new("Method #{name} must be defined") unless method_defined? name
@@ -1,3 +1,3 @@
1
1
  module Abstractify
2
- VERSION = "1.0.0"
2
+ VERSION = "1.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: abstractify
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeffrey Phillips Freeman
8
8
  autorequire:
9
- bindir: exe
9
+ bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-11 00:00:00.000000000 Z
11
+ date: 2023-09-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -121,7 +121,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
121
121
  - !ruby/object:Gem::Version
122
122
  version: '0'
123
123
  requirements: []
124
- rubygems_version: 3.4.16
124
+ rubygems_version: 3.4.19
125
125
  signing_key:
126
126
  specification_version: 4
127
127
  summary: Library for implementing true Abstract classes, throwing errors when class