hobby 0.1.2 → 0.1.3
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.
- checksums.yaml +4 -4
- data/hobby.gemspec +1 -1
- data/lib/hobby.rb +1 -1
- data/lib/hobby/helpers.rb +2 -2
- data/readme.adoc +11 -3
- data/spec/app_spec.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b95d5ad065324e903deb97971e990916ec1011e2353f50d0ab4c30f69607cecc
|
4
|
+
data.tar.gz: 0e2a747860c4d153fc418fbd1b1ed599847e419f80db6c31690c02b2097ea146
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dbff581d827ea9eadd548378730262c9f4e0b9941cc25954c62455e90032698e6364e82dfc2e25ab7ab79efb919a3b2f2bfa34580cd9f853376b993821e5eedf
|
7
|
+
data.tar.gz: c030f1a411b5db33c080eb0b68c722ac9c362d5212fc3f60b88f61df007f47baa53a73e0e3b5d2e4e920331415095cec74f69cf5225fe3f4a73b80bc3496cdc3
|
data/hobby.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = 'hobby'
|
7
|
-
spec.version = '0.1.
|
7
|
+
spec.version = '0.1.3'
|
8
8
|
spec.authors = ['Anatoly Chernow']
|
9
9
|
spec.email = ['chertoly@gmail.com']
|
10
10
|
spec.summary = %q{A professional way to create Rack applications.}
|
data/lib/hobby.rb
CHANGED
data/lib/hobby/helpers.rb
CHANGED
@@ -27,7 +27,7 @@ module Hobby
|
|
27
27
|
end
|
28
28
|
|
29
29
|
def halt
|
30
|
-
throw :halt, response
|
30
|
+
throw :halt, response.to_a
|
31
31
|
end
|
32
32
|
|
33
33
|
def not_found
|
@@ -44,7 +44,7 @@ module Hobby
|
|
44
44
|
end
|
45
45
|
|
46
46
|
def script_name
|
47
|
-
env
|
47
|
+
env.fetch 'SCRIPT_NAME'
|
48
48
|
end
|
49
49
|
end
|
50
50
|
end
|
data/readme.adoc
CHANGED
@@ -27,8 +27,16 @@ $ gem install hobby
|
|
27
27
|
[[introduction]]
|
28
28
|
== Introduction
|
29
29
|
|
30
|
-
Hobby
|
31
|
-
|
30
|
+
Hobby provides a Ruby DSL to create web applications. It is well suited both for standalone and inside-Rails use.
|
31
|
+
|
32
|
+
The DSL looks a lot like Sinatra, but Hobby applications are
|
33
|
+
|
34
|
+
* more reusable
|
35
|
+
* more reliable
|
36
|
+
+
|
37
|
+
The API and the codebase are much smaller and fully covered with specs. 100% mutation coverage is constantly maintained.
|
38
|
+
* https://github.com/luislavena/bench-micro#requestssec[more performant]
|
39
|
+
* https://github.com/luislavena/bench-micro#memory-allocationrequest[consume less resources]
|
32
40
|
|
33
41
|
To create a Hobby application, you create a class and include `Hobby` in it.
|
34
42
|
For example:
|
@@ -332,5 +340,5 @@ To perform mutation analysis:
|
|
332
340
|
|
333
341
|
[source,bash]
|
334
342
|
----
|
335
|
-
bundle exec mutant --use rspec 'Hobby*'
|
343
|
+
bundle exec mutant --use rspec 'Hobby*' --include lib --require hobby
|
336
344
|
----
|
data/spec/app_spec.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hobby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anatoly Chernow
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-03-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|
@@ -83,8 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
83
83
|
- !ruby/object:Gem::Version
|
84
84
|
version: '0'
|
85
85
|
requirements: []
|
86
|
-
|
87
|
-
rubygems_version: 2.7.6
|
86
|
+
rubygems_version: 3.0.3
|
88
87
|
signing_key:
|
89
88
|
specification_version: 4
|
90
89
|
summary: A professional way to create Rack applications.
|