melodiest 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +56 -0
- data/lib/melodiest/version.rb +1 -1
- data/melodiest.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 00c23e4c16d216fa1999cc6ad4f21c7f4e4d7e6e
|
4
|
+
data.tar.gz: 3cbde05684e9a5b653cd617e1614711322da8c0f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 18e669f816f85dcaeaa2337d46f04c96c48c75927e80acb116a3ee4016cae80e63a3bafab49804d7b6a324b31caadb31bba6a8bd0b97c5d90ba2f28de4bfe977
|
7
|
+
data.tar.gz: 0c8fa8028ac85f7b9d8cb01dcd9578163ddb16c5ff2d424ad56c2be123b08f0bf1cd8fb52ad27f39c15f19381560a516d6d3d6ed13422638d5069362a65ffa3f
|
data/README.md
CHANGED
@@ -0,0 +1,56 @@
|
|
1
|
+
# Melodiest
|
2
|
+
|
3
|
+
Melodiest is [Sinatra](http://www.sinatrarb.com/) configuration boilerplate. The purpose of this gem is because I'm too lazy to write configuration every my Sinatra project.
|
4
|
+
|
5
|
+
### Installation
|
6
|
+
|
7
|
+
|
8
|
+
```ruby
|
9
|
+
gem install melodiest
|
10
|
+
```
|
11
|
+
|
12
|
+
with Bundler, put this code in your Gemfile:
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
gem 'melodiest'
|
16
|
+
```
|
17
|
+
|
18
|
+
### How to Use
|
19
|
+
|
20
|
+
Because Melodiest is already required Sinatra, you don't have to require 'sinatra' anymore, just require 'melodiest'.
|
21
|
+
|
22
|
+
`Melodiest::Application` is subclass from `Sinatra::Application` and by default is using configuration from `Melodiest::Setting.setup` method.
|
23
|
+
|
24
|
+
|
25
|
+
```ruby
|
26
|
+
# mysinatraapp.rb
|
27
|
+
|
28
|
+
require 'melodiest'
|
29
|
+
require 'melodiest/auth'
|
30
|
+
|
31
|
+
class App < Melodiest::Application
|
32
|
+
helpers Melodiest::Auth::Http
|
33
|
+
|
34
|
+
get "/" do
|
35
|
+
"hello world!"
|
36
|
+
end
|
37
|
+
|
38
|
+
get "/protected" do
|
39
|
+
authorized! "myhttpauthusername", "myhttpauthpassword"
|
40
|
+
end
|
41
|
+
|
42
|
+
end
|
43
|
+
|
44
|
+
```
|
45
|
+
|
46
|
+
#### Configuration
|
47
|
+
|
48
|
+
Configuration
|
49
|
+
|
50
|
+
* `set :server, 'thin'`
|
51
|
+
|
52
|
+
#### Helpers
|
53
|
+
|
54
|
+
Helper methods
|
55
|
+
|
56
|
+
* `Melodiest::Auth::Http`
|
data/lib/melodiest/version.rb
CHANGED
data/melodiest.gemspec
CHANGED
@@ -3,7 +3,7 @@ require_relative 'lib/melodiest/version'
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = 'melodiest'
|
5
5
|
s.version = Melodiest::VERSION
|
6
|
-
s.date = '2015-01
|
6
|
+
s.date = '2015-02-01'
|
7
7
|
s.summary = "Sinatra configuration boilerplate"
|
8
8
|
s.description = "Sinatra configuration boilerplate"
|
9
9
|
s.author = 'Kunto Aji Kristianto'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: melodiest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kunto Aji Kristianto
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-01
|
11
|
+
date: 2015-02-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|