miscellany 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
  SHA256:
3
- metadata.gz: 296f82b755fbbff37b7b939e31d30d53c1e1ed3b528df93992460a5c5093e1bb
4
- data.tar.gz: f42d95c04a728a4b16e9b0286e900d243b18b1385649150fed2b1a0501e7098a
3
+ metadata.gz: f99bdf275cebd6b213ceb58a325dc8eef2c5259fc155d8e3709d12120d2b56d0
4
+ data.tar.gz: 78af18e87095d6941e952e2a959b5081ebc690afc4f2646551a9b6018167ac26
5
5
  SHA512:
6
- metadata.gz: 513b776e716e713413ee7f1c45cb2300c6142ffad6fcd3b550bfa06f5f496b630dea82fb99274853e2f825d47387648d015364d619de3b7572e0565b83160219
7
- data.tar.gz: 85540e4cca127328d52c1b68a51be2b2366e5bcf5dfef95464703ece61539ba68ed3e0689fd55e22d8c258bbb625efa486b2d5f0b32075bffcf43da866d4e110
6
+ metadata.gz: ff1325cc8b1aa570ef4b227c067b02dbc341772edd446b922cee1e69a2ed3552ea8c2a7e39b1be04a31545a7a9331f3d147c19891eb202f9cee189a1a651f0c8
7
+ data.tar.gz: 1f05be9cbf5c25558b2759c86994781b47a495f557b76416208d9f5221e71d549fec42a6f38ff967afff97bf1779df087845e92e1dd92de28f2f6a56eebb92dd
@@ -0,0 +1,2 @@
1
+ <%= stylesheet_pack_tag pack_name %>
2
+ <%= javascript_pack_tag pack_name %>
data/lib/miscellany.rb CHANGED
@@ -3,4 +3,8 @@ Dir[File.dirname(__FILE__) + "/miscellany/**/*.rb"].each { |file| require file }
3
3
 
4
4
  module Miscellany
5
5
 
6
+ if defined?(Rails)
7
+ class Engine < ::Rails::Engine
8
+ end
9
+ end
6
10
  end
@@ -1,3 +1,5 @@
1
+ require_relative '../http_error_handling'
2
+
1
3
  module Miscellany
2
4
  module SlicedResponse
3
5
  extend ActiveSupport::Concern
@@ -0,0 +1,18 @@
1
+ module Miscellany
2
+ module SpaRender
3
+ extend ActiveSupport::Concern
4
+
5
+ def render(*args, **kwargs)
6
+ if kwargs[:spa].present?
7
+ js_env(kwargs.delete(:env))
8
+ kwargs[:template] ||= 'miscellany/spa_page'
9
+ kwargs[:locals] ||= {}
10
+ kwargs[:locals][:pack_name] ||= kwargs.delete(:spa)
11
+ kwargs[:formats] = [:html]
12
+ super(*args, **kwargs)
13
+ else
14
+ super
15
+ end
16
+ end
17
+ end
18
+ end
@@ -1,3 +1,3 @@
1
1
  module Miscellany
2
- VERSION = "0.1.0".freeze
2
+ VERSION = "0.1.1".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: miscellany
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
  - Ethan Knapp
@@ -256,6 +256,7 @@ extensions: []
256
256
  extra_rdoc_files: []
257
257
  files:
258
258
  - README.md
259
+ - app/views/miscellany/spa_page.html.erb
259
260
  - config/initializers/01_custom_preloaders.rb
260
261
  - config/initializers/arbitrary_prefetch.rb
261
262
  - config/initializers/cancancan.rb
@@ -269,6 +270,7 @@ files:
269
270
  - lib/miscellany/controller/http_error_handling.rb
270
271
  - lib/miscellany/controller/json_uploads.rb
271
272
  - lib/miscellany/controller/sliced_response.rb
273
+ - lib/miscellany/controller/spa_render.rb
272
274
  - lib/miscellany/param_validator.rb
273
275
  - lib/miscellany/version.rb
274
276
  - miscellany.gemspec