dryml-firemarker 0.0.9 → 0.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.9
1
+ 0.0.11
@@ -2,23 +2,18 @@ version = File.read(File.expand_path('../VERSION', __FILE__)).strip
2
2
  require 'date'
3
3
 
4
4
  Gem::Specification.new do |s|
5
-
6
- s.name = 'dryml-firemarker'
7
- s.summary = 'Adds DRYML markers viewable with FireMarker'
8
- s.description = 'Dryml FireMarker annotates the output of Hobo and Rails apps that use the DRYML templating system.',
9
- s.authors = ["Domizio Demichelis"]
10
- s.email = 'dd.nexus@gmail.com'
11
- s.homepage = "http://github.com/ddnexus/#{name}"
12
-
13
- s.files = `git ls-files -z`.split("\0")
14
-
15
- s.version = version
16
- s.date = Date.today.to_s
17
-
18
- s.required_rubygems_version = ">= 1.3.6"
19
- s.rdoc_options = ["--charset=UTF-8"]
5
+ s.name = 'dryml-firemarker'
6
+ s.summary = 'Adds DRYML markers viewable with FireMarker'
7
+ s.description = 'Dryml FireMarker annotates the output of Hobo and Rails apps that use the DRYML templating system.'
8
+ s.authors = ["Domizio Demichelis"]
9
+ s.email = 'dd.nexus@gmail.com'
10
+ s.homepage = "http://github.com/ddnexus/dryml-firemarker"
20
11
  s.extra_rdoc_files = ["README.md"]
21
12
  s.require_paths = ["lib"]
22
-
13
+ s.files = `git ls-files -z`.split("\0")
14
+ s.version = version
15
+ s.date = Date.today.to_s
16
+ s.required_rubygems_version = ">= 1.3.6"
17
+ s.rdoc_options = ["--charset=UTF-8"]
23
18
  end
24
19
 
@@ -6,12 +6,17 @@ module DrymlRootModule
6
6
  undef_method :part_contexts_javascripts
7
7
  end
8
8
 
9
- if DRYML_METAINFO
9
+ if defined?(::DRYML_METAINFO) && ::DRYML_METAINFO || ENV['DRYML_METAINFO']
10
10
  class Template
11
11
  def wrap_source_with_metadata(content, kind, name, line, *args)
12
12
  return content if name.in?(NO_METADATA_TAGS)
13
13
  json = DrymlFireMarker.metadata_to_json(@template_path, kind, name, line, *args)
14
- "<!--[dryml]#{json}-->" + content + "<!--[/dryml]-->"
14
+ uid = rand(10000000000)
15
+ <<-source
16
+ <%= timestamp#{uid} = Time.now.to_f; %(<!--[dryml]#{json}-->) %>
17
+ #{content}
18
+ <%= %(<!--[/dryml]{"time":"\#{(Time.now.to_f - timestamp#{uid})*1000}ms"}-->) %>
19
+ source
15
20
  end
16
21
  end
17
22
  end
@@ -10,7 +10,12 @@ module Dryml
10
10
  def wrap_source_with_metadata(content, kind, name, line, *args)
11
11
  return content if name.in?(NO_METADATA_TAGS)
12
12
  json = DrymlFireMarker.metadata_to_json(@template_path, kind, name, line, *args)
13
- "<% safe_concat(%(<!--[dryml]#{json}-->)) %>" + content + "<% safe_concat(%(<!--[/dryml]-->)) %>"
13
+ uid = rand(10000000000)
14
+ <<-source
15
+ <% timestamp#{uid} = Time.now.to_f; safe_concat(%(<!--[dryml]#{json}-->)) %>
16
+ #{content}
17
+ <% safe_concat(%(<!--[/dryml]{"time":"\#{(Time.now.to_f - timestamp#{uid})*1000}ms"}-->)) %>
18
+ source
14
19
  end
15
20
 
16
21
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dryml-firemarker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.11
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,10 +9,10 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-11-10 00:00:00.000000000Z
12
+ date: 2012-07-14 00:00:00.000000000 Z
13
13
  dependencies: []
