sinatra-pages 0.6.2 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/LICENSE +19 -0
  2. data/README.markdown +65 -0
  3. data/Rakefile +2 -12
  4. metadata +4 -4
  5. data/README +0 -0
data/LICENSE CHANGED
@@ -0,0 +1,19 @@
1
+ Copyright (c) 2010 Julio Javier Cicchelli
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in
11
+ all copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ THE SOFTWARE.
data/README.markdown ADDED
@@ -0,0 +1,65 @@
1
+ # Sinatra Pages
2
+ This is a [Sinatra Extension][1] that renders any page located under the *views/* directory inside your [Sinatra][2] application.
3
+
4
+ ### Installation
5
+ In order to install this gem, you just need to install the gem from your command line like this:
6
+
7
+ $sudo gem install sinatra-pages
8
+
9
+ You should take into account that this library have the following dependencies:
10
+
11
+ * [sinatra][2]
12
+ * [haml][3]
13
+
14
+ ### Usage
15
+ Before plug in this extension, you should create the following file structure inside your application.
16
+
17
+ app/
18
+ |- config.ru
19
+ |- views/
20
+ |- home.haml
21
+ |- layout.haml
22
+ |- not_found.haml
23
+
24
+ Then, you just need to plug it in inside your *config.ru* file.
25
+
26
+ require 'sinatra'
27
+ require 'sinatra/pages'
28
+
29
+ map '/' do
30
+ run Sinatra::Pages
31
+ end
32
+
33
+ Finally, you should test your application by executing the following command on your command line.
34
+
35
+ $app/rackup config.ru
36
+
37
+ In order to verify if you application is working, open your web browser with the address that will appear after the execution described above.
38
+
39
+ ### Contributions
40
+ Everybody is welcome to contribute to this project by commenting the source code, suggesting modifications or new ideas, reporting bugs, writing some documentation and, of course, you're also welcome to contribute with patches as well!
41
+
42
+ In case you would like to contribute on this library, here's the list of extra dependencies you would need:
43
+
44
+ * [rspec][4]
45
+ * [rcov][5]
46
+ * [rack-test][6]
47
+
48
+ ### Contributors
49
+ * [Julio Javier Cicchelli][7]
50
+
51
+ ### Notes
52
+ This library is being developed by using the [Ruby 1.9.1 interpreter][8] and was not being tested on any other version of the interpreter.
53
+
54
+ ### License
55
+ This extension is licensed under the [MIT License][9].
56
+
57
+ [1]: http://www.sinatrarb.com/extensions.html
58
+ [2]: http://www.sinatrarb.com/
59
+ [3]: http://haml-lang.com/
60
+ [4]: http://rspec.info/
61
+ [5]: http://eigenclass.org/hiki/rcov
62
+ [6]: http://gitrdoc.com/brynary/rack-test/tree/master
63
+ [7]: http://github.com/mr-rock
64
+ [8]: http://www.ruby-lang.org/en/
65
+ [9]: http://creativecommons.org/licenses/MIT/
data/Rakefile CHANGED
@@ -1,25 +1,15 @@
1
1
  require 'rubygems' if RUBY_VERSION.to_f < 1.9
2
2
  require 'rake/clean'
3
- require 'rake/rdoctask'
4
3
  require 'rake/gempackagetask'
5
4
  require 'spec/rake/spectask'
6
5
 
7
- CLEAN.include %w[coverage/ doc/ pkg/]
8
-
9
- desc 'Documentation generation.'
10
- Rake::RDocTask.new :rdoc do |documentation|
11
- documentation.rdoc_files.add(%w(README LICENSE lib/**/*.rb))
12
- documentation.main = 'README'
13
- documentation.title = 'Sinatra-Pages Documentation'
14
- documentation.rdoc_dir = 'doc'
15
- documentation.options = %w[--line-numbers --inline-source --charset=UTF-8]
16
- end
6
+ CLEAN.include %w[coverage/ pkg/]
17
7
 
18
8
  desc 'Load the GemSpec definition file.'
19
9
  load 'sinatra-pages.gemspec'
20
10
 
21
11
  desc 'Package building.'
22
- Rake::GemPackageTask.new(GEM) do |package|
12
+ Rake::GemPackageTask.new GEM do |package|
23
13
  package.gem_spec = GEM
24
14
  package.need_tar = false
25
15
  package.need_zip = false
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sinatra-pages
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julio Javier Cicchelli
@@ -69,11 +69,11 @@ executables: []
69
69
  extensions: []
70
70
 
71
71
  extra_rdoc_files:
72
- - README
72
+ - README.markdown
73
73
  - LICENSE
74
74
  files:
75
75
  - LICENSE
76
- - README
76
+ - README.markdown
77
77
  - Rakefile
78
78
  - lib/sinatra/pages.rb
79
79
  - spec/opts/rcov.opts
@@ -89,7 +89,7 @@ rdoc_options:
89
89
  - --title
90
90
  - Sinatra-Pages
91
91
  - --main
92
- - README
92
+ - README.markdown
93
93
  - --line-numbers
94
94
  - --inline-source
95
95
  - --charset=UTF-8
data/README DELETED
File without changes