CryptoPriceFinder 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +19 -20
- data/Rakefile +39 -0
- data/lib/CryptoPriceFinder/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 91a3c892af5131c5e060814350322c32b822dc4fababe9fd5ae534c4627989f3
|
4
|
+
data.tar.gz: f3e423e3f4e63790dba90e7b868a54d2d6538f851ca89831a6e2610dd6881b97
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ed2bc8cf80c90a054cea807221aa9e709f522453f94a74a94358c2a6981a43ab2593f5e8c7f368c1b11fd38688d334c464328c1c98f135723e8b6497a903dbc
|
7
|
+
data.tar.gz: 92f4e34e0121bb6bda08ac18995c06eb60c7944d95b73b2479de14ceb69de5746cc9b3ed98062f219db62be2707637509e9daba2011968a5b30200d9e19ae786
|
data/README.md
CHANGED
@@ -1,30 +1,29 @@
|
|
1
1
|
# CryptoPriceFinder
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
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/CryptoPriceFinder`. To experiment with that code, run `bin/console` for an interactive prompt.
|
3
|
+
Fetches cryptocurrency prices from DuckDuckGo. Converts crypto prices into USD prices.
|
6
4
|
|
7
5
|
## Installation
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
$ bundle add UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
|
14
|
-
|
15
|
-
If bundler is not being used to manage dependencies, install the gem by executing:
|
16
|
-
|
17
|
-
$ gem install UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
|
6
|
+
```ruby
|
7
|
+
gem install httparty
|
8
|
+
gem install CryptoPriceFinder
|
9
|
+
```
|
18
10
|
|
19
11
|
## Usage
|
20
12
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
13
|
+
```ruby
|
14
|
+
puts "Monero"
|
15
|
+
CryptoPriceFinder::monero(6.6)
|
16
|
+
puts "Bitcoin"
|
17
|
+
CryptoPriceFinder::bitcoin(3)
|
18
|
+
puts "Stellar"
|
19
|
+
CryptoPriceFinder::stellar(4)
|
20
|
+
puts "DogeCoin"
|
21
|
+
CryptoPriceFinder::dogecoin(4)
|
22
|
+
Puts "Ethereum"
|
23
|
+
CryptoPriceFinder::ethereum(4)
|
24
|
+
puts "Ripple"
|
25
|
+
CryptoPriceFinder::ripple(5)
|
26
|
+
```
|
28
27
|
|
29
28
|
## Contributing
|
30
29
|
|
data/Rakefile
CHANGED
@@ -2,3 +2,42 @@
|
|
2
2
|
|
3
3
|
require "bundler/gem_tasks"
|
4
4
|
task default: %i[]
|
5
|
+
namespace "gems" do
|
6
|
+
desc "Building gem, Push gem, Install Gem"
|
7
|
+
task :all do
|
8
|
+
begin
|
9
|
+
require "colorize"
|
10
|
+
gemfile = Dir.glob("*.gem").each { |f| f }.shift
|
11
|
+
if !gemfile.nil?
|
12
|
+
if File.exist?(gemfile)
|
13
|
+
puts "Deleting #{gemfile}...\n".red
|
14
|
+
File.delete(gemfile)
|
15
|
+
puts "Building gem...\n".red
|
16
|
+
%x(gem build CryptoPriceFinder.gemspec)
|
17
|
+
puts "Pushing Gem...\n".red
|
18
|
+
begin
|
19
|
+
sh "gem push #{Dir.glob("*.gem").each { |f| f }.shift}"
|
20
|
+
rescue
|
21
|
+
puts "ERROR in Pushing...\n".red
|
22
|
+
end
|
23
|
+
puts "[+] Installing gem...\n"
|
24
|
+
sh "gem install #{Dir.glob("*.gem").each { |f| f }.shift}"
|
25
|
+
end
|
26
|
+
else
|
27
|
+
puts "No gem file found..."
|
28
|
+
puts "Building gem...\n".red
|
29
|
+
%x(gem build CryptoPriceFinder.gemspec)
|
30
|
+
puts "Pushing Gem...\n".red
|
31
|
+
begin
|
32
|
+
sh "gem push #{Dir.glob("*.gem").each { |f| f }.shift}"
|
33
|
+
rescue
|
34
|
+
puts "ERROR in Pushing...\n".red
|
35
|
+
end
|
36
|
+
puts "[+] Installing gem...\n"
|
37
|
+
sh "gem install #{Dir.glob("*.gem").each { |f| f }.shift}"
|
38
|
+
end
|
39
|
+
rescue => e
|
40
|
+
puts e
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|