volt 0.9.1 → 0.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +56 -0
  3. data/CHANGELOG.md +4 -0
  4. data/Rakefile +0 -1
  5. data/app/volt/models/user.rb +1 -3
  6. data/app/volt/tasks/live_query/live_query.rb +1 -1
  7. data/app/volt/tasks/store_tasks.rb +4 -5
  8. data/app/volt/tasks/user_tasks.rb +1 -1
  9. data/lib/volt.rb +2 -6
  10. data/lib/volt/boot.rb +0 -2
  11. data/lib/volt/cli.rb +0 -1
  12. data/lib/volt/cli/asset_compile.rb +0 -2
  13. data/lib/volt/cli/console.rb +3 -4
  14. data/lib/volt/cli/generate.rb +3 -4
  15. data/lib/volt/cli/new_gem.rb +1 -3
  16. data/lib/volt/controllers/actions.rb +6 -6
  17. data/lib/volt/controllers/model_controller.rb +4 -8
  18. data/lib/volt/data_stores/base.rb +1 -2
  19. data/lib/volt/data_stores/data_store.rb +2 -2
  20. data/lib/volt/data_stores/mongo_driver.rb +3 -3
  21. data/lib/volt/extra_core/hash.rb +1 -1
  22. data/lib/volt/extra_core/inflector/inflections.rb +10 -2
  23. data/lib/volt/extra_core/logger.rb +1 -4
  24. data/lib/volt/extra_core/object.rb +1 -1
  25. data/lib/volt/models.rb +2 -4
  26. data/lib/volt/models/array_model.rb +3 -7
  27. data/lib/volt/models/associations.rb +5 -4
  28. data/lib/volt/models/buffer.rb +1 -2
  29. data/lib/volt/models/dirty.rb +2 -2
  30. data/lib/volt/models/errors.rb +1 -1
  31. data/lib/volt/models/listener_tracker.rb +1 -3
  32. data/lib/volt/models/model.rb +16 -20
  33. data/lib/volt/models/permissions.rb +15 -18
  34. data/lib/volt/models/persistors/array_store.rb +5 -10
  35. data/lib/volt/models/persistors/cookies.rb +2 -2
  36. data/lib/volt/models/persistors/model_store.rb +3 -9
  37. data/lib/volt/models/persistors/params.rb +1 -3
  38. data/lib/volt/models/persistors/query/normalizer.rb +3 -3
  39. data/lib/volt/models/persistors/query/query_listener.rb +1 -1
  40. data/lib/volt/models/persistors/store.rb +2 -2
  41. data/lib/volt/models/state_helpers.rb +1 -1
  42. data/lib/volt/models/state_manager.rb +4 -4
  43. data/lib/volt/models/url.rb +2 -6
  44. data/lib/volt/models/validations.rb +8 -13
  45. data/lib/volt/models/validators/numericality_validator.rb +2 -6
  46. data/lib/volt/models/validators/unique_validator.rb +1 -1
  47. data/lib/volt/models/validators/user_validation.rb +0 -1
  48. data/lib/volt/page/bindings/attribute_binding.rb +9 -19
  49. data/lib/volt/page/bindings/content_binding.rb +1 -1
  50. data/lib/volt/page/bindings/each_binding.rb +3 -4
  51. data/lib/volt/page/bindings/if_binding.rb +1 -1
  52. data/lib/volt/page/bindings/view_binding.rb +15 -22
  53. data/lib/volt/page/bindings/view_binding/controller_handler.rb +5 -7
  54. data/lib/volt/page/bindings/view_binding/view_lookup_for_path.rb +1 -2
  55. data/lib/volt/page/bindings/yield_binding.rb +1 -2
  56. data/lib/volt/page/channel.rb +3 -3
  57. data/lib/volt/page/document_events.rb +1 -1
  58. data/lib/volt/page/page.rb +3 -6
  59. data/lib/volt/page/path_string_renderer.rb +7 -8
  60. data/lib/volt/page/sub_context.rb +1 -3
  61. data/lib/volt/page/targets/binding_document/component_node.rb +1 -3
  62. data/lib/volt/page/tasks.rb +3 -5
  63. data/lib/volt/reactive/class_eventable.rb +2 -2
  64. data/lib/volt/reactive/computation.rb +7 -7
  65. data/lib/volt/reactive/dependency.rb +1 -1
  66. data/lib/volt/reactive/eventable.rb +3 -4
  67. data/lib/volt/reactive/reactive_accessors.rb +0 -1
  68. data/lib/volt/reactive/reactive_array.rb +4 -12
  69. data/lib/volt/router/routes.rb +1 -3
  70. data/lib/volt/server.rb +6 -6
  71. data/lib/volt/server/component_handler.rb +1 -1
  72. data/lib/volt/server/component_templates.rb +2 -2
  73. data/lib/volt/server/forking_server.rb +6 -9
  74. data/lib/volt/server/html_parser/component_view_scope.rb +2 -2
  75. data/lib/volt/server/html_parser/each_scope.rb +1 -1
  76. data/lib/volt/server/html_parser/sandlebars_parser.rb +2 -6
  77. data/lib/volt/server/html_parser/view_handler.rb +1 -1
  78. data/lib/volt/server/html_parser/view_parser.rb +1 -1
  79. data/lib/volt/server/html_parser/view_scope.rb +2 -4
  80. data/lib/volt/server/rack/asset_files.rb +1 -3
  81. data/lib/volt/server/rack/component_paths.rb +1 -3
  82. data/lib/volt/server/rack/http_request.rb +1 -3
  83. data/lib/volt/server/rack/http_resource.rb +1 -3
  84. data/lib/volt/server/rack/http_response_renderer.rb +2 -2
  85. data/lib/volt/server/rack/index_files.rb +1 -1
  86. data/lib/volt/server/rack/opal_files.rb +1 -3
  87. data/lib/volt/server/socket_connection_handler.rb +1 -3
  88. data/lib/volt/server/websocket/rack_server_adaptor.rb +1 -1
  89. data/lib/volt/server/websocket/websocket_handler.rb +1 -2
  90. data/lib/volt/spec/capybara.rb +1 -1
  91. data/lib/volt/spec/setup.rb +18 -12
  92. data/lib/volt/tasks/dispatcher.rb +1 -2
  93. data/lib/volt/tasks/task_handler.rb +1 -3
  94. data/lib/volt/utils/boolean_patch.rb +1 -1
  95. data/lib/volt/utils/event_counter.rb +2 -2
  96. data/lib/volt/utils/generic_pool.rb +5 -9
  97. data/lib/volt/utils/logging/task_argument_filterer.rb +4 -4
  98. data/lib/volt/utils/logging/task_logger.rb +2 -2
  99. data/lib/volt/utils/modes.rb +2 -2
  100. data/lib/volt/utils/promise_patch.rb +1 -2
  101. data/lib/volt/utils/read_write_lock.rb +21 -23
  102. data/lib/volt/utils/tilt_patch.rb +1 -1
  103. data/lib/volt/utils/timers.rb +3 -7
  104. data/lib/volt/utils/volt_user_error.rb +1 -1
  105. data/lib/volt/version.rb +2 -2
  106. data/lib/volt/volt/app.rb +4 -6
  107. data/lib/volt/volt/users.rb +4 -3
  108. data/spec/apps/kitchen_sink/app/main/controllers/main_controller.rb +1 -1
  109. data/spec/apps/kitchen_sink/app/main/controllers/server/simple_http_controller.rb +1 -1
  110. data/spec/apps/kitchen_sink/app/main/controllers/todos_controller.rb +5 -5
  111. data/spec/apps/kitchen_sink/app/main/controllers/upload_controller.rb +1 -1
  112. data/spec/apps/kitchen_sink/app/main/controllers/yield_component_controller.rb +1 -1
  113. data/spec/controllers/actions_spec.rb +9 -10
  114. data/spec/controllers/model_controller_spec.rb +1 -1
  115. data/spec/extra_core/blank_spec.rb +2 -2
  116. data/spec/extra_core/logger_spec.rb +6 -8
  117. data/spec/extra_core/string_transformations_spec.rb +3 -3
  118. data/spec/integration/bindings_spec.rb +3 -9
  119. data/spec/integration/first_last_spec.rb +1 -1
  120. data/spec/integration/missing_spec.rb +1 -2
  121. data/spec/integration/raw_html_binding.rb +2 -2
  122. data/spec/integration/todos_spec.rb +22 -0
  123. data/spec/integration/yield_spec.rb +2 -2
  124. data/spec/models/associations_spec.rb +4 -4
  125. data/spec/models/buffer_spec.rb +2 -2
  126. data/spec/models/dirty_spec.rb +10 -11
  127. data/spec/models/model_spec.rb +19 -13
  128. data/spec/models/model_state_spec.rb +1 -1
  129. data/spec/models/permissions_spec.rb +8 -12
  130. data/spec/models/url_spec.rb +1 -1
  131. data/spec/models/user_spec.rb +17 -10
  132. data/spec/models/user_validation_spec.rb +2 -3
  133. data/spec/models/validations_spec.rb +7 -10
  134. data/spec/models/validators/email_validator_spec.rb +5 -7
  135. data/spec/models/validators/format_validator_spec.rb +21 -3
  136. data/spec/models/validators/length_validator_spec.rb +12 -22
  137. data/spec/models/validators/shared_examples_for_validators.rb +1 -1
  138. data/spec/models/validators/unique_validator_spec.rb +1 -2
  139. data/spec/page/bindings/content_binding_spec.rb +1 -1
  140. data/spec/page/bindings/template_binding/view_lookup_for_path_spec.rb +0 -1
  141. data/spec/page/path_string_renderer_spec.rb +2 -3
  142. data/spec/reactive/class_eventable_spec.rb +1 -1
  143. data/spec/reactive/computation_spec.rb +30 -31
  144. data/spec/reactive/reactive_hash_spec.rb +1 -1
  145. data/spec/router/routes_spec.rb +14 -16
  146. data/spec/server/html_parser/view_handler_spec.rb +1 -1
  147. data/spec/server/html_parser/view_parser_spec.rb +0 -1
  148. data/spec/server/rack/quite_common_logger_spec.rb +3 -3
  149. data/spec/tasks/dispatcher_spec.rb +1 -1
  150. data/spec/tasks/query_tracker_spec.rb +1 -3
  151. data/spec/utils/task_argument_filtererer_spec.rb +5 -5
  152. data/templates/project/app/main/controllers/main_controller.rb +1 -1
  153. data/templates/project/spec/app/main/models/sample_model_spec.rb +2 -2
  154. data/templates/project/spec/app/main/tasks/sample_task_spec.rb +2 -2
  155. data/volt.gemspec +3 -5
  156. metadata +19 -4
