lydia 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +61 -0
- data/.travis.yml +3 -8
- data/README.md +93 -22
- data/Rakefile +3 -3
- data/bin/console +3 -3
- data/examples/{example2.rb → config.ru} +2 -0
- data/examples/hello_world.rb +1 -1
- data/lib/lydia.rb +2 -2
- data/lib/lydia/application.rb +8 -11
- data/lib/lydia/delegator.rb +2 -2
- data/lib/lydia/filters.rb +11 -12
- data/lib/lydia/halted.rb +1 -1
- data/lib/lydia/helpers.rb +5 -5
- data/lib/lydia/not_found.rb +1 -1
- data/lib/lydia/request.rb +2 -2
- data/lib/lydia/response.rb +37 -25
- data/lib/lydia/route.rb +30 -22
- data/lib/lydia/router.rb +29 -30
- data/lib/lydia/standard_pages.rb +10 -7
- data/lib/lydia/version.rb +1 -1
- data/lydia.gemspec +9 -5
- data/spec/application_spec.rb +16 -16
- data/spec/delegator_spec.rb +5 -9
- data/spec/filters_spec.rb +16 -18
- data/spec/helpers_spec.rb +14 -14
- data/spec/middleware_spec.rb +9 -9
- data/spec/response_spec.rb +36 -38
- data/spec/router_spec.rb +18 -19
- data/spec/spec_helper.rb +1 -1
- data/spec/templates_spec.rb +5 -5
- metadata +35 -6
data/spec/spec_helper.rb
CHANGED
data/spec/templates_spec.rb
CHANGED
@@ -2,28 +2,28 @@ require 'spec_helper'
|
|
2
2
|
require 'rack/test'
|
3
3
|
require 'lydia/application'
|
4
4
|
|
5
|
-
describe
|
5
|
+
describe 'Templates' do
|
6
6
|
include Rack::Test::Methods
|
7
7
|
|
8
8
|
class TemplatesHelpers < Lydia::Application
|
9
9
|
get '/render_erb' do
|
10
10
|
render 'spec/templates/template.erb', nil, message: 'template'
|
11
|
-
end
|
11
|
+
end
|
12
12
|
|
13
13
|
get '/render_haml' do
|
14
14
|
render 'spec/templates/template.haml', Object.new, message: 'template'
|
15
15
|
end
|
16
16
|
end
|
17
|
-
|
17
|
+
|
18
18
|
def app
|
19
19
|
TemplatesHelpers.new
|
20
20
|
end
|
21
|
-
|
21
|
+
|
22
22
|
it 'render an erb template' do
|
23
23
|
get '/render_erb'
|
24
24
|
expect(last_response.status).to eq(200)
|
25
25
|
expect(last_response.body).to include('template')
|
26
|
-
end
|
26
|
+
end
|
27
27
|
|
28
28
|
it 'render an haml template' do
|
29
29
|
get '/render_haml'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lydia
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mirko Mignini
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-10-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -94,20 +94,48 @@ dependencies:
|
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rubocop
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rubocop-rspec
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
97
125
|
- !ruby/object:Gem::Dependency
|
98
126
|
name: rack
|
99
127
|
requirement: !ruby/object:Gem::Requirement
|
100
128
|
requirements:
|
101
129
|
- - "~>"
|
102
130
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
131
|
+
version: 2.0.1
|
104
132
|
type: :runtime
|
105
133
|
prerelease: false
|
106
134
|
version_requirements: !ruby/object:Gem::Requirement
|
107
135
|
requirements:
|
108
136
|
- - "~>"
|
109
137
|
- !ruby/object:Gem::Version
|
110
|
-
version:
|
138
|
+
version: 2.0.1
|
111
139
|
- !ruby/object:Gem::Dependency
|
112
140
|
name: tilt
|
113
141
|
requirement: !ruby/object:Gem::Requirement
|
@@ -131,6 +159,7 @@ extra_rdoc_files: []
|
|
131
159
|
files:
|
132
160
|
- ".gitignore"
|
133
161
|
- ".rspec"
|
162
|
+
- ".rubocop.yml"
|
134
163
|
- ".travis.yml"
|
135
164
|
- Gemfile
|
136
165
|
- LICENSE.txt
|
@@ -138,7 +167,7 @@ files:
|
|
138
167
|
- Rakefile
|
139
168
|
- bin/console
|
140
169
|
- bin/setup
|
141
|
-
- examples/
|
170
|
+
- examples/config.ru
|
142
171
|
- examples/hello_world.rb
|
143
172
|
- lib/lydia.rb
|
144
173
|
- lib/lydia/application.rb
|
@@ -186,7 +215,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
186
215
|
version: '0'
|
187
216
|
requirements: []
|
188
217
|
rubyforge_project:
|
189
|
-
rubygems_version: 2.
|
218
|
+
rubygems_version: 2.5.0
|
190
219
|
signing_key:
|
191
220
|
specification_version: 4
|
192
221
|
summary: Lightweight, fast and easy to use small ruby web framework.
|