volt 0.9.0.pre1 → 0.9.0.pre2

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: 80b355af09d532dbb92bd9f350a6c9029479b524
4
- data.tar.gz: 9950a3baf09a3965333ab7b2ace7fc8fb3a4fd06
3
+ metadata.gz: 50a8c49fdfca06fec0fa165a120490f04d106576
4
+ data.tar.gz: 3b6e44e7ac3056bcadf7a9f2e3472bdf98c3e75e
5
5
  SHA512:
6
- metadata.gz: 01a00caca4e061866f487aed6a027d5975d509a7b11cc0b04b226e25e87d8263ad5921e18c45fe04257c51c25685fdc8fe7c9ca414da6d9e001882a5ba7255b6
7
- data.tar.gz: d4a42204c6a4356a8b266df335f92e1f2c1082111dbd711a6ac487e783aa872025ffba6a0e24282536aae7c9f5bad6d583d49f4733cf9c0ed6de3b7d0f60d3f4
6
+ metadata.gz: d586613c6bf0277385b2f4edd9c9c47abf95aa0db1e18074865cb2e998286db13c7ecffa93dc93fd848cc081ca98be33eea96d86e00660837f3b179013581ac0
7
+ data.tar.gz: 3d53026c407d64a4e59ff86c8866efc4618b122866e408059e5a16c2f425cb8d1de5cf9f1f434bc8f9630b7de3c01dd49e35e15e288b8aaa744badfc92a026ac
data/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- ## 0.8.27 - WIP
3
+ ## 0.9.0.pre1
4
4
  ### Added
5
5
  - added has_many and belongs_to on models. See docs.
6
6
  - you can now serve http/rest from Volt. Thanks to @jfahrer for his great work. Docs coming soon.
@@ -26,6 +26,7 @@
26
26
  - ```the_page``` is a shortcut to the page collection inside of specs. (Unfortunately, ```page``` is used by capybara, so for now we're using ```the_page```, we'll find a better solution in the future.)
27
27
 
28
28
  ### Changed
29
+ - all plural attributes now return an empty ArrayModel. This is to simplify implementation and to unify store's interface.
29
30
  - main_path in generated projects now includes the a component param that can be used to easily point at controllers/views in other components.
30
31
  - previously the main component's controllers were not namespaced. We changed it so all controllers (including those in main) are namespaced. This is makes things more consistent and keeps expectations when working with components.
31
32
  - model attributes no longer return NilModels. Instead they just return nil. You can however add an ! to the end to "expand" the model to an empty model.
