breezy 0.10.1 → 0.15.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +5 -5
  2. data/lib/breezy.rb +10 -15
  3. data/lib/breezy/helpers.rb +541 -11
  4. data/lib/breezy/redirection.rb +30 -0
  5. data/lib/breezy/xhr_headers.rb +0 -10
  6. data/lib/generators/rails/breezy_generator.rb +13 -6
  7. data/lib/generators/rails/templates/_form.json.props +13 -0
  8. data/lib/generators/rails/templates/controller.rb.tt +0 -3
  9. data/lib/generators/rails/templates/edit.json.props +14 -0
  10. data/lib/generators/rails/templates/{index.js.props → index.json.props} +1 -2
  11. data/lib/generators/rails/templates/new.json.props +15 -0
  12. data/lib/generators/rails/templates/{show.js.props → show.json.props} +0 -2
  13. data/lib/generators/rails/templates/web/edit.html.erb +7 -0
  14. data/lib/generators/rails/templates/web/edit.jsx +21 -28
  15. data/lib/generators/rails/templates/web/index.html.erb +7 -0
  16. data/lib/generators/rails/templates/web/index.jsx +10 -7
  17. data/lib/generators/rails/templates/web/new.html.erb +7 -0
  18. data/lib/generators/rails/templates/web/new.jsx +18 -25
  19. data/lib/generators/rails/templates/web/show.html.erb +7 -0
  20. data/lib/generators/rails/templates/web/show.jsx +3 -4
  21. data/lib/install/templates/web/action_creators.js +14 -12
  22. data/lib/install/templates/web/actions.js +4 -1
  23. data/lib/install/templates/web/application.js +172 -46
  24. data/lib/install/templates/web/application.json.props +26 -0
  25. data/lib/install/templates/web/application_visit.js +65 -0
  26. data/lib/install/templates/web/initializer.rb +2 -5
  27. data/lib/install/templates/web/reducer.js +62 -9
  28. data/lib/install/web.rb +18 -55
  29. data/lib/tasks/install.rake +11 -7
  30. data/test/helpers_test.rb +9 -17
  31. data/test/render_test.rb +26 -91
  32. data/test/test_helper.rb +2 -2
  33. metadata +31 -34
  34. data/app/views/breezy/response.html.erb +0 -0
  35. data/lib/breezy/configuration.rb +0 -35
  36. data/lib/breezy/render.rb +0 -37
  37. data/lib/generators/rails/templates/edit.js.props +0 -16
  38. data/lib/generators/rails/templates/new.js.props +0 -4
  39. data/lib/generators/rails/templates/web/base.jsx +0 -11
  40. data/lib/generators/rails/templates/web/form.jsx +0 -31
  41. data/lib/install/templates/web/babelrc +0 -35
  42. data/test/breezy_test.rb +0 -125
  43. data/test/configuration_test.rb +0 -36
@@ -1,36 +0,0 @@
1
- require 'test_helper'
2
-
3
- class ConfigurationTest < ActiveSupport::TestCase
4
- def restore_default_config
5
- Breezy.configuration = nil
6
- Breezy.configure {}
7
- end
8
-
9
- setup do
10
- restore_default_config
11
- end
12
-
13
- test 'configuration with an empty block defaults to application.js and application.css' do
14
- Breezy.configure do |config|
15
- end
16
-
17
- track_sprockets_assets = ['application.js', 'application.css']
18
- track_pack_assets = ['application.js']
19
-
20
- assert_equal track_sprockets_assets, Breezy.configuration.track_sprockets_assets
21
- assert_equal track_pack_assets, Breezy.configuration.track_pack_assets
22
- end
23
-
24
- test 'configuration with track_assets specified' do
25
- Breezy.configure do |config|
26
- config.track_sprockets_assets = ['app.js']
27
- config.track_pack_assets = ['pack.js']
28
- end
29
-
30
- track_sprockets_assets = ['app.js']
31
- track_pack_assets = ['pack.js']
32
-
33
- assert_equal track_sprockets_assets, Breezy.configuration.track_sprockets_assets
34
- assert_equal track_pack_assets, Breezy.configuration.track_pack_assets
35
- end
36
- end