breezy 0.10.1 → 0.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/breezy.rb +10 -15
- data/lib/breezy/helpers.rb +541 -11
- data/lib/breezy/redirection.rb +30 -0
- data/lib/breezy/xhr_headers.rb +0 -10
- data/lib/generators/rails/breezy_generator.rb +13 -6
- data/lib/generators/rails/templates/_form.json.props +13 -0
- data/lib/generators/rails/templates/controller.rb.tt +0 -3
- data/lib/generators/rails/templates/edit.json.props +14 -0
- data/lib/generators/rails/templates/{index.js.props → index.json.props} +1 -2
- data/lib/generators/rails/templates/new.json.props +15 -0
- data/lib/generators/rails/templates/{show.js.props → show.json.props} +0 -2
- data/lib/generators/rails/templates/web/edit.html.erb +7 -0
- data/lib/generators/rails/templates/web/edit.jsx +21 -28
- data/lib/generators/rails/templates/web/index.html.erb +7 -0
- data/lib/generators/rails/templates/web/index.jsx +10 -7
- data/lib/generators/rails/templates/web/new.html.erb +7 -0
- data/lib/generators/rails/templates/web/new.jsx +18 -25
- data/lib/generators/rails/templates/web/show.html.erb +7 -0
- data/lib/generators/rails/templates/web/show.jsx +3 -4
- data/lib/install/templates/web/action_creators.js +14 -12
- data/lib/install/templates/web/actions.js +4 -1
- data/lib/install/templates/web/application.js +172 -46
- data/lib/install/templates/web/application.json.props +26 -0
- data/lib/install/templates/web/application_visit.js +65 -0
- data/lib/install/templates/web/initializer.rb +2 -5
- data/lib/install/templates/web/reducer.js +62 -9
- data/lib/install/web.rb +18 -55
- data/lib/tasks/install.rake +11 -7
- data/test/helpers_test.rb +9 -17
- data/test/render_test.rb +26 -91
- data/test/test_helper.rb +2 -2
- metadata +31 -34
- data/app/views/breezy/response.html.erb +0 -0
- data/lib/breezy/configuration.rb +0 -35
- data/lib/breezy/render.rb +0 -37
- data/lib/generators/rails/templates/edit.js.props +0 -16
- data/lib/generators/rails/templates/new.js.props +0 -4
- data/lib/generators/rails/templates/web/base.jsx +0 -11
- data/lib/generators/rails/templates/web/form.jsx +0 -31
- data/lib/install/templates/web/babelrc +0 -35
- data/test/breezy_test.rb +0 -125
- data/test/configuration_test.rb +0 -36
data/test/configuration_test.rb
DELETED
@@ -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
|