otto 1.1.0.pre.alpha4 → 1.3.0

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.
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: otto
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0.pre.alpha4
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Delano Mandelbaum
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-09-07 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: rexml
@@ -25,45 +24,39 @@ dependencies:
25
24
  - !ruby/object:Gem::Version
26
25
  version: 3.3.6
27
26
  - !ruby/object:Gem::Dependency
28
- name: addressable
27
+ name: rack
29
28
  requirement: !ruby/object:Gem::Requirement
30
29
  requirements:
31
30
  - - "~>"
32
31
  - !ruby/object:Gem::Version
33
- version: '2.2'
32
+ version: '3.1'
34
33
  - - "<"
35
34
  - !ruby/object:Gem::Version
36
- version: '3'
35
+ version: '4.0'
37
36
  type: :runtime
38
37
  prerelease: false
39
38
  version_requirements: !ruby/object:Gem::Requirement
40
39
  requirements:
41
40
  - - "~>"
42
41
  - !ruby/object:Gem::Version
43
- version: '2.2'
42
+ version: '3.1'
44
43
  - - "<"
45
44
  - !ruby/object:Gem::Version
46
- version: '3'
45
+ version: '4.0'
47
46
  - !ruby/object:Gem::Dependency
48
- name: rack
47
+ name: rack-parser
49
48
  requirement: !ruby/object:Gem::Requirement
50
49
  requirements:
51
50
  - - "~>"
52
51
  - !ruby/object:Gem::Version
53
- version: '2.2'
54
- - - "<"
55
- - !ruby/object:Gem::Version
56
- version: '3.0'
52
+ version: '0.7'
57
53
  type: :runtime
58
54
  prerelease: false
59
55
  version_requirements: !ruby/object:Gem::Requirement
60
56
  requirements:
61
57
  - - "~>"
62
58
  - !ruby/object:Gem::Version
63
- version: '2.2'
64
- - - "<"
65
- - !ruby/object:Gem::Version
66
- version: '3.0'
59
+ version: '0.7'
67
60
  description: 'Otto: Auto-define your rack-apps in plaintext.'
68
61
  email: gems@solutious.com
69
62
  executables: []
@@ -71,30 +64,39 @@ extensions: []
71
64
  extra_rdoc_files: []
72
65
  files:
73
66
  - ".gitignore"
67
+ - ".rspec"
74
68
  - ".rubocop.yml"
75
- - CHANGES.txt
76
69
  - Gemfile
77
70
  - Gemfile.lock
78
71
  - LICENSE.txt
79
72
  - README.md
80
- - VERSION.yml
81
- - example/app.rb
82
- - example/config.ru
83
- - example/public/favicon.ico
84
- - example/public/img/otto.jpg
85
- - example/routes
73
+ - examples/basic/app.rb
74
+ - examples/basic/config.ru
75
+ - examples/basic/routes
76
+ - examples/dynamic_pages/app.rb
77
+ - examples/dynamic_pages/config.ru
78
+ - examples/dynamic_pages/routes
79
+ - examples/security_features/app.rb
80
+ - examples/security_features/config.ru
81
+ - examples/security_features/routes
86
82
  - lib/otto.rb
83
+ - lib/otto/design_system.rb
87
84
  - lib/otto/helpers/request.rb
88
85
  - lib/otto/helpers/response.rb
89
86
  - lib/otto/route.rb
87
+ - lib/otto/security/config.rb
88
+ - lib/otto/security/csrf.rb
89
+ - lib/otto/security/validator.rb
90
90
  - lib/otto/static.rb
91
91
  - lib/otto/version.rb
92
92
  - otto.gemspec
93
+ - public/favicon.ico
94
+ - public/img/otto.jpg
93
95
  homepage: https://github.com/delano/otto
94
96
  licenses:
95
97
  - MIT
96
- metadata: {}
97
- post_install_message:
98
+ metadata:
99
+ rubygems_mfa_required: 'true'
98
100
  rdoc_options: []
99
101
  require_paths:
100
102
  - lib
@@ -102,7 +104,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
102
104
  requirements:
103
105
  - - ">="
104
106
  - !ruby/object:Gem::Version
105
- version: 2.6.8
107
+ version: '3.4'
106
108
  - - "<"
107
109
  - !ruby/object:Gem::Version
108
110
  version: '4.0'
@@ -112,8 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
112
114
  - !ruby/object:Gem::Version
113
115
  version: '0'
114
116
  requirements: []
115
- rubygems_version: 3.5.15
116
- signing_key:
117
+ rubygems_version: 3.6.9
117
118
  specification_version: 4
118
119
  summary: Auto-define your rack-apps in plaintext.
119
120
  test_files: []
