etheruby 0.9.1 → 0.9.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dfed46cee6fdea612e7c4c0c08b0cd634d8746a4
4
- data.tar.gz: 77c90af3d066a14055b39297c5092705dd22b3e0
3
+ metadata.gz: 69a49c095a9ddcee44a49105c2f212329520e0e7
4
+ data.tar.gz: 44d3ffb4f1a9bc0c12e3fbb48d7c2284c14b7c33
5
5
  SHA512:
6
- metadata.gz: 72a01c07b209b5124207a196adb86d9d5207cf9a461265a62822ff74bd55caa6aed3f67ab53b6c33ebe67822bad5beca3ba684db8dbb44141c2aef53856a2ec8
7
- data.tar.gz: b2960aeab3cb037b99b139aecbef3f350fbc06b8add6ec0ed5aac8c5e3d713d2863ad54dd7d3fc5de81f02162ee549828e25797a5e74756857b9d55aa5109dce
6
+ metadata.gz: 64bee06d5c9bd73351cca313b7ac428c9e46d267f5838c88b91f8583cfd6bc5d6afea8ae6fb97918b358a92a356c4e912dd0e6ab55fb94467489706765cc1ee3
7
+ data.tar.gz: 7b7739089daacb4b704ad68ea03098058821661e6849d8d3a9be2d90bb12c6da98619f7d862355e5aaaffabf8ee351427c9ba3926722812735a917dc98f65c85
@@ -26,8 +26,20 @@ module Etheruby
26
26
  data[:returns] = args
27
27
  end
28
28
 
29
- def method_missing(sym, *args)
30
- data[sym] = args[0]
29
+ def from(_address)
30
+ data[:from] = "0x#{_address.to_s(16)}"
31
+ end
32
+
33
+ def gas(_gas)
34
+ data[:gas] = "0x#{_gas.to_s(16)}"
35
+ end
36
+
37
+ def gasPrice(_gp)
38
+ data[:gasPrice] = "0x#{_gas.to_s(16)}"
39
+ end
40
+
41
+ def value(_v)
42
+ data[:value] = "0x#{_gas.to_s(16)}"
31
43
  end
32
44
 
33
45
  def validate!
@@ -1,6 +1,9 @@
1
+ Dir["./app/contracts/**/*.rb"].each { |f| require f }
2
+
1
3
  module Etheruby
2
4
 
3
5
  class Railtie < Rails::Railtie
6
+
4
7
  initializer "etheruby.configure" do |app|
5
8
  Etheruby::Client.uri = app.config.etheruby_uri if app.config.respond_to? :etheruby_uri
6
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: etheruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jérémy SEBAN