lotusrb 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/FEATURES.md +2 -0
- data/lib/lotus/cli.rb +1 -1
- data/lib/lotus/commands/generate/app.rb +2 -2
- data/lib/lotus/commands/new/abstract.rb +1 -1
- data/lib/lotus/commands/new/app.rb +1 -1
- data/lib/lotus/generators/application/app/Gemfile.tt +1 -1
- data/lib/lotus/generators/application/app/gitignore.tt +0 -2
- data/lib/lotus/generators/application/app/gitignore_with_db.tt +4 -0
- data/lib/lotus/generators/application/container/gitignore.tt +0 -2
- data/lib/lotus/generators/application/container/gitignore_with_db.tt +4 -0
- data/lib/lotus/version.rb +1 -1
- data/lib/lotus/welcome.rb +11 -4
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a931d2f52487797eb662bea70ae481e1d542a3ca
|
4
|
+
data.tar.gz: c2196ffd93716d30eddda44e75a90972ac72728a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce8c51b74f48615ef9c9efd5a8b78b5d259877bc23381af72dc427603b67b8ba2335f02b754041ad3ed01ff91171b6d53794ce147d76c31b3568572b59b922ba
|
7
|
+
data.tar.gz: efcc502bd4366499ddca11100877fc9e38d2e1a44ee808e7b2367836ef3707eaecc87480fc068bf5331e6b5bbd393755335c98aaafb8bca21ff71cbb35436815
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,15 @@
|
|
1
1
|
# Lotus
|
2
2
|
A complete web framework for Ruby
|
3
3
|
|
4
|
+
## v0.6.1 - 2016-01-19
|
5
|
+
### Fixed
|
6
|
+
- [Anton Davydov] Show the current app name in Welcome page (eg. `/admin` shows instructions on how to generate an action for `Admin` app)
|
7
|
+
- [Anton Davydov] Fix project creation when name contains dashes (eg. `"awesome-project" => "AwesomeProject"`)
|
8
|
+
- [Anton Davydov] Ensure to add assets related entries to `.gitignore` when a project is generated with the `--database` flag
|
9
|
+
- [deepj] Avoid blank lines in generated `Gemfile`
|
10
|
+
- [trexnix] Fix for `lotus destroy app`: it doesn't cause a syntax error in `config/application.rb` anymore
|
11
|
+
- [Serg Ikonnikov & Trung Lê] Ensure console to use the bundled engine
|
12
|
+
|
4
13
|
## v0.6.0 - 2016-01-12
|
5
14
|
### Added
|
6
15
|
- [Luca Guidi] Introduced configurable assets compressors
|
data/FEATURES.md
CHANGED
data/lib/lotus/cli.rb
CHANGED
@@ -51,7 +51,7 @@ module Lotus
|
|
51
51
|
$ > lotus console --engine=pry
|
52
52
|
EOS
|
53
53
|
method_option :environment, desc: 'path to environment configuration (config/environment.rb)'
|
54
|
-
method_option :engine, desc: "choose a specific console engine: (#{Lotus::Commands::Console::ENGINES.keys.join('/')})"
|
54
|
+
method_option :engine, desc: "choose a specific console engine: (#{Lotus::Commands::Console::ENGINES.keys.join('/')})"
|
55
55
|
method_option :help, desc: 'displays the usage method'
|
56
56
|
def console
|
57
57
|
if options[:help]
|
@@ -59,7 +59,7 @@ module Lotus
|
|
59
59
|
|
60
60
|
def add_require_app
|
61
61
|
# Add "require_relative '../apps/web/application'"
|
62
|
-
generator.inject_into_file base_path.join('config/environment.rb'), after: /require_relative '\.\.\/lib
|
62
|
+
generator.inject_into_file base_path.join('config/environment.rb'), after: /require_relative '\.\.\/lib\/.*'/ do
|
63
63
|
"\nrequire_relative '../apps/#{ app_name }/application'"
|
64
64
|
end
|
65
65
|
end
|
@@ -96,7 +96,7 @@ module Lotus
|
|
96
96
|
end
|
97
97
|
|
98
98
|
def classified_app_name
|
99
|
-
Utils::String.new(app_name).classify
|
99
|
+
Utils::String.new(app_name).classify.tr('::', '')
|
100
100
|
end
|
101
101
|
|
102
102
|
def assert_application_name!(value)
|
@@ -62,7 +62,7 @@ module Lotus
|
|
62
62
|
def add_git_templates
|
63
63
|
return if git_dir_present?
|
64
64
|
|
65
|
-
source = database_config.filesystem? ? '
|
65
|
+
source = database_config.filesystem? ? 'gitignore_with_db.tt' : 'gitignore.tt'
|
66
66
|
target = '.gitignore'
|
67
67
|
add_mapping(source, target)
|
68
68
|
end
|
@@ -19,7 +19,7 @@ gem 'lotusrb', '<%= Lotus::VERSION %>'
|
|
19
19
|
gem 'lotus-model', '<%= config[:lotus_model_version] %>'
|
20
20
|
<%- end -%>
|
21
21
|
|
22
|
-
<%- if config[:database_config][:gem]
|
22
|
+
<%- if config[:database_config][:gem] -%>
|
23
23
|
gem '<%= config[:database_config][:gem] %>'
|
24
24
|
<%- end -%>
|
25
25
|
|
data/lib/lotus/version.rb
CHANGED
data/lib/lotus/welcome.rb
CHANGED
@@ -7,10 +7,12 @@ module Lotus
|
|
7
7
|
class Welcome
|
8
8
|
def initialize(app)
|
9
9
|
@root = Pathname.new(__dir__).join('templates').realpath
|
10
|
-
@body = [ERB.new(@root.join('welcome.html.erb').read).result(binding)]
|
11
10
|
end
|
12
11
|
|
13
12
|
def call(env)
|
13
|
+
@request_path = env['REQUEST_PATH'] || ''
|
14
|
+
@body = [ERB.new(@root.join('welcome.html.erb').read).result(binding)]
|
15
|
+
|
14
16
|
[200, {}, @body]
|
15
17
|
end
|
16
18
|
|
@@ -24,10 +26,15 @@ module Lotus
|
|
24
26
|
Environment.new.container?
|
25
27
|
end
|
26
28
|
|
29
|
+
def application_class
|
30
|
+
applications = Lotus::Application.applications.to_a
|
31
|
+
applications.select do |app|
|
32
|
+
@request_path.include? app.configuration.path_prefix.to_s
|
33
|
+
end.first
|
34
|
+
end
|
35
|
+
|
27
36
|
def app
|
28
|
-
Utils::String.new(
|
29
|
-
Application.applications.first
|
30
|
-
).namespace.downcase
|
37
|
+
Utils::String.new(application_class).namespace.downcase
|
31
38
|
end
|
32
39
|
end
|
33
40
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lotusrb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luca Guidi
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-01-
|
13
|
+
date: 2016-01-19 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: lotus-utils
|
@@ -322,6 +322,7 @@ files:
|
|
322
322
|
- lib/lotus/generators/application/app/features_helper.rb.minitest.tt
|
323
323
|
- lib/lotus/generators/application/app/features_helper.rb.rspec.tt
|
324
324
|
- lib/lotus/generators/application/app/gitignore.tt
|
325
|
+
- lib/lotus/generators/application/app/gitignore_with_db.tt
|
325
326
|
- lib/lotus/generators/application/app/lib/app_name.rb.tt
|
326
327
|
- lib/lotus/generators/application/app/lib/chirp/entities/.gitkeep
|
327
328
|
- lib/lotus/generators/application/app/lib/chirp/repositories/.gitkeep
|
@@ -349,6 +350,7 @@ files:
|
|
349
350
|
- lib/lotus/generators/application/container/features_helper.rb.minitest.tt
|
350
351
|
- lib/lotus/generators/application/container/features_helper.rb.rspec.tt
|
351
352
|
- lib/lotus/generators/application/container/gitignore.tt
|
353
|
+
- lib/lotus/generators/application/container/gitignore_with_db.tt
|
352
354
|
- lib/lotus/generators/application/container/lib/app_name.rb.tt
|
353
355
|
- lib/lotus/generators/application/container/lib/chirp/entities/.gitkeep
|
354
356
|
- lib/lotus/generators/application/container/lib/chirp/mailers/.gitkeep
|