chili 3.1.0 → 3.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +7 -0
  2. data/.travis.yml +1 -1
  3. data/app/controllers/chili/application_controller.rb +1 -0
  4. data/chili.gemspec +5 -4
  5. data/lib/chili/overrides.rb +2 -1
  6. data/lib/chili/version.rb +1 -1
  7. data/lib/generators/chili/feature/feature_generator.rb +1 -1
  8. data/spec/dummy/app/config/application.rb +14 -1
  9. data/spec/dummy/app/config/boot.rb +3 -8
  10. data/spec/dummy/app/config/environment.rb +2 -2
  11. data/spec/dummy/app/config/environments/test.rb +13 -14
  12. data/spec/dummy/blank_feature/app/assets/javascripts/blank_feature/application.js +3 -3
  13. data/spec/dummy/blank_feature/blank_feature.gemspec +3 -2
  14. data/spec/example_app/README.rdoc +15 -248
  15. data/spec/example_app/Rakefile +0 -1
  16. data/spec/example_app/app/controllers/posts_controller.rb +8 -2
  17. data/spec/example_app/app/controllers/users_controller.rb +8 -2
  18. data/spec/example_app/app/models/post.rb +0 -1
  19. data/spec/example_app/app/models/user.rb +0 -1
  20. data/spec/example_app/app/overrides/posts/index/spree.html.erb.deface +2 -0
  21. data/spec/example_app/config/application.rb +3 -35
  22. data/spec/example_app/config/boot.rb +3 -8
  23. data/spec/example_app/config/environment.rb +2 -2
  24. data/spec/example_app/config/environments/development.rb +11 -19
  25. data/spec/example_app/config/environments/production.rb +40 -27
  26. data/spec/example_app/config/environments/test.rb +13 -14
  27. data/spec/example_app/config/initializers/filter_parameter_logging.rb +4 -0
  28. data/spec/example_app/config/initializers/inflections.rb +6 -5
  29. data/spec/example_app/config/initializers/secret_token.rb +7 -2
  30. data/spec/example_app/config/initializers/session_store.rb +0 -5
  31. data/spec/example_app/config/initializers/wrap_parameters.rb +6 -6
  32. data/spec/example_app/config/locales/en.yml +20 -2
  33. data/spec/example_app/config/routes.rb +1 -1
  34. data/spec/example_app/lib/chili/social_feature/app/controllers/social_feature/likes_controller.rb +4 -0
  35. data/spec/example_app/lib/chili/social_feature/app/models/social_feature/like.rb +0 -2
  36. data/spec/features/{social_extension_spec.rb → social_feature_spec.rb} +13 -7
  37. data/spec/spec_helper.rb +0 -2
  38. metadata +41 -49
  39. data/spec/dummy/app/config/environments/development.rb +0 -37
@@ -1,4 +1,4 @@
1
- Rails.application.routes.draw do
1
+ Dummy::Application.routes.draw do
2
2
  resources :users, :posts
3
3
  resource :session
4
4
  root to: 'posts#index'
@@ -16,5 +16,9 @@ module SocialFeature
16
16
  super.becomes(SocialFeature::User)
17
17
  end
18
18
 
19
+ def like_params
20
+ params.require(:like).permit(:post_id)
21
+ end
22
+
19
23
  end
20
24
  end
@@ -1,7 +1,5 @@
1
1
  module SocialFeature
2
2
  class Like < ActiveRecord::Base
3
3
  belongs_to :post
4
-
5
- attr_accessible :post_id
6
4
  end
7
5
  end
@@ -2,28 +2,29 @@ require 'spec_helper'
2
2
 
3
3
  feature 'View overrides' do
4
4
  scenario 'when user is not admin active_if toggles overrides off' do
5
- login User.create!
6
- visit('/posts')
5
+ login User.create!(admin: false)
6
+ visit '/posts'
7
7
  page.should_not have_content('See Your Likes')
8
8
  page.should_not have_content('Like functionality is in beta')
9
9
  end
10
10
 
11
11
  scenario 'when admin active_if toggles overrides on' do
12
12
  login User.create!(admin: true)