@@ -72,7 +72,7 @@ shared_examples_for 'a format validator' do
72
72
  end
73
73
 
74
74
  context 'when there is both regex and block criteria' do
75
- let(:options) { [ regex_opts, proc_opts ] }
75
+ let(:options) { [regex_opts, proc_opts] }
76
76
 
77
77
  before { validate }
78
78
 
@@ -5,7 +5,6 @@ unless RUBY_PLATFORM == 'opal'
5
5
  validate :name, unique: true
6
6
  end
7
7
 
8
-
9
8
  describe 'unique spec' do
10
9
  it 'should reject save if there are records with existing attributes already' do
11
10
  store._fridges << { name: 'swift' }
@@ -23,4 +22,4 @@ unless RUBY_PLATFORM == 'opal'
23
22
  expect(store._fridges.count).to eq(1)
24
23
  end
25
24
  end
26
- end
25
+ end
@@ -15,7 +15,7 @@ describe Volt::ContentBinding do
15
15
 
16
16
  it 'should render with a template' do
17
17
  context = { name: 'jimmy' }
18
- binding = lambda { |page, target, context, id| Volt::ContentBinding.new(page, target, context, id, proc { self[:name] }) }
18
+ binding = ->(page, target, context, id) { Volt::ContentBinding.new(page, target, context, id, proc { self[:name] }) }
19
19
 
