chili 3.0.0 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -35,7 +35,9 @@ Chili features are like mini apps that are created inside your main app's lib/ch
35
35
  As an example, assuming you want to add a beta feature named "social" that shows a new like-button
36
36
  to a subset of users, first within your main app run:
37
37
 
38
- $ rails g chili:feature social
38
+ ```bash
39
+ $ rails g chili:feature social
40
+ ```
39
41
 
40
42
  This will:
41
43
 
@@ -60,11 +62,17 @@ end
60
62
  ### Modifying view templates in main app
61
63
 
62
64
  Chili uses Deface to dynamically modify existing view templates (see [Deface docs](https://github.com/spree/deface#using-the-deface-dsl-deface-files) for details)
63
- Add overrides to the `app/overides` directory mirroring the path of the view you want to modify.
64
- For example, assuming the main app has the partial `app/views/posts/_post.html.erb`:
65
+ To generate an override to the feature, run the deface generator specifying the name of the feature and path to the template you want to modify.
66
+ For example, assuming the main app has the partial `app/views/posts/_post.html.erb` run:
67
+
68
+ ```bash
69
+ $ rails g social_feature deface:override posts/_post like_button
70
+ ```
71
+
72
+ This will create a dummy override at `{feature}/app/overrides/posts/_post/like_button.html.erb.deface` that you can edit:
65
73
 
66
74
  ```erb
67
- <% # {feature}/app/overrides/posts/_post/like_button.html.erb.deface (folder should mirror main app view path) %>
75
+ <% # {feature}/app/overrides/posts/_post/like_button.html.erb.deface %>
68
76
  <!-- insert_bottom 'tr' -->
69
77
  <td><%= link_to 'Like!', social_feature.likes_path(like: {post_id: post}), method: :post %></td>
70
78
  ```
@@ -85,7 +93,9 @@ but will only be accessible when active_if is true.
85
93
 
86
94
  To copy and run feature db migrations use the following command:
87
95
 
88
- $ rake social_feature:db:migrate
96
+ ```bash
97
+ $ rake social_feature:db:migrate
98
+ ```
89
99
 
90
100
  ### Modifying existing models
91
101
 
@@ -16,7 +16,7 @@ Gem::Specification.new do |gem|
16
16
  gem.version = Chili::VERSION
17
17
 
18
18
  gem.add_dependency "rails", "~> 3.2"
19
- gem.add_dependency "deface", "~> 1.0.0.rc1"
19
+ gem.add_dependency "deface", "~> 1.0.0.rc2"
20
20
 
21
21
  gem.add_development_dependency 'rspec', '~> 2.12.0'
22
22
  gem.add_development_dependency 'rspec-rails', '~> 2.12.0'
@@ -1,3 +1,3 @@
1
1
  module Chili
2
- VERSION = "3.0.0"
2
+ VERSION = "3.1.0"
3
3
  end
@@ -15,8 +15,8 @@ Gem::Specification.new do |s|
15
15
 
16
16
  s.files = Dir["{app,config,db,lib}/**/*"] + ["MIT-LICENSE", "Rakefile", "README.rdoc"]
17
17
 
18
- s.add_dependency "rails", "~> 3.2.9"
19
- s.add_dependency 'chili', '~> 3.0'
18
+ s.add_dependency "rails", "~> 3.2.13"
19
+ s.add_dependency 'chili', '~> 3.1'
20
20
 
21
21
  s.add_development_dependency "sqlite3"
22
22
  end
@@ -17,6 +17,13 @@ describe Chili::GeneratorProxy do
17
17
  end
18
18
  end
19
19
 
20
+ context 'running deface override generator' do
21
+ it "generates namespaced override properly" do
22
+ puts `cd #{app.path} && rails g blank_feature deface:override posts/index add_links`
23
+ File.exist?(File.join(app.path, 'lib/chili/blank_feature/app/overrides/posts/index/add_links.html.erb.deface')).should be_true
24
+ end
25
+ end
26
+
20
27
  context 'passing in options' do
21
28
  it "passes options on to rails generator" do
22
29
  puts `cd #{app.path} && rails g blank_feature scaffold post --stylesheets=false`
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: 3.0.0
4
+ version: 3.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-30 00:00:00.000000000 Z
12
+ date: 2013-03-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -34,7 +34,7 @@ dependencies:
34
34
  requirements:
35
35
  - - ~>
36
36
  - !ruby/object:Gem::Version
37
- version: 1.0.0.rc1
37
+ version: 1.0.0.rc2
38
38
  type: :runtime
39
39
  prerelease: false
40
40
  version_requirements: !ruby/object:Gem::Requirement
@@ -42,7 +42,7 @@ dependencies:
42
42
  requirements:
43
43
  - - ~>
44
44
  - !ruby/object:Gem::Version
45
- version: 1.0.0.rc1
45
+ version: 1.0.0.rc2
46
46
  - !ruby/object:Gem::Dependency
47
47
  name: rspec
48
48
  requirement: !ruby/object:Gem::Requirement
@@ -297,7 +297,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
297
297
  version: '0'
298
298
  segments:
299
299
  - 0
300
- hash: 2891570347868177261
300
+ hash: -1451030424463406941
301
301
  required_rubygems_version: !ruby/object:Gem::Requirement
302
302
  none: false
303
303
  requirements:
@@ -306,7 +306,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
306
306
  version: '0'
307
307
  segments:
308
308
  - 0
309
- hash: 2891570347868177261
309
+ hash: -1451030424463406941
310
310
  requirements: []
311
311
  rubyforge_project:
312
312
  rubygems_version: 1.8.23