14
- description: ! '["Dryml FireMarker annotates the output of Hobo and Rails apps that
15
- use the DRYML templating system.", ["Domizio Demichelis"]]'
14
+ description: Dryml FireMarker annotates the output of Hobo and Rails apps that use
15
+ the DRYML templating system.
16
16
  email: dd.nexus@gmail.com
17
17
  executables: []
18
18
  extensions: []
@@ -22,7 +22,6 @@ files:
22
22
  - .gitignore
23
23
  - LICENSE
24
24
  - README.md
25
- - Rakefile
26
25
  - VERSION
27
26
  - dryml-firemarker.gemspec
28
27
  - lib/dryml-firemarker-shared-overrides.rb
@@ -32,7 +31,7 @@ files:
32
31
  - lib/dryml10-firemarker.rb
33
32
  - lib/dryml11-firemarker.rb
34
33
  - lib/dryml13-firemarker.rb
35
- homepage: http://github.com/ddnexus/Gem::Specification
34
+ homepage: http://github.com/ddnexus/dryml-firemarker
36
35
  licenses: []
37
36
  post_install_message:
38
37
  rdoc_options:
@@ -53,7 +52,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
53
52
  version: 1.3.6
54
53
  requirements: []
55
54
  rubyforge_project:
56
- rubygems_version: 1.8.10
55
+ rubygems_version: 1.8.24
57
56
  signing_key:
58
57
  specification_version: 3
59
58
  summary: Adds DRYML markers viewable with FireMarker
data/Rakefile DELETED
@@ -1,60 +0,0 @@
1
- name = 'dryml-firemarker'
2
-
3
- def ensure_clean(action, force=false)
4
- if !force && ! `git status -s`.empty?
5
- puts <<-EOS.gsub(/^ {6}/, '')
6
- Rake task aborted: the working tree is dirty!
7
- If you know what you are doing you can use \`rake #{action}[force]\`"
8
- EOS
9
- exit(1)
10
- end
11
- end
12
-
13
- desc "Install the gem"
14
- task :install, :force do |t, args|
15
- ensure_clean(:install, args.force)
16
- orig_version = version = File.read('VERSION').strip
17
- begin
18
- commit_id = `git log -1 --format="%h" HEAD`.strip
19
- version = "#{orig_version}.#{commit_id}"
20
- File.open('VERSION', 'w') {|f| f.puts version }
21
- gem_name = "#{name}-#{version}.gem"
22
- sh %(gem build #{name}.gemspec)
23
- sh %(gem install #{gem_name} --local --no-rdoc --no-ri)
24
- puts <<-EOS.gsub(/^ {6}/, '')
25
-
26
- *******************************************************************************
27
- * NOTICE *
28
- *******************************************************************************
29
- * The version id of locally installed gems is comparable to a --pre version: *
30
- * i.e. it is alphabetically ordered (not numerically ordered), besides it *
31
- * includes the sah1 commit id which is not aphabetically ordered, so be sure *
32
- * your application picks the version you really intend to use *
33
- *******************************************************************************
34
-
35
- EOS
36
- ensure
37
- remove_entry_secure gem_name, true
38
- File.open('VERSION', 'w') {|f| f.puts orig_version }
39
- end
40
- end
41
-
42
- desc %(Remove all the "#{name}" installed gems and executables and install this version)
43
- task :clean_install, :force do |t, args|
44
- ensure_clean(:install, args.force)
45
- sh %(gem uninstall #{name} --all --ignore-dependencies --executables)
46
- Rake::Task['install'].invoke(args.force)
47
- end
48
-
49
- desc "Push the gem to rubygems.org"
50
- task :push, :force do |t, args|
51
- begin
52
- ensure_clean(:push, args.force)
53
- version = File.read('VERSION').strip
54
- gem_name = "#{name}-#{version}.gem"
55
- sh %(gem build #{name}.gemspec)
56
- sh %(gem push #{gem_name})
57
- ensure
58
- remove_entry_secure gem_name, true
59
- end
60
- end