20
20
  templates = {
21
21
  'main/main' => {
@@ -1,7 +1,6 @@
1
1
  require 'spec_helper'
2
2
  require 'volt/page/bindings/view_binding'
3
3
 
4
-
5
4
  describe Volt::ViewBinding do
6
5
  before do
7
6
  @page = double('volt/page')
@@ -1,7 +1,6 @@
1
1
  require 'spec_helper'
2
2
  require 'volt/page/path_string_renderer'
3
3
 
4
-
5
4
  unless RUBY_PLATFORM == 'opal'
6
5
  describe Volt::PathStringRenderer do
7
6
  before do
@@ -16,8 +15,8 @@ unless RUBY_PLATFORM == 'opal'
16
15
  end
17
16
 
18
17
  it 'should render a section with a variable' do
19
- html = Volt::PathStringRenderer.new('main/mailers/welcome/html', {:name => 'Jimmy'}, @page).html
18
+ html = Volt::PathStringRenderer.new('main/mailers/welcome/html', { name: 'Jimmy' }, @page).html
20
19
  expect(html).to eq("\n <h1>Welcome Jimmy</h1>\n\n <p>Glad you signed up!</p>\n\n")
21
20
  end
22
21
  end
23
- end
22
+ end
@@ -34,4 +34,4 @@ describe Volt::ClassEventable do
34
34
 
35
35
  expect(test_ev.run_count).to eq(2)
36
36
  end
37
- end
37
+ end
@@ -44,7 +44,7 @@ describe Volt::Computation do
44
44
  a[:b] = 5
45
45
 
46
46
  count = 0
47
- -> do
47
+ lambda do
48
48
  a[:b]
49
49
  end.watch_until!(10) do
50
50
  count += 1
@@ -74,7 +74,7 @@ describe Volt::Computation do
74
74
  a = Volt::Dependency.new
75
75
 
76
76
  count = 0
77
- -> { count += 1 ; a.depend }.watch!
77
+ -> { count += 1; a.depend }.watch!
78
78
 
79
79
  expect(count).to eq(1)
80
80
 
@@ -93,10 +93,10 @@ describe Volt::Computation do
93
93
  a = Volt::ReactiveHash.new
94
94
 
95
95
  values = []
96
- -> do
96
+ lambda do
97
97
  values << a[0]
98
98
 
99
- -> do
99
+ lambda do
100
100
  values << a[1]
101
101
  end.watch!
102
102
  end.watch!
@@ -112,7 +112,7 @@ describe Volt::Computation do
112
112
  expect(values).to eq([nil, nil, 'inner', 'outer', 'inner'])
113
113
  end
114
114
 
115
- describe "watch_and_resolve!" do
115
+ describe 'watch_and_resolve!' do
116
116
  it 'should resolve any returnted promises' do
117
117
  promise = Promise.new.resolve('resolved')
118
118
  count = 0
@@ -130,45 +130,44 @@ describe Volt::Computation do
130
130
  # https://github.com/opal/opal/issues/677
131
131
  unless RUBY_PLATFORM == 'opal'
132
132
  describe '#invalidate!' do
133
+ let(:computation) { Volt::Computation.new -> {} }
133
134
 
134
- let(:computation) { Volt::Computation.new ->{} }
135
-
136
- before(:each) do
137
- Volt::Computation.class_variable_set :@@flush_queue, []
138
- end
135
+ before(:each) do
136
+ Volt::Computation.class_variable_set :@@flush_queue, []
137
+ end
139
138
 
140
- describe 'when stopped' do
141
- before(:each) { computation.instance_variable_set :@stopped, true }
139
+ describe 'when stopped' do
140
+ before(:each) { computation.instance_variable_set :@stopped, true }
142
141
 
143
- it "doesn't add self to flush queue" do
144
- computation.invalidate!
142
+ it "doesn't add self to flush queue" do
143
+ computation.invalidate!
145
144
 
146
- expect(Volt::Computation.class_variable_get :@@flush_queue).to be_empty
145
+ expect(Volt::Computation.class_variable_get :@@flush_queue).to be_empty
146
+ end
147
147
  end
148
- end
149
148
 
150
- describe 'when computing' do
151
- before(:each) { computation.instance_variable_set :@computing, true }
149
+ describe 'when computing' do
150
+ before(:each) { computation.instance_variable_set :@computing, true }
152
151
 
153
- it "should still add itself to flush queue" do
154
- computation.invalidate!
152
+ it 'should still add itself to flush queue' do
153
+ computation.invalidate!
155
154
 
156
- expect(Volt::Computation.class_variable_get :@@flush_queue).not_to be_empty
155
+ expect(Volt::Computation.class_variable_get :@@flush_queue).not_to be_empty
156
+ end
157
157
  end
158
- end
159
158
 
160
- describe 'when not stopped and not computing' do
161
- before(:each) do
162
- computation.instance_variable_set :@stopped, false
163
- computation.instance_variable_set :@computing, false
164
- end
159
+ describe 'when not stopped and not computing' do
160
+ before(:each) do
161
+ computation.instance_variable_set :@stopped, false
162
+ computation.instance_variable_set :@computing, false
163
+ end
165
164
 
166
- it 'adds self to flush queue' do
167
- computation.invalidate!
165
+ it 'adds self to flush queue' do
166
+ computation.invalidate!
168
167
 
169
- expect(Volt::Computation.class_variable_get :@@flush_queue).to match_array([computation])
168
+ expect(Volt::Computation.class_variable_get :@@flush_queue).to match_array([computation])
169
+ end
170
170
  end
171
171
  end
172
172
  end
173
- end
174
173
  end
@@ -9,4 +9,4 @@ describe Volt::ReactiveHash do
9
9
  a.clear
10
10
  expect(a[:name]).to eq(nil)
11
11
  end
12
- end
12
+ end
@@ -33,22 +33,22 @@ describe Volt::Routes do
33
33
  '*' => {
34
34
  'edit' => {
35
35
  nil => { view: 'blog/edit', id: 1 }
36
- },
37
- nil => { view: 'blog/show', id: 1 }
38
- }
36
+ },
37
+ nil => { view: 'blog/show', id: 1 }
39
38
  }
