ethereal 0.0.3 → 0.0.4

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: 12eef29e9d20ec13cd7b936f7e1dd47ca69e11cd
4
- data.tar.gz: 8ee04a0a736ce8604ce2f355f2074ca8062f88f7
3
+ metadata.gz: c309c909e77b1da5a299d397b4635a62cb2171a5
4
+ data.tar.gz: 3470113450185c9a04b10bc745422f84ee87143a
5
5
  SHA512:
6
- metadata.gz: a5b6cf5f6ba602e14cebf290b54259085feeb342f6954201803b89e8ab5eba0fe6ca11a6a424fb5772c103880a99b2e879e2e731dbb96438c2514d5513d84df1
7
- data.tar.gz: cd3cdec852202442ad0b5b74da232d7ccbd18227636321d7969149e336c512120a9699e04da1c78dabda8540f0bdf92b00e509ecc397e1de85e5f9e0a79c1def
6
+ metadata.gz: f5b5d3b9438406bc504c691c987661cb0368e611f064778887193ad659828617d440469f88729ae5f723a73339b8d416ac34ba04f0c443c53a377701aee3408d
7
+ data.tar.gz: 6e5a8ead832028772167f2f711017f41bdff3f82d5900919ca08ddacf4bc5cbb16d441f2d83489146076a90b87bd6ae43a6dea9a019f5cd79cbd872bf2ebff79
data/.gitignore CHANGED
@@ -11,4 +11,5 @@
11
11
  *.so
12
12
  *.o
13
13
  *.a
14
- mkmf.log
14
+ *.log
15
+ .DS_Store
data/Rakefile CHANGED
@@ -1,2 +1,4 @@
1
1
  require "bundler/gem_tasks"
2
+ require_relative "test/test_helper"
2
3
 
4
+ Ethereal::Application.load_tasks
@@ -18,4 +18,6 @@ Gem::Specification.new do |spec|
18
18
 
19
19
  spec.add_development_dependency "bundler", "~> 1.7"
20
20
  spec.add_development_dependency "rake", "~> 10.0"
21
+ spec.add_development_dependency "rails", "~> 4.1"
22
+ spec.add_development_dependency "sqlite3"
21
23
  end
@@ -30,12 +30,17 @@ listen = (e) ->
30
30
  return false
31
31
 
32
32
  document.addEventListener 'click', (e) ->
33
+ el = e.target
34
+ while el? && !(el instanceof HTMLAnchorElement)
35
+ el = el.parentElement
33
36
 
34
- if e.target.getAttribute('disabled')? || e.target.dataset['remote'] != 'true'
37
+ return unless el?
38
+
39
+ if el.getAttribute('disabled')? || el.dataset['remote'] != 'true'
35
40
  return
36
41
 
37
- xhr = new Ethereal.XHR(e.target)
38
- xhr.send(e.target.getAttribute('href'))
42
+ xhr = new Ethereal.XHR(el)
43
+ xhr.send(el.getAttribute('href'))
39
44
 
40
45
  e.preventDefault()
41
46
  return false
@@ -1,3 +1,3 @@
1
1
  module Ethereal
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -0,0 +1,11 @@
1
+ require 'rails/all'
2
+
3
+ Bundler.require(:default, Rails.env)
4
+
5
+ module Ethereal
6
+ class Application < Rails::Application
7
+ config.root = File.expand_path('../', __FILE__)
8
+ config.eager_load = false
9
+ end
10
+ end
11
+
@@ -0,0 +1,5 @@
1
+ test:
2
+ adapter: 'sqlite3'
3
+ database: ":memory:"
4
+ pool: 5
5
+ timeout: 5000
@@ -0,0 +1,24 @@
1
+ class PathsTest < ActiveSupport::TestCase
2
+ test "assets are in path" do
3
+ app = Rails.application
4
+ assets = app.paths['vendor/assets'].to_ary
5
+ paths = assets.select do |p|
6
+ p[/ethereal/]
7
+ end
8
+
9
+ assert(!paths.nil?, "Couldn't find path in assets")
10
+ assert(paths.any?, "Couldn't find path in assets")
11
+ end
12
+
13
+ test "views are in path" do
14
+ app = Rails.application
15
+ assets = app.paths['app/views'].to_ary
16
+ paths = assets.select do |p|
17
+ p[/ethereal/]
18
+ end
19
+
20
+ assert(!paths.nil?, "Couldn't find path in views")
21
+ assert(paths.any?, "Couldn't find path in views")
22
+ end
23
+
24
+ end
@@ -0,0 +1,15 @@
1
+ # The order of this file is important as some requirements execute ruby code automatically.
2
+
3
+ ENV['RAILS_ENV'] ||= 'test'
4
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
5
+
6
+ require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
7
+ require_relative 'application'
8
+
9
+ Ethereal::Application.initialize!
10
+
11
+ require 'rails/test_help'
12
+
13
+ class ActiveSupport::TestCase
14
+ end
15
+
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ethereal
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pier-Olivier Thibault
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-04 00:00:00.000000000 Z
11
+ date: 2014-11-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -38,6 +38,34 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rails
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '4.1'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '4.1'
55
+ - !ruby/object:Gem::Dependency
56
+ name: sqlite3
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
41
69
  description:
42
70
  email:
43
71
  - pothibo@gmail.com
@@ -62,12 +90,15 @@ files:
62
90
  - lib/ethereal/app/views/layouts/application.js.erb
63
91
  - lib/ethereal/railtie.rb
64
92
  - lib/ethereal/version.rb
93
+ - test/application.rb
94
+ - test/config/database.yml
95
+ - test/integration/load_test.rb
65
96
  - test/js/base.js
66
97
  - test/js/god.js
67
98
  - test/js/list.js
68
99
  - test/js/models.js
69
100
  - test/js/watcher.js
70
- - test/test.html
101
+ - test/test_helper.rb
71
102
  homepage:
72
103
  licenses:
73
104
  - MIT
@@ -88,14 +119,17 @@ required_rubygems_version: !ruby/object:Gem::Requirement
88
119
  version: '0'
89
120
  requirements: []
90
121
  rubyforge_project:
91
- rubygems_version: 2.2.2
122
+ rubygems_version: 2.2.0
92
123
  signing_key:
93
124
  specification_version: 4
94
125
  summary: Event based JavaScript framework tailored for Ruby on rails.
95
126
  test_files:
127
+ - test/application.rb
128
+ - test/config/database.yml
129
+ - test/integration/load_test.rb
96
130
  - test/js/base.js
97
131
  - test/js/god.js
98
132
  - test/js/list.js
99
133
  - test/js/models.js
100
134
  - test/js/watcher.js
101
- - test/test.html
135
+ - test/test_helper.rb
@@ -1,18 +0,0 @@
1
- <!DOCTYPE>
2
- <html>
3
- <head>
4
- <script src="js/base.js"></script>
5
- <script src="js/god.js"></script>
6
- <script src="js/models.js"></script>
7
- <script src="js/watcher.js"></script>
8
-
9
- <script src="js/list.js"></script>
10
- </head>
11
- <body>
12
-
13
- <ol as="List">
14
- <li>Hello</li>
15
- </ol>
16
-
17
- </body>
18
- </html>