jun 0.1.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +18 -15
- data/jun.gemspec +4 -4
- data/lib/jun/action_controller/base.rb +6 -10
- data/lib/jun/action_controller/callbacks.rb +46 -0
- data/lib/jun/action_controller/metal.rb +22 -0
- data/lib/jun/action_controller/redirecting.rb +17 -0
- data/lib/jun/action_controller/rendering.rb +0 -4
- data/lib/jun/action_dispatch/routing/mapper.rb +28 -3
- data/lib/jun/action_dispatch/routing/route_set.rb +49 -2
- data/lib/jun/action_dispatch/routing/welcome.html.erb +59 -0
- data/lib/jun/{active_record.rb → active_record/base.rb} +14 -3
- data/lib/jun/active_record/migration.rb +76 -0
- data/lib/jun/active_record/migrator.rb +80 -0
- data/lib/jun/active_record/persistence.rb +60 -0
- data/lib/jun/active_record/relation.rb +42 -0
- data/lib/jun/active_support/core_ext/array/access.rb +33 -0
- data/lib/jun/active_support/core_ext/array/conversion.rb +18 -0
- data/lib/jun/active_support/core_ext/hash/transformation.rb +29 -0
- data/lib/jun/active_support/core_ext/string/access.rb +42 -0
- data/lib/jun/active_support/{inflector.rb → core_ext/string/inflector.rb} +18 -0
- data/lib/jun/active_support/core_ext.rb +5 -0
- data/lib/jun/active_support/dependencies.rb +2 -0
- data/lib/jun/application.rb +31 -0
- data/lib/jun/cli/commands/db/create.rb +21 -1
- data/lib/jun/cli/commands/db/drop.rb +4 -1
- data/lib/jun/cli/commands/db/migrate.rb +1 -1
- data/lib/jun/cli/commands/db/rollback.rb +15 -0
- data/lib/jun/cli/commands/db/schema/dump.rb +24 -0
- data/lib/jun/cli/commands/db/schema/load.rb +43 -0
- data/lib/jun/cli/commands/db/seed.rb +19 -0
- data/lib/jun/cli/commands/generate/migration.rb +27 -0
- data/lib/jun/cli/commands/new.rb +7 -2
- data/lib/jun/cli/commands/server.rb +1 -1
- data/lib/jun/cli/generator_templates/migration.rb.erb +11 -0
- data/lib/jun/cli/{generators/new → generator_templates/new_app}/Gemfile.erb +0 -0
- data/lib/jun/cli/{generators/new → generator_templates/new_app}/README.md.erb +0 -0
- data/lib/jun/cli/{generators/new → generator_templates/new_app}/app/controllers/application_controller.rb.erb +0 -0
- data/lib/jun/cli/{generators/new → generator_templates/new_app}/app/helpers/application_helper.rb.erb +0 -0
- data/lib/jun/cli/generator_templates/new_app/app/models/application_record.rb.erb +4 -0
- data/lib/jun/cli/{generators/new → generator_templates/new_app}/app/views/layouts/application.html.erb.erb +0 -0
- data/lib/jun/cli/generator_templates/new_app/bin/console.erb +8 -0
- data/lib/jun/cli/generator_templates/new_app/config/application.rb.erb +12 -0
- data/lib/jun/cli/generator_templates/new_app/config/environment.rb.erb +7 -0
- data/lib/jun/cli/{generators/new → generator_templates/new_app}/config/routes.rb.erb +0 -0
- data/lib/jun/cli/{generators/new → generator_templates/new_app}/config.ru.erb +1 -2
- data/lib/jun/cli/generator_templates/new_app/db/seeds.rb.erb +9 -0
- data/lib/jun/cli.rb +5 -0
- data/lib/jun/version.rb +1 -1
- data/lib/jun.rb +13 -2
- metadata +48 -26
- data/lib/jun/cli/generators/new/config/application.rb.erb +0 -18
- data/lib/jun/cli/generators/new/db/app.db.erb +0 -0
metadata
CHANGED
@@ -1,57 +1,57 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jun
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zoran
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-04-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '2.2'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '2.2'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: tilt
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
33
|
+
version: '2.0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
40
|
+
version: '2.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: sqlite3
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '1.4'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '1.4'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -108,7 +108,7 @@ dependencies:
|
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0.14'
|
111
|
-
description: A simple web framework inspired by Rails.
|
111
|
+
description: A simple web framework inspired by Rails. Not meant for production use.
|
112
112
|
email:
|
113
113
|
- zspesic@gmail.com
|
114
114
|
executables:
|
@@ -127,33 +127,55 @@ files:
|
|
127
127
|
- jun.gemspec
|
128
128
|
- lib/jun.rb
|
129
129
|
- lib/jun/action_controller/base.rb
|
130
|
+
- lib/jun/action_controller/callbacks.rb
|
131
|
+
- lib/jun/action_controller/metal.rb
|
132
|
+
- lib/jun/action_controller/redirecting.rb
|
130
133
|
- lib/jun/action_controller/rendering.rb
|
131
134
|
- lib/jun/action_dispatch/routing/mapper.rb
|
132
135
|
- lib/jun/action_dispatch/routing/route_set.rb
|
136
|
+
- lib/jun/action_dispatch/routing/welcome.html.erb
|
133
137
|
- lib/jun/action_view/base.rb
|
134
138
|
- lib/jun/action_view/helpers.rb
|
135
139
|
- lib/jun/action_view/helpers/url_helper.rb
|
136
|
-
- lib/jun/active_record.rb
|
140
|
+
- lib/jun/active_record/base.rb
|
141
|
+
- lib/jun/active_record/migration.rb
|
142
|
+
- lib/jun/active_record/migrator.rb
|
143
|
+
- lib/jun/active_record/persistence.rb
|
144
|
+
- lib/jun/active_record/relation.rb
|
145
|
+
- lib/jun/active_support/core_ext.rb
|
146
|
+
- lib/jun/active_support/core_ext/array/access.rb
|
147
|
+
- lib/jun/active_support/core_ext/array/conversion.rb
|
148
|
+
- lib/jun/active_support/core_ext/hash/transformation.rb
|
149
|
+
- lib/jun/active_support/core_ext/string/access.rb
|
150
|
+
- lib/jun/active_support/core_ext/string/inflector.rb
|
137
151
|
- lib/jun/active_support/dependencies.rb
|
138
|
-
- lib/jun/active_support/inflector.rb
|
139
152
|
- lib/jun/application.rb
|
140
153
|
- lib/jun/cli.rb
|
141
154
|
- lib/jun/cli/commands/base.rb
|
142
155
|
- lib/jun/cli/commands/db/create.rb
|
143
156
|
- lib/jun/cli/commands/db/drop.rb
|
144
157
|
- lib/jun/cli/commands/db/migrate.rb
|
158
|
+
- lib/jun/cli/commands/db/rollback.rb
|
159
|
+
- lib/jun/cli/commands/db/schema/dump.rb
|
160
|
+
- lib/jun/cli/commands/db/schema/load.rb
|
161
|
+
- lib/jun/cli/commands/db/seed.rb
|
162
|
+
- lib/jun/cli/commands/generate/migration.rb
|
145
163
|
- lib/jun/cli/commands/new.rb
|
146
164
|
- lib/jun/cli/commands/server.rb
|
147
165
|
- lib/jun/cli/commands/version.rb
|
148
|
-
- lib/jun/cli/
|
149
|
-
- lib/jun/cli/
|
150
|
-
- lib/jun/cli/
|
151
|
-
- lib/jun/cli/
|
152
|
-
- lib/jun/cli/
|
153
|
-
- lib/jun/cli/
|
154
|
-
- lib/jun/cli/
|
155
|
-
- lib/jun/cli/
|
156
|
-
- lib/jun/cli/
|
166
|
+
- lib/jun/cli/generator_templates/migration.rb.erb
|
167
|
+
- lib/jun/cli/generator_templates/new_app/Gemfile.erb
|
168
|
+
- lib/jun/cli/generator_templates/new_app/README.md.erb
|
169
|
+
- lib/jun/cli/generator_templates/new_app/app/controllers/application_controller.rb.erb
|
170
|
+
- lib/jun/cli/generator_templates/new_app/app/helpers/application_helper.rb.erb
|
171
|
+
- lib/jun/cli/generator_templates/new_app/app/models/application_record.rb.erb
|
172
|
+
- lib/jun/cli/generator_templates/new_app/app/views/layouts/application.html.erb.erb
|
173
|
+
- lib/jun/cli/generator_templates/new_app/bin/console.erb
|
174
|
+
- lib/jun/cli/generator_templates/new_app/config.ru.erb
|
175
|
+
- lib/jun/cli/generator_templates/new_app/config/application.rb.erb
|
176
|
+
- lib/jun/cli/generator_templates/new_app/config/environment.rb.erb
|
177
|
+
- lib/jun/cli/generator_templates/new_app/config/routes.rb.erb
|
178
|
+
- lib/jun/cli/generator_templates/new_app/db/seeds.rb.erb
|
157
179
|
- lib/jun/connection_adapters/sqlite_adapter.rb
|
158
180
|
- lib/jun/version.rb
|
159
181
|
homepage: https://github.com/zokioki/jun
|
@@ -1,18 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "jun"
|
4
|
-
|
5
|
-
Jun::ActiveSupport::Dependencies.autoload_paths += Jun.root.join("app").children
|
6
|
-
|
7
|
-
# Include all helpers in app/helpers directory
|
8
|
-
Dir.glob(Jun.root.join("app/helpers/**/*.rb")).each do |filepath|
|
9
|
-
helper_class_name = File.basename(filepath, ".rb").camelize
|
10
|
-
helper_class = Object.const_get(helper_class_name)
|
11
|
-
|
12
|
-
Jun::ActionView::Base.include(helper_class)
|
13
|
-
end
|
14
|
-
|
15
|
-
module <%= app_name.camelize %>
|
16
|
-
class Application < Jun::Application
|
17
|
-
end
|
18
|
-
end
|
File without changes
|