volt 0.7.22 → 0.7.23

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5b730e5f16273424161f8379476984c2689b753d
4
- data.tar.gz: e362306558f379cccc2aab0a5fe15da4250a5627
3
+ metadata.gz: d7bb8c103737c0830c53f7d6fea45e1881fe6f98
4
+ data.tar.gz: 15e470a4a5617ab6905f447bf59926354b9ab2d1
5
5
  SHA512:
6
- metadata.gz: 921b6d8e8fe5de195fe402b32a7f040087881bfb896c55ea60a0d577b0c1ae6406b2b490ff33aba3818eb3aaa6c7099d5e5a10c8573dc025bda4057342b34b9f
7
- data.tar.gz: 3c7bb6ceb7c150f898584ba3c4ae144e4a66be7f31d58537f9f4a54198795e6a1bf7c7b486b6223fe58d31d4b550be1024003f8bf2435fc4466b1764f11f78e8
6
+ metadata.gz: 78a090d11f527006c79ee66a851e18106193d730d2d4cfaaaa1856737c198f1e27a73ea38fc540b6b1c3e91239fce6fc6eb60dab3bb66e61277f91e82d3cbde4
7
+ data.tar.gz: 6e9eda4f1e09a74af9b05983dac7babbf4603f6387f57d18545541f23eeb6195eee79ebc1a05f7c736022988ac2422a93d9a6209067c3ad17c7e77fb16d727dc
data/.travis.yml CHANGED
@@ -1,6 +1,9 @@
1
1
  language: ruby
2
2
  rvm:
3
3
  - "2.1.0"
4
+ - "2.1.1"
5
+ - "2.1.2"
6
+ - "2.1.3"
4
7
  # - jruby-19mode # JRuby in 1.9 mode
5
8
  # - rbx
6
9
  script: bundle exec rspec
