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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZmY5MjNlNjIwOTk0NWQzZjJmODA1NmE1ZGIyMDhlMTY2Y2M2MzM4Mg==
4
+ NWI3ZmJmMGMwMTNkNDA1YzA1ZDA4M2E0YmMzZjIzODI0MTYyMmUwOQ==
5
5
  data.tar.gz: !binary |-
6
- NzAyYzIyNzk4MzkyM2FkNWNkYTVhMGNmYWNhYWViMDAyZGMyNWE3NA==
6
+ MmRmMTk0M2IxZjEzZjE0NDI4MzRmNzFhNTFlOGE4OGUxYzc1NDY1Yw==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- YzE3NzQzMDgxNDk3ZGQxZmQzMzgwYTlmZDk5MDBlYzBkODk5ZjIzNzNjY2Fj
10
- NzQzY2Q4Y2QwNWExZGZlMjEzMWE2YmYyODk4ZTJlYmQyNjdkOGE2MGQ0N2Jm
11
- ODBmMTk0MGM1OGFmMGJiZWE5NThiNjNkOTljYzdlZjE4ZTc5ZGY=
9
+ NmE3MDI4YzNlZTgxMjQ1MmMyNTMyY2JjNWJlODUxNmZmODZlMDE5ZWE4ZWE1
10
+ YjAzNTYyMGU1Y2JmODdmMTg4NDlmMzM5Y2Y5YmM4MjE5OGFkN2EzZDQ5MTY3
11
+ NjBmY2I2MTNkNWE0ZDUyOWYzOTEyMzNkZmI4YjNlMDQyZTkyZTI=
12
12
  data.tar.gz: !binary |-
13
- MGJjMTJlMTg0MWQzZWI4NzQwMzIyOGM4MTM2OTkyZWJmYWY5YmZjM2M5Y2Jm
14
- ZDA2YzIzNjRhZTQyNjQxNmRjNDk5ZTQyYzMxOWY1ZjhjY2M2MzM5NGMwZWM3
15
- OWY1NmQ2YjhhMmUwZWVjNzliNGM0NWQwZjc2Yzg3YTg1Y2ViMDM=
13
+ ZTk5OTQwODFiNTQ4NjdiMTdkZWRmM2Y4OGQ2YmJlY2I4ZDA3MzRjZDBkOTRl
14
+ NzU4M2E2ZjJlOGI2MmI0NDY4Zjc2NjU1OTU3N2MxOTE0OTJmN2Q2NzNmYzcz
15
+ MTA5Mjk1ODM1YTI5OGMwYTQ3NDA1ZDFiYWYzMTVlNTExNjM1MDI=
@@ -3,7 +3,7 @@ require 'gibberish'
3
3
 
4
4
  module ::Middleman
5
5
  class Gibberish < Middleman::Extension
6
- Version = '0.6.1'
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
- asset_url = 'http://ahoward.github.io/middleman-gibberish/assets/'
124
-
125
- srcs =
129
+ scripts =
126
130
  libs.map do |lib|
127
- script = File.join(source_dir, 'gibberish', 'javascripts', lib)
131
+ script = File.join(source_dir, 'javascripts', lib)
128
132
 
129
- if test(?s, script)
130
- "/gibberish/javascripts/#{ lib }"
133
+ #if test(?s, script)
134
+ if false
135
+ javascript_include_tag(lib)
131
136
  else
132
- asset_url + lib
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
- <% srcs.each do |src| %>
186
- <script src='<%= src %>'></script>
187
- <% end %>
195
+ #{ scripts.join("\n") }
188
196
 
189
197
  <script>
190
198
  var encrypted = #{ encrypted.to_json };
@@ -3,7 +3,7 @@
3
3
 
4
4
  Gem::Specification::new do |spec|
5
5
  spec.name = "middleman-gibberish"
6
- spec.version = "0.6.1"
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.6.1
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-14 00:00:00.000000000 Z
11
+ date: 2014-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: middleman