volt 0.8.15 → 0.8.16

Sign up to get free protection for your applications and to get access to all the features.
Files changed (162) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +11 -0
  3. data/CHANGELOG.md +11 -0
  4. data/Gemfile +1 -1
  5. data/Guardfile +2 -3
  6. data/Rakefile +1 -4
  7. data/VERSION +1 -1
  8. data/app/volt/controllers/notices_controller.rb +1 -1
  9. data/app/volt/tasks/live_query/data_store.rb +7 -7
  10. data/app/volt/tasks/live_query/live_query.rb +7 -9
  11. data/app/volt/tasks/live_query/live_query_pool.rb +13 -12
  12. data/app/volt/tasks/live_query/query_tracker.rb +4 -5
  13. data/app/volt/tasks/query_tasks.rb +9 -11
  14. data/app/volt/tasks/store_tasks.rb +4 -4
  15. data/app/volt/tasks/user_tasks.rb +1 -1
  16. data/bin/volt +2 -2
  17. data/lib/volt.rb +3 -7
  18. data/lib/volt/assets/test.rb +1 -2
  19. data/lib/volt/benchmark/benchmark.rb +3 -3
  20. data/lib/volt/boot.rb +1 -1
  21. data/lib/volt/cli.rb +18 -18
  22. data/lib/volt/cli/asset_compile.rb +8 -10
  23. data/lib/volt/cli/generate.rb +9 -11
  24. data/lib/volt/cli/new_gem.rb +51 -51
  25. data/lib/volt/config.rb +2 -3
  26. data/lib/volt/console.rb +1 -1
  27. data/lib/volt/controllers/model_controller.rb +6 -6
  28. data/lib/volt/data_stores/data_store.rb +1 -1
  29. data/lib/volt/data_stores/mongo_driver.rb +1 -1
  30. data/lib/volt/extra_core/array.rb +2 -2
  31. data/lib/volt/extra_core/blank.rb +1 -2
  32. data/lib/volt/extra_core/extra_core.rb +1 -1
  33. data/lib/volt/extra_core/inflector/methods.rb +0 -1
  34. data/lib/volt/extra_core/logger.rb +13 -7
  35. data/lib/volt/extra_core/numeric.rb +1 -1
  36. data/lib/volt/extra_core/string.rb +7 -7
  37. data/lib/volt/extra_core/stringify_keys.rb +5 -5
  38. data/lib/volt/models.rb +2 -2
  39. data/lib/volt/models/array_model.rb +18 -19
  40. data/lib/volt/models/cursor.rb +0 -1
  41. data/lib/volt/models/model.rb +17 -35
  42. data/lib/volt/models/model_hash_behaviour.rb +0 -2
  43. data/lib/volt/models/model_state.rb +1 -1
  44. data/lib/volt/models/model_wrapper.rb +1 -1
  45. data/lib/volt/models/persistors/array_store.rb +26 -13
  46. data/lib/volt/models/persistors/base.rb +1 -1
  47. data/lib/volt/models/persistors/flash.rb +2 -2
  48. data/lib/volt/models/persistors/local_store.rb +2 -3
  49. data/lib/volt/models/persistors/model_store.rb +7 -6
  50. data/lib/volt/models/persistors/params.rb +2 -2
  51. data/lib/volt/models/persistors/query/query_listener.rb +2 -0
  52. data/lib/volt/models/persistors/query/query_listener_pool.rb +1 -1
  53. data/lib/volt/models/persistors/store.rb +1 -2
  54. data/lib/volt/models/persistors/store_state.rb +2 -3
  55. data/lib/volt/models/url.rb +17 -16
  56. data/lib/volt/models/validations.rb +11 -14
  57. data/lib/volt/models/validators/length_validator.rb +3 -3
  58. data/lib/volt/models/validators/presence_validator.rb +2 -2
  59. data/lib/volt/page/bindings/attribute_binding.rb +2 -3
  60. data/lib/volt/page/bindings/base_binding.rb +1 -1
  61. data/lib/volt/page/bindings/each_binding.rb +8 -9
  62. data/lib/volt/page/bindings/event_binding.rb +2 -3
  63. data/lib/volt/page/bindings/template_binding.rb +8 -7
  64. data/lib/volt/page/bindings/template_binding/grouped_controllers.rb +2 -1
  65. data/lib/volt/page/channel.rb +10 -10
  66. data/lib/volt/page/channel_stub.rb +1 -1
  67. data/lib/volt/page/document.rb +0 -1
  68. data/lib/volt/page/document_events.rb +4 -4
  69. data/lib/volt/page/page.rb +26 -19
  70. data/lib/volt/page/string_template_renderer.rb +2 -2
  71. data/lib/volt/page/sub_context.rb +10 -4
  72. data/lib/volt/page/targets/attribute_section.rb +1 -1
  73. data/lib/volt/page/targets/attribute_target.rb +1 -2
  74. data/lib/volt/page/targets/base_section.rb +4 -4
  75. data/lib/volt/page/targets/binding_document/base_node.rb +0 -1
  76. data/lib/volt/page/targets/binding_document/component_node.rb +4 -5
  77. data/lib/volt/page/targets/dom_section.rb +21 -22
  78. data/lib/volt/page/targets/dom_target.rb +1 -1
  79. data/lib/volt/page/targets/dom_template.rb +11 -12
  80. data/lib/volt/page/targets/helpers/comment_searchers.rb +7 -8
  81. data/lib/volt/page/tasks.rb +0 -1
  82. data/lib/volt/page/template_renderer.rb +1 -1
  83. data/lib/volt/page/url_tracker.rb +3 -3
  84. data/lib/volt/reactive/computation.rb +5 -11
  85. data/lib/volt/reactive/dependency.rb +1 -3
  86. data/lib/volt/reactive/eventable.rb +17 -4
  87. data/lib/volt/reactive/hash_dependency.rb +1 -0
  88. data/lib/volt/reactive/reactive_accessors.rb +0 -1
  89. data/lib/volt/reactive/reactive_array.rb +20 -25
  90. data/lib/volt/reactive/reactive_hash.rb +3 -3
  91. data/lib/volt/router/routes.rb +11 -13
  92. data/lib/volt/server.rb +17 -17
  93. data/lib/volt/server/component_handler.rb +2 -2
  94. data/lib/volt/server/component_templates.rb +8 -8
  95. data/lib/volt/server/html_parser/attribute_scope.rb +9 -10
  96. data/lib/volt/server/html_parser/if_view_scope.rb +2 -2
  97. data/lib/volt/server/html_parser/sandlebars_parser.rb +14 -14
  98. data/lib/volt/server/html_parser/textarea_scope.rb +1 -2
  99. data/lib/volt/server/html_parser/view_handler.rb +1 -1
  100. data/lib/volt/server/html_parser/view_parser.rb +1 -1
  101. data/lib/volt/server/html_parser/view_scope.rb +10 -10
  102. data/lib/volt/server/rack/asset_files.rb +15 -16
  103. data/lib/volt/server/rack/component_code.rb +2 -2
  104. data/lib/volt/server/rack/component_html_renderer.rb +0 -1
  105. data/lib/volt/server/rack/component_paths.rb +13 -10
  106. data/lib/volt/server/rack/index_files.rb +4 -4
  107. data/lib/volt/server/rack/opal_files.rb +4 -5
  108. data/lib/volt/server/rack/source_map_server.rb +3 -3
  109. data/lib/volt/server/socket_connection_handler.rb +3 -4
  110. data/lib/volt/server/socket_connection_handler_stub.rb +1 -1
  111. data/lib/volt/spec/setup.rb +3 -3
  112. data/lib/volt/store/mongo.rb +2 -2
  113. data/lib/volt/tasks/task_handler.rb +3 -3
  114. data/lib/volt/utils/generic_counting_pool.rb +2 -2
  115. data/lib/volt/utils/generic_pool.rb +7 -8
  116. data/lib/volt/utils/local_storage.rb +4 -4
  117. data/lib/volt/volt/environment.rb +1 -1
  118. data/spec/apps/file_loading/app/shared/config/dependencies.rb +1 -1
  119. data/spec/apps/kitchen_sink/Gemfile +0 -2
  120. data/spec/apps/kitchen_sink/app/main/config/routes.rb +5 -5
  121. data/spec/apps/kitchen_sink/app/main/controllers/main_controller.rb +7 -6
  122. data/spec/apps/kitchen_sink/app/main/controllers/todos_controller.rb +3 -4
  123. data/spec/controllers/reactive_accessors_spec.rb +4 -4
  124. data/spec/extra_core/inflector_spec.rb +1 -1
  125. data/spec/extra_core/string_transformation_test_cases.rb +23 -24
  126. data/spec/extra_core/string_transformations_spec.rb +11 -12
  127. data/spec/integration/bindings_spec.rb +15 -15
  128. data/spec/integration/list_spec.rb +12 -13
  129. data/spec/integration/templates_spec.rb +3 -3
  130. data/spec/models/model_spec.rb +74 -80
  131. data/spec/models/persistors/params_spec.rb +2 -2
  132. data/spec/models/persistors/store_spec.rb +4 -4
  133. data/spec/models/validations_spec.rb +14 -23
  134. data/spec/page/bindings/content_binding_spec.rb +7 -8
  135. data/spec/page/bindings/template_binding_spec.rb +22 -24
  136. data/spec/page/sub_context_spec.rb +2 -2
  137. data/spec/reactive/computation_spec.rb +3 -3
  138. data/spec/reactive/reactive_array_spec.rb +12 -12
  139. data/spec/router/routes_spec.rb +45 -48
  140. data/spec/server/html_parser/sandlebars_parser_spec.rb +42 -42
  141. data/spec/server/html_parser/view_parser_spec.rb +132 -153
  142. data/spec/server/rack/asset_files_spec.rb +9 -8
  143. data/spec/server/rack/component_paths_spec.rb +5 -5
  144. data/spec/server/rack/rack_requests_spec.rb +3 -3
  145. data/spec/spec_helper.rb +1 -1
  146. data/spec/tasks/live_query_spec.rb +4 -5
  147. data/spec/tasks/query_tasks.rb +2 -4
  148. data/spec/tasks/query_tracker_spec.rb +29 -29
  149. data/spec/templates/targets/binding_document/component_node_spec.rb +1 -1
  150. data/spec/utils/generic_counting_pool_spec.rb +4 -4
  151. data/spec/utils/generic_pool_spec.rb +12 -12
  152. data/templates/component/config/routes.rb +2 -2
  153. data/templates/component/controllers/main_controller.rb +7 -6
  154. data/templates/newgem/app/newgem/config/dependencies.rb +1 -1
  155. data/templates/newgem/app/newgem/config/routes.rb +1 -1
  156. data/templates/project/app/main/config/routes.rb +2 -2
  157. data/templates/project/app/main/controllers/main_controller.rb +7 -6
  158. data/templates/project/spec/sample_spec.rb +2 -2
  159. data/volt.gemspec +32 -33
  160. metadata +3 -4
  161. data/lib/volt/extra_core/log.rb +0 -56
  162. data/lib/volt/extra_core/try.rb +0 -31
