breezy 0.3.4 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5ea53dc349e8ee6d517f346bdeba127b78c48bf0
4
- data.tar.gz: a2d3295aa80f7ac22326bc8393e6526525e4912e
3
+ metadata.gz: 021670ec6a383d8c41d2741352fe413b36073511
4
+ data.tar.gz: f5df7c82b777a64399e7c41a973cf36c47af3aa3
5
5
  SHA512:
6
- metadata.gz: 3d6bb3718396524334eba6c258ef8dba0a8df8c03b18c6c41d1e7672780177d0b87b21ede803d890a83f79b931a28f126ef195320e3bd98db34694513091f9e0
7
- data.tar.gz: 58b0a9a4ccb8335e951bb96aacdf9208eb1d9118ae64cb523f2a002fb12c65ab4f0c0c874d03bc4b3450077064f88036fb43744c13df7c27224cc99614382fe2
6
+ metadata.gz: 10f8dd453d698269699cea287e151e36939e1eb63444e437336fecb038f27d8c0e4b1e2dfd00aa45c1ddf7731002c42d81e4774c2eb33f28cc59c079d5e8ed98
7
+ data.tar.gz: 1542aa4578bd435e4e9efb47599fd2a58207172d7a5381c4c50be6cb871e4bf2dbe11545f00b7688a3fbd04cd2f2597f9b9cb84afb7843e48577b00cbed9c828
@@ -4,12 +4,20 @@ module Breezy
4
4
  BreezyTemplate.configuration = nil
5
5
  end
6
6
 
7
- def track_assets=(assets)
8
- BreezyTemplate.configuration.track_assets = assets
7
+ def track_sprockets_assets=(assets)
8
+ BreezyTemplate.configuration.track_sprockets_assets = assets
9
9
  end
10
10
 
11
- def track_assets
12
- BreezyTemplate.configuration.track_assets
11
+ def track_sprockets_assets
12
+ BreezyTemplate.configuration.track_sprockets_assets
13
+ end
14
+
15
+ def track_pack_assets=(assets)
16
+ BreezyTemplate.configuration.track_pack_assets = assets
17
+ end
18
+
19
+ def track_pack_assets
20
+ BreezyTemplate.configuration.track_pack_assets
13
21
  end
14
22
  end
15
23
 
data/lib/breezy/render.rb CHANGED
@@ -22,7 +22,7 @@ module Breezy
22
22
 
23
23
  if breezy
24
24
  view_parts = _prefixes.reverse.push(action_name)[1..-1]
25
- view_name = view_parts.map(&:camelize).join
25
+ view_name = view_parts.map(&:camelize).join.gsub('::', '')
26
26
 
27
27
  breezy[:screen] ||= view_name
28
28
  render_options[:locals] ||= {}
@@ -1,3 +1,3 @@
1
1
  module Breezy
2
- VERSION = '0.3.4'
2
+ VERSION = '0.5.0'
3
3
  end
@@ -1,23 +1,19 @@
1
1
  module Breezy
2
2
  module XHRHeaders
3
- if Rails.version >= '5.0'
4
- def redirect_back(fallback_location:, **args)
5
- if referer = request.headers["X-XHR-Referer"]
6
- redirect_to referer, **args
7
- else
8
- super
9
- end
3
+ def redirect_back(fallback_location:, **args)
4
+ if referer = request.headers["X-XHR-Referer"]
5
+ redirect_to referer, **args
6
+ else
7
+ super
10
8
  end
11
9
  end
12
10
 
13
- def _compute_redirect_to_location(*args)
14
- options, request = _normalize_redirect_params(args)
15
-
11
+ def _compute_redirect_to_location(request, options)
16
12
  url = begin
17
13
  if options == :back && request.headers["X-XHR-Referer"]
18
- super(*[(request if args.length == 2), request.headers["X-XHR-Referer"]].compact)
14
+ super(request, request.headers["X-XHR-Referer"])
19
15
  else
20
- super(*args)
16
+ super
21
17
  end
22
18
  end
23
19
 
@@ -31,13 +27,5 @@ module Breezy
31
27
  def set_response_url
32
28
  response.headers['X-RESPONSE-URL'] = request.fullpath
33
29
  end
