chili 0.0.6 → 0.0.7

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.
Files changed (36) hide show
  1. data/Gemfile +1 -1
  2. data/README.md +21 -20
  3. data/chili.gemspec +1 -1
  4. data/lib/chili/extensions/rails/engine.rb +1 -1
  5. data/lib/chili/overrides.rb +2 -4
  6. data/lib/chili/tasks.rb +0 -8
  7. data/lib/chili/template.rb +1 -1
  8. data/lib/chili/version.rb +1 -1
  9. data/spec/dummy/{chili_likes/app/assets/images/chili_likes → chili_social/app/assets/images/chili_social}/.gitkeep +0 -0
  10. data/spec/dummy/{chili_likes/app/assets/javascripts/chili_likes → chili_social/app/assets/javascripts/chili_social}/application.js +0 -0
  11. data/spec/dummy/{chili_likes/app/assets/stylesheets/chili_likes → chili_social/app/assets/stylesheets/chili_social}/application.css.scss +0 -0
  12. data/spec/dummy/chili_social/app/controllers/chili_social/likes_controller.rb +14 -0
  13. data/spec/dummy/{chili_likes/app/models/chili_likes → chili_social/app/models/chili_social}/like.rb +1 -1
  14. data/spec/dummy/{chili_likes/app/models/chili_likes → chili_social/app/models/chili_social}/post.rb +1 -1
  15. data/spec/dummy/{chili_likes/app/models/chili_likes → chili_social/app/models/chili_social}/user.rb +1 -1
  16. data/spec/dummy/chili_social/app/overrides/layouts/application/stylesheets.html.erb.deface +2 -0
  17. data/spec/dummy/{chili_likes/app/overrides/posts/_post/chili_likes.html.erb.deface → chili_social/app/overrides/posts/_post/like_actions.html.erb.deface} +2 -2
  18. data/spec/dummy/chili_social/app/overrides/posts/index/disclaimer.html.erb.deface +2 -0
  19. data/spec/dummy/chili_social/app/overrides/posts/index/like_links.html.erb.deface +2 -0
  20. data/spec/dummy/{chili_likes/app/views/chili_likes → chili_social/app/views/chili_social}/likes/index.html.erb +0 -0
  21. data/spec/dummy/chili_social/config/routes.rb +4 -0
  22. data/spec/dummy/{chili_likes → chili_social}/db/migrate/20120513031021_create_chili_likes_likes.rb +0 -0
  23. data/spec/dummy/{chili_likes/lib/chili_likes.rb → chili_social/lib/chili_social.rb} +2 -2
  24. data/spec/dummy/{chili_likes/lib/chili_likes → chili_social/lib/chili_social}/engine.rb +2 -2
  25. data/spec/dummy/main_app/config/application.rb +1 -1
  26. data/spec/dummy/main_app/config/boot.rb +1 -1
  27. data/spec/dummy/main_app/config/routes.rb +1 -4
  28. data/spec/dummy/main_app/db/migrate/20120513032032_create_chili_social_likes.chili_likes.rb +11 -0
  29. data/spec/dummy/main_app/db/schema.rb +1 -1
  30. data/spec/requests/{chili_likes_spec.rb → chili_social_spec.rb} +3 -2
  31. metadata +53 -51
  32. data/spec/dummy/chili_likes/app/controllers/chili_likes/likes_controller.rb +0 -14
  33. data/spec/dummy/chili_likes/app/overrides/layouts/application/chili_likes.html.erb.deface +0 -2
  34. data/spec/dummy/chili_likes/app/overrides/posts/index/chili_likes.html.erb.deface +0 -2
  35. data/spec/dummy/chili_likes/config/routes.rb +0 -4
  36. data/spec/dummy/main_app/db/migrate/20120513032032_create_chili_likes_likes.chili_likes.rb +0 -11
data/Gemfile CHANGED
@@ -3,4 +3,4 @@ source 'https://rubygems.org'
3
3
  # Specify your gem's dependencies in chili.gemspec
4
4
  gemspec
5
5
  gem 'rake'
6
- gem 'deface', git: 'git://github.com/railsdog/deface.git', branch: 'dsl'
6
+ gem 'deface', github: 'railsdog/deface'
data/README.md CHANGED
@@ -19,14 +19,14 @@ Just like engines chili extensions are like mini apps that are created separatel
19
19
 
