bitsharesws 0.0.1 → 0.0.2

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
  SHA1:
3
- metadata.gz: fb7a8e55ee7eb9d3ef3a2cfe7e291b650619bb9e
4
- data.tar.gz: ec418e46a08ddd5edf5a60665dd45326fdf6dad5
3
+ metadata.gz: 829712effb1a8377f67e04ed8c9b0ca34b984d35
4
+ data.tar.gz: c8a32c847874e1a19ffeda1f7886d8715734bbe4
5
5
  SHA512:
6
- metadata.gz: bdc4d0c543c8922c251aff87ae999cb1f43a7a0d7195d8432a2e5830ba003b6072f1a053e90c1d0f206f1d1c30b0379157c6850eb082565e5dd9c94fe2166f7f
7
- data.tar.gz: f8d3a917fe3be4464b69d0dbbeb925fa6045437fbee265f218fa41bc881b8ea51621e3e2b39a4b2143762ffa3bcb2973ae3357ba01f95950a5eec20977a05899
6
+ metadata.gz: e8fbfbca60943cfb3efa699bd0054d92c4f42401d9eb91ec50e7b52e838f4a7a652f92cf6728c3b2f47e6194a8b343f43c9b70623c607afd53f865c22e88ac10
7
+ data.tar.gz: 2a686fe6dbec3197d1de23d5d785b9cdd60fb3c449cb6da9086560569bc4ea275255da85db5449c2da75c6c4c1ee4a8fb8bee92834063d03203a2ed2e798a258
data/README.md CHANGED
@@ -1,8 +1,6 @@
1
1
  # Bitsharesws
2
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/bitsharesws`. 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
3
+ This gem is websocket client for Decentralize Exchange BitShares. Now gem can get public information from Database API.
6
4
 
7
5
  ## Installation
8
6
 
@@ -22,17 +20,52 @@ Or install it yourself as:
22
20
 
23
21
  ## Usage
24
22
 
25
- TODO: Write usage instructions here
23
+ `BitShares` is main class. Require it:
26
24
 
27
- ## Development
25
+ ```ruby
26
+ require 'bitshares'
27
+ ```
28
+
29
+ Becouse BitShares is decentralize exchange, before you use it, you need set node (for example openledger):
30
+
31
+ ```ruby
32
+ BitShares.config do
33
+ node 'wss://bitshares.openledger.info/ws'
34
+ end
35
+ ```
36
+
37
+ This command try connect to this node. If you don't want connect now, use this:
38
+
39
+ ```ruby
40
+ BitShares.config false do
41
+ node 'wss://bitshares.openledger.info/ws'
42
+ end
43
+
44
+ # some else code
45
+
46
+ BitShares.start # now try to connect
47
+ ```
48
+
49
+ If you want to set username and password:
28
50
 
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
51
+ ```ruby
52
+ BitShares.config do
53
+ node 'wss://bitshares.openledger.info/ws'
54
+ login 'mylogin'
55
+ pass 'mypass'
56
+ end
57
+ ```
58
+
59
+ If you want to get account use `BitShares.account 'some-account-name'`.
60
+ If you want to know balance some account use `BitShares.balance 'some-account-name'`.
61
+
62
+ ## Development
30
63
 
31
- 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).
64
+ Now gem have only Database API. In future version, I want add all public and wallet API.
32
65
 
33
66
  ## Contributing
34
67
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/bitsharesws.
68
+ Bug reports and pull requests are welcome on GitHub at https://github.com/scientistnik/bitsharesws.
36
69
 
37
70
  ## License
38
71
 
data/bitsharesws.gemspec CHANGED
@@ -21,8 +21,8 @@ Gem::Specification.new do |spec|
21
21
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
22
  spec.require_paths = ["lib"]
23
23
 
24
- spec.add_runtime_dependency 'json'
25
- spec.add_runtime_dependency 'websocket-eventmachine-client'
24
+ spec.add_runtime_dependency 'json', '~> 0'
25
+ spec.add_runtime_dependency 'websocket-eventmachine-client', '~> 0'
26
26
 
27
27
  spec.add_development_dependency "bundler", "~> 1.15"
28
28
  spec.add_development_dependency "rake", "~> 10.0"
@@ -1,3 +1,3 @@
1
1
  module Bitshares
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bitsharesws
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - scientistnik
@@ -14,28 +14,28 @@ dependencies:
14
14
  name: json
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: websocket-eventmachine-client
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency