lalala 4.0.0.dev.66 → 4.0.0.dev.71
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lalala.rb +3 -1
- data/lib/lalala/engine.rb +4 -0
- data/lib/lalala/ext_with_advisory_lock.rb +11 -0
- data/lib/lalala/ext_with_advisory_lock/flock.rb +21 -0
- data/lib/lalala/version.rb +1 -1
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 53b9132ad4862fd665528e46a51ae41409f472fb
|
4
|
+
data.tar.gz: 6557e2d81cbb7fe71fa0be8e0f21c3df317a763a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6471354e1b415bb167edcc537a431c3b144ab8b69202693c0c2ea2c13d247aa23a6fb7e92eb99cb523492fc409ce425964a5396a9734ef5c974917ab11db8c8e
|
7
|
+
data.tar.gz: 2b013f3ce49ceaff9a0e5f839361d14bfed304d080d693bd4eac80def8333317fefec6c9ffaff0012d4445d3b1556b0016af5754297a112febc4af4a62452cc0
|
data/lib/lalala.rb
CHANGED
@@ -27,7 +27,6 @@ module Lalala
|
|
27
27
|
require 'stringex'
|
28
28
|
require 'activeadmin'
|
29
29
|
|
30
|
-
require 'formtastic/inputs/grid_input'
|
31
30
|
|
32
31
|
if groups.include?(:assets)
|
33
32
|
require 'lalala/assets'
|
@@ -41,9 +40,12 @@ module Lalala
|
|
41
40
|
require 'lalala/test'
|
42
41
|
end
|
43
42
|
|
43
|
+
require 'formtastic/inputs/grid_input'
|
44
|
+
|
44
45
|
autoload :ExtActiveRecord
|
45
46
|
autoload :ExtRack
|
46
47
|
autoload :ExtI18n
|
48
|
+
autoload :ExtWithAdvisoryLock
|
47
49
|
|
48
50
|
autoload :Markdown
|
49
51
|
autoload :Pages
|
data/lib/lalala/engine.rb
CHANGED
@@ -0,0 +1,21 @@
|
|
1
|
+
module Lalala::ExtWithAdvisoryLock::Flock
|
2
|
+
extend ActiveSupport::Concern
|
3
|
+
|
4
|
+
included do
|
5
|
+
remove_method :filename
|
6
|
+
alias_method :filename, :_ng_filename
|
7
|
+
end
|
8
|
+
|
9
|
+
def _ng_filename
|
10
|
+
@filename ||= begin
|
11
|
+
safe = @lock_name.gsub(/[^a-z0-9]/i, '')
|
12
|
+
fn = "lock-#{safe}-#{@lock_name.to_s.hash}"
|
13
|
+
|
14
|
+
dir = File.join(Rails.application.paths['tmp'].first, 'locks')
|
15
|
+
FileUtils.mkdir_p(dir)
|
16
|
+
|
17
|
+
File.join(dir, fn)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
data/lib/lalala/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lalala
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.0.dev.
|
4
|
+
version: 4.0.0.dev.71
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Simon Menke
|
@@ -1477,6 +1477,8 @@ files:
|
|
1477
1477
|
- lib/lalala/ext_rack/canonical_url.rb
|
1478
1478
|
- lib/lalala/ext_rack/i18n_negotiator.rb
|
1479
1479
|
- lib/lalala/ext_rack/page_loader.rb
|
1480
|
+
- lib/lalala/ext_with_advisory_lock.rb
|
1481
|
+
- lib/lalala/ext_with_advisory_lock/flock.rb
|
1480
1482
|
- lib/lalala/markdown.rb
|
1481
1483
|
- lib/lalala/markdown/active_model.rb
|
1482
1484
|
- lib/lalala/markdown/handlers/base.rb
|