chili 0.2.0 → 0.2.1
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 -7
- data/bin/chili +1 -1
- data/lib/chili/version.rb +1 -1
- data/spec/bin/chili_spec.rb +1 -1
- metadata +17 -17
data/README.md
CHANGED
@@ -15,7 +15,7 @@ First add chili to your app's Gemfile:
|
|
15
15
|
gem 'chili'
|
16
16
|
```
|
17
17
|
|
18
|
-
|
18
|
+
and run `bundle`.
|
19
19
|
|
20
20
|
## Usage
|
21
21
|
|
@@ -26,7 +26,7 @@ Chili extensions are like mini apps that are created inside your main app's vend
|
|
26
26
|
As an example, assuming you want to add a new extension named "social" that exposes a new social feature in the form of a like-button
|
27
27
|
to a subset of users, first run within your main app:
|
28
28
|
|
29
|
-
$ chili social
|
29
|
+
$ chili new social
|
30
30
|
|
31
31
|
This is basically a shortcut for running the `rails plugin new` engine generator with a custom template and will:
|
32
32
|
|
@@ -34,7 +34,7 @@ This is basically a shortcut for running the `rails plugin new` engine generator
|
|
34
34
|
2. Add a reference to the extension to the main app gemfile
|
35
35
|
|
36
36
|
Since the extension is mounted as a gem you'll have to run `bundle`
|
37
|
-
after this.
|
37
|
+
after this to start using the extension.
|
38
38
|
|
39
39
|
### Define who can see the extension
|
40
40
|
|
@@ -63,14 +63,13 @@ For example, assuming the main app has the partial `app/views/posts/_post.html.e
|
|
63
63
|
|
64
64
|
### Adding new resources
|
65
65
|
|
66
|
-
Go to the extension's directory and use `rails g scaffold Like
|
66
|
+
Go to the extension's directory and use `rails g scaffold Like`. The new resource will be namespaced to ChiliSocial::Like
|
67
67
|
and automounted in the main app at `/chili/social/likes`, but only accessible when active_if is true.
|
68
|
-
All the rules for using [engine
|
69
|
-
|
68
|
+
All the rules for using [isolated engine models](http://railscasts.com/episodes/277-mountable-engines?view=asciicast) apply.
|
70
69
|
|
71
70
|
### Migrations
|
72
71
|
|
73
|
-
Migrations are handled
|
72
|
+
Migrations are handled the same way as engines. Use the
|
74
73
|
following commands after you've added a new migration to your extension:
|
75
74
|
|
76
75
|
$ rake chili_social:migrations:install
|
data/bin/chili
CHANGED
@@ -1,4 +1,4 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
3
|
template_file = File.join(File.dirname(__FILE__), '..', 'lib', 'chili', 'template.rb')
|
4
|
-
system "rails plugin new vendor/chili_#{ARGV.
|
4
|
+
system "rails plugin new vendor/chili_#{ARGV.last} --mountable -m #{template_file}"
|
data/lib/chili/version.rb
CHANGED
data/spec/bin/chili_spec.rb
CHANGED
@@ -13,7 +13,7 @@ describe 'Chili Binary' do
|
|
13
13
|
end
|
14
14
|
|
15
15
|
it 'creates a new extension with a correct file structure' do
|
16
|
-
`cd #{app_path} && #{chili} template`
|
16
|
+
`cd #{app_path} && #{chili} new template`
|
17
17
|
|
18
18
|
Dir.glob(File.join(template_path, "**/*")).reject { |f| File.directory?(f) }.each do |source|
|
19
19
|
result = File.join(app_path, 'vendor/chili_template', source.sub(template_path, ''))
|
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.2.
|
4
|
+
version: 0.2.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-05-31 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
16
|
-
requirement: &
|
16
|
+
requirement: &70351662907460 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '3.2'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70351662907460
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: deface
|
27
|
-
requirement: &
|
27
|
+
requirement: &70351662906960 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 0.9.1
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70351662906960
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rspec
|
38
|
-
requirement: &
|
38
|
+
requirement: &70351662906500 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: 2.9.0
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70351662906500
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: rspec-rails
|
49
|
-
requirement: &
|
49
|
+
requirement: &70351662906040 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: 2.9.0
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70351662906040
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: jquery-rails
|
60
|
-
requirement: &
|
60
|
+
requirement: &70351662905660 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: '0'
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70351662905660
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: capybara
|
71
|
-
requirement: &
|
71
|
+
requirement: &70351662905200 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ! '>='
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: '0'
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *70351662905200
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: sqlite3
|
82
|
-
requirement: &
|
82
|
+
requirement: &70351662904780 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ! '>='
|
@@ -87,7 +87,7 @@ dependencies:
|
|
87
87
|
version: '0'
|
88
88
|
type: :development
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *70351662904780
|
91
91
|
description: The spicy extension framework
|
92
92
|
email:
|
93
93
|
- jens@balvig.com
|
@@ -217,7 +217,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
217
217
|
version: '0'
|
218
218
|
segments:
|
219
219
|
- 0
|
220
|
-
hash:
|
220
|
+
hash: 3163804124466460800
|
221
221
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
222
222
|
none: false
|
223
223
|
requirements:
|
@@ -226,7 +226,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
226
226
|
version: '0'
|
227
227
|
segments:
|
228
228
|
- 0
|
229
|
-
hash:
|
229
|
+
hash: 3163804124466460800
|
230
230
|
requirements: []
|
231
231
|
rubyforge_project:
|
232
232
|
rubygems_version: 1.8.11
|