40
- )
39
+ }
40
+ )
41
41
 
42
42
  expect(indirect_routes[:get]).to eq(
43
43
  'comments' => {
44
44
  '*' => {
45
45
  'edit' => {
46
46
  nil => { controller: 'comments', action: 'edit', id: 1 }
47
- },
48
- nil => { controller: 'comments', action: 'show', id: 1 }
49
- }
47
+ },
48
+ nil => { controller: 'comments', action: 'show', id: 1 }
50
49
  }
51
- )
50
+ }
51
+ )
52
52
  end
53
53
 
54
54
  it 'should setup param matchers' do
@@ -69,15 +69,14 @@ describe Volt::Routes do
69
69
  { view: 'blog/edit', id: nil },
70
70
  { view: 'blog/tag', tag: nil },
71
71
  { view: 'login', action: 'user', name: nil, id: nil }
72
- ])
72
+ ])
73
73
 
74
74
  expect(param_matches[:get].map { |v| v[0] }).to eq([
75
75
  { controller: 'articles', action: 'index' },
76
- { controller: 'articles', action: 'show', id: nil },
77
- ])
76
+ { controller: 'articles', action: 'show', id: nil }
77
+ ])
78
78
  end
79
79
 
80
-
81
80
  it 'should match routes' do
82
81
  routes do
