sinatra-xslview 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1,2 @@
1
+ sinatra-xslview-0.1.0.gem
2
+ sinatra-xslview.gemspec
@@ -5,7 +5,7 @@ Sinatra-XSLView
5
5
 
6
6
  ## Description
7
7
 
8
- Simple helper function to render XML via an XSL stylesheet.
8
+ Simple helper function to render XML via an XSL stylesheet.
9
9
 
10
10
 
11
11
  ## Usage
@@ -24,8 +24,6 @@ get '/entries' do
24
24
  stepone = xslview myxml, '/path/to/views/xsl/entries.xsl'
25
25
  stepone
26
26
  end
27
-
28
27
  </pre>
29
28
 
30
29
 
31
-
data/VERSION.yml ADDED
@@ -0,0 +1,4 @@
1
+ ---
2
+ :major: 0
3
+ :minor: 1
4
+ :patch: 1
@@ -13,9 +13,10 @@ module Sinatra
13
13
  # TODO: cache stylesheets
14
14
  ##
15
15
  module XSLView
16
- def xslview(myxml,myxsl)
16
+ def xslview(myxml,myxsl,params={})
17
17
  xslt = XML::XSLT.new()
18
18
  xslt.xml = myxml
19
+ xslt.parameters = params unless params.empty?
19
20
  xslt.xsl = options.xslviews + myxsl
20
21
  xslt.serve
21
22
  end
@@ -5,23 +5,23 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{sinatra-xslview}
8
- s.version = "0.1.0"
8
+ s.version = "0.1.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Albert Lash"]
12
- s.date = %q{2010-02-13}
12
+ s.date = %q{2010-03-06}
13
13
  s.description = %q{Simple helper function to render XML via an XSL stylesheet.}
14
14
  s.email = %q{albert.lash@docunext.com}
15
15
  s.extra_rdoc_files = [
16
16
  "LICENSE",
17
- "README",
18
- "README.markdown"
17
+ "README.md"
19
18
  ]
20
19
  s.files = [
21
- "LICENSE",
22
- "README",
23
- "README.markdown",
20
+ ".gitignore",
21
+ "LICENSE",
22
+ "README.md",
24
23
  "Rakefile",
24
+ "VERSION.yml",
25
25
  "lib/sinatra/xslview.rb",
26
26
  "sinatra-xslview.gemspec"
27
27
  ]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sinatra-xslview
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Albert Lash
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-02-13 00:00:00 -05:00
12
+ date: 2010-03-06 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -30,13 +30,13 @@ extensions: []
30
30
 
31
31
  extra_rdoc_files:
32
32
  - LICENSE
33
- - README
34
- - README.markdown
33
+ - README.md
35
34
  files:
35
+ - .gitignore
36
36
  - LICENSE
37
- - README
38
- - README.markdown
37
+ - README.md
39
38
  - Rakefile
39
+ - VERSION.yml
40
40
  - lib/sinatra/xslview.rb
41
41
  - sinatra-xslview.gemspec
42
42
  has_rdoc: true
data/README.markdown DELETED
@@ -1,31 +0,0 @@
1
- Sinatra-XSLView
2
- ===============
3
-
4
- ## Summary: XSL Sinatra Helper
5
-
6
- ## Description
7
-
8
- Simple helper function to render XML via an XSL stylesheet.
9
-
10
-
11
- ## Usage
12
-
13
- In the Sinatra application (on Debian):
14
-
15
- <pre class="sh_ruby">
16
- require 'xml/xslt'
17
- require 'sinatra/xslview'
18
-
19
- get '/entries' do
20
- # Using DataMapper
21
- @myentries = Entry.all
22
- # Example of using xslview and how xslviews could be chained together
23
- myxml = builder :'xml/entries'
24
- stepone = xslview myxml, '/path/to/views/xsl/entries.xsl'
25
- stepone
26
- end
27
-
28
- </pre>
29
-
30
-
31
-