chili 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -3,4 +3,3 @@ source 'https://rubygems.org'
3
3
  # Specify your gem's dependencies in chili.gemspec
4
4
  gemspec
5
5
  gem 'rake'
6
- gem 'deface', github: 'railsdog/deface'
data/README.md CHANGED
@@ -9,7 +9,7 @@ while leaving the main code untouched.
9
9
 
10
10
  ## Installation
11
11
 
12
- First add chili to your app's Gemfile:
12
+ First add Chili to your app's Gemfile:
13
13
 
14
14
  ```ruby
15
15
  gem 'chili'
@@ -33,12 +33,11 @@ This is basically a shortcut for running the `rails plugin new` engine generator
33
33
  1. Create a the directory `vendor/chili/social_extension` containing the basic structure for the extension
34
34
  2. Add a reference to the extension to the main app gemfile
35
35
 
36
- Since the extension is mounted as a gem you'll have to run `bundle`
37
- after this to start using the extension.
36
+ Since the extension is mounted as a gem you'll have to restart the app to start using the extension.
38
37
 
39
38
  ### Define who can see the extension
40
39
 
41
- Use the active_if block to control whether new the extension is visible or not.
40
+ Use the active_if block to control whether new the extension is active for each user.
42
41
  The context of the active_if block is the application controller so you can use any methods available to that.
43
42
 
44
43
  ```ruby
@@ -51,7 +50,7 @@ end
51
50
 
52
51
  ### Modifying view templates in main app
53
52
 
54
- Chili uses deface to modify existing view templates (see [deface docs](https://github.com/railsdog/deface#using-the-deface-dsl-deface-files) for details)
53
+ Chili uses Deface to dynamically modify existing view templates (see [Deface docs](https://github.com/railsdog/deface#using-the-deface-dsl-deface-files) for details)
55
54
  Add overrides to the `app/overides` directory mirroring the path of the view you want to modify.
56
55
  For example, assuming the main app has the partial `app/views/posts/_post.html.erb`:
57
56
 
@@ -63,7 +62,7 @@ For example, assuming the main app has the partial `app/views/posts/_post.html.e
63
62
 
64
63
  ### Adding new resources
65
64
 
66
- Go to the extension's directory and use `rails g scaffold Like`. The new resource will be namespaced to SocialExt::Like
65
+ Run `rails g scaffold Like` within the extension's directory. The new resource will be namespaced to `SocialExtension::Like`
67
66
  and automounted in the main app at `/chili/social_extension/likes`, but only accessible when active_if is true.
68
67
  All the rules for using [isolated engine models](http://railscasts.com/episodes/277-mountable-engines?view=asciicast) apply.
69
68
 
@@ -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", "~> 0.9.1"
19
+ gem.add_dependency "deface", "~> 1.0.0.rc1"
20
20
 
21
21
  gem.add_development_dependency 'rspec', '~> 2.9.0'
22
22
  gem.add_development_dependency 'rspec-rails', '~> 2.9.0'
@@ -1,3 +1,3 @@
1
1
  module Chili
2
- VERSION = "0.3.2"
2
+ VERSION = "0.3.3"
3
3
  end
@@ -77,7 +77,7 @@ module Chili
77
77
  def include_active_if
78
78
  inject_into_file "lib/#{NAME}.rb", :after => "module #{NAME.camelcase}\n" do <<-RUBY
79
79
  extend Chili::Activatable
80
- active_if { logged_in? }
80
+ active_if { true } # edit this to activate/deactivate extension at runtime
81
81
  RUBY
82
82
  end
83
83
  end
@@ -16,7 +16,7 @@ Gem::Specification.new do |s|
16
16
  s.files = Dir["{app,config,db,lib}/**/*"] + ["MIT-LICENSE", "Rakefile", "README.rdoc"]
17
17
 
18
18
  s.add_dependency "rails", "~> 3.2.8"
19
- s.add_dependency 'chili', '~> 0.3.2'
19
+ s.add_dependency 'chili', '~> 0.3.3'
20
20
 
21
21
  s.add_development_dependency "sqlite3"
22
22
  end
@@ -3,5 +3,5 @@ require "blank_extension/engine"
3
3
 
4
4
  module BlankExtension
5
5
  extend Chili::Activatable
6
- active_if { logged_in? }
6
+ active_if { true } # edit this to activate/deactivate extension at runtime
7
7
  end
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.3.2
4
+ version: 0.3.3
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-09-12 00:00:00.000000000 Z
12
+ date: 2012-09-23 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: 0.9.1
37
+ version: 1.0.0.rc1
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: 0.9.1
45
+ version: 1.0.0.rc1
46
46
  - !ruby/object:Gem::Dependency
47
47
  name: rspec
48
48
  requirement: !ruby/object:Gem::Requirement
@@ -259,7 +259,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
259
259
  version: '0'
260
260
  segments:
261
261
  - 0
262
- hash: -1399549731139573438
262
+ hash: -2588197379376791472
263
263
  required_rubygems_version: !ruby/object:Gem::Requirement
264
264
  none: false
265
265
  requirements:
@@ -268,7 +268,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
268
268
  version: '0'
269
269
  segments:
270
270
  - 0
271
- hash: -1399549731139573438
271
+ hash: -2588197379376791472
272
272
  requirements: []
273
273
  rubyforge_project:
274
274
  rubygems_version: 1.8.23