@@ -19,14 +19,14 @@ module Volt
19
19
 
20
20
  item[0] += 1
21
21
 
22
- return item[1]
22
+ item[1]
23
23
  end
24
24
 
25
25
  # Lookups an item
26
26
  def lookup(*args, &block)
27
27
  item = super(*args, &block)
28
28
 
29
- return item[1]
29
+ item[1]
30
30
  end
31
31
 
32
32
  def transform_item(item)
@@ -21,12 +21,11 @@ module Volt
21
21
 
22
22
  # TODO: This is to work around opal issue #500
23
23
  if RUBY_PLATFORM == 'opal'
24
- args.pop if args.last == nil
24
+ args.pop if args.last.nil?
25
25
  end
26
26
 
27
-
28
27
  args.each_with_index do |arg, index|
29
- last = (args.size-1) == index
28
+ last = (args.size - 1) == index
30
29
 
31
30
  if last
32
31
  # return, creating if needed
@@ -48,7 +47,7 @@ module Volt
48
47
  new_item = create(*args)
49
48
  end
50
49
 
51
- return transform_item(new_item)
50
+ transform_item(new_item)
52
51
  end
53
52
 
54
53
  # Allow other pools to override how the created item gets stored.
@@ -77,19 +76,19 @@ module Volt
77
76
  args.each_with_index do |arg, index|
