Skip to content

Instantly share code, notes, and snippets.

View krainboltgreene's full-sized avatar
🏠
Working from home

Kurtis Rainbolt-Greene krainboltgreene

🏠
Working from home
View GitHub Profile
# NOTE: Each task is a map function wrapped in a HOC for handling the return data.
# The annotation of each task is `state -> mixed | state | exception` and the HOC is
# `state -> (state -> mixed | exception) -> state`. `error` is like a task, but instead:
# `exception -> mixed` wrapped in a HOC that matches `exception -> (exception -> mixed) -> exception`.
class AddToCartOperation < ApplicationOperation
task :check_for_missing_product
task :carbon_copy_cart_item
task :lock
task :persist
require "set"
require "rspec/autorun"
GRAPH = Hash.new { |accumulated, key| accumulated[key] = Set.new}
LIBRARIES = Set.new
def depend(subject, *dependencies)
GRAPH[subject].merge(dependencies)
dependencies.each(&GRAPH.method(:[]))
end

smart_params

  • Build
  • Downloads
  • Version

Work smart, not strong. This gem gives developers an easy to understand and easy to maintain schema for request parameters. Meant as a drop-in replacement for strong_params.

SmartParams
returns as json (FAILED - 1)
Failures:
1) SmartParams returns as json
Failure/Error:
expect(
CreateAccountSchema.new({
data: {

smart_params

  • Build
  • Downloads
  • Version

Work smart, not strong. This gem gives developers an easy to understand and easy to maintain schema for request parameters. Meant as a drop-in replacement for strong_params.

export {default as updateInput} from "./updateInput"
export {default as submitAccount} from "./submitAccount"
/usr/local/Cellar/ruby/2.5.0/bin/ruby -I/usr/local/lib/ruby/gems/2.5.0/gems/rspec-core-3.7.1/lib:/usr/local/lib/ruby/gems/2.5.0/gems/rspec-support-3.7.1/lib /usr/local/lib/ruby/gems/2.5.0/gems/rspec-core-3.7.1/exe/rspec --pattern lib/\*\*\{,/\*/\*\*\}/\*_spec.rb
JSONAPI::Realizer::Action::Create
#call
with a good payload and good headers
creates a model (FAILED - 1)
Failures:
1) JSONAPI::Realizer::Action::Create#call with a good payload and good headers creates a model
:root {
--blue: #007bff;
--indigo: #6610f2;
--purple: #6f42c1;
--pink: #e83e8c;
--red: #dc3545;
--orange: #fd7e14;
--yellow: #ffc107;
--green: #28a745;
--teal: #20c997;
development main · > PUBNUB_POWERSELLER.publish(channel: "test", message: "test")
fatal: No live threads left. Deadlock?
2 threads, 2 sleeps current:0x00007faf668c0180 main thread:0x00007faf64e06580
* #<Thread:0x00007faf6587eee0 sleep_forever>
rb_thread_t:0x00007faf64e06580 native:0x00007fffab4b4340 int:0
/Users/kurtis.rainboltgreene/.rvm/gems/ruby-2.4.3@sneakers/gems/celluloid-0.17.3/lib/celluloid/mailbox.rb:63:in `sleep'
/Users/kurtis.rainboltgreene/.rvm/gems/ruby-2.4.3@sneakers/gems/celluloid-0.17.3/lib/celluloid/mailbox.rb:63:in `wait'
/Users/kurtis.rainboltgreene/.rvm/gems/ruby-2.4.3@sneakers/gems/celluloid-0.17.3/lib/celluloid/mailbox.rb:63:in `block in check'
/Users/kurtis.rainboltgreene/.rvm/gems/ruby-2.4.3@sneakers/gems/timers-4.1.2/lib/timers/wait.rb:15:in `block in for'
/Users/kurtis.rainboltgreene/.rvm/gems/ruby-2.4.3@sneakers/gems/timers-4.1.2/lib/timers/wait.rb:14:in `loop'
RSpec.describe "Some HTTP Request" do
before do
get "http://example.com"
end
it "is successful" do
expect(response).to have_http_status(:ok)
end
it "increments the visitor counter" do