13
- visit('/posts')
13
+ visit '/posts'
14
14
  page.should have_content('See Your Likes')
15
15
  end
16
16
  end
17
17
 
18
18
  feature 'Togglable controllers' do
19
19
  scenario 'when user is not admin active_if hides controllers in feature' do
20
- login User.create!
21
- expect { visit('/chili/social_feature/likes') }.to raise_error(ActionController::RoutingError)
20
+ login User.create!(admin: false)
21
+ visit '/chili/social_feature/likes'
22
+ #expect { visit('/chili/social_feature/likes') }.to raise_error(ActionController::RoutingError)
22
23
  end
23
24
 
24
25
  scenario 'when admin active_if makes controllers available' do
25
26
  login User.create!(admin: true)
26
- visit('/chili/social_feature/likes')
27
+ visit '/chili/social_feature/likes'
27
28
  page.should have_content('Your Likes')
28
29
  end
29
30
  end
@@ -31,8 +32,13 @@ end
31
32
  feature 'Multiple chili features' do
32
33
  scenario 'multiple overrides do not redefine each other' do
33
34
  login User.create!(admin: true)
34
- visit('/posts')
35
+ visit '/posts'
35
36
  page.should have_content('Like functionality is in beta')
36
37
  page.should have_content('Invite functionality is also in beta')
37
38
  end
39
+
40
+ scenario 'Chili works alongside permanent spree overrides' do
41
+ visit '/posts'
42
+ page.should have_content('Permanent spree override')
43
+ end
38
44
  end
@@ -2,7 +2,6 @@
2
2
  ENV["RAILS_ENV"] ||= 'test'
3
3
  require File.expand_path("../example_app/config/environment", __FILE__)
4
4
  require 'rspec/rails'
5
- require 'capybara/rspec'
6
5
 
7
6
  # Requires supporting ruby files with custom matchers and macros, etc,
8
7
  # in spec/support/ and its subdirectories.
@@ -17,7 +16,6 @@ RSpec.configure do |config|
17
16
  # config.mock_with :mocha
18
17
  # config.mock_with :flexmock
19
18
  # config.mock_with :rr
20
- config.mock_with :rspec
21
19
 
22
20
  # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
23
21
  config.fixture_path = "#{::Rails.root}/spec/fixtures"
metadata CHANGED
@@ -1,100 +1,88 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chili
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0
5
- prerelease:
4
+ version: 3.1.1
6
5
  platform: ruby
7
6
  authors:
8
7
  - Jens Balvig
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-03-26 00:00:00.000000000 Z
11
+ date: 2013-10-15 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rails
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ~>
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: '3.2'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ~>
24
+ - - '>='
28
25
  - !ruby/object:Gem::Version
29
26
  version: '3.2'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: deface
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
31
  - - ~>
36
32
  - !ruby/object:Gem::Version
37
- version: 1.0.0.rc2
33
+ version: 1.0.0
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
38
  - - ~>
44
39
  - !ruby/object:Gem::Version
45
- version: 1.0.0.rc2
40
+ version: 1.0.0
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: rspec
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
45
  - - ~>
52
46
  - !ruby/object:Gem::Version
53
- version: 2.12.0
47
+ version: 2.14.0
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
52
  - - ~>
60
53
  - !ruby/object:Gem::Version
61
- version: 2.12.0
54
+ version: 2.14.0
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: rspec-rails
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
59
  - - ~>
68
60
  - !ruby/object:Gem::Version
69
- version: 2.12.0
61
+ version: 2.14.0
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
66
  - - ~>
76
67
  - !ruby/object:Gem::Version
77
- version: 2.12.0
68
+ version: 2.14.0
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: jquery-rails
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
- - - ! '>='
73
+ - - '>='
84
74
  - !ruby/object:Gem::Version
85
75
  version: '0'
86
76
  type: :development
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
- - - ! '>='
80
+ - - '>='
92
81
  - !ruby/object:Gem::Version
93
82
  version: '0'
94
83
  - !ruby/object:Gem::Dependency
95
84
  name: capybara
96
85
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
86
  requirements:
99
87
  - - ~>
100
88
  - !ruby/object:Gem::Version
