rails_jskit 5.0.1 → 5.0.2

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: ad1c775799b28a7db824596cc46bd3a408e4dfe4
4
- data.tar.gz: 5705864e3a14dfc72b20cd65bceee5efb1c09107
3
+ metadata.gz: a15f3760d8c6e81a5ac1c0ffd2344c9201881cf3
4
+ data.tar.gz: 38b50b8168b5e20d38023fb5686dde1c08727ffa
5
5
  SHA512:
6
- metadata.gz: 57bc99de58e79d624bfbc3b3b98ed98d29bb60189df8aeed45bcf7df6e5be5c0f1b7688fe4c343dd5e6a329b8e5cd0d9d9731c7d46240550a2321a9978bbb1a3
7
- data.tar.gz: 8f7c5caba135044cf229c8b43e7e8b916e258ce782e6a5307ee9109c4142f8e291a22ca80c61a88207aa7d0dcd1efa6908af4d8f51d7399ec9a369dfbaf23a49
6
+ metadata.gz: 3d926442464ed5aad88ec72dc60396491dddc28ba3410ea5394560c996b98bec35770a99a9c39ea671f7b3ed6d846feeb1175e2a9c6c7135d73ff78369ae93ee
7
+ data.tar.gz: db51a062072c0768ec026976656c3e6ec30bc072442d375a59d3b1e1b9a576ad79092a007f7eae312d75fb6d71012508c9abf8d167826c982f7c7e79c873e4fe
@@ -54,7 +54,12 @@ module Jskit
54
54
  end
55
55
 
56
56
  def body_indentation
57
- "#{layout_file_content.match(/^(\s+)%body/)[1]} "
57
+ if layout_file_content.match(/^(\s+)%body/)
58
+ indentation = layout_file_content.match(/^(\s+)%body/)[1]
59
+ else
60
+ indentation = ""
61
+ end
62
+ "#{indentation} "
58
63
  end
59
64
 
60
65
  def layout_file
@@ -77,10 +82,20 @@ module Jskit
77
82
  "app/assets/javascripts/application.js"
78
83
  end
79
84
 
80
- private
85
+ def manifest?
86
+ File.exists? js_manifest
87
+ end
88
+
89
+ def require_tree?
90
+ !!application_js.match(/\/\/= require_tree \./)
91
+ end
92
+
93
+ def rails_jskit?
94
+ !!application_js.match(/\/\/= require rails_jskit/)
95
+ end
81
96
 
82
97
  def application_js
83
- @application_js ||= File.read js_manifest
98
+ File.read js_manifest
84
99
  end
85
100
  end
86
101
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_jskit
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.1
4
+ version: 5.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dayton Nolan