34
-
35
- # Ensure backwards compatibility
36
- # Rails < 4.2: _compute_redirect_to_location(options)
37
- # Rails >= 4.2: _compute_redirect_to_location(request, options)
38
- def _normalize_redirect_params(args)
39
- options, req = args.reverse
40
- [options, req || request]
41
- end
42
30
  end
43
31
  end
data/lib/breezy.rb CHANGED
@@ -1,7 +1,6 @@
1
1
  require 'breezy/version'
2
2
  require 'breezy/xhr_headers'
3
3
  require 'breezy/xhr_url_for'
4
- require 'breezy/cookies'
5
4
  require 'breezy/x_domain_blocker'
6
5
  require 'breezy/render'
7
6
  require 'breezy/helpers'
@@ -10,14 +9,14 @@ require 'breezy_template'
10
9
 
11
10
  module Breezy
12
11
  module Controller
13
- include XHRHeaders, Cookies, XDomainBlocker, Render, Helpers
12
+ include XHRHeaders, XDomainBlocker, Render, Helpers
14
13
 
15
14
  def self.included(base)
16
15
  if base.respond_to?(:before_action)
17
- base.before_action :set_response_url, :set_request_method_cookie
16
+ base.before_action :set_response_url
18
17
  base.after_action :abort_xdomain_redirect
19
18
  else
20
- base.before_filter :set_response_url, :set_request_method_cookie
19
+ base.before_filter :set_response_url
21
20
  base.after_filter :abort_xdomain_redirect
22
21
  end
23
22
 
@@ -23,7 +23,7 @@ class <%= plural_table_name.camelize %>Edit extends React.Component {
23
23
  contentType: 'application/json'
24
24
  }
25
25
 