@@ -102,7 +90,6 @@ dependencies:
102
90
  type: :development
103
91
  prerelease: false
104
92
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
93
  requirements:
107
94
  - - ~>
108
95
  - !ruby/object:Gem::Version
@@ -110,33 +97,43 @@ dependencies:
110
97
  - !ruby/object:Gem::Dependency
111
98
  name: xpath
112
99
  requirement: !ruby/object:Gem::Requirement
113
- none: false
114
100
  requirements:
115
- - - ! '>='
101
+ - - '>='
116
102
  - !ruby/object:Gem::Version
117
103
  version: '0'
118
104
  type: :development
119
105
  prerelease: false
120
106
  version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
107
  requirements:
123
- - - ! '>='
108
+ - - '>='
124
109
  - !ruby/object:Gem::Version
125
110
  version: '0'
126
111
  - !ruby/object:Gem::Dependency
127
112
  name: sqlite3
128
113
  requirement: !ruby/object:Gem::Requirement
129
- none: false
130
114
  requirements:
131
- - - ! '>='
115
+ - - '>='
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - '>='
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: pry
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - '>='
132
130
  - !ruby/object:Gem::Version
133
131
  version: '0'
134
132
  type: :development
135
133
  prerelease: false
136
134
  version_requirements: !ruby/object:Gem::Requirement
137
- none: false
138
135
  requirements:
139
- - - ! '>='
136
+ - - '>='
140
137
  - !ruby/object:Gem::Version
141
138
  version: '0'
142
139
  description: The spicy feature toggle framework
@@ -174,7 +171,6 @@ files:
174
171
  - spec/dummy/app/config/boot.rb
175
172
  - spec/dummy/app/config/database.yml
176
173
  - spec/dummy/app/config/environment.rb
177
- - spec/dummy/app/config/environments/development.rb
178
174
  - spec/dummy/app/config/environments/test.rb
179
175
  - spec/dummy/app/script/rails
180
176
  - spec/dummy/blank_feature/README.rdoc
@@ -209,6 +205,7 @@ files:
209
205
  - spec/example_app/app/models/.gitkeep
210
206
  - spec/example_app/app/models/post.rb
211
207
  - spec/example_app/app/models/user.rb
208
+ - spec/example_app/app/overrides/posts/index/spree.html.erb.deface
212
209
  - spec/example_app/app/views/layouts/application.html.erb
213
210
  - spec/example_app/app/views/posts/_form.html.erb
214
211
  - spec/example_app/app/views/posts/_post.html.erb
@@ -231,6 +228,7 @@ files:
231
228
  - spec/example_app/config/environments/production.rb
232
229
  - spec/example_app/config/environments/test.rb
233
230
  - spec/example_app/config/initializers/backtrace_silencers.rb
231
+ - spec/example_app/config/initializers/filter_parameter_logging.rb
234
232
  - spec/example_app/config/initializers/inflections.rb
235
233
  - spec/example_app/config/initializers/mime_types.rb
236
234
  - spec/example_app/config/initializers/secret_token.rb
@@ -278,40 +276,33 @@ files:
278
276
  - spec/example_app/public/favicon.ico
279
277
  - spec/example_app/script/rails
280
278
  - spec/example_app/spec/support/user_macros.rb
281
- - spec/features/social_extension_spec.rb
279
+ - spec/features/social_feature_spec.rb
282
280
  - spec/generators/chili/feature_generator_spec.rb
283
281
  - spec/generators/chili/generator_proxy_spec.rb
284
282
  - spec/spec_helper.rb
285
283
  - spec/support/dummy_app.rb
286
284
  homepage: http://balvig.github.com/chili/
287
285
  licenses: []
286
+ metadata: {}
288
287
  post_install_message:
289
288
  rdoc_options: []
290
289
  require_paths:
291
290
  - lib
292
291
  required_ruby_version: !ruby/object:Gem::Requirement
293
- none: false
294
292
  requirements:
295
- - - ! '>='
293
+ - - '>='
296
294
  - !ruby/object:Gem::Version
297
295
  version: '0'
