ethlite 0.4.0 → 0.4.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: 1e11a16356a6595d0a8463c9b8709f71f03edd0c0b2c66dac3d228f4b19511fe
4
- data.tar.gz: 2811b02e7c428864876dc3bb416080c9348d5ef120ea1f067717690f531df48c
3
+ metadata.gz: a168744cd8aa2f76a80e7536064f8d831f3cbcef3e9148687c7f003403415d97
4
+ data.tar.gz: 711fa922a92492be4ef33317a552de466a3f4b9e32428d80e6a79d55fc1b3f6d
5
5
  SHA512:
6
- metadata.gz: 71875ac074cc206b14fe695b96c8c32fe83ee68f162f26985fd800e2a04d1dc9637c68b2a4826bbadf831f529733d133642b2c4be7e462ccc36f524959329f55
7
- data.tar.gz: b4111981e3ab713d120ddeb3d88e186d00e3489e13d875411e43b05b2f92c750948010df33ef86424c2f2c6f76b197a08db3c4ab42eff156ff114a9200037c89
6
+ metadata.gz: 9465a3704789b0c377e7dd7db33f7675bb2230b011f7792c9758bf4b72723b55516e18e594b897d015e4b5326f80359e0c7a5eecaaff1f957c5d9f354a2b827d
7
+ data.tar.gz: 0fb31c94e3810430d01573dbb951787e34a8824a2d0ba2bc4305ea306c5258260bd189ab8a84b817c1260a6b1d5b978bc99b48a543390eec586c59a56726c583
@@ -3,7 +3,7 @@
3
3
  module Ethlite
4
4
  MAJOR = 0
5
5
  MINOR = 4
6
- PATCH = 0
6
+ PATCH = 1
7
7
  VERSION = [MAJOR,MINOR,PATCH].join('.')
8
8
 
9
9
  def self.version
data/lib/ethlite.rb CHANGED
@@ -1,5 +1,24 @@
1
1
  require 'cocos'
2
2
 
3
+
4
+ ### todo/fix:
5
+ ## move .env loader to
6
+ ## cocos - why? why not?
7
+ def load_env( path='./.env' )
8
+ if File.exist?( path )
9
+ puts "==> loading .env settings..."
10
+ env = read_yaml( path )
11
+ puts " applying .env settings... (merging into ENV)"
12
+ pp env
13
+ env.each do |k,v|
14
+ ENV[k] ||= v
15
+ end
16
+ end
17
+ end
18
+
19
+ load_env
20
+
21
+
3
22
  require 'uri'
4
23
  require 'net/http'
5
24
  require 'net/https'
@@ -32,10 +51,9 @@ require_relative 'ethlite/contract'
32
51
 
33
52
 
34
53
 
35
-
36
54
  module Ethlite
37
55
  class Configuration
38
- def rpc() @rpc || JsonRpc.new( ENV['INFURA_URI'] ); end
56
+ def rpc() @rpc ||= JsonRpc.new( ENV['INFURA_URI'] ); end
39
57
  def rpc=(value)
40
58
  @rpc = if value.is_a?( String )
41
59
  JsonRpc.new( value ) ## auto-wrap in (built-in/simple) jsonrpc client/serverproxy
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ethlite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gerald Bauer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-12-09 00:00:00.000000000 Z
11
+ date: 2022-12-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cocos