20
20
  ### Creating a new chili extension
21
21
 
22
- Assuming you want to add a new extension that adds exposes a new "like" button feature to a subset of users, first run:
22
+ Assuming you want to add a new extension that adds exposes a new social feature such as a "like" button feature to a subset of users, first run:
23
23
 
24
- chili likes
24
+ chili social # social is the name of the extension
25
25
 
26
26
  This is basically a shortcut for running the `rails plugin new` engine generator with a custom template and will:
27
27
 
28
- 1. Create a directory named chili_likes containing the basic structure for the extension
29
- 2. Clone the app you are adding the extension to as a submodule into chili_likes/main_app
28
+ 1. Create a directory named chili_social containing the basic structure for the extension
29
+ 2. Clone the app you are adding the extension to as a submodule into chili_social/main_app
30
30
  3. Add a reference to the extensions gemspec to the main app gemfile for testing
31
31
 
32
32
  ### Define who can see the extension
@@ -35,8 +35,8 @@ Use the active_if block to control whether new controllers/overrides are visible
35
35
  The context of the active_if block is the application controller so you can use any methods available to that.
36
36
 
37
37
  ```ruby
38
- # lib/chili_likes.rb
39
- module ChiliLikes
38
+ # lib/chili_social.rb
39
+ module ChiliSocial
40
40
  extend Chili::Activatable
41
41
  active_if { logged_in? && current_user.admin? } # Extension is only visible to logged in admin users
42
42
  end
@@ -44,19 +44,20 @@ end
44
44
 
45
45
  ### Modifying view templates in main app
46
46
 
47
- Chili uses deface to modify existing view templates (see [deface docs](https://github.com/railsdog/deface#readme) for details)
48
- Add an override with the same name as the extension. As an example, assuming the main app has the partial `app/views/posts/_post.html.erb`:
47
+ Chili uses deface to modify existing view templates (see [deface docs](https://github.com/railsdog/deface#using-the-deface-dsl-deface-files) for details)
48
+ Add overrides to the `app/overides` directory mirroing the path of the view you want to modify.
49
+ For example, assuming the main app has the partial `app/views/posts/_post.html.erb`:
49
50
 
50
51
  ```erb
51
- <% # app/overrides/posts/_post/chili_likes.html.erb.deface (folder should mirror main app view path) %>
52
+ <% # app/overrides/posts/_post/like_button.html.erb.deface (folder should mirror main app view path) %>
52
53
  <!-- insert_bottom 'tr' -->
53
- <td><%= link_to 'Like!', chili_likes.likes_path(like: {post_id: post}), method: :post %></td>
54
+ <td><%= link_to 'Like!', chili_social.likes_path(like: {post_id: post}), method: :post %></td>
54
55
  ```
55
56
 
56
57
  ### Adding new resources
57
58
 
58
- Use `rails g scaffold Like` as usual when using engines. The new resource will be namespaced to ChiliLikes::Like
59
- and automounted in the main app at `/chili_likes/likes`, but only accessible when active_if is true.
59
+ Use `rails g scaffold Like` as usual when using engines. The new resource will be namespaced to ChiliSocial::Like
60
+ and automounted in the main app at `/chili/social/likes`, but only accessible when active_if is true.
60
61
  All the rules for using [engine-based models](http://railscasts.com/episodes/277-mountable-engines?view=asciicast) apply.
61
62
 
62
63
  ### Modifying existing models
@@ -65,8 +66,8 @@ Create a model with the same name as the one you want to modify: `rails g model
65
66
  and inherit from the original:
66
67
 
67
68
  ```ruby
68
- # app/model/chili_likes/user.rb
69
- module ChiliLikes
69
+ # app/model/chili_social/user.rb
70
+ module ChiliSocial
70
71
  class User < ::User
71
72
  has_many :likes
72
73
  end
@@ -76,19 +77,19 @@ end
76
77
  Access through the namespaced model:
77
78
 
78
79
  ```erb
79
- <%= ChiliLikes::User.first.likes %>
80
- <%= current_user.becomes(ChiliLikes::User).likes %>
80
+ <%= ChiliSocial::User.first.likes %>
81
+ <%= current_user.becomes(ChiliSocial::User).likes %>
81
82
  ```
82
83
 
83
84
  ### Adding new stylesheets/javascripts
84
85
 
85
- Add files as usual in `app/assets/chili_likes/javascripts|stylesheets` and inject them into the layout using an override:
86
+ Add files as usual in `app/assets/chili_social/javascripts|stylesheets` and inject them into the layout using an override:
86
87
 
87
88
  ```erb