83
82
  client '/blog', view: 'blog'
@@ -93,7 +92,6 @@ describe Volt::Routes do
93
92
  put '/people', controller: 'people', action: 'update'
94
93
  patch '/people/1', controller: 'people', action: 'update'
95
94
  delete '/people/2', controller: 'people', action: 'destroy'
96
-
97
95
  end
98
96
 
99
97
  params = @routes.url_to_params('/blog')
@@ -174,7 +172,7 @@ describe Volt::Routes do
174
172
 
175
173
  url, params = @routes.params_to_url(controller: 'articles', action: 'update', method: :put, id: 99, other: 'xyz')
176
174
  expect(url).to eq('/articles/99')
177
- expect(params).to eq({other: 'xyz'})
175
+ expect(params).to eq(other: 'xyz')
178
176
 
179
177
  url, params = @routes.params_to_url({})
180
178
  expect(url).to eq(nil)
@@ -213,13 +211,13 @@ describe Volt::Routes do
213
211
 
214
212
  it 'should not match params that have no matches at all' do
215
213
  routes = Volt::Routes.new
216
- match, params = routes.send(:check_params_match, { view: '', id: false }, bleep: {volt: 'rocks'} )
214
+ match, params = routes.send(:check_params_match, { view: '', id: false }, bleep: { volt: 'rocks' })
217
215
  expect(match).to eq(false)
218
216
  end
219
217
 
220
218
  it 'should not match params that have a nil value' do
221
219
  routes = Volt::Routes.new
222
- match, params = routes.send(:check_params_match, { view: 'blog', id: false }, bleep: nil )
220
+ match, params = routes.send(:check_params_match, { view: 'blog', id: false }, bleep: nil)
223
221
  expect(match).to eq(false)
