Recent activity

[PATCH sgx-jmp] Slightly better logging a day ago

From Stephen Paul Weber to ~singpolyma/dev

Import structured logging gem ougai and replace current use of puts/warn with
logging calls.  Gives us level, timestamp, and formatting for exceptions and/or
hash of arbitrary context data.  Can do JSON logging if we ever need that, but
set to human-readable (with colour if isatty) for now.
---
 Gemfile             |  2 ++
 lib/registration.rb |  2 +-
 sgx_jmp.rb          | 16 ++++++++++++----
 3 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/Gemfile b/Gemfile
index 98cf256..622a7e5 100644
--- a/Gemfile
+++ b/Gemfile
[message trimmed]

[PATCH sgx-jmp 2/2] Ask electrum to notify on new BTC addresses a day ago

From Stephen Paul Weber to ~singpolyma/dev

Otherwise we won't know when someone has paid...
---
 config.dhall.sample   | 2 ++
 lib/customer.rb       | 5 ++++-
 lib/electrum.rb       | 4 ++++
 test/test_customer.rb | 7 +++++++
 test/test_helper.rb   | 3 ++-
 5 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/config.dhall.sample b/config.dhall.sample
index 370932a..f623413 100644
--- a/config.dhall.sample
+++ b/config.dhall.sample
@@ -66,6 +66,8 @@
[message trimmed]

[PATCH sgx-jmp 1/2] Factor out CustomerRepo a day ago

From Stephen Paul Weber to ~singpolyma/dev

Using the Repository pattern to encapsulate the fetch and create operations on
the persistence layer for a domain object.  These were not really factories in
the classic sense, but rather "fetch from persisitence layer" methods, and so
they now have a home.
---
 lib/customer.rb            | 31 -------------
 lib/customer_repo.rb       | 42 ++++++++++++++++++
 sgx_jmp.rb                 | 22 +++++-----
 test/test_customer.rb      | 61 --------------------------
 test/test_customer_repo.rb | 90 ++++++++++++++++++++++++++++++++++++++
 5 files changed, 143 insertions(+), 103 deletions(-)
 create mode 100644 lib/customer_repo.rb
 create mode 100644 test/test_customer_repo.rb
[message trimmed]

[PATCH em_promise.rb v2 3/3] Defer through a Fiber trampoline a day ago

From Stephen Paul Weber to ~singpolyma/dev

Instead of running all defer blocks on the EM reactor fiber, run in a dedicated
Fiber trampoline.  Inherit the trampoline from scope if present, or from the
promise you call #then on, or else make a new trampoline.  This means that all
callbacks on promises in a logical chain run in the same Fiber as each other,
but a different one from all other code, so Fiber-local variables are scoped to
the logical chain, like so:

    EMPromise.resolve(nil).then {
    	Thread.current[:fiber_local] = 123
    	promise_timer(1)
    }.then {
    	p Thread.current[:fiber_local] # 123
    }
[message trimmed]

[PATCH em_promise.rb v2 2/3] Support #sync on Defferable a day ago

From Stephen Paul Weber to ~singpolyma/dev

---
 lib/em_promise.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/em_promise.rb b/lib/em_promise.rb
index baeb1d3..d6e0437 100644
--- a/lib/em_promise.rb
+++ b/lib/em_promise.rb
@@ -61,7 +61,7 @@ module EventMachine
			EMPromise.new(self)
		end

		[:then, :rescue, :catch].each do |method|
		[:then, :rescue, :catch, :sync].each do |method|
[message trimmed]

[PATCH em_promise.rb v2 1/3] eventmachine is a dependency a day ago

From Stephen Paul Weber to ~singpolyma/dev

---
 em_promise.rb.gemspec | 1 +
 1 file changed, 1 insertion(+)

diff --git a/em_promise.rb.gemspec b/em_promise.rb.gemspec
index 5dcd09c..8796f63 100644
--- a/em_promise.rb.gemspec
+++ b/em_promise.rb.gemspec
@@ -18,5 +18,6 @@ Gem::Specification.new do |spec|
		end
	spec.require_paths = ["lib"]

	spec.add_dependency "eventmachine"
	spec.add_dependency "promise.rb", "~> 0.7.4"
[message trimmed]

[PATCH em_promise.rb 3/3] Defer through a Fiber trampoline 2 days ago

From Stephen Paul Weber to ~singpolyma/dev

Instead of running all defer blocks on the EM reactor fiber, run in a dedicated
Fiber trampoline.  Inherit the trampoline from scope if present, or from the
promise you call #then on, or else make a new trampoline.  This means that all
callbacks on promises in a logical chain run in the same Fiber as each other,
but a different one from all other code, so Fiber-local variables are scoped to
the logical chain, like so:

    EMPromise.resolve(nil).then {
    	Thread.current[:fiber_local] = 123
    	promise_timer(1)
    }.then {
    	p Thread.current[:fiber_local] # 123
    }
[message trimmed]

[PATCH em_promise.rb 2/3] Support #sync on Defferable 2 days ago

From Stephen Paul Weber to ~singpolyma/dev

---
 lib/em_promise.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/em_promise.rb b/lib/em_promise.rb
index baeb1d3..d6e0437 100644
--- a/lib/em_promise.rb
+++ b/lib/em_promise.rb
@@ -61,7 +61,7 @@ module EventMachine
			EMPromise.new(self)
		end

		[:then, :rescue, :catch].each do |method|
		[:then, :rescue, :catch, :sync].each do |method|
[message trimmed]

[PATCH em_promise.rb 1/3] eventmachine is a dependency 2 days ago

From Stephen Paul Weber to ~singpolyma/dev

---
 em_promise.rb.gemspec | 1 +
 1 file changed, 1 insertion(+)

diff --git a/em_promise.rb.gemspec b/em_promise.rb.gemspec
index 5dcd09c..8796f63 100644
--- a/em_promise.rb.gemspec
+++ b/em_promise.rb.gemspec
@@ -18,5 +18,6 @@ Gem::Specification.new do |spec|
		end
	spec.require_paths = ["lib"]

	spec.add_dependency "eventmachine"
	spec.add_dependency "promise.rb", "~> 0.7.4"
[message trimmed]

[PATCH jmp-pay] Add one-off script to convert long activation ranges to balance 3 days ago

From Stephen Paul Weber to ~singpolyma/dev

Fix-up for the web register previously doing 5 month activations with 0 balance
instead of adding balance + 1 month activation.
---
 bin/months_to_balance | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)
 create mode 100755 bin/months_to_balance

diff --git a/bin/months_to_balance b/bin/months_to_balance
new file mode 100755
index 0000000..31e9286
--- /dev/null
@@ -0,0 +1,37 @@
#!/usr/bin/ruby
[message trimmed]