getyourvat 0.1.3

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 7f9a8fcb792e8cd52d1a6121d4d603a596c426a874b57aded7be3f574f654d28
4
+ data.tar.gz: 6c3ac5bf47daac0b1f27fe49b898013678a8d3e22f971f78fc22fcb8975235b1
5
+ SHA512:
6
+ metadata.gz: f9acc421a761a55e6452742fb1684415b7c64c2feebf7da3b0502220bd665f1640cf38505d6ac946b8735bdd1b2a9285b15329a81c273514a40ad632d6ede290
7
+ data.tar.gz: e3c1ac1e78cd9ba3d4c72d803dd94f6220bcfcdf79b580d93c7e8136a9d4d193487b1e7695ec595050e2331ab0535c0f61bc9ea5654754d618da0c8dd006ec59
data/Gemfile ADDED
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in getyourvat.gemspec
6
+ gemspec
7
+
8
+ gem "rake", "~> 13.0"
9
+
10
+ gem "minitest", "~> 5.0"
data/README.md ADDED
@@ -0,0 +1,30 @@
1
+ # Getyourvat
2
+
3
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/getyourvat`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Install the gem and add to the application's Gemfile by executing:
10
+
11
+ $ bundle add getyourvat
12
+
13
+ If bundler is not being used to manage dependencies, install the gem by executing:
14
+
15
+ $ gem install getyourvat
16
+
17
+ ## Usage
18
+
19
+ Example:
20
+ Getyourvat::Calculate.getyourvat(20,100) =>120
21
+
22
+ ## Development
23
+
24
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
25
+
26
+ 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 the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
27
+
28
+ ## Contributing
29
+
30
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/getyourvat.
data/Rakefile ADDED
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rake/testtask"
5
+
6
+ Rake::TestTask.new(:test) do |t|
7
+ t.libs << "test"
8
+ t.libs << "lib"
9
+ t.test_files = FileList["test/**/test_*.rb"]
10
+ end
11
+
12
+ task default: :test
Binary file
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Getyourvat
4
+ VERSION = "0.1.3"
5
+ end
data/lib/getyourvat.rb ADDED
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "getyourvat/version"
4
+ require "singleton"
5
+
6
+ module Getyourvat
7
+ class Calculate
8
+ include Singleton
9
+ def self.getyourvat(vat, subtotal)
10
+ subtotal + (subtotal * vat / 100)
11
+ end
12
+ end
13
+
14
+ class Error < StandardError; end
15
+ end
16
+ puts(Getyourvat::Calculate.getyourvat(20,100))
@@ -0,0 +1,4 @@
1
+ module Getyourvat
2
+ VERSION: String
3
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
+ end
metadata ADDED
@@ -0,0 +1,53 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: getyourvat
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.3
5
+ platform: ruby
6
+ authors:
7
+ - Laszlo-VSC
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2022-05-30 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Calculate VAT in your rails app.
14
+ email:
15
+ - laszloluque@gmail.com
16
+ executables: []
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - Gemfile
21
+ - README.md
22
+ - Rakefile
23
+ - getyourvat-0.1.0.gem
24
+ - lib/getyourvat.rb
25
+ - lib/getyourvat/version.rb
26
+ - sig/getyourvat.rbs
27
+ homepage: https://github.com/laszloluque/getyourvat
28
+ licenses: []
29
+ metadata:
30
+ allowed_push_host: https://rubygems.org
31
+ homepage_uri: https://github.com/laszloluque/getyourvat
32
+ source_code_uri: https://github.com/laszloluque/getyourvat
33
+ changelog_uri: https://github.com/laszloluque/getyourvat
34
+ post_install_message:
35
+ rdoc_options: []
36
+ require_paths:
37
+ - lib
38
+ required_ruby_version: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ version: 2.6.0
43
+ required_rubygems_version: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ requirements: []
49
+ rubygems_version: 3.3.7
50
+ signing_key:
51
+ specification_version: 4
52
+ summary: Calculates VAT tax
53
+ test_files: []