224
222
  end
225
223
 
@@ -8,7 +8,7 @@ else
8
8
 
9
9
  it 'handles tags' do
10
10
  handler.comment('Yowza!')
11
- handler.start_tag('a', {href: 'yahoo.com'}, false)
11
+ handler.start_tag('a', { href: 'yahoo.com' }, false)
12
12
  handler.text('Cool in 1996')
13
13
  handler.end_tag('a')
14
14
 
@@ -185,7 +185,6 @@ describe Volt::ViewParser do
185
185
  END
186
186
 
187
187
  view = Volt::ViewParser.new(html, 'main/main/main/body')
188
-
189
188
  end
190
189
  it 'should setup a href single attribute binding correctly' do
191
190
  html = <<-END
@@ -24,7 +24,7 @@ unless RUBY_PLATFORM == 'opal'
24
24
  end
25
25
 
26
26
  describe 'when request path has no file extension and request run over web socket' do
27
- let(:env) { {'PATH_INFO' => '/file'} }
27
+ let(:env) { { 'PATH_INFO' => '/file' } }
28
28
 
29
29
  it "calls 'log' method" do
30
30
  expect(subject).to receive(:log)
@@ -33,7 +33,7 @@ unless RUBY_PLATFORM == 'opal'
33
33
  end
34
34
 
35
35
  describe 'when request path has file extension' do
36
- let(:env) { {'PATH_INFO' => '/file.ext'} }
36
+ let(:env) { { 'PATH_INFO' => '/file.ext' } }
37
37
 
38
38
  it "doesn't call 'log' method" do
39
39
  expect(subject).not_to receive(:log)
@@ -42,7 +42,7 @@ unless RUBY_PLATFORM == 'opal'
42
42
  end
43
43
 
44
44
  describe 'when request run over web socket' do
45
- let(:env) { {'PATH_INFO' => '/channel'} }
45
+ let(:env) { { 'PATH_INFO' => '/channel' } }
46
46
 
47
47
  it "doesn't call 'log' method" do
48
48
  expect(subject).not_to receive(:log)
@@ -1,7 +1,7 @@
1
1
  if RUBY_PLATFORM != 'opal'
2
2
  class TestTask < Volt::Task
3
3
  def allowed_method(arg1, arg2)
4
- return 'yes' + arg1 + arg2
4
+ 'yes' + arg1 + arg2
5
5
  end
6
6
  end
7
7
 
@@ -33,12 +33,11 @@ if RUBY_PLATFORM != 'opal'
33
33
  end
34
34
 
35
35
  def notify_changed(id, data, skip_channel)
36
- item = @items.find{ |item| item['_id'] == id }
36
+ item = @items.find { |item| item['_id'] == id }
37
37
  idx = @items.index(item)
38
38
  @items.delete(item)
39
39
  @items.insert(idx, data)
40
40
  end
41
-
42
41
  end
43
42
 
44
43
  before do
@@ -141,7 +140,6 @@ if RUBY_PLATFORM != 'opal'
141
140
  expect(@live_query.items).to_not eq(@items)
142
141
  @query_tracker.run
143
142
  expect(@live_query.items).to eq(@items)
144
-
145
143
  end
146
144
  end
147
145
  end
@@ -3,15 +3,15 @@ require 'spec_helper'
3
3
  if RUBY_PLATFORM != 'opal'
4
4
  describe TaskArgumentFilterer do
5
5
  it 'should filter arguments' do
6
- filtered_args = TaskArgumentFilterer.new({login: 'jim@jim.com', password: 'some password no one should see'}).run
6
+ filtered_args = TaskArgumentFilterer.new(login: 'jim@jim.com', password: 'some password no one should see').run
7
7
 
8
- expect(filtered_args).to eq({:login=>"jim@jim.com", :password=>"[FILTERED]"})
8
+ expect(filtered_args).to eq(login: 'jim@jim.com', password: '[FILTERED]')
9
9
  end
10
10
 
11
11
  it 'should filter in nested args' do
12
- filtered_args = TaskArgumentFilterer.new([:login, {login: 'jim@jim.com', password: 'some password'}]).run
12
+ filtered_args = TaskArgumentFilterer.new([:login, { login: 'jim@jim.com', password: 'some password' }]).run
13
13
 