88
- <% # app/overrides/layouts/application/chili_likes.html.erb.deface %>
89
+ <% # app/overrides/layouts/application/assets.html.erb.deface %>
89
90
  <!-- insert_bottom 'head' -->
90
- <%= stylesheet_link_tag 'chili_likes/application' %>
91
- <%= javascript_include_tag 'chili_likes/application' %>
91
+ <%= stylesheet_link_tag 'chili_social/application' %>
92
+ <%= javascript_include_tag 'chili_social/application' %>
92
93
  ```
93
94
 
94
95
  ### Gotchas
data/chili.gemspec CHANGED
@@ -15,7 +15,7 @@ Gem::Specification.new do |gem|
15
15
  gem.require_paths = ["lib"]
16
16
  gem.version = Chili::VERSION
17
17
 
18
- gem.add_dependency "rails", "~> 3.1"
18
+ gem.add_dependency "rails", "~> 3.2"
19
19
  gem.add_development_dependency 'rspec', '~> 2.9.0'
20
20
  gem.add_development_dependency 'rspec-rails', '~> 2.9.0'
21
21
  gem.add_development_dependency 'jquery-rails'
@@ -1,7 +1,7 @@
1
1
  class Rails::Engine
2
2
  def self.automount!(path = nil)
3
3
  engine = self
4
- path ||= engine.to_s.underscore.split('/').first
4
+ path ||= engine.parent.to_s.underscore.sub('_','/')
5
5
  Rails.application.routes.draw do
6
6
  mount engine => path
7
7
  end
@@ -7,10 +7,8 @@ module Chili
7
7
 
8
8
  module InstanceMethods
9
9
  def activate_overrides
10
- Deface::Override.all.each do |o|
11
- engine = o.second.keys.first.camelcase.constantize
12
- override = o.second.first.second
13
- override.args[:disabled] = !engine.active?(self)
10
+ Deface::Override.all.values.map(&:values).flatten.each do |override|
11
+ override.args[:disabled] = !override.railtie.class.parent.active?(self)
14
12
  end
15
13
  end
16
14
  end
data/lib/chili/tasks.rb CHANGED
@@ -1,12 +1,5 @@
1
1
  module Chili
2
2
  module Tasks
3
- # Bundler
4
- begin
5
- require 'bundler/setup'
6
- rescue LoadError
7
- puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
8
- end
9
-
10
3
  # App tasks
11
4
  require 'rails'
12
5
  load 'rails/tasks/engine.rake'
@@ -14,6 +7,5 @@ module Chili
14
7
  # Gem tasks
15
8
  require 'bundler/gem_helper'
16
9
  Bundler::GemHelper.install_tasks
17
-
18
10
  end
19
11
  end
@@ -11,7 +11,7 @@ append_to_file "main_app/Gemfile" do <<-RUBY
11
11
 
12
12
  # Chili dev dependencies
13
13
  gemspec path: '../'
14
- gem 'deface', git: 'git://github.com/railsdog/deface.git', branch: 'dsl'
14
+ gem 'deface', github: 'railsdog/deface'
15
15
  RUBY
16
16
  end
17
17
 
data/lib/chili/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Chili
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
@@ -0,0 +1,14 @@
1
+ module ChiliSocial
2
+ class LikesController < Chili::ApplicationController
3
+
4
+ def index
5
+ @likes = current_user.becomes(ChiliSocial::User).likes
6
+ end
7
+
8
+ def create
9
+ @like = current_user.becomes(ChiliSocial::User).likes.create!(params[:like])
10
+ redirect_to :back, notice: 'Post liked!'
11
+ end
12
+
13
+ end
14
+ end
@@ -1,4 +1,4 @@
1
- module ChiliLikes
1
+ module ChiliSocial
2
2
  class Like < ActiveRecord::Base
3
3
  belongs_to :post
4
4
 
@@ -1,4 +1,4 @@
1
- module ChiliLikes
1
+ module ChiliSocial
2
2
  class Post < ::Post
3
3
  has_many :likes
4
4
 
@@ -1,4 +1,4 @@
1
- module ChiliLikes
1
+ module ChiliSocial
2
2
  class User < ::User
3
3
  has_many :likes
4
4
  end
@@ -0,0 +1,2 @@
1
+ <!-- insert_bottom 'head' -->
2
+ <%# stylesheet_link_tag 'chili_social/application' %>
@@ -1,6 +1,6 @@
1
1
  <!-- insert_bottom 'tr' -->
2
- <% post.becomes(ChiliLikes::Post).tap do |post| %>
3
- <td><%= link_to 'Like!', chili_likes.likes_path(like: {post_id: post}), method: :post %></td>
2
+ <% post.becomes(ChiliSocial::Post).tap do |post| %>
3
+ <td><%= link_to 'Like!', chili_social.likes_path(like: {post_id: post}), method: :post %></td>
4
4
  <td><%= pluralize post.likes.size, 'like' %></td>
5
5
  <td><%= post.well_liked? ? 'This post is well liked!' : 'This post is boring...' %></td>
6
6
  <% end %>
@@ -0,0 +1,2 @@
1
+ <!-- insert_after '#posts' -->
2
+ <p class='disclaimer'>Like functionality is in beta</p>
@@ -0,0 +1,2 @@
1
+ <!-- insert_before '#posts' -->
2
+ <%= link_to 'See Your Likes', chili_social.likes_path %>
@@ -0,0 +1,4 @@
1
+ ChiliSocial::Engine.automount!
2
+ ChiliSocial::Engine.routes.draw do
3
+ resources :likes
4
+ end
@@ -1,7 +1,7 @@
1
1
  require "chili"
2
- require "chili_likes/engine"
2
+ require "chili_social/engine"
3
3
 
4
- module ChiliLikes
4
+ module ChiliSocial
5
5
  extend Chili::Activatable
6
6
  active_if { logged_in? && current_user.admin? }
7
7
  end
@@ -1,6 +1,6 @@
1
- module ChiliLikes
1
+ module ChiliSocial
2
2
  class Engine < ::Rails::Engine
3
- isolate_namespace ChiliLikes
3
+ isolate_namespace ChiliSocial
4
4
  config.generators do |g|
5
5
  g.scaffold_controller :chili
6
6
  g.test_framework :rspec, view_specs: false, routing_specs: false, controller_specs: false
@@ -4,7 +4,7 @@ require 'rails/all'
4
4
 
5
5
  Bundler.require
6
6
  require "chili"
7
- require "chili_likes"
7
+ require "chili_social"
8
8
 
9
9
  module Dummy
10
10
  class Application < Rails::Application
@@ -8,4 +8,4 @@ if File.exist?(gemfile)
8
8
  end
9
9
 
10
10
  $:.unshift File.expand_path('../../../../../lib', __FILE__)
11
- $:.unshift File.expand_path('../../../../../spec/dummy/chili_likes/lib', __FILE__)
11
+ $:.unshift File.expand_path('../../../../../spec/dummy/chili_social/lib', __FILE__)
@@ -1,6 +1,3 @@
1
1
  Rails.application.routes.draw do
2
- resources :users
3
-
4
- resources :posts
5
-
2
+ resources :users, :posts
6
3
  end
@@ -0,0 +1,11 @@
1
+ # This migration comes from chili_social (originally 20120513031021)
2
+ class CreateChiliSocialLikes < ActiveRecord::Migration
3
+ def change
4
+ create_table :chili_social_likes do |t|
5
+ t.integer :post_id
6
+ t.integer :user_id
7
+
8
+ t.timestamps
9
+ end
10
+ end
11
+ end
@@ -13,7 +13,7 @@
13
13
 
14
14
  ActiveRecord::Schema.define(:version => 20120513032032) do
15
15
 
16
- create_table "chili_likes_likes", :force => true do |t|
16
+ create_table "chili_social_likes", :force => true do |t|
17
17
  t.integer "post_id"
18
18
  t.integer "user_id"
19
19
  t.datetime "created_at", :null => false
@@ -5,6 +5,7 @@ feature 'View overrides' do
5
5
  User.create!
6
6
  visit('/posts')
7
7
  page.should_not have_content('See Your Likes')
8
+ page.should_not have_content('Like functionality is in beta')
8
9
  end
9
10
 
10
11
  scenario 'when admin active_if toggles overrides on' do
@@ -17,12 +18,12 @@ end
17
18
  feature 'Togglable controllers' do
18
19
  scenario 'when user is not admin active_if hides engine controller' do
19
20
  User.create!
20
- expect { visit('/chili_likes/likes') }.to raise_error(ActionController::RoutingError)
21
+ expect { visit('/chili/social/likes') }.to raise_error(ActionController::RoutingError)
21
22
  end
22
23
 
23
24
  scenario 'when admin active_if toggles overrides on' do
24
25
  User.create!(admin: true)
25
- visit('/chili_likes/likes')
26
+ visit('/chili/social/likes')
26
27
  page.should have_content('Your Likes')
27
28
  end
28
29
  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.0.6
4
+ version: 0.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,22 +9,22 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-05-23 00:00:00.000000000 Z
12
+ date: 2012-05-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &70261933751340 !ruby/object:Gem::Requirement
16
+ requirement: &70323199401800 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
20
20
  - !ruby/object:Gem::Version
21
- version: '3.1'
21
+ version: '3.2'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70261933751340
24
+ version_requirements: *70323199401800
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rspec
27
- requirement: &70261933750820 !ruby/object:Gem::Requirement
27
+ requirement: &70323199401280 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 2.9.0
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70261933750820
35
+ version_requirements: *70323199401280
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rspec-rails
38
- requirement: &70261933780760 !ruby/object:Gem::Requirement
38
+ requirement: &70323199400820 !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: *70261933780760
46
+ version_requirements: *70323199400820
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: jquery-rails
49
- requirement: &70261933780360 !ruby/object:Gem::Requirement
49
+ requirement: &70323199400420 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70261933780360
57
+ version_requirements: *70323199400420
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: capybara
60
- requirement: &70261933779900 !ruby/object:Gem::Requirement
60
+ requirement: &70323199399860 !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: *70261933779900
68
+ version_requirements: *70323199399860
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: sqlite3
71
- requirement: &70261933779480 !ruby/object:Gem::Requirement
71
+ requirement: &70323199399440 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,7 +76,7 @@ dependencies:
76
76
  version: '0'
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *70261933779480
79
+ version_requirements: *70323199399440
80
80
  description: The spicy extension framework (work in progress)
81
81
  email:
82
82
  - jens@balvig.com
@@ -103,21 +103,22 @@ files:
103
103
  - lib/chili/version.rb
104
104
  - lib/generators/rails/chili_generator.rb
105
105
  - lib/generators/rails/templates/controller.rb
106
- - spec/dummy/chili_likes/app/assets/images/chili_likes/.gitkeep
107
- - spec/dummy/chili_likes/app/assets/javascripts/chili_likes/application.js
108
- - spec/dummy/chili_likes/app/assets/stylesheets/chili_likes/application.css.scss
109
- - spec/dummy/chili_likes/app/controllers/chili_likes/likes_controller.rb
110
- - spec/dummy/chili_likes/app/models/chili_likes/like.rb
111
- - spec/dummy/chili_likes/app/models/chili_likes/post.rb
112
- - spec/dummy/chili_likes/app/models/chili_likes/user.rb
113
- - spec/dummy/chili_likes/app/overrides/layouts/application/chili_likes.html.erb.deface
114
- - spec/dummy/chili_likes/app/overrides/posts/_post/chili_likes.html.erb.deface
115
- - spec/dummy/chili_likes/app/overrides/posts/index/chili_likes.html.erb.deface
116
- - spec/dummy/chili_likes/app/views/chili_likes/likes/index.html.erb
117
- - spec/dummy/chili_likes/config/routes.rb
118
- - spec/dummy/chili_likes/db/migrate/20120513031021_create_chili_likes_likes.rb
119
- - spec/dummy/chili_likes/lib/chili_likes.rb
120
- - spec/dummy/chili_likes/lib/chili_likes/engine.rb
106
+ - spec/dummy/chili_social/app/assets/images/chili_social/.gitkeep
107
+ - spec/dummy/chili_social/app/assets/javascripts/chili_social/application.js
108
+ - spec/dummy/chili_social/app/assets/stylesheets/chili_social/application.css.scss
109
+ - spec/dummy/chili_social/app/controllers/chili_social/likes_controller.rb
110
+ - spec/dummy/chili_social/app/models/chili_social/like.rb
111
+ - spec/dummy/chili_social/app/models/chili_social/post.rb
112
+ - spec/dummy/chili_social/app/models/chili_social/user.rb
113
+ - spec/dummy/chili_social/app/overrides/layouts/application/stylesheets.html.erb.deface
114
+ - spec/dummy/chili_social/app/overrides/posts/_post/like_actions.html.erb.deface
115
+ - spec/dummy/chili_social/app/overrides/posts/index/disclaimer.html.erb.deface
116
+ - spec/dummy/chili_social/app/overrides/posts/index/like_links.html.erb.deface
117
+ - spec/dummy/chili_social/app/views/chili_social/likes/index.html.erb
118
+ - spec/dummy/chili_social/config/routes.rb
119
+ - spec/dummy/chili_social/db/migrate/20120513031021_create_chili_likes_likes.rb
120
+ - spec/dummy/chili_social/lib/chili_social.rb
121
+ - spec/dummy/chili_social/lib/chili_social/engine.rb
121
122
  - spec/dummy/main_app/README.rdoc
122
123
  - spec/dummy/main_app/Rakefile
123
124
  - spec/dummy/main_app/app/assets/javascripts/application.js
@@ -165,7 +166,7 @@ files:
165
166
  - spec/dummy/main_app/config/routes.rb
166
167
  - spec/dummy/main_app/db/migrate/20120513023816_create_posts.rb
167
168
  - spec/dummy/main_app/db/migrate/20120513023840_create_users.rb
168
- - spec/dummy/main_app/db/migrate/20120513032032_create_chili_likes_likes.chili_likes.rb
169
+ - spec/dummy/main_app/db/migrate/20120513032032_create_chili_social_likes.chili_likes.rb
169
170
  - spec/dummy/main_app/db/schema.rb
170
171
  - spec/dummy/main_app/lib/assets/.gitkeep
171
172
  - spec/dummy/main_app/log/.gitkeep
@@ -175,7 +176,7 @@ files:
175
176
  - spec/dummy/main_app/public/favicon.ico
176
177
  - spec/dummy/main_app/script/rails
177
178
  - spec/lib/chili/activatable_spec.rb
178
- - spec/requests/chili_likes_spec.rb
179
+ - spec/requests/chili_social_spec.rb
179
180
  - spec/spec_helper.rb
180
181
  homepage: https://github.com/balvig/chili
181
182
  licenses: []
@@ -191,7 +192,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
191
192
  version: '0'
192
193
  segments:
193
194
  - 0
194
- hash: 3335938520079951196
195
+ hash: 4584259311276612351
195
196
  required_rubygems_version: !ruby/object:Gem::Requirement
196
197
  none: false
197
198
  requirements:
@@ -200,7 +201,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
200
201
  version: '0'
201
202
  segments:
202
203
  - 0
203
- hash: 3335938520079951196
204
+ hash: 4584259311276612351
204
205
  requirements: []
205
206
  rubyforge_project:
206
207
  rubygems_version: 1.8.11
@@ -208,21 +209,22 @@ signing_key:
208
209
  specification_version: 3
209
210
  summary: The spicy extension framework (work in progress)
210
211
  test_files:
211
- - spec/dummy/chili_likes/app/assets/images/chili_likes/.gitkeep
212
- - spec/dummy/chili_likes/app/assets/javascripts/chili_likes/application.js
213
- - spec/dummy/chili_likes/app/assets/stylesheets/chili_likes/application.css.scss
214
- - spec/dummy/chili_likes/app/controllers/chili_likes/likes_controller.rb
215
- - spec/dummy/chili_likes/app/models/chili_likes/like.rb
216
- - spec/dummy/chili_likes/app/models/chili_likes/post.rb
217
- - spec/dummy/chili_likes/app/models/chili_likes/user.rb
218
- - spec/dummy/chili_likes/app/overrides/layouts/application/chili_likes.html.erb.deface
219
- - spec/dummy/chili_likes/app/overrides/posts/_post/chili_likes.html.erb.deface
220
- - spec/dummy/chili_likes/app/overrides/posts/index/chili_likes.html.erb.deface
221
- - spec/dummy/chili_likes/app/views/chili_likes/likes/index.html.erb
222
- - spec/dummy/chili_likes/config/routes.rb
223
- - spec/dummy/chili_likes/db/migrate/20120513031021_create_chili_likes_likes.rb
224
- - spec/dummy/chili_likes/lib/chili_likes.rb
225
- - spec/dummy/chili_likes/lib/chili_likes/engine.rb
212
+ - spec/dummy/chili_social/app/assets/images/chili_social/.gitkeep
213
+ - spec/dummy/chili_social/app/assets/javascripts/chili_social/application.js
214
+ - spec/dummy/chili_social/app/assets/stylesheets/chili_social/application.css.scss
215
+ - spec/dummy/chili_social/app/controllers/chili_social/likes_controller.rb
216
+ - spec/dummy/chili_social/app/models/chili_social/like.rb
217
+ - spec/dummy/chili_social/app/models/chili_social/post.rb
218
+ - spec/dummy/chili_social/app/models/chili_social/user.rb
219
+ - spec/dummy/chili_social/app/overrides/layouts/application/stylesheets.html.erb.deface
220
+ - spec/dummy/chili_social/app/overrides/posts/_post/like_actions.html.erb.deface
221
+ - spec/dummy/chili_social/app/overrides/posts/index/disclaimer.html.erb.deface
222
+ - spec/dummy/chili_social/app/overrides/posts/index/like_links.html.erb.deface
223
+ - spec/dummy/chili_social/app/views/chili_social/likes/index.html.erb
224
+ - spec/dummy/chili_social/config/routes.rb
225
+ - spec/dummy/chili_social/db/migrate/20120513031021_create_chili_likes_likes.rb
226
+ - spec/dummy/chili_social/lib/chili_social.rb
227
+ - spec/dummy/chili_social/lib/chili_social/engine.rb
226
228
  - spec/dummy/main_app/README.rdoc
227
229
  - spec/dummy/main_app/Rakefile
228
230
  - spec/dummy/main_app/app/assets/javascripts/application.js
@@ -270,7 +272,7 @@ test_files:
270
272
  - spec/dummy/main_app/config/routes.rb
271
273
  - spec/dummy/main_app/db/migrate/20120513023816_create_posts.rb
272
274
  - spec/dummy/main_app/db/migrate/20120513023840_create_users.rb
273
- - spec/dummy/main_app/db/migrate/20120513032032_create_chili_likes_likes.chili_likes.rb
275
+ - spec/dummy/main_app/db/migrate/20120513032032_create_chili_social_likes.chili_likes.rb
274
276
  - spec/dummy/main_app/db/schema.rb
275
277
  - spec/dummy/main_app/lib/assets/.gitkeep
276
278
  - spec/dummy/main_app/log/.gitkeep
@@ -280,5 +282,5 @@ test_files:
280
282
  - spec/dummy/main_app/public/favicon.ico
281
283
  - spec/dummy/main_app/script/rails
282
284
  - spec/lib/chili/activatable_spec.rb
283
- - spec/requests/chili_likes_spec.rb
285
+ - spec/requests/chili_social_spec.rb
284
286
  - spec/spec_helper.rb
@@ -1,14 +0,0 @@
1
- module ChiliLikes
2
- class LikesController < Chili::ApplicationController
3
-
4
- def index
5
- @likes = current_user.becomes(ChiliLikes::User).likes
6
- end
7
-
8
- def create
9
- @like = current_user.becomes(ChiliLikes::User).likes.create!(params[:like])
10
- redirect_to :back, notice: 'Post liked!'
11
- end
12
-
13
- end
14
- end
@@ -1,2 +0,0 @@
1
- <!-- insert_bottom 'head' -->
2
- <%# stylesheet_link_tag 'chili_likes/application' %>
@@ -1,2 +0,0 @@
1
- <!-- insert_before '#posts' -->
2
- <%= link_to 'See Your Likes', chili_likes.likes_path %>
@@ -1,4 +0,0 @@
1
- ChiliLikes::Engine.automount!
2
- ChiliLikes::Engine.routes.draw do
3
- resources :likes
4
- end
@@ -1,11 +0,0 @@
1
- # This migration comes from chili_likes (originally 20120513031021)
2
- class CreateChiliLikesLikes < ActiveRecord::Migration
3
- def change
4
- create_table :chili_likes_likes do |t|
5
- t.integer :post_id
6
- t.integer :user_id
7
-
8
- t.timestamps
9
- end
10
- end
11
- end