inversion 1.1.1 → 1.2.0

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.
Files changed (49) hide show
  1. checksums.yaml +5 -5
  2. checksums.yaml.gz.sig +0 -0
  3. data.tar.gz.sig +0 -0
  4. data/ChangeLog +2012 -1916
  5. data/History.rdoc +10 -1
  6. data/Rakefile +3 -1
  7. data/bin/inversion +3 -1
  8. data/lib/inversion.rb +4 -4
  9. data/lib/inversion/command.rb +2 -1
  10. data/lib/inversion/exceptions.rb +4 -1
  11. data/lib/inversion/mixins.rb +3 -2
  12. data/lib/inversion/monkeypatches.rb +3 -2
  13. data/lib/inversion/parser.rb +2 -2
  14. data/lib/inversion/renderstate.rb +2 -1
  15. data/lib/inversion/sinatra.rb +4 -1
  16. data/lib/inversion/template.rb +2 -1
  17. data/lib/inversion/template/attrtag.rb +3 -1
  18. data/lib/inversion/template/begintag.rb +3 -1
  19. data/lib/inversion/template/calltag.rb +3 -1
  20. data/lib/inversion/template/codetag.rb +4 -2
  21. data/lib/inversion/template/commenttag.rb +3 -1
  22. data/lib/inversion/template/configtag.rb +3 -1
  23. data/lib/inversion/template/containertag.rb +2 -2
  24. data/lib/inversion/template/defaulttag.rb +3 -1
  25. data/lib/inversion/template/elsetag.rb +3 -1
  26. data/lib/inversion/template/elsiftag.rb +4 -3
  27. data/lib/inversion/template/endtag.rb +3 -3
  28. data/lib/inversion/template/escapetag.rb +3 -1
  29. data/lib/inversion/template/fortag.rb +3 -1
  30. data/lib/inversion/template/fragmenttag.rb +3 -1
  31. data/lib/inversion/template/iftag.rb +3 -1
  32. data/lib/inversion/template/importtag.rb +3 -1
  33. data/lib/inversion/template/includetag.rb +3 -1
  34. data/lib/inversion/template/node.rb +2 -1
  35. data/lib/inversion/template/pptag.rb +4 -2
  36. data/lib/inversion/template/publishtag.rb +3 -1
  37. data/lib/inversion/template/rescuetag.rb +3 -1
  38. data/lib/inversion/template/subscribetag.rb +3 -1
  39. data/lib/inversion/template/tag.rb +2 -2
  40. data/lib/inversion/template/textnode.rb +3 -1
  41. data/lib/inversion/template/timedeltatag.rb +16 -3
  42. data/lib/inversion/template/unlesstag.rb +3 -1
  43. data/lib/inversion/template/uriencodetag.rb +3 -1
  44. data/lib/inversion/template/yieldtag.rb +3 -1
  45. data/lib/inversion/tilt.rb +3 -1
  46. data/spec/inversion/template/pptag_spec.rb +2 -0
  47. data/spec/inversion/template/timedeltatag_spec.rb +7 -0
  48. metadata +31 -33
  49. metadata.gz.sig +0 -0
@@ -1,7 +1,9 @@
1
- #!/usr/bin/env ruby
1
+ # -*- ruby -*-
2
+ # frozen_string_literal: true
2
3
  # vim: set noet nosta sw=4 ts=4 :
3
4
 
4
5
  require 'inversion/mixins'
6
+ require 'inversion/template' unless defined?( Inversion::Template )
5
7
  require 'inversion/template/attrtag'
6
8
  require 'inversion/template/containertag'
7
9
  require 'inversion/template/elsetag'
@@ -1,7 +1,9 @@
1
- #!/usr/bin/env ruby
1
+ # -*- ruby -*-
2
+ # frozen_string_literal: true
2
3
  # vim: set noet nosta sw=4 ts=4 :
3
4
 
4
5
  require 'uri'
6
+ require 'inversion/template' unless defined?( Inversion::Template )
5
7
  require 'inversion/template/attrtag'
6
8
 
7
9
  # Inversion URL encoding tag.
@@ -1,8 +1,10 @@
1
- #!/usr/bin/env ruby
1
+ # -*- ruby -*-
2
+ # frozen_string_literal: true
2
3
  # vim: set noet nosta sw=4 ts=4 :
3
4
 
4
5
  require 'pathname'
5
6
  require 'inversion/mixins'
7
+ require 'inversion/template' unless defined?( Inversion::Template )
6
8
  require 'inversion/template/tag'
7
9
 
8
10
 
@@ -1,4 +1,6 @@
1
- #!/usr/bin/env ruby
1
+ # -*- ruby -*-
2
+ # frozen_string_literal: true
3
+ # vim: set noet nosta sw=4 ts=4 :
2
4
 
3
5
  require 'tilt'
4
6
 
@@ -24,6 +24,7 @@ describe Inversion::Template::PpTag do
24
24
  ).to eq( "It looks like: <tt>{:a_complex=>[:datastructure, :or, :something]}</tt>." )
25
25
  end
26
26
 
27
+
27
28
  it "escapes as HTML if the format is set to :html" do
28
29
  template = Inversion::Template.
29
30
  new( 'It looks like: <tt><?pp foo.bar ?></tt>.', :escape_format => :html )
@@ -35,4 +36,5 @@ describe Inversion::Template::PpTag do
35
36
  template.render
36
37
  ).to eq( "It looks like: <tt>{:a_complex=&gt;[:datastructure, :or, :something]}</tt>." )
37
38
  end
39
+
38
40
  end
