otto 1.1.0.pre.alpha3 → 1.2.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,15 +1,28 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: otto
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0.pre.alpha3
4
+ version: 1.2.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-08-28 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
12
+ - !ruby/object:Gem::Dependency
13
+ name: rexml
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ - - ">="
17
+ - !ruby/object:Gem::Version
18
+ version: 3.3.6
19
+ type: :runtime
20
+ prerelease: false
21
+ version_requirements: !ruby/object:Gem::Requirement
22
+ requirements:
23
+ - - ">="
24
+ - !ruby/object:Gem::Version
25
+ version: 3.3.6
13
26
  - !ruby/object:Gem::Dependency
14
27
  name: addressable
15
28
  requirement: !ruby/object:Gem::Requirement
@@ -36,20 +49,34 @@ dependencies:
36
49
  requirements:
37
50
  - - "~>"
38
51
  - !ruby/object:Gem::Version
39
- version: '2.2'
52
+ version: '3.1'
40
53
  - - "<"
41
54
  - !ruby/object:Gem::Version
42
- version: '3.0'
55
+ version: '4.0'
43
56
  type: :runtime
44
57
  prerelease: false
45
58
  version_requirements: !ruby/object:Gem::Requirement
46
59
  requirements:
47
60
  - - "~>"
48
61
  - !ruby/object:Gem::Version
49
- version: '2.2'
62
+ version: '3.1'
50
63
  - - "<"
51
64
  - !ruby/object:Gem::Version
52
- version: '3.0'
65
+ version: '4.0'
66
+ - !ruby/object:Gem::Dependency
67
+ name: rack-parser
68
+ requirement: !ruby/object:Gem::Requirement
69
+ requirements:
70
+ - - "~>"
71
+ - !ruby/object:Gem::Version
72
+ version: '0.7'
73
+ type: :runtime
74
+ prerelease: false
75
+ version_requirements: !ruby/object:Gem::Requirement
76
+ requirements:
77
+ - - "~>"
78
+ - !ruby/object:Gem::Version
79
+ version: '0.7'
53
80
  description: 'Otto: Auto-define your rack-apps in plaintext.'
54
81
  email: gems@solutious.com
55
82
  executables: []
@@ -57,30 +84,41 @@ extensions: []
57
84
  extra_rdoc_files: []
58
85
  files:
59
86
  - ".gitignore"
87
+ - ".rspec"
60
88
  - ".rubocop.yml"
61
- - CHANGES.txt
89
+ - ".rubocop_todo.yml"
62
90
  - Gemfile
63
91
  - Gemfile.lock
64
92
  - LICENSE.txt
65
93
  - README.md
66
94
  - VERSION.yml
67
- - example/app.rb
68
- - example/config.ru
69
- - example/public/favicon.ico
70
- - example/public/img/otto.jpg
71
- - example/routes
95
+ - examples/basic/app.rb
96
+ - examples/basic/config.ru
97
+ - examples/basic/routes
98
+ - examples/dynamic_pages/app.rb
99
+ - examples/dynamic_pages/config.ru
100
+ - examples/dynamic_pages/routes
101
+ - examples/security_features/app.rb
102
+ - examples/security_features/config.ru
103
+ - examples/security_features/routes
72
104
  - lib/otto.rb
105
+ - lib/otto/design_system.rb
73
106
  - lib/otto/helpers/request.rb
74
107
  - lib/otto/helpers/response.rb
75
108
  - lib/otto/route.rb
109
+ - lib/otto/security/config.rb
110
+ - lib/otto/security/csrf.rb
111
+ - lib/otto/security/validator.rb
76
112
  - lib/otto/static.rb
77
113
  - lib/otto/version.rb
78
114
  - otto.gemspec
115
+ - public/favicon.ico
116
+ - public/img/otto.jpg
79
117
  homepage: https://github.com/delano/otto
80
118
  licenses:
81
119
  - MIT
82
- metadata: {}
83
- post_install_message:
120
+ metadata:
121
+ rubygems_mfa_required: 'true'
84
122
  rdoc_options: []
85
123
  require_paths:
86
124
  - lib
@@ -88,7 +126,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
88
126
  requirements:
89
127
  - - ">="
90
128
  - !ruby/object:Gem::Version
91
- version: 2.6.8
129
+ version: '3.4'
92
130
  - - "<"
93
131
  - !ruby/object:Gem::Version
94
132
  version: '4.0'
@@ -98,8 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
98
136
  - !ruby/object:Gem::Version
99
137
  version: '0'
100
138
  requirements: []
101
- rubygems_version: 3.5.15
102
- signing_key:
139
+ rubygems_version: 3.6.9
103
140
  specification_version: 4
104
141
  summary: Auto-define your rack-apps in plaintext.
105
142
  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/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