middleman-gibberish 0.6.1 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/middleman-gibberish.rb +19 -11
- data/middleman-gibberish.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NWI3ZmJmMGMwMTNkNDA1YzA1ZDA4M2E0YmMzZjIzODI0MTYyMmUwOQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MmRmMTk0M2IxZjEzZjE0NDI4MzRmNzFhNTFlOGE4OGUxYzc1NDY1Yw==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NmE3MDI4YzNlZTgxMjQ1MmMyNTMyY2JjNWJlODUxNmZmODZlMDE5ZWE4ZWE1
|
10
|
+
YjAzNTYyMGU1Y2JmODdmMTg4NDlmMzM5Y2Y5YmM4MjE5OGFkN2EzZDQ5MTY3
|
11
|
+
NjBmY2I2MTNkNWE0ZDUyOWYzOTEyMzNkZmI4YjNlMDQyZTkyZTI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZTk5OTQwODFiNTQ4NjdiMTdkZWRmM2Y4OGQ2YmJlY2I4ZDA3MzRjZDBkOTRl
|
14
|
+
NzU4M2E2ZjJlOGI2MmI0NDY4Zjc2NjU1OTU3N2MxOTE0OTJmN2Q2NzNmYzcz
|
15
|
+
MTA5Mjk1ODM1YTI5OGMwYTQ3NDA1ZDFiYWYzMTVlNTExNjM1MDI=
|
data/lib/middleman-gibberish.rb
CHANGED
@@ -3,7 +3,7 @@ require 'gibberish'
|
|
3
3
|
|
4
4
|
module ::Middleman
|
5
5
|
class Gibberish < Middleman::Extension
|
6
|
-
Version = '0.
|
6
|
+
Version = '0.7.0'
|
7
7
|
|
8
8
|
def Gibberish.version
|
9
9
|
Version
|
@@ -45,6 +45,11 @@ module ::Middleman
|
|
45
45
|
File.join(@app.root, 'source')
|
46
46
|
end
|
47
47
|
|
48
|
+
# FIXME
|
49
|
+
def javascript_include_tag(*args, &block)
|
50
|
+
@app.send(:javascript_include_tag, *args, &block)
|
51
|
+
end
|
52
|
+
|
48
53
|
def password(*password)
|
49
54
|
unless password.empty?
|
50
55
|
@password = password.first.to_s
|
@@ -119,17 +124,22 @@ module ::Middleman
|
|
119
124
|
#
|
120
125
|
def script_for(glob, path, encrypted)
|
121
126
|
libs = %w( jquery.js jquery.cookie.js gibberish.js )
|
127
|
+
cdn = 'http://ahoward.github.io/middleman-gibberish/assets/'
|
122
128
|
|
123
|
-
|
124
|
-
|
125
|
-
srcs =
|
129
|
+
scripts =
|
126
130
|
libs.map do |lib|
|
127
|
-
script = File.join(source_dir, '
|
131
|
+
script = File.join(source_dir, 'javascripts', lib)
|
128
132
|
|
129
|
-
if test(?s, script)
|
130
|
-
|
133
|
+
#if test(?s, script)
|
134
|
+
if false
|
135
|
+
javascript_include_tag(lib)
|
131
136
|
else
|
132
|
-
|
137
|
+
src = cdn + lib
|
138
|
+
|
139
|
+
log(:warn, "using cdn hosted #{ lib.inspect } @ #{ src.inspect }")
|
140
|
+
log(:warn, "- add source/javascripts/#{ lib } to shut this up - a symlink link will do")
|
141
|
+
|
142
|
+
"<script src='%s' type='text/javascript'></script>" % src
|
133
143
|
end
|
134
144
|
end
|
135
145
|
|
@@ -182,9 +192,7 @@ module ::Middleman
|
|
182
192
|
</html>
|
183
193
|
|
184
194
|
|
185
|
-
|
186
|
-
<script src='<%= src %>'></script>
|
187
|
-
<% end %>
|
195
|
+
#{ scripts.join("\n") }
|
188
196
|
|
189
197
|
<script>
|
190
198
|
var encrypted = #{ encrypted.to_json };
|
data/middleman-gibberish.gemspec
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
Gem::Specification::new do |spec|
|
5
5
|
spec.name = "middleman-gibberish"
|
6
|
-
spec.version = "0.
|
6
|
+
spec.version = "0.7.0"
|
7
7
|
spec.platform = Gem::Platform::RUBY
|
8
8
|
spec.summary = "middleman-gibberish"
|
9
9
|
spec.description = "password protect middleman pages - even on s3"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: middleman-gibberish
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ara T. Howard
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-01-
|
11
|
+
date: 2014-01-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: middleman
|