78
77
  stack << section
79
78
 
80
- if args.size-1 == index
79
+ if args.size - 1 == index
81
80
  section.delete(arg)
82
81
  else
83
82
  section = section[arg]
84
83
  end
85
84
  end
86
85
 
87
- (stack.size-1).downto(1) do |index|
86
+ (stack.size - 1).downto(1) do |index|
88
87
  node = stack[index]
89
- parent = stack[index-1]
88
+ parent = stack[index - 1]
90
89
 
91
90
  if node.size == 0
92
- parent.delete(args[index-1])
91
+ parent.delete(args[index - 1])
93
92
  end
94
93
  end
95
94
  end
@@ -2,10 +2,10 @@ if RUBY_PLATFORM == 'opal'
2
2
  module Volt
3
3
  module LocalStorage
4
4
  def self.[](key)
5
- %x{
5
+ `
6
6
  var val = localStorage.getItem(key);
7
7
  return val === null ? nil : val;
8
- }
8
+ `
9
9
  end
10
10
 
11
11
  def self.[]=(key, value)
@@ -18,11 +18,11 @@ if RUBY_PLATFORM == 'opal'
18
18
  end
19
19
 
20
20
  def self.delete(key)
21
- %x{
21
+ `
22
22
  var val = localStorage.getItem(key);
23
23
  localStorage.removeItem(key);
24
24
  return val === null ? nil : val;
25
- }
25
+ `
26
26
  end
27
27
  end
28
28
  end
@@ -7,7 +7,7 @@ module Volt
7
7
  if RUBY_PLATFORM == 'opal'
8
8
  unless @env
9
9
  `if (window.start_env) {`
10
- @env = `window.start_env`
10
+ @env = `window.start_env`
11
11
  `}`
12
12
  end
13
13
  end
@@ -1 +1 @@
1
- component 'bootstrap'
1
+ component 'bootstrap'
@@ -10,7 +10,6 @@ gem 'volt-bootstrap'
10
10
  # Simple theme for bootstrap, remove to theme yourself.
11
11
  gem 'volt-bootstrap-jumbotron-theme'
12
12
 
13
-
14
13
  # Server for MRI
15
14
  platform :mri do
16
15
  gem 'thin', '~> 1.6.0'
@@ -22,7 +21,6 @@ platform :jruby do
22
21
  gem 'jubilee'
23
22
  end
24
23
 
25
-
26
24
  #---------------------
27
25
  # Needed at the moment
28
26
  gem 'volt-sockjs', require: false, platforms: :mri
@@ -1,9 +1,9 @@
1
1
  # See https://github.com/voltrb/volt#routes for more info on routes
2
2
 
3
- get "/bindings/{{_route_test}}", _action: 'bindings'
4
- get "/bindings", _action: 'bindings'
5
- get "/store", _action: 'store'
6
- get "/todos", _controller: 'todos'
3
+ get '/bindings/{{_route_test}}', _action: 'bindings'
4
+ get '/bindings', _action: 'bindings'
5
+ get '/store', _action: 'store'
6
+ get '/todos', _controller: 'todos'
7
7
 
8
8
  # The main route, this should be last. It will match any params not previously matched.
9
- get '/', {}
9
+ get '/', {}
@@ -2,10 +2,11 @@ class MainController < Volt::ModelController
2
2
  model :page
3
3
 
4
4
  private
5
- # the main template contains a #template binding that shows another
6
- # template. This is the path to that template. It may change based
7
- # on the params._controller and params._action values.
8
- def main_path
9
- params._controller.or('main') + "/" + params._action.or('index')
10
- end
5
+
6
+ # the main template contains a #template binding that shows another
7
+ # template. This is the path to that template. It may change based
8
+ # on the params._controller and params._action values.
9
+ def main_path
10
+ params._controller.or('main') + '/' + params._action.or('index')
11
+ end
11
12
  end
@@ -2,16 +2,15 @@ class TodosController < Volt::ModelController
2
2
  model :page
3
3
 
4
4
  def add_todo
5
- self._todos << {name: self._new_todo}
5
+ _todos << { name: _new_todo }
6
6
  self._new_todo = ''
7
7
  end
8
8
 
9
9
  def remove_todo(todo)
10
- self._todos.delete(todo)
10
+ _todos.delete(todo)
11
11
  end
12
12
 
13
13
  def completed
14
- self._todos.count {|t| t._completed }
14
+ _todos.count(&:_completed)
15
15
  end
16
-
17
16
  end
@@ -8,14 +8,14 @@ class TestReactiveAccessors
8
8
  end
9
9
 
10
10
  describe Volt::ReactiveAccessors do
11
- it "should assign a reactive value" do
11
+ it 'should assign a reactive value' do
12
12
  inst = TestReactiveAccessors.new
13
13
 
14
14
  inst._name = 'Ryan'
15
15
  expect(inst._name).to eq('Ryan')
16
16
  end
17
17
 
18
- it "should start nil" do
18
+ it 'should start nil' do
19
19
  inst = TestReactiveAccessors.new
20
20
 
21
21
  expect(inst._name).to eq(nil)
@@ -31,10 +31,10 @@ describe Volt::ReactiveAccessors do
31
31
 
32
32
  inst._name = 'Ryan'
33
33
  Volt::Computation.flush!
34
- expect(values).to eq([nil,'Ryan'])
34
+ expect(values).to eq([nil, 'Ryan'])
35
35
 
36
36
  inst._name = 'Stout'
37
37
  Volt::Computation.flush!
38
- expect(values).to eq([nil,'Ryan','Stout'])
38
+ expect(values).to eq([nil, 'Ryan', 'Stout'])
39
39
  end
40
40
  end
@@ -2,7 +2,7 @@ require 'spec_helper'
2
2
  require 'volt/extra_core/inflector'
3
3
 
4
4
  describe Volt::Inflector do
5
- it "should pluralize correctly" do
5
+ it 'should pluralize correctly' do
6
6
  expect('car'.pluralize).to eq('cars')
7
7
  # expect('database'.pluralize).to eq('database')
8
8
  end
@@ -1,41 +1,40 @@
1
1
  CamelToUnderscore = {
2
- "Product" => "product",
3
- "SpecialGuest" => "special_guest",
4
- "ApplicationController" => "application_controller",
5
- "Area51Controller" => "area51_controller"
2
+ 'Product' => 'product',
3
+ 'SpecialGuest' => 'special_guest',
4
+ 'ApplicationController' => 'application_controller',
5
+ 'Area51Controller' => 'area51_controller'
6
6
  }
7
7
 
8
8
  UnderscoreToLowerCamel = {
9
- "product" => "product",
10
- "special_guest" => "specialGuest",
11
- "application_controller" => "applicationController",
12
- "area51_controller" => "area51Controller"
9
+ 'product' => 'product',
10
+ 'special_guest' => 'specialGuest',
11
+ 'application_controller' => 'applicationController',
12
+ 'area51_controller' => 'area51Controller'
13
13
  }
14
14
 
15
15
  SymbolToLowerCamel = {
16
- :product => 'product',
17
- :special_guest => 'specialGuest',
18
- :application_controller => 'applicationController',
19
- :area51_controller => 'area51Controller'
16
+ product: 'product',
17
+ special_guest: 'specialGuest',
18
+ application_controller: 'applicationController',
19
+ area51_controller: 'area51Controller'
20
20
  }
21
21
 
22
22
  CamelToUnderscoreWithoutReverse = {
23
- "HTMLTidy" => "html_tidy",
24
- "HTMLTidyGenerator" => "html_tidy_generator",
25
- "FreeBSD" => "free_bsd",
26
- "HTML" => "html",
27
- "ForceXMLController" => "force_xml_controller",
23
+ 'HTMLTidy' => 'html_tidy',
24
+ 'HTMLTidyGenerator' => 'html_tidy_generator',
25
+ 'FreeBSD' => 'free_bsd',
26
+ 'HTML' => 'html',
27
+ 'ForceXMLController' => 'force_xml_controller'
28
28
  }
29
29
 
30
30
  CamelWithModuleToUnderscoreWithSlash = {
31
- "Admin::Product" => "admin/product",
32
- "Users::Commission::Department" => "users/commission/department",
33
- "UsersSection::CommissionDepartment" => "users_section/commission_department",
31
+ 'Admin::Product' => 'admin/product',
32
+ 'Users::Commission::Department' => 'users/commission/department',
33
+ 'UsersSection::CommissionDepartment' => 'users_section/commission_department'
34
34
  }
35
35
 
36
36
  UnderscoresToDashes = {
37
- "street" => "street",
38
- "street_address" => "street-address",
39
- "person_street_address" => "person-street-address"
37
+ 'street' => 'street',
38
+ 'street_address' => 'street-address',
39
+ 'person_street_address' => 'person-street-address'
40
40
  }
41
-
@@ -3,47 +3,46 @@ require 'spec_helper'
3
3
  require 'extra_core/string_transformation_test_cases'
4
4
  require 'volt/extra_core/string'
5
5
 
6
- describe "#camelize" do
6
+ describe '#camelize' do
7
7
  CamelToUnderscore.each do |camel, underscore|
8
- it "camelizes" do
8
+ it 'camelizes' do
9
9
  expect(underscore.camelize).to eq(camel)
10
10
  end
11
11
  end
12
12
 
13
- it "camelizes lower" do
13
+ it 'camelizes lower' do
14
14
  expect('capital_city'.camelize(:lower)).to eq('capitalCity')
15
15
  end
16
16
 
17
- it "camelizes upper" do
17
+ it 'camelizes upper' do
18
18
  expect('capital_city'.camelize(:upper)).to eq('CapitalCity')
19
19
  end
20
20
 
21
- it "camelizes upper default" do
21
+ it 'camelizes upper default' do
22
22
  expect('capital_city'.camelize).to eq('CapitalCity')
23
23
  end
24
24
 
25
25
  UnderscoreToLowerCamel.each do |underscored, lower_camel|
26
- it "camelizes lower" do
26
+ it 'camelizes lower' do
27
27
  expect(underscored.camelize(:lower)).to eq(lower_camel)
28
28
  end
29
29
  end
30
30
 
31
31
  UnderscoresToDashes.each do |underscored, dasherized|
32
- it "dasherizes" do
32
+ it 'dasherizes' do
33
33
  expect(underscored.dasherize).to eq(dasherized)
34
34
  end
35
35
  end
36
36
 
37
37
  CamelToUnderscore.each do |camel, underscore|
38
- it "underscores" do
38
+ it 'underscores' do
39
39
  expect(camel.underscore).to eq(underscore)
40
40
  end
41
41
  end
42
42
 
43
- it "underscores acronyms" do
44
- expect("HTMLTidy".underscore).to eq("html_tidy")
45
- expect("HTMLTidyGenerator".underscore).to eq("html_tidy_generator")
43
+ it 'underscores acronyms' do
44
+ expect('HTMLTidy'.underscore).to eq('html_tidy')
45
+ expect('HTMLTidyGenerator'.underscore).to eq('html_tidy_generator')
46
46
  end
47
47
 
48
48
  end
49
-
@@ -1,26 +1,26 @@
1
1
  if ENV['BROWSER']
2
2
  require 'spec_helper'
3
3
 
4
- describe "bindings test", :type => :feature do
5
- it "should load the page" do
4
+ describe 'bindings test', type: :feature do
5
+ it 'should load the page' do
6
6
  visit '/'
7
7
 
8
8
  expect(page).to have_content('Kitchen Sink')
9
9
  end
10
10
 
11
- describe "text/fields" do
11
+ describe 'text/fields' do
12
12
  it 'should load the bindings page and update bindings' do
13
13
  visit '/'
14
14
 
15
15
  click_link 'Bindings'
16
16
 
17
17
  # Fill in one field and see if it updates the rest
18
- fill_in('pageName1', :with => 'Page bindings')
18
+ fill_in('pageName1', with: 'Page bindings')
19
19
  expect(find('#pageName1').value).to eq('Page bindings')
20
20
  expect(find('#pageName2').value).to eq('Page bindings')
21
21
  expect(find('#pageName3')).to have_content('Page bindings')
22
22
 
23
- fill_in('pageName2', :with => 'Update everywhere')
23
+ fill_in('pageName2', with: 'Update everywhere')
24
24
  expect(find('#pageName1').value).to eq('Update everywhere')
25
25
  expect(find('#pageName2').value).to eq('Update everywhere')
26
26
  expect(find('#pageName3')).to have_content('Update everywhere')
@@ -38,12 +38,12 @@ if ENV['BROWSER']
38
38
  end
39
39
 
40
40
  # Fill in one field and see if it updates the rest
41
- fill_in('paramsName1', :with => 'Params bindings')
41
+ fill_in('paramsName1', with: 'Params bindings')
42
42
  expect(find('#paramsName1').value).to eq('Params bindings')
43
43
  expect(find('#paramsName2').value).to eq('Params bindings')
44
44
  expect(find('#paramsName3')).to have_content('Params bindings')
45
45
 
46
- fill_in('paramsName2', :with => 'Update everywhere')
46
+ fill_in('paramsName2', with: 'Update everywhere')
47
47
  expect(find('#paramsName1').value).to eq('Update everywhere')
48
48
  expect(find('#paramsName2').value).to eq('Update everywhere')
49
49
  expect(find('#paramsName3')).to have_content('Update everywhere')
@@ -65,12 +65,12 @@ if ENV['BROWSER']
65
65
  end
66
66
 
67
67
  # Fill in one field and see if it updates the rest
68
- fill_in('routesName1', :with => 'Routes bindings')
68
+ fill_in('routesName1', with: 'Routes bindings')
69
69
  expect(find('#routesName1').value).to eq('Routes bindings')
70
70
  expect(find('#routesName2').value).to eq('Routes bindings')
71
71
  expect(find('#routesName3')).to have_content('Routes bindings')
72
72
 
73
- fill_in('routesName2', :with => 'bound_url')
73
+ fill_in('routesName2', with: 'bound_url')
74
74
  expect(find('#routesName1').value).to eq('bound_url')
75
75
  expect(find('#routesName2').value).to eq('bound_url')
76
76
  expect(find('#routesName3')).to have_content('bound_url')
@@ -93,12 +93,12 @@ if ENV['BROWSER']
93
93
  click_link 'Bindings'
94
94
 
95
95
  # Fill in one field and see if it updates the rest
96
- fill_in('textareaName1', :with => 'Page bindings')
96
+ fill_in('textareaName1', with: 'Page bindings')
97
97
  expect(find('#textareaName1').value).to eq('Page bindings')
98
98
  expect(find('#textareaName2').value).to eq('Page bindings')
99
99
  expect(find('#textareaName3')).to have_content('Page bindings')
100
100
 
101
- fill_in('textareaName2', :with => 'Update everywhere')
101
+ fill_in('textareaName2', with: 'Update everywhere')
102
102
  expect(find('#textareaName1').value).to eq('Update everywhere')
103
103
  expect(find('#textareaName2').value).to eq('Update everywhere')
104
104
  expect(find('#textareaName3')).to have_content('Update everywhere')
@@ -110,12 +110,12 @@ if ENV['BROWSER']
110
110
  click_link 'Bindings'
111
111
 
112
112
  # Fill in one field and see if it updates the rest
113
- fill_in('localstoreName1', :with => 'Page bindings')
113
+ fill_in('localstoreName1', with: 'Page bindings')
114
114
  expect(find('#localstoreName1').value).to eq('Page bindings')
115
115
  expect(find('#localstoreName2').value).to eq('Page bindings')
116
116
  expect(find('#localstoreName3')).to have_content('Page bindings')
117
117
 
118
- fill_in('localstoreName2', :with => 'Update everywhere')
118
+ fill_in('localstoreName2', with: 'Update everywhere')
119
119
  expect(find('#localstoreName1').value).to eq('Update everywhere')
120
120
  expect(find('#localstoreName2').value).to eq('Update everywhere')
121
121
  expect(find('#localstoreName3')).to have_content('Update everywhere')
@@ -143,7 +143,7 @@ if ENV['BROWSER']
143
143
  # end
144
144
  end
145
145
 
146
- describe "check boxes" do
146
+ describe 'check boxes' do
147
147
  it 'should load the bindings page and update checkboxes' do
148
148
  visit '/'
149
149
 
@@ -193,7 +193,7 @@ if ENV['BROWSER']
193
193
  end
194
194
  end
195
195
 
196
- describe "content escaping" do
196
+ describe 'content escaping' do
197
197
  it 'should escape in a tripple stash' do
198
198
  visit '/'
199
199