data/Readme.md CHANGED
@@ -1,6 +1,7 @@
1
1
  [![Gem Version](https://badge.fury.io/rb/volt.png)](http://badge.fury.io/rb/volt)
2
2
  [![Code Climate](https://codeclimate.com/github/voltrb/volt.png)](https://codeclimate.com/github/voltrb/volt)
3
3
  [![Build Status](https://travis-ci.org/voltrb/volt.png?branch=master)](https://travis-ci.org/voltrb/volt)
4
+ [![Inline docs](http://inch-ci.org/github/voltrb/volt.svg?branch=master)](http://inch-ci.org/github/voltrb/volt)
4
5
  [![Volt Chat](https://badges.gitter.im/voltrb/volt.png)](https://gitter.im/voltrb/volt)
5
6
 
6
7
  ** For the current status of volt, read: http://voltframework.com/blog
@@ -454,8 +455,8 @@ For convenience, when placing a hash inside of another model, it is automaticall
454
455
  user = Model.new
455
456
  user._name = 'Ryan'
456
457
  user._profiles = {
457
- twitter: 'http://www.twitter.com/ryanstout',
458
- dribbble: 'http://dribbble.com/ryanstout'
458
+ _twitter: 'http://www.twitter.com/ryanstout',
459
+ _dribbble: 'http://dribbble.com/ryanstout'
459
460
  }
460
461
 
461
462
  user._name
@@ -821,11 +822,11 @@ To run Capybara tests, you need to specify a driver. The following drivers are
821
822
 
822
823
  1. Phantom (via poltergeist)
823
824
 
824
- BROWSER=phantom bundle exec rspec
825
+ ```BROWSER=phantom bundle exec rspec```
825
826
 
826
827
  2. Firefox
827
828
 
828
- BROWSER=firefox bundle exec rspec
829
+ ```BROWSER=firefox bundle exec rspec```
829
830
 
830
831
  3. IE - coming soon
831
832
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.7.22
1
+ 0.7.23
@@ -8,6 +8,9 @@
8
8
  {#if channel.reconnect_interval} Reconnecting in {(channel.reconnect_interval / 1000.0).round} sec{/}
9
9
  </div>
10
10
  {/}
11
+ {#if page._reconnected}
12
+ <div class="notices alert alert-success">Reconnected!</div>
13
+ {/}
11
14
  {#if !flash.empty?}
12
15
  <div class="notices alert alert-info" e-click="flash.clear">
13
16
  {#each flash._notices as notice}
data/docs/FAQ.md ADDED
@@ -0,0 +1,7 @@
1
+ # FAQ
2
+
3
+ ## How do I include/call JavaScript from Volt?
4
+
5
+ 1. If you have a url outside of your project you want to include with a component, see dependencies under https://github.com/voltrb/volt/blob/master/Readme.md#Dependencies. This is useful for including assets from a shared CDN and will place a script tag on the page.
6
+ 2. You can also place script tags in public/index.html (though it's better to put them in the components). Any JS files in app/{component_name}/assets/js will be loaded automatically.
7
+ 3. Lastly, you can also embed javascript inline in any controllers since they run in opal (see opalrb.org for info on that)
@@ -46,6 +46,7 @@ class Channel
46
46
  end
47
47
 
48
48
  def opened
49
+ old_status = @status
49
50
  @status = :open
50
51
  @connected = true
51
52
  @reconnect_interval = nil
@@ -56,6 +57,9 @@ class Channel
56
57
 
57
58
  trigger!('open')
58
59
  trigger!('changed')
60
+ if old_status == :reconnecting
61
+ trigger!('reconnected')
62
+ end
59
63
  end
60
64
 
61
65
  def closed(error)
@@ -64,6 +64,14 @@ class Page
64
64
 
65
65
  # Initialize tasks so we can get the reload message
66
66
  self.tasks if Volt.env.development?
67
+
68
+ channel.on('reconnected') do
69
+ @page._reconnected.cur = true
70
+
71
+ `setTimeout(function() {`
72
+ @page._reconnected.cur = false
73
+ `}, 2000);`
74
+ end
67
75
  end
68
76
 
69
77
  def flash
data/volt.gemspec CHANGED
@@ -40,12 +40,13 @@ Gem::Specification.new do |spec|
40
40
  spec.add_dependency "chromedriver2-helper", "~> 0.0.8"
41
41
  spec.add_dependency "poltergeist", "~> 1.5.0"
42
42
  spec.add_dependency "opal-rspec", "0.3.0.beta3"
43
+ spec.add_dependency "bundler", ">= 1.5"
44
+
43
45
 
44
46
  # spec.add_dependency "promise.rb", "~> 0.6.1"
45
47
 
46
48
  # spec.add_dependency "rack-colorized_logger", "~> 1.0.4"
47
49
 
48
- spec.add_development_dependency "bundler", "~> 1.5"
49
50
  spec.add_development_dependency "guard", "2.6.0" # bug in current guard
50
51
  spec.add_development_dependency "guard-rspec", "~> 4.3.0"
51
52
  spec.add_development_dependency "yard", "~> 0.8.7.0"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: volt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.22
4
+ version: 0.7.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Stout
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-23 00:00:00.000000000 Z
11
+ date: 2014-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -280,14 +280,14 @@ dependencies:
280
280
  name: bundler
281
281
  requirement: !ruby/object:Gem::Requirement
282
282
  requirements:
283
- - - "~>"
283
+ - - ">="
284
284
  - !ruby/object:Gem::Version
285
285
  version: '1.5'
286
- type: :development
286
+ type: :runtime
287
287
  prerelease: false
288
288
  version_requirements: !ruby/object:Gem::Requirement
289
289
  requirements:
290
- - - "~>"
290
+ - - ">="
291
291
  - !ruby/object:Gem::Version
292
292
  version: '1.5'
293
293
  - !ruby/object:Gem::Dependency
@@ -364,6 +364,7 @@ files:
364
364
  - app/volt/tasks/store_tasks.rb
365
365
  - app/volt/views/notices/index.html
366
366
  - bin/volt
367
+ - docs/FAQ.md
367
368
  - docs/GETTING_STARTED.md
368
369
  - docs/WHY.md
369
370
  - docs/volt-logo.jpg