298
- segments:
299
- - 0
300
- hash: -1451030424463406941
301
296
  required_rubygems_version: !ruby/object:Gem::Requirement
302
- none: false
303
297
  requirements:
304
- - - ! '>='
298
+ - - '>='
305
299
  - !ruby/object:Gem::Version
306
300
  version: '0'
307
- segments:
308
- - 0
309
- hash: -1451030424463406941
310
301
  requirements: []
311
302
  rubyforge_project:
312
- rubygems_version: 1.8.23
303
+ rubygems_version: 2.0.2
313
304
  signing_key:
314
- specification_version: 3
305
+ specification_version: 4
315
306
  summary: The spicy feature toggle framework
316
307
  test_files:
317
308
  - spec/README.md
@@ -321,7 +312,6 @@ test_files:
321
312
  - spec/dummy/app/config/boot.rb
322
313
  - spec/dummy/app/config/database.yml
323
314
  - spec/dummy/app/config/environment.rb
324
- - spec/dummy/app/config/environments/development.rb
325
315
  - spec/dummy/app/config/environments/test.rb
326
316
  - spec/dummy/app/script/rails
327
317
  - spec/dummy/blank_feature/README.rdoc
@@ -356,6 +346,7 @@ test_files:
356
346
  - spec/example_app/app/models/.gitkeep
357
347
  - spec/example_app/app/models/post.rb
358
348
  - spec/example_app/app/models/user.rb
349
+ - spec/example_app/app/overrides/posts/index/spree.html.erb.deface
359
350
  - spec/example_app/app/views/layouts/application.html.erb
360
351
  - spec/example_app/app/views/posts/_form.html.erb
361
352
  - spec/example_app/app/views/posts/_post.html.erb
@@ -378,6 +369,7 @@ test_files:
378
369
  - spec/example_app/config/environments/production.rb
379
370
  - spec/example_app/config/environments/test.rb
380
371
  - spec/example_app/config/initializers/backtrace_silencers.rb
372
+ - spec/example_app/config/initializers/filter_parameter_logging.rb
381
373
  - spec/example_app/config/initializers/inflections.rb
382
374
  - spec/example_app/config/initializers/mime_types.rb
383
375
  - spec/example_app/config/initializers/secret_token.rb
@@ -425,7 +417,7 @@ test_files:
425
417
  - spec/example_app/public/favicon.ico
426
418
  - spec/example_app/script/rails
427
419
  - spec/example_app/spec/support/user_macros.rb
428
- - spec/features/social_extension_spec.rb
420
+ - spec/features/social_feature_spec.rb
429
421
  - spec/generators/chili/feature_generator_spec.rb
430
422
  - spec/generators/chili/generator_proxy_spec.rb
431
423
  - spec/spec_helper.rb
@@ -1,37 +0,0 @@
1
- Dummy::Application.configure do
2
- # Settings specified here will take precedence over those in config/application.rb
3
-
4
- # In the development environment your application's code is reloaded on
5
- # every request. This slows down response time but is perfect for development
6
- # since you don't have to restart the web server when you make code changes.
7
- config.cache_classes = false
8
-
9
- # Log error messages when you accidentally call methods on nil.
10
- config.whiny_nils = true
11
-
12
- # Show full error reports and disable caching
13
- config.consider_all_requests_local = true
14
- config.action_controller.perform_caching = false
15
-
16
- # Don't care if the mailer can't send
17
- config.action_mailer.raise_delivery_errors = false
18
-
19
- # Print deprecation notices to the Rails logger
20
- config.active_support.deprecation = :log
21
-
22
- # Only use best-standards-support built into browsers
23
- config.action_dispatch.best_standards_support = :builtin
24
-
25
- # Raise exception on mass assignment protection for Active Record models
26
- config.active_record.mass_assignment_sanitizer = :strict
27
-
28
- # Log the query plan for queries taking more than this (works
29
- # with SQLite, MySQL, and PostgreSQL)
30
- config.active_record.auto_explain_threshold_in_seconds = 0.5
31
-
32
- # Do not compress assets
33
- config.assets.compress = false
34
-
35
- # Expands the lines which load the assets
36
- config.assets.debug = true
37
- end