chili 0.0.3 → 0.0.4
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.
- data/README.md +6 -1
- data/chili.gemspec +1 -1
- data/lib/chili/template.rb +3 -1
- data/lib/chili/version.rb +1 -1
- metadata +2 -2
data/README.md
CHANGED
@@ -85,8 +85,8 @@ All the rules for using [engine-based models](http://railscasts.com/episodes/277
|
|
85
85
|
Create a model with the same name as the one you want to modify: `rails g model User --migration=false`
|
86
86
|
and inherit from the original:
|
87
87
|
|
88
|
-
# app/model/chili_likes/user.rb
|
89
88
|
```ruby
|
89
|
+
# app/model/chili_likes/user.rb
|
90
90
|
module ChiliLikes
|
91
91
|
class User < ::User
|
92
92
|
has_many :likes
|
@@ -111,3 +111,8 @@ Add files as usual in `app/assets/chili_likes/javascripts|stylesheets` and injec
|
|
111
111
|
<%= stylesheet_link_tag 'chili_likes/application' %>
|
112
112
|
<%= javascript_include_tag 'chili_likes/application' %>
|
113
113
|
```
|
114
|
+
|
115
|
+
## Gotchas
|
116
|
+
|
117
|
+
- Chili will not be able to automount if you use a catch-all route in your main app (ie `match '*a', to: 'errors#routing'`), you will have to remove the catch-all or manually add the engine to the main app's routes file.
|
118
|
+
- Just like normal engines, Chili requires you to prepend path helpers with `main_app` (ie `main_app.root_path` etc) in view templates that are shared with the main app (such as the main app's application layout file).
|
data/chili.gemspec
CHANGED
@@ -6,7 +6,7 @@ Gem::Specification.new do |gem|
|
|
6
6
|
gem.email = ["jens@balvig.com"]
|
7
7
|
gem.description = %q{The spicy extension framework (work in progress)}
|
8
8
|
gem.summary = %q{The spicy extension framework (work in progress)}
|
9
|
-
gem.homepage = ""
|
9
|
+
gem.homepage = "https://github.com/balvig/chili"
|
10
10
|
|
11
11
|
gem.files = `git ls-files`.split($\)
|
12
12
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
data/lib/chili/template.rb
CHANGED
@@ -80,7 +80,9 @@ end
|
|
80
80
|
# Add dummy override
|
81
81
|
create_file "app/overrides/layouts/application/#{app_path}.html.erb.deface" do <<-RUBY
|
82
82
|
<!-- insert_bottom 'body' -->
|
83
|
-
<div style='background: #FFF;text-align: center; padding: 4px 0;position: fixed;width: 100%;z-index: 9999;top: 0;'
|
83
|
+
<div style='background: #FFF;text-align: center; padding: 4px 0;position: fixed;width: 100%;z-index: 9999;top: 0;'>
|
84
|
+
#{app_path} activated - <%= link_to 'deface docs', 'https://github.com/railsdog/deface', target: '_blank' %>
|
85
|
+
</div>
|
84
86
|
RUBY
|
85
87
|
end
|
86
88
|
|
data/lib/chili/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chili
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -37,7 +37,7 @@ files:
|
|
37
37
|
- lib/chili/version.rb
|
38
38
|
- lib/generators/rails/chili_generator.rb
|
39
39
|
- lib/generators/rails/templates/controller.rb
|
40
|
-
homepage:
|
40
|
+
homepage: https://github.com/balvig/chili
|
41
41
|
licenses: []
|
42
42
|
post_install_message:
|
43
43
|
rdoc_options: []
|