@@ -40,6 +41,7 @@ So if you wanted to use a property on ```_new_todo``` without initializing ```_n
40
41
  - the underlying way queries are normalized and passed to the server has changed (no external api changes)
41
42
  - changed .find to .where to not conflict with ruby Enum's .find
42
43
  - Volt::TaskHandler is now Volt::Task
44
+ - Move testing gems to the generated Gemfile for projects
43
45
 
44
46
  ### Removed
45
47
  - .false?, .true?, .or, and .and were removed since NilModels were removed. This means you get back a real nil value when accessing an undefined model attribute.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.0.pre1
1
+ 0.9.0.pre2
@@ -58,4 +58,25 @@ class Generate < Thor
58
58
  template('controller/model_controller.rb.tt', output_file, component_module: component.camelize, model_controller_name: name.camelize.singularize)
59
59
  end
60
60
 
61
+ desc 'task NAME COMPONENT', 'Creates a task named NAME in the app folder of the component named COMPONENT.'
62
+ method_option :name, type: :string, banner: 'The name of the task.'
63
+ method_option :component, type: :string, default: 'main', banner: 'The component the task should be created in.', required: false
64
+ def task(name, component = 'main')
65
+ output_file = Dir.pwd + "/app/#{component}/tasks/#{name.underscore.singularize}.rb"
66
+ template('task/task.rb.tt', output_file, task_name: name.camelize.singularize)
67
+ end
68
+
69
+ desc 'view NAME COMPONENT', 'Creates a view named NAME in the app folder of the component named COMPONENT.'
70
+ method_option :name, type: :string, banner: 'The name of the view.'
71
+ method_option :component, type: :string, default: 'main', banner: 'The component the view should be created in.', required: false
72
+ def view(name, component = 'main')
73
+ output_file = Dir.pwd + "/app/#{component}/views/#{component}/#{name.underscore.singularize}.html"
74
+ controller(name, component) unless controller?(name, component)
75
+ template('view/view.rb.tt', output_file, view_name: name.camelize.singularize)
76
+ end
77
+
78
+ def controller?(name, component = 'main')
79
+ dir = Dir.pwd + "/app/#{component}/controllers/"
80
+ File.exists?(dir + name.downcase.underscore.singularize + '.rb')
81
+ end
61
82
  end
@@ -12,6 +12,16 @@ gem 'volt-bootstrap_jumbotron_theme', '~> 0.1.0'
12
12
  # User templates for login, signup, and logout menu.
13
13
  gem 'volt-user_templates', '~> 0.1.3'
14
14
 
15
+ group :development, :test do
16
+ # Testing dependencies
17
+ gem 'rspec', '~> 3.2.0'
18
+ gem 'opal-rspec', '~> 0.4.2'
19
+ gem 'capybara', '~> 2.4.2'
20
+ gem 'selenium-webdriver', '~> 2.43.0'
21
+ gem 'chromedriver2-helper', '~> 0.0.8'
22
+ gem 'poltergeist', '~> 1.5.0'
23
+ end
24
+
15
25
  # Server for MRI
16
26
  platform :mri do
17
27
  gem 'thin', '~> 1.6.0'
@@ -0,0 +1,11 @@
1
+ require 'spec_helper'
2
+
3
+ describe 'sample integration test', type: :feature do
4
+ # An example integration spec, this will only be run if ENV['BROWSER'] is
5
+ # specified. Current values for ENV['BROWSER'] are 'firefox' and 'phantom'
6
+ it 'should load the page' do
7
+ visit '/'
8
+
9
+ expect(page).to have_content('Home')
10
+ end
11
+ end
@@ -0,0 +1,5 @@
1
+ require 'spec_helper'
2
+
3
+ describe "sample model" do
4
+ # Specs here
5
+ end
@@ -0,0 +1,4 @@
1
+ class <%= config[:task_name] %> < Volt::Task
2
+
3
+ end
4
+
@@ -0,0 +1,4 @@
1
+ <div>
2
+ {{ # your code here }}
3
+ </div>
4
+
data/volt.gemspec CHANGED
@@ -31,18 +31,20 @@ Gem::Specification.new do |spec|
31
31
  spec.add_dependency 'yui-compressor', '~> 0.12.0'
32
32
  spec.add_dependency 'opal', '~> 0.7.1'
33
33
  spec.add_dependency 'opal-jquery', '~> 0.3.0'
34
- spec.add_dependency 'rspec-core', '~> 3.1.0'
35
- spec.add_dependency 'capybara', '~> 2.4.2'
36
- spec.add_dependency 'selenium-webdriver', '~> 2.43.0'
37
- spec.add_dependency 'chromedriver2-helper', '~> 0.0.8'
38
- spec.add_dependency 'poltergeist', '~> 1.5.0'
39
- spec.add_dependency 'opal-rspec', '~> 0.4.2'
40
34
  spec.add_dependency 'bundler', '>= 1.5'
41
35
  spec.add_dependency 'volt-sockjs', '~> 0.3.4.4'
42
36
 
43
37
  # For user passwords
44
38
  spec.add_dependency 'bcrypt', '~> 3.1.9'
45
39
 
40
+ # For testing
41
+ spec.add_development_dependency 'rspec', '~> 3.2.0'
42
+ spec.add_development_dependency 'opal-rspec', '~> 0.4.2'
43
+ spec.add_development_dependency 'capybara', '~> 2.4.2'
44
+ spec.add_development_dependency 'selenium-webdriver', '~> 2.43.0'
45
+ spec.add_development_dependency 'chromedriver2-helper', '~> 0.0.8'
46
+ spec.add_development_dependency 'poltergeist', '~> 1.5.0'
47
+
46
48
  spec.add_development_dependency 'guard', '2.6.0' # bug in current guard
47
49
  spec.add_development_dependency 'guard-rspec', '~> 4.3.0'
48
50
  spec.add_development_dependency 'rake', '~> 10.0.4'
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.0.pre1
4
+ version: 0.9.0.pre2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Stout
@@ -179,131 +179,131 @@ dependencies:
179
179
  - !ruby/object:Gem::Version
180
180
  version: 0.3.0
181
181
  - !ruby/object:Gem::Dependency
182
- name: rspec-core
182
+ name: bundler
183
183
  requirement: !ruby/object:Gem::Requirement
184
184
  requirements:
185
- - - "~>"
185
+ - - ">="
186
186
  - !ruby/object:Gem::Version
187
- version: 3.1.0
187
+ version: '1.5'
188
188
  type: :runtime
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
- - - "~>"
192
+ - - ">="
193
193
  - !ruby/object:Gem::Version
194
- version: 3.1.0
194
+ version: '1.5'
195
195
  - !ruby/object:Gem::Dependency
196
- name: capybara
196
+ name: volt-sockjs
197
197
  requirement: !ruby/object:Gem::Requirement
198
198
  requirements:
199
199
  - - "~>"
200
200
  - !ruby/object:Gem::Version
201
- version: 2.4.2
201
+ version: 0.3.4.4
202
202
  type: :runtime
203
203
  prerelease: false
204
204
  version_requirements: !ruby/object:Gem::Requirement
205
205
  requirements:
206
206
  - - "~>"
207
207
  - !ruby/object:Gem::Version
208
- version: 2.4.2
208
+ version: 0.3.4.4
209
209
  - !ruby/object:Gem::Dependency
210
- name: selenium-webdriver
210
+ name: bcrypt
211
211
  requirement: !ruby/object:Gem::Requirement
212
212
  requirements:
213
213
  - - "~>"
214
214
  - !ruby/object:Gem::Version
215
- version: 2.43.0
215
+ version: 3.1.9
216
216
  type: :runtime
217
217
  prerelease: false
218
218
  version_requirements: !ruby/object:Gem::Requirement
219
219
  requirements:
220
220
  - - "~>"
221
221
  - !ruby/object:Gem::Version
222
- version: 2.43.0
222
+ version: 3.1.9
223
223
  - !ruby/object:Gem::Dependency
224
- name: chromedriver2-helper
224
+ name: rspec
225
225
  requirement: !ruby/object:Gem::Requirement
226
226
  requirements:
227
227
  - - "~>"
228
228
  - !ruby/object:Gem::Version
229
- version: 0.0.8
230
- type: :runtime
229
+ version: 3.2.0
230
+ type: :development
231
231
  prerelease: false
232
232
  version_requirements: !ruby/object:Gem::Requirement
233
233
  requirements:
234
234
  - - "~>"
235
235
  - !ruby/object:Gem::Version
236
- version: 0.0.8
236
+ version: 3.2.0
237
237
  - !ruby/object:Gem::Dependency
238
- name: poltergeist
238
+ name: opal-rspec
239
239
  requirement: !ruby/object:Gem::Requirement
240
240
  requirements:
241
241
  - - "~>"
242
242
  - !ruby/object:Gem::Version
243
- version: 1.5.0
244
- type: :runtime
243
+ version: 0.4.2
244
+ type: :development
245
245
  prerelease: false
246
246
  version_requirements: !ruby/object:Gem::Requirement
247
247
  requirements:
248
248
  - - "~>"
249
249
  - !ruby/object:Gem::Version
250
- version: 1.5.0
250
+ version: 0.4.2
251
251
  - !ruby/object:Gem::Dependency
252
- name: opal-rspec
252
+ name: capybara
253
253
  requirement: !ruby/object:Gem::Requirement
254
254
  requirements:
255
255
  - - "~>"
256
256
  - !ruby/object:Gem::Version
257
- version: 0.4.2
258
- type: :runtime
257
+ version: 2.4.2
258
+ type: :development
259
259
  prerelease: false
260
260
  version_requirements: !ruby/object:Gem::Requirement
261
261
  requirements:
262
262
  - - "~>"
263
263
  - !ruby/object:Gem::Version
264
- version: 0.4.2
264
+ version: 2.4.2
265
265
  - !ruby/object:Gem::Dependency
266
- name: bundler
266
+ name: selenium-webdriver
267
267
  requirement: !ruby/object:Gem::Requirement
268
268
  requirements:
269
- - - ">="
269
+ - - "~>"
270
270
  - !ruby/object:Gem::Version
271
- version: '1.5'
272
- type: :runtime
271
+ version: 2.43.0
272
+ type: :development
273
273
  prerelease: false
274
274
  version_requirements: !ruby/object:Gem::Requirement
275
275
  requirements:
276
- - - ">="
276
+ - - "~>"
277
277
  - !ruby/object:Gem::Version
278
- version: '1.5'
278
+ version: 2.43.0
279
279
  - !ruby/object:Gem::Dependency
280
- name: volt-sockjs
280
+ name: chromedriver2-helper
281
281
  requirement: !ruby/object:Gem::Requirement
282
282
  requirements:
283
283
  - - "~>"
284
284
  - !ruby/object:Gem::Version
285
- version: 0.3.4.4
286
- type: :runtime
285
+ version: 0.0.8
286
+ type: :development
287
287
  prerelease: false
288
288
  version_requirements: !ruby/object:Gem::Requirement
289
289
  requirements:
290
290
  - - "~>"
291
291
  - !ruby/object:Gem::Version
292
- version: 0.3.4.4
292
+ version: 0.0.8
293
293
  - !ruby/object:Gem::Dependency
294
- name: bcrypt
294
+ name: poltergeist
295
295
  requirement: !ruby/object:Gem::Requirement
296
296
  requirements:
297
297
  - - "~>"
298
298
  - !ruby/object:Gem::Version
299
- version: 3.1.9
300
- type: :runtime
299
+ version: 1.5.0
300
+ type: :development
301
301
  prerelease: false
302
302
  version_requirements: !ruby/object:Gem::Requirement
303
303
  requirements:
304
304
  - - "~>"
305
305
  - !ruby/object:Gem::Version
306
- version: 3.1.9
306
+ version: 1.5.0
307
307
  - !ruby/object:Gem::Dependency
308
308
  name: guard
309
309
  requirement: !ruby/object:Gem::Requirement
@@ -775,8 +775,11 @@ files:
775
775
  - templates/project/config/app.rb.tt
776
776
  - templates/project/config/base/index.html
777
777
  - templates/project/lib/.empty_directory
778
- - templates/project/spec/sample_spec.rb
778
+ - templates/project/spec/app/main/integration/sample_integration_spec.rb
779
+ - templates/project/spec/app/main/models/sample_model_spec.rb
779
780
  - templates/project/spec/spec_helper.rb
781
+ - templates/task/task.rb.tt
782
+ - templates/view/view.rb.tt
780
783
  - volt.gemspec
781
784
  homepage: http://voltframework.com
782
785
  licenses:
@@ -1,11 +0,0 @@
1
- if ENV['BROWSER']
2
- require 'spec_helper'
3
-
4
- describe 'sample integration test', type: :feature do
5
- it 'should load the page' do
6
- visit '/'
7
-
8
- expect(page).to have_content('Home')
9
- end
10
- end
11
- end