@@ -96,6 +96,13 @@ describe Inversion::Template::TimeDeltaTag do
96
96
  expect( @tag.render( renderstate ) ).to eq( "about a day ago" )
97
97
  end
98
98
 
99
+ it "omits decorators if requested" do
100
+ renderstate = Inversion::RenderState.new( :foo => { time: @pastsecs, omit_decorator: true } )
101
+ expect( @tag.render( renderstate ) ).to eq( "about a day" )
102
+ renderstate = Inversion::RenderState.new( :foo => { time: @futuresecs, omit_decorator: true } )
103
+ expect( @tag.render( renderstate ) ).to eq( "about a day" )
104
+ end
105
+
99
106
 
100
107
  describe "time period calculation" do
101
108
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inversion
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Granger
@@ -11,32 +11,31 @@ bindir: bin
11
11
  cert_chain:
12
12
  - |
13
13
  -----BEGIN CERTIFICATE-----
14
- MIIEbDCCAtSgAwIBAgIBATANBgkqhkiG9w0BAQUFADA+MQwwCgYDVQQDDANnZWQx
15
- GTAXBgoJkiaJk/IsZAEZFglGYWVyaWVNVUQxEzARBgoJkiaJk/IsZAEZFgNvcmcw
16
- HhcNMTcwOTI3MDAzMDQ0WhcNMTgwOTI3MDAzMDQ0WjA+MQwwCgYDVQQDDANnZWQx
17
- GTAXBgoJkiaJk/IsZAEZFglGYWVyaWVNVUQxEzARBgoJkiaJk/IsZAEZFgNvcmcw
18
- ggGiMA0GCSqGSIb3DQEBAQ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R0PBAQDAgSwMB0GA1UdDgQWBBRyjf55EbrHagiRLqt5YAd3yb8k4DAcBgNVHREE
27
+ FTATgRFnZWRARmFlcmllTVVELm9yZzAcBgNVHRIEFTATgRFnZWRARmFlcmllTVVE
28
+ Lm9yZzANBgkqhkiG9w0BAQsFAAOCAYEAP9Ffkvg4e8CjIWi8SykQ8oJSS8jbmbgF
29
+ abke3vXWLG6V9kFiObuJd5wZRBluJANu7bEtjgc3fFaGVP2XxVdCpVjNbmMDg4Qp
30
+ ovvczP53X6pQP2RSZgxF6Lblvy8y11RziUTVRG/Z2aJHsElo6gI7vQznE/OSDrhC
31
+ gEhr8uaIUt7D+HZWRbU0+MkKPpL5uMqaFuJbqXEvSwPTuUuYkDfNfsjQO7ruWBac
32
+ bxHCrvpZ6Tijc0nrlyXi6gPOCLeaqhau2xFnlvKgELwsGYSoKBJyDwqtQ5kwrOlU
33
+ tkSyLrfZ+RZcH535Hyvif7ZxB0v5OxXXoec+N2vrUsEUMRDL9dg4/WFdN8hIOixF
34
+ 3IPKpZ1ho0Ya5q7yhygtBK9/NBFHw+nbJjcltfPDBXleRe8u73gnQo8AZIhStYSP
35
+ v4qqqa27Bs468d6SoPxjSm8a2mM9HZ4OdWhq4tFsbTeXDVquCfi64OTEaTt2xQdR
36
+ JnC4lpJfCP6aCXa5h2XAQfPSH636cQap
38
37
  -----END CERTIFICATE-----
39
- date: 2017-11-16 00:00:00.000000000 Z
38
+ date: 2019-06-01 00:00:00.000000000 Z
40
39
  dependencies:
41
40
  - !ruby/object:Gem::Dependency
42
41
  name: loggability
@@ -72,14 +71,14 @@ dependencies:
72
71
  requirements:
73
72
  - - "~>"
74
73
  - !ruby/object:Gem::Version
75
- version: '0.9'
74
+ version: '0.10'
76
75
  type: :development
77
76
  prerelease: false
78
77
  version_requirements: !ruby/object:Gem::Requirement
79
78
  requirements:
80
79
  - - "~>"
81
80
  - !ruby/object:Gem::Version
82
- version: '0.9'
81
+ version: '0.10'
83
82
  - !ruby/object:Gem::Dependency
84
83
  name: hoe-highline
85
84
  requirement: !ruby/object:Gem::Requirement
@@ -254,14 +253,14 @@ dependencies:
254
253
  requirements:
255
254
  - - "~>"
256
255
  - !ruby/object:Gem::Version
257
- version: '3.16'
256
+ version: '3.17'
258
257
  type: :development
259
258
  prerelease: false
260
259
  version_requirements: !ruby/object:Gem::Requirement
261
260
  requirements:
262
261
  - - "~>"
263
262
  - !ruby/object:Gem::Version
264
- version: '3.16'
263
+ version: '3.17'
265
264
  description: |-
266
265
  Inversion is a templating system for Ruby. It uses the "Inversion of Control"
267
266
  principle to decouple the contents and structure of templates from the code
@@ -383,15 +382,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
383
382
  requirements:
384
383
  - - ">="
385
384
  - !ruby/object:Gem::Version
386
- version: 2.2.0
385
+ version: 2.4.0
387
386
  required_rubygems_version: !ruby/object:Gem::Requirement
388
387
  requirements:
389
388
  - - ">="
390
389
  - !ruby/object:Gem::Version
391
390
  version: '0'
392
391
  requirements: []
393
- rubyforge_project:
394
- rubygems_version: 2.6.13
392
+ rubygems_version: 3.0.3
395
393
  signing_key:
396
394
  specification_version: 4
397
395
  summary: Inversion is a templating system for Ruby
metadata.gz.sig CHANGED
Binary file