bit_price 0.0.1
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 +7 -0
- data/lib/bit_price.rb +16 -0
- metadata +44 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 71a104e2522d2f9d4cc71084ab8f12c3ffc43e2d
|
4
|
+
data.tar.gz: 34366d0136f9a38c25592f07427dc86c9d07bde1
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 04ee402f81be51c3ccf049521c4ff14868e3eb813cd14b024413a1ea7df4a3727f6609b71dbb26813b665bba9577dcb97a700a796ee9fabfb78ae2256bed8a89
|
7
|
+
data.tar.gz: 40e9034bac5d0cca622fcf226f528f1f6ee8dde47116e38ca7d934dc6303bb0b60318b4e40b817c4ab88c6bca4623334616bc2d57188d4bc2ad9ef995c17fb4a
|
data/lib/bit_price.rb
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'nokogiri'
|
2
|
+
require 'open-uri'
|
3
|
+
|
4
|
+
def bit_price
|
5
|
+
page = Nokogiri::HTML(open("https://coinbase.com/charts"))
|
6
|
+
|
7
|
+
prices = page.css("div.page-header h2.pull-right strong").text.split("$").reject(&:empty?)
|
8
|
+
|
9
|
+
puts
|
10
|
+
puts "The Current Bitcoin Prices Are:"
|
11
|
+
|
12
|
+
puts "Buy Price: $#{prices[0]}"
|
13
|
+
puts "Sell Price: $#{prices [1]}"
|
14
|
+
puts
|
15
|
+
puts "Prices provided by www.coinbase.com/charts"
|
16
|
+
end
|
metadata
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: bit_price
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Daniel Spector
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-02-12 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: Get the Bitcoin price easily from your terminal
|
14
|
+
email: danielyspector@gmail.com
|
15
|
+
executables: []
|
16
|
+
extensions: []
|
17
|
+
extra_rdoc_files: []
|
18
|
+
files:
|
19
|
+
- lib/bit_price.rb
|
20
|
+
homepage: http://rubygems.org/gems/bit_price
|
21
|
+
licenses:
|
22
|
+
- MIT
|
23
|
+
metadata: {}
|
24
|
+
post_install_message:
|
25
|
+
rdoc_options: []
|
26
|
+
require_paths:
|
27
|
+
- lib
|
28
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
29
|
+
requirements:
|
30
|
+
- - '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
33
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
34
|
+
requirements:
|
35
|
+
- - '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
requirements: []
|
39
|
+
rubyforge_project:
|
40
|
+
rubygems_version: 2.2.1
|
41
|
+
signing_key:
|
42
|
+
specification_version: 4
|
43
|
+
summary: Bitcoin Prices from Your Terminal
|
44
|
+
test_files: []
|