14
- expect(filtered_args).to eq([:login, {:login=>"jim@jim.com", :password=>"[FILTERED]"}])
14
+ expect(filtered_args).to eq([:login, { login: 'jim@jim.com', password: '[FILTERED]' }])
15
15
  end
16
16
  end
17
- end
17
+ end
@@ -24,4 +24,4 @@ module Main
24
24
  url.path.split('/')[1] == attrs.href.split('/')[1]
25
25
  end
26
26
  end
27
- end
27
+ end
@@ -1,5 +1,5 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe "sample model" do
3
+ describe 'sample model' do
4
4
  # Specs here
5
- end
5
+ end
@@ -1,5 +1,5 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe "sample task", type: :task do
3
+ describe 'sample task', type: :task do
4
4
  # Specs here
5
- end
5
+ end
data/volt.gemspec CHANGED
@@ -10,10 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.authors = ['Ryan Stout']
11
11
  spec.email = ['ryan@agileproductions.com']
12
12
  spec.summary = 'A reactive Ruby web framework.'
13
- spec.description = <<-EOF
14
- A reactive Ruby web framework where your Ruby code runs on both the server
15
- and the client (via Opal).
16
- EOF
13
+ spec.description = 'A reactive Ruby web framework where your Ruby code runs on both the server and the client (via Opal).'
17
14
  spec.homepage = 'http://voltframework.com'
18
15
  spec.license = 'MIT'
19
16
 
@@ -47,7 +44,6 @@ Gem::Specification.new do |spec|
47
44
  spec.add_development_dependency 'selenium-webdriver', '~> 2.43.0'
48
45
  spec.add_development_dependency 'chromedriver2-helper', '~> 0.0.8'
49
46
  spec.add_development_dependency 'poltergeist', '~> 1.5.0'
50
- # spec.add_development_dependency 'puma', '~> 2.11.2'
51
47
  spec.add_development_dependency 'thin', '~> 1.6.3'
52
48
  spec.add_development_dependency 'coveralls', '~> 0.8.1'
53
49
 
@@ -63,4 +59,6 @@ Gem::Specification.new do |spec|
63
59
  spec.add_development_dependency 'sauce', '~> 3.5.3'
64
60
  spec.add_development_dependency 'sauce-connect', '~> 3.5.0'
65
61
  spec.add_development_dependency 'pry-byebug', '~> 2.0.0'
62
+
63
+ spec.add_development_dependency 'rubocop', '~> 0.31.0'
66
64
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: volt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Stout
@@ -458,9 +458,22 @@ dependencies:
458
458
  - - "~>"
459
459
  - !ruby/object:Gem::Version
460
460
  version: 2.0.0
461
- description: |2
462
- A reactive Ruby web framework where your Ruby code runs on both the server
463
- and the client (via Opal).
461
+ - !ruby/object:Gem::Dependency
462
+ name: rubocop
463
+ requirement: !ruby/object:Gem::Requirement
464
+ requirements:
465
+ - - "~>"
466
+ - !ruby/object:Gem::Version
467
+ version: 0.31.0
468
+ type: :development
469
+ prerelease: false
470
+ version_requirements: !ruby/object:Gem::Requirement
471
+ requirements:
472
+ - - "~>"
473
+ - !ruby/object:Gem::Version
474
+ version: 0.31.0
475
+ description: A reactive Ruby web framework where your Ruby code runs on both the server
476
+ and the client (via Opal).
464
477
  email:
465
478
  - ryan@agileproductions.com
466
479
  executables:
@@ -725,6 +738,7 @@ files:
725
738
  - spec/integration/missing_spec.rb
726
739
  - spec/integration/raw_html_binding.rb
727
740
  - spec/integration/templates_spec.rb
741
+ - spec/integration/todos_spec.rb
728
742
  - spec/integration/url_spec.rb
729
743
  - spec/integration/user_spec.rb
730
744
  - spec/integration/yield_spec.rb
@@ -943,6 +957,7 @@ test_files:
943
957
  - spec/integration/missing_spec.rb
944
958
  - spec/integration/raw_html_binding.rb
945
959
  - spec/integration/templates_spec.rb
960
+ - spec/integration/todos_spec.rb
946
961
  - spec/integration/url_spec.rb
947
962
  - spec/integration/user_spec.rb
948
963
  - spec/integration/yield_spec.rb