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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4ee5ec3efe7fcffdb34c286c5184bcd6be173c4c4566dfcd9a1b94f2f04c999b
4
- data.tar.gz: 24a4f9f6d5ffb7749d5c361c9bdc401e42dc24d6ea17eefccc5802f3d151c21f
3
+ metadata.gz: b95d5ad065324e903deb97971e990916ec1011e2353f50d0ab4c30f69607cecc
4
+ data.tar.gz: 0e2a747860c4d153fc418fbd1b1ed599847e419f80db6c31690c02b2097ea146
5
5
  SHA512:
6
- metadata.gz: 217cf5434c618bd03e3e9e5f7e202146b343e68fa03304fc034abeed46176ac6ef2fb67fa0ce8a51d1778d9571535c84714df6fb250b80f5fa8ab457e27359af
7
- data.tar.gz: cf4fa9beaa6efd0193e102c48b59530f86664fbdf59421dc290fd16f809fe0d11dc8d7268eedf048bc8148cbce503c8433517c2717ab39b3381da0c3efeaee5d
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.2'
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
@@ -42,7 +42,7 @@ module Hobby
42
42
  catch :halt do
43
43
  @route = router.route_for (@env = env)
44
44
  fill_body
45
- response
45
+ response.to_a
46
46
  end
47
47
  end
48
48
 
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['SCRIPT_NAME']
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 features a Sinatra-like DSL, but in contrast to Sinatra,
31
- Hobby applications behave like usual Ruby classes.
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
@@ -279,7 +279,7 @@ describe Hobby::App do
279
279
  assert { last_response.body == '' }
280
280
 
281
281
  get '/some/path'
282
- assert { last_response.body = '/mounted' }
282
+ assert { last_response.body == '/some/path' }
283
283
  end
284
284
  end
285
285
  end
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.2
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: 2018-02-28 00:00:00.000000000 Z
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
- rubyforge_project:
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.