jcompiler 0.1.46 → 0.1.47
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/update +16 -0
- data/build +1 -0
- data/lib/jcompiler.rb +5 -13
- data/lib/jcompiler/cache.rb +7 -0
- data/lib/jcompiler/compiler.rb +8 -0
- data/lib/jcompiler/handler.rb +10 -0
- metadata +6 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5320625b94274c2890de72c0e9590782792d2dd0
|
4
|
+
data.tar.gz: 402fa9f040ba61eedda26f853ce88faabca96522
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4e4175141741799636b2352a38454669dd71d3ed53ac5579e5f28d0501c1ef89e0af1d735163cad119def17d7317e4f10e973b91d379e44d20c2edbf51d8f18f
|
7
|
+
data.tar.gz: 8dfba155ab881f604ab5eeb337f5abc7a83ed975b8c52708fc518e49e43a1f195e38966afa5bced72023764fbe0878d6a6dff68da85f64566c40c947b3ce5d4c
|
data/bin/update
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
#! /usr/bin/env ruby
|
2
|
+
|
3
|
+
def stream_out(command)
|
4
|
+
IO.popen(command) do |lines|
|
5
|
+
lines.each do |line|
|
6
|
+
puts line
|
7
|
+
STDOUT.flush
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
root_path = File.expand_path('../..', __FILE__)
|
13
|
+
|
14
|
+
stream_out("rm -f #{root_path}/*.gem 2> /dev/null")
|
15
|
+
stream_out("gem build #{root_path}/jcompiler.gemspec")
|
16
|
+
stream_out("gem push #{root_path}/*.gem")
|
data/build
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
48
|
data/lib/jcompiler.rb
CHANGED
@@ -31,20 +31,12 @@ class Jcompiler
|
|
31
31
|
end
|
32
32
|
|
33
33
|
def self.code(id, source, bind)
|
34
|
+
if @@codes.has_key?(id)
|
35
|
+
@@codes[id] ||=
|
36
|
+
else
|
37
|
+
|
38
|
+
end
|
34
39
|
debugger
|
35
40
|
1
|
36
41
|
end
|
37
42
|
end
|
38
|
-
|
39
|
-
class JcompilerHandler
|
40
|
-
cattr_accessor :default_format
|
41
|
-
self.default_format = Mime::JSON
|
42
|
-
|
43
|
-
@@jcompiler = Jcompiler.new
|
44
|
-
|
45
|
-
def self.call(template)
|
46
|
-
"Jcompiler.code(\"#{template.identifier}\", \"#{template.source}\", binding)"
|
47
|
-
end
|
48
|
-
end
|
49
|
-
|
50
|
-
ActionView::Template.register_template_handler :jcompiler, JcompilerHandler
|
@@ -0,0 +1,10 @@
|
|
1
|
+
class Jcompiler::Handler
|
2
|
+
cattr_accessor :default_format
|
3
|
+
self.default_format = Mime::JSON
|
4
|
+
|
5
|
+
def self.call(template)
|
6
|
+
"Jcompiler::Cache.read(\"#{template.identifier}\", \"#{template.source}\", binding)"
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
ActionView::Template.register_template_handler :jcompiler, Jcompiler::Handler
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jcompiler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.47
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tetsuri Moriya
|
@@ -21,8 +21,13 @@ files:
|
|
21
21
|
- Gemfile
|
22
22
|
- Gemfile.lock
|
23
23
|
- README.md
|
24
|
+
- bin/update
|
25
|
+
- build
|
24
26
|
- jcompiler.gemspec
|
25
27
|
- lib/jcompiler.rb
|
28
|
+
- lib/jcompiler/cache.rb
|
29
|
+
- lib/jcompiler/compiler.rb
|
30
|
+
- lib/jcompiler/handler.rb
|
26
31
|
- tmp/.gitignore
|
27
32
|
homepage: https://bitbucket.org/pandora2000/jcompiler
|
28
33
|
licenses:
|