26
- this.props.delInPage({pathQuery: this.props.pathQuery, keypath: 'errors'})
26
+ this.props.delInPage({pageKey: this.props.pageKey, keypath: 'errors'})
27
27
  return this.props.visit('/<%= plural_table_name %>/' + this.props.id, options).then((rsp) => {
28
28
  if (this.props.errors) {
29
29
  throw new SubmissionError({
@@ -39,7 +39,7 @@ class <%= plural_table_name.camelize %>Index extends React.Component {
39
39
  const nav = this.props.navigation
40
40
  this.props.visit(path, {method}).then((rsp)=>{
41
41
  if (rsp.canNavigate) {
42
- return nav.navigate(rsp.screen, {pathQuery: rsp.pathQuery})
42
+ return nav.navigate(rsp.screen, {pageKey: rsp.pageKey})
43
43
  } else {
44
44
  // There can only be one visit at a time, if `canNavigate`
45
45
  // is false, then this request is being ignored for a more
@@ -23,7 +23,7 @@ class <%= plural_table_name.camelize %>New extends React.Component {
23
23
  contentType: 'application/json'
24
24
  }
25
25
 
26
- this.props.delInPage({pathQuery: this.props.pathQuery, keypath: 'errors'})
26
+ this.props.delInPage({pageKey: this.props.pageKey, keypath: 'errors'})
27
27
  return this.props.visit('/<%= plural_table_name %>', options).then((rsp) => {
28
28
  if (this.props.errors) {
29
29
  throw new SubmissionError({
@@ -16,7 +16,7 @@ export default class extends React.Component {
16
16
  }
17
17
 
18
18
  if (rsp.canNavigate) {
19
- return this.props.navigateTo(rsp.screen, rsp.pathQuery)
19
+ return this.props.navigateTo(rsp.screen, rsp.pageKey)
20
20
  } else {
21
21
  // There can only be one visit at a time, if `canNavigate`
22
22
  // is false, then this request is being ignored for a more
@@ -49,7 +49,7 @@ export default class extends React.Component {
49
49
  //Uncomment this if you want full-page reloads
50
50
  // window.location = rsp.url
51
51
 
52
- return this.props.navigateTo(rsp.screen, rsp.pathQuery)
52
+ return this.props.navigateTo(rsp.screen, rsp.pageKey)
53
53
  } else {
54
54
  // There can only ve one visit at a time, if `canNavigate`
55
55
  // is false, then this request is being ignored for a more
@@ -7,7 +7,7 @@ import <%= plural_table_name.camelize %>Form from 'components/<%= plural_table_n
7
7
 
8
8
  class <%= plural_table_name.camelize %>Edit extends BaseScreen {
9
9
  handleSubmit (body) {
10
- this.props.delInPage({pathQuery: this.props.pathQuery, keypath: 'errors'})
10
+ this.props.delInPage({pageKey: this.props.pageKey, keypath: 'errors'})
11
11
  return super.handleSubmit('/<%= plural_table_name %>/' + this.props.id, body, 'PATCH')
12
12
  }
13
13
 
@@ -7,7 +7,7 @@ import <%= plural_table_name.camelize %>Form from 'components/<%= plural_table_n
7
7
 
8
8
  class <%= plural_table_name.camelize %>New extends BaseScreen {
9
9
  handleSubmit(body) {
10
- this.props.delInPage({pathQuery: this.props.pathQuery, keypath: 'errors'})
10
+ this.props.delInPage({pageKey: this.props.pageKey, keypath: 'errors'})
11
11
  return super.handleSubmit('/<%= plural_table_name %>', body, 'POST')
12
12
  }
13
13
 
@@ -63,14 +63,14 @@ store.dispatch({type: 'BREEZY_SET_BASE_URL', baseUrl})
63
63
  window.store = store
64
64
  const Nav = StackNavigator(navMapping, {
65
65
  initialRouteName: initialPage.screen,
66
- initialRouteParams: {pathQuery: initialPath},
66
+ initialRouteParams: {pageKey: initialPath},
67
67
  headerMode: 'none',
68
68
  })
69
69
 
70
70
  export default class extends React.Component {
71
71
  render() {
72
72
  return <Provider store={store}>
73
- <Nav pathQuery={initialPath}/>
73
+ <Nav pageKey={initialPath}/>
74
74
  </Provider>
75
75
  }
76
76
  }
@@ -0,0 +1,4 @@
1
+ Breezy.configure do |config|
2
+ config.track_sprockets_assets = ['application.js', 'application.css']
3
+ config.track_pack_assets = ['application.js']
4
+ end
data/lib/install/web.rb CHANGED
@@ -60,6 +60,9 @@ end
60
60
  say "Copying application.js file to #{Webpacker.config.source_entry_path}"
61
61
  copy_file "#{__dir__}/templates/web/application.js", "#{Webpacker.config.source_entry_path}/application.js"
62
62
 
63
+ say "Copying Breezy initializer"
64
+ copy_file "#{__dir__}/templates/web/initializer.rb", "config/initializers/breezy.rb"
65
+
63
66
  say "Appending js tags to your application.html.erb"
64
67
  append_js_tags
65
68
 
@@ -25,21 +25,13 @@ namespace :breezy do
25
25
  desc "Install everything needed for breezy web"
26
26
  task 'web' => ["breezy:verify_webpacker", "webpacker:verify_install"] do
27
27
  template = File.expand_path("../install/web.rb", __dir__)
28
- if Rails::VERSION::MAJOR >= 5
29
- exec "#{RbConfig.ruby} ./bin/rails app:template LOCATION=#{template}"
30
- else
31
- exec "#{RbConfig.ruby} ./bin/rake rails:template LOCATION=#{template}"
32
- end
28
+ exec "#{RbConfig.ruby} ./bin/rails app:template LOCATION=#{template}"
33
29
  end
34
30
 
35
31
  desc "Install everything needed for breezy mobile"
36
32
  task 'mobile' => ["breezy:verify_yarn"] do
37
33
  template = File.expand_path("../install/mobile.rb", __dir__)
38
- if Rails::VERSION::MAJOR >= 5
39
- exec "#{RbConfig.ruby} ./bin/rails app:template LOCATION=#{template}"
40
- else
41
- exec "#{RbConfig.ruby} ./bin/rake rails:template LOCATION=#{template}"
42
- end
34
+ exec "#{RbConfig.ruby} ./bin/rails app:template LOCATION=#{template}"
43
35
  end
44
36
  end
45
37
  end
data/test/breezy_test.rb CHANGED
@@ -54,49 +54,46 @@ class BreezyTest < ActionController::TestCase
54
54
  end
55
55
 
56
56
  test "redirect to back uses xhr referer when available" do
57
+ @request.env['HTTP_X_REQUESTED_WITH'] = 'XMLHttpRequest'
58
+ @request.headers['X-BREEZY-REQUEST'] = 't'
59
+
57
60
  @request.env['HTTP_REFERER'] = 'http://test.host/referer'
58
61
  get :redirect_to_back
59
- assert_redirected_to 'http://test.host/referer'
62
+ assert_response :ok
63
+ assert_equal @response.headers['X-BREEZY-LOCATION'], 'http://test.host/referer'
60
64
 
61
- @request.env['HTTP_X_XHR_REFERER'] = 'http://test.host/xhr-referer'
65
+ @request.env['HTTP_X_XHR_REFERER'] = 'http://test.host/referer'
62
66
  get :redirect_to_back
63
- assert_redirected_to 'http://test.host/xhr-referer'
67
+ assert_response :ok
68
+ assert_equal @response.headers['X-BREEZY-LOCATION'], 'http://test.host/referer'
64
69
  end
65
70
 
66
- test "sets request method cookie on non get requests" do
67
- post :simple_action
68
- assert_equal 'POST', cookies[:request_method]
69
- put :simple_action
70
- assert_equal 'PUT', cookies[:request_method]
71
- end
71
+ test "sets X-BREEZY-LOCATION header on redirect requests coming from breezy" do
72
+ @request.env['HTTP_X_REQUESTED_WITH'] = 'XMLHttpRequest'
73
+ @request.headers['X-BREEZY-REQUEST'] = 't'
72
74
 
73
- test "pops request method cookie on get request" do
74
- cookies[:request_method] = 'TEST'
75
- get :simple_action
76
- assert_nil cookies[:request_method]
77
- end
78
-
79
- test "sets xhr redirected to header on redirect requests coming from breezy" do
80
75
  get :redirect_to_same_origin
81
76
  get :simple_action
82
- assert_nil @response.headers['X-XHR-Redirected-To']
77
+ assert_nil @response.headers['X-BREEZY-LOCATION']
83
78
 
84
79
  @request.env['HTTP_X_XHR_REFERER'] = 'http://test.host/'
85
80
  get :redirect_to_same_origin
86
- @request.env['HTTP_X_XHR_REFERER'] = nil
87
- get :simple_action
88
- assert_equal 'http://test.host/path', @response.headers['X-XHR-Redirected-To']
81
+ assert_equal 'http://test.host/path', @response.headers['X-BREEZY-LOCATION']
89
82
  end
90
83
 
91
84
  test "changes status to 403 on breezy requests redirecting to different origin" do
85
+ @request.env['HTTP_X_REQUESTED_WITH'] = 'XMLHttpRequest'
86
+ @request.headers['X-BREEZY-REQUEST'] = 't'
87
+
92
88
  get :redirect_to_different_host
93
- assert_response :redirect
89
+ assert_response :ok
90
+ assert @response.headers['X-BREEZY-LOCATION']
94
91
 
95
92
  get :redirect_to_different_protocol
96
- assert_response :redirect
93
+ assert_response :ok
94
+ assert @response.headers['X-BREEZY-LOCATION']
97
95
 
98
96
  @request.env['HTTP_X_XHR_REFERER'] = 'http://test.host'
99
-
100
97
  get :redirect_to_different_host
101
98
  assert_response :forbidden
102
99
 
@@ -104,68 +101,25 @@ class BreezyTest < ActionController::TestCase
104
101
  assert_response :forbidden
105
102
 
106
103
  get :redirect_to_same_origin
107
- assert_response :redirect
104
+ assert_response :ok
105
+ assert @response.headers['X-BREEZY-LOCATION']
108
106
  end
109
107
 
110
108
  test "handles invalid xhr referer on redirection" do
109
+ @request.env['HTTP_X_REQUESTED_WITH'] = 'XMLHttpRequest'
110
+ @request.headers['X-BREEZY-REQUEST'] = 't'
111
111
  @request.env['HTTP_X_XHR_REFERER'] = ':'
112
112
  get :redirect_to_same_origin
113
- assert_response :redirect
113
+ assert_response :ok
114
+ assert @response.headers['X-BREEZY-LOCATION']
114
115
  end
115
116
 
116
117
  test "handles unescaped same origin location on redirection" do
118
+ @request.env['HTTP_X_REQUESTED_WITH'] = 'XMLHttpRequest'
119
+ @request.headers['X-BREEZY-REQUEST'] = 't'
117
120
  @request.env['HTTP_X_XHR_REFERER'] = 'http://test.host/'
118
121
  get :redirect_to_unescaped_path
119
- assert_response :redirect
120
- end
121
-
122
- test "handles unescaped different origin location on redirection" do
123
- @request.env['HTTP_X_XHR_REFERER'] = 'https://test.host/'
124
- get :redirect_to_unescaped_path
125
- assert_response :forbidden
126
- end
127
- end
128
-
129
- class BreezyIntegrationTest < ActionDispatch::IntegrationTest
130
- setup do
131
- @session = open_session
132
- end
133
-
134
- test "sets xhr redirected to header on redirect requests coming from breezy" do
135
- get '/redirect_hash'
136
- get response.location
137
- assert_nil response.headers['X-XHR-Redirected-To']
138
-
139
- if Rails.version >= '5.0'
140
- get '/redirect_hash', headers: { 'HTTP_X_XHR_REFERER' => 'http://www.example.com/' }
141
- else
142
- get '/redirect_hash', nil, { 'HTTP_X_XHR_REFERER' => 'http://www.example.com/' }
143
- end
144
- assert_response :redirect
145
- assert_nil response.headers['X-XHR-Redirected-To']
146
-
147
- if Rails.version >= '5.0'
148
- get response.location, headers: { 'HTTP_X_XHR_REFERER' => nil }
149
- else
150
- get response.location, nil, { 'HTTP_X_XHR_REFERER' => nil }
151
- end
152
- assert_equal 'http://www.example.com/breezy/simple_action', response.headers['X-XHR-Redirected-To']
153
- assert_response :ok
154
-
155
- if Rails.version >= '5.0'
156
- get '/redirect_path', headers: { 'HTTP_X_XHR_REFERER' => 'http://www.example.com/' }
157
- else
158
- get '/redirect_path', nil, { 'HTTP_X_XHR_REFERER' => 'http://www.example.com/' }
159
- end
160
- assert_response :redirect
161
- assert_nil response.headers['X-XHR-Redirected-To']
162
-
163
- if Rails.version >= '5.0'
164
- get response.location, headers: { 'HTTP_X_XHR_REFERER' => nil }
165
- else
166
- get response.location, nil, { 'HTTP_X_XHR_REFERER' => nil }
167
- end
168
- assert_equal 'http://www.example.com/breezy/simple_action', response.headers['X-XHR-Redirected-To']
169
122
  assert_response :ok
123
+ assert @response.headers['X-BREEZY-LOCATION']
170
124
  end
171
125
  end
@@ -14,16 +14,23 @@ class ConfigurationTest < ActiveSupport::TestCase
14
14
  Breezy.configure do |config|
15
15
  end
16
16
 
17
- track_assets = ['application.js', 'application.css']
18
- assert_equal track_assets, Breezy.configuration.track_assets
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
19
22
  end
20
23
 
21
24
  test 'configuration with track_assets specified' do
22
25
  Breezy.configure do |config|
23
- config.track_assets = ['app.js']
26
+ config.track_sprockets_assets = ['app.js']
27
+ config.track_pack_assets = ['pack.js']
24
28
  end
25
29
 
26
- default_track_assets = ['app.js']
27
- assert_equal default_track_assets, Breezy.configuration.track_assets
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
28
35
  end
29
36
  end
data/test/render_test.rb CHANGED
@@ -44,11 +44,13 @@ class RenderTest < ActionController::TestCase
44
44
 
45
45
 
46
46
  setup do
47
- Breezy.configuration.track_assets = ['app.js']
47
+ Breezy.configuration.track_sprockets_assets = ['app.js']
48
+ Breezy.configuration.track_pack_assets = ['app.js']
48
49
  end
49
50
 
50
51
  teardown do
51
- Breezy.configuration.track_assets = []
52
+ Breezy.configuration.track_sprockets_assets = []
53
+ Breezy.configuration.track_pack_assets = []
52
54
  end
53
55
 
54
56
  test "render action via get" do
metadata CHANGED
@@ -1,35 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: breezy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Johny Ho
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-06 00:00:00.000000000 Z
11
+ date: 2018-05-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionpack
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "<"
18
- - !ruby/object:Gem::Version
19
- version: '6.0'
20
17
  - - ">="
21
18
  - !ruby/object:Gem::Version
22
- version: '4.0'
19
+ version: '5.0'
23
20
  type: :runtime
24
21
  prerelease: false
25
22
  version_requirements: !ruby/object:Gem::Requirement
26
23
  requirements:
27
- - - "<"
28
- - !ruby/object:Gem::Version
29
- version: '6.0'
30
24
  - - ">="
31
25
  - !ruby/object:Gem::Version
32
- version: '4.0'
26
+ version: '5.0'
33
27
  - !ruby/object:Gem::Dependency
34
28
  name: breezy_template
35
29
  requirement: !ruby/object:Gem::Requirement
@@ -62,44 +56,86 @@ dependencies:
62
56
  name: rake
63
57
  requirement: !ruby/object:Gem::Requirement
64
58
  requirements:
65
- - - ">="
59
+ - - "~>"
66
60
  - !ruby/object:Gem::Version
67
- version: '0'
61
+ version: '12.0'
68
62
  type: :development
69
63
  prerelease: false
70
64
  version_requirements: !ruby/object:Gem::Requirement
71
65
  requirements:
72
- - - ">="
66
+ - - "~>"
73
67
  - !ruby/object:Gem::Version
74
- version: '0'
68
+ version: '12.0'
75
69
  - !ruby/object:Gem::Dependency
76
- name: mocha
70
+ name: byebug
77
71
  requirement: !ruby/object:Gem::Requirement
78
72
  requirements:
79
- - - ">="
73
+ - - "~>"
80
74
  - !ruby/object:Gem::Version
81
- version: '0'
75
+ version: '9.0'
82
76
  type: :development
83
77
  prerelease: false
84
78
  version_requirements: !ruby/object:Gem::Requirement
85
79
  requirements:
86
- - - ">="
80
+ - - "~>"
87
81
  - !ruby/object:Gem::Version
88
- version: '0'
82
+ version: '9.0'
89
83
  - !ruby/object:Gem::Dependency
90
84
  name: sqlite3
91
85
  requirement: !ruby/object:Gem::Requirement
92
86
  requirements:
93
- - - ">="
87
+ - - "~>"
94
88
  - !ruby/object:Gem::Version
95
- version: '0'
89
+ version: '1.3'
96
90
  type: :development
97
91
  prerelease: false
98
92
  version_requirements: !ruby/object:Gem::Requirement
99
93
  requirements:
100
- - - ">="
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '1.3'
97
+ - !ruby/object:Gem::Dependency
98
+ name: minitest
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '5.10'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '5.10'
111
+ - !ruby/object:Gem::Dependency
112
+ name: capybara
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: '3.0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: '3.0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: selenium-webdriver
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: '3.11'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
101
137
  - !ruby/object:Gem::Version
102
- version: '0'
138
+ version: '3.11'
103
139
  description: Rails integration for BreezyJS
104
140
  email: jho406@gmail.com
105
141
  executables: []
@@ -109,7 +145,6 @@ files:
109
145
  - app/views/breezy/response.html.erb
110
146
  - lib/breezy.rb
111
147
  - lib/breezy/configuration.rb
112
- - lib/breezy/cookies.rb
113
148
  - lib/breezy/helpers.rb
114
149
  - lib/breezy/render.rb
115
150
  - lib/breezy/version.rb
@@ -147,6 +182,7 @@ files:
147
182
  - lib/install/templates/mobile/rn-cli.config.js
148
183
  - lib/install/templates/web/application.js
149
184
  - lib/install/templates/web/babelrc
185
+ - lib/install/templates/web/initializer.rb
150
186
  - lib/install/web.rb
151
187
  - lib/tasks/install.rake
152
188
  - test/breezy_test.rb
@@ -1,15 +0,0 @@
1
- module Breezy
2
- # For non-GET requests, sets a request_method cookie containing
3
- # the request method of the current request. The Breezy script
4
- # will not initialize if this cookie is set.
5
- module Cookies
6
- private
7
- def set_request_method_cookie
8
- if request.get?
9
- cookies.delete(:request_method)
10
- else
11
- cookies[:request_method] = request.request_method
12
- end
13
- end
14
- end
15
- end