get_schwifty 0.1.0 → 0.1.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
  SHA1:
3
- metadata.gz: f937f9b21a7ac4b56fff5a6502f91a8ab92c8a15
4
- data.tar.gz: 4118a97184ccef0f2f8d793c53e6a5856b840b15
3
+ metadata.gz: efeaf60c498883cadecc040b078c405a9490f86c
4
+ data.tar.gz: ae6c6b127933885076ac0144a2a0566eaf394fe8
5
5
  SHA512:
6
- metadata.gz: afebf12398a35645ca1aea418a6c2a988160336d9e0916010ac339d95c2c0b5b624191cb2dd3290f3a1ac81dcea59fe1155a135ae890c036ac5310885d525661
7
- data.tar.gz: 0c08a37cb35a502231f25865157276e91ac3f4c08d5c798802f4d01dba75a666710fd1913421389e392e40a17e745b3778370e9f8949816f6639dd95c78b6ee6
6
+ metadata.gz: aeac7f9f8c7a71738f5b5bdc3d7045e10e984a2beb116071a92bd9669f8264e453fee18437c8f781f9f6136c143cd5eb1cf2297bbcb6ceb4a21dc7ec6f857237
7
+ data.tar.gz: d231ecb37e5ee75fa47986c7ad9896dc08a9ba9a92d6c9fac943ca22ac9d3df54cf1a718aa1563db56af3400b22c87c324251ef87ae33f8f1bf98fb3e478a62e
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2017 Daniel Westendorf
1
+ Copyright 2017 Daniel Westendorf - HireLoop.io
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -11,6 +11,18 @@ Slow-to-render HTML elements can be expensive (hosting) and unavoidable (technic
11
11
 
12
12
  GetSchwifty is all about quick responses by utilizing background jobs to do the rendering for your and delivering it to the client with ActionCable.
13
13
 
14
+ ## Caveats
15
+
16
+ - There is no gurantee that the content will load. If your background job queue get's backed up, you'll be not showing content anytime soon.
17
+
18
+ ## Extracted from HireLoop
19
+
20
+ get_schwifty was extracted from [HireLoop.io](https://www.hireloop.io), a platform for a more human hiring experience.
21
+
22
+ Make hiring delightful by closing the loop between hiring managers and every applicant. Automate the trival tasks associated with screening job applicants, lowering the barrier for easy and clear communication.
23
+
24
+ ![](https://travis-ci.org/danielwestendorf/get_schwifty.svg?branch=master)
25
+
14
26
  ## Installation
15
27
  Add this line to your application's Gemfile:
16
28
 
@@ -5,6 +5,10 @@ module GetSchwifty
5
5
 
6
6
  desc "Installs required files for getting schwifty in here"
7
7
 
8
+ def copy_initializer
9
+ template "get_schwifty.rb", "config/initializers/get_schwifty.rb"
10
+ end
11
+
8
12
  def copy_controller
9
13
  template "controllers/get_schwifty_controller.rb", "app/controllers/get_schwifty_controller.rb"
10
14
  end
@@ -0,0 +1,18 @@
1
+ # GetSchwifty configuration initializer
2
+ # Use this file to configure GetSchwifty for your needs
3
+ GetSchwifty.configure do |config|
4
+ # Configure re-rendering
5
+ #
6
+ # By default, job parameters are stored in the Rails cache and not removed after render
7
+ # If your're not expring keys with a Least Recently Used policy, you cache could fill up
8
+ # with values which will never be accessed again.
9
+ #
10
+ # Allow rerendering
11
+ # This allows caching of `get_schwifty` helper calls in views
12
+ # config.allow_rerender = true # Default
13
+
14
+ # Disable rerendering
15
+ # This disables rerendering, and the cachability of `get_schwifty` helper calls. Subscriptions
16
+ # will be rejected after the first render of a cached `get_schwifty` call
17
+ # config.allow_rerender = false
18
+ end
data/lib/get_schwifty.rb CHANGED
@@ -4,6 +4,13 @@ require "get_schwifty/job"
4
4
  require "get_schwifty/cable/base"
5
5
 
6
6
  module GetSchwifty
7
+ mattr_accessor :allow_rerender
8
+ @@allow_rerender = true
9
+
10
+ def self.configure
11
+ yield self
12
+ end
13
+
7
14
  class Engine < ::Rails::Engine
8
15
  config.assets.paths += [File.expand_path("../../app/assets/javascripts", __FILE__)] if config.respond_to?(:assets)
9
16
 
@@ -8,7 +8,7 @@ module GetSchwifty
8
8
  end
9
9
 
10
10
  def rendered
11
- Rails.cache.write(channel_name, nil)
11
+ Rails.cache.write(channel_name, nil) unless GetSchwifty.allow_rerender
12
12
  end
13
13
 
14
14
  def route
@@ -1,3 +1,3 @@
1
1
  module GetSchwifty
2
- VERSION = '0.1.0'
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: get_schwifty
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Westendorf
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-30 00:00:00.000000000 Z
11
+ date: 2017-10-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -115,6 +115,7 @@ files:
115
115
  - lib/generators/templates/cables/cable.rb
116
116
  - lib/generators/templates/channels/get_schwifty_channel.rb
117
117
  - lib/generators/templates/controllers/get_schwifty_controller.rb
118
+ - lib/generators/templates/get_schwifty.rb
118
119
  - lib/generators/templates/jobs/get_schwifty_runner_job.rb
119
120
  - lib/generators/templates/views/cables/action.html.erb
120
121
  - lib/get_schwifty.rb