data/CHANGES.txt DELETED
@@ -1,35 +0,0 @@
1
- OTTO, CHANGES
2
-
3
- #### 0.4.1 (2015-04-07) ###############################
4
-
5
- * FIXED: Resolved error when ACCEPT-LANGUAGES header doesn't exist
6
-
7
- #### 0.4.0 (2015-04-06) ###############################
8
-
9
- * ADDED: Locale support via env['rack.locale']
10
-
11
- #### 0.3.2 (2013-01-27) ###############################
12
-
13
- * CHANGE: send_cookie doesn't set domain
14
-
15
- #### 0.3.1 (2012-12-17) ###############################
16
-
17
- * ADDED: Otto.debug (set w/ Otto.debug= or env variable OTTO_DEBUG)
18
- * ADDED: RequestHelpers#ajax?
19
- * CHANGE: Added internal subnets to RequestHelpers#local?
20
-
21
-
22
- #### 0.3.0 (2011-12-17) ###############################
23
-
24
- * ADDED: Example app, better docs in readme
25
- * CHANGE: No default value for user agent
26
-
27
- #### 0.2.1 (2011-07-07) ###############################
28
-
29
- * ADDED: Otto#add_static_path
30
-
31
- #### 0.2.0 (2011-07-06) ###############################
32
-
33
- Initial public release
34
-
35
-
data/VERSION.yml DELETED
@@ -1,4 +0,0 @@
1
- :MAJOR: 1
2
- :MINOR: 1
3
- :PATCH: 0
4
- :PRE: alpha4
data/example/app.rb DELETED
@@ -1,58 +0,0 @@
1
-
2
-
3
- class App
4
-
5
- # An instance of Rack::Request
6
- attr_reader :req
7
- # An instance of Rack::Response
8
- attr_reader :res
9
-
10
- # Otto creates an instance of this class for every request
11
- # and passess the Rack::Request and Rack::Response objects.
12
- def initialize req, res
13
- @req, @res = req, res
14
- res.header['Content-Type'] = "text/html; charset=utf-8"
15
- end
16
-
17
- def index
18
- lines = [
19
- '<img src="/img/otto.jpg" /><br/><br/>',
20
- 'Send feedback:<br/>',
21
- '<form method="post"><input name="msg" /><input type="submit" /></form>',
22
- '<a href="/product/100">A product example</a>'
23
- ]
24
- res.send_cookie :sess, 1234567, 3600
25
- res.body = lines.join($/)
26
- end
27
-
28
- def receive_feedback
29
- res.body = req.params.inspect
30
- end
31
-
32
- def redirect
33
- res.redirect '/robots.txt'
34
- end
35
-
36
- def robots_text
37
- res.header['Content-Type'] = "text/plain"
38
- rules = 'User-agent: *', 'Disallow: /private'
39
- res.body = rules.join($/)
40
- end
41
-
42
- def display_product
43
- res.header['Content-Type'] = "application/json; charset=utf-8"
44
- prodid = req.params[:prodid]
45
- res.body = '{"product":%s,"msg":"Hint: try another value"}' % [prodid]
46
- end
47
-
48
- def not_found
49
- res.status = 404
50
- res.body = "Item not found!"
51
- end
52
-
53
- def server_error
54
- res.status = 500
55
- res.body = "There was a server error!"
56
- end
57
-
58
- end
data/example/config.ru DELETED
@@ -1,35 +0,0 @@
1
- # OTTO EXAMPLE APP CONFIG - 2011-12-17
2
- #
3
- # Usage:
4
- #
5
- # $ thin -e dev -R config.ru -p 10770 start
6
- # $ tail -f /var/log/system.log
7
-
8
- ENV['RACK_ENV'] ||= 'prod'
9
- ENV['APP_ROOT'] = ::File.expand_path(::File.join(::File.dirname(__FILE__)))
10
- $:.unshift(::File.join(ENV['APP_ROOT']))
11
- $:.unshift(::File.join(ENV['APP_ROOT'], '..', 'lib'))
12
-
13
- require 'otto'
14
- require 'app'
15
-
16
- PUBLIC_DIR = "#{ENV['APP_ROOT']}/public"
17
- APP_DIR = "#{ENV['APP_ROOT']}"
18
-
19
- app = Otto.new("#{APP_DIR}/routes")
20
-
21
- if Otto.env?(:dev) # DEV: Run web apps with extra logging and reloading
22
- map('/') {
23
- use Rack::CommonLogger
24
- use Rack::Reloader, 0
25
- app.option[:public] = PUBLIC_DIR
26
- app.add_static_path '/favicon.ico'
27
- run app
28
- }
29
- # Specify static paths to serve in dev-mode only
30
- map('/etc/') { run Rack::File.new("#{PUBLIC_DIR}/etc") }
31
- map('/img/') { run Rack::File.new("#{PUBLIC_DIR}/img") }
32
-
33
- else # PROD: run barebones webapp
34
- map('/') { run app }
35
- end
File without changes
File without changes