volt-webix 0.1.0

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 8026ab4c851cf7da859e8c7f4d6169ca794aaf8e
4
+ data.tar.gz: fd83ddad3c2d94cb3d4a3873aae1dac52fc24b92
5
+ SHA512:
6
+ metadata.gz: 1713ba5341ee7be83a6f7ce383e5b552b5622813daf8b483dfc6f6c0bf7077e7aea2a2dbf2c3dd66d50eb02b72ee446b37d52b24cc72cd4cae99ba4696a2df4a
7
+ data.tar.gz: 36c11434dbe73538df7fca395b808f62880a784f44ef3625fdec930d629d85a6595c0773528bc2a5f3fceb6fc4229e91f4a3092d2f3d22b2705f9f4a2d34702e
@@ -0,0 +1,6 @@
1
+ # Change Log
2
+
3
+
4
+
5
+
6
+
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in volt-highcharts.gemspec
4
+ gemspec
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2015 Colin Gunn
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,78 @@
1
+ # Volt::Webix
2
+
3
+ A Volt component wrapping the Webix Javascript library.
4
+
5
+ It depends on opal-webix, a gem which wraps the Webix Javascript library in a client-side Ruby API.
6
+
7
+ See
8
+ - https://www.webix.com
9
+ - https://github.com/balmoral/volt-webix-app
10
+ - https://github.com/balmoral/volt-webix
11
+ - https://github.com/balmoral/opal-webix
12
+
13
+ ## Installation
14
+
15
+ Add this line to your application's Gemfile:
16
+
17
+ gem 'volt-webix'
18
+
19
+ And then execute:
20
+
21
+ $ bundle
22
+
23
+ Or install it yourself as:
24
+
25
+ $ gem install volt-webix
26
+
27
+ ## Usage
28
+
29
+ First include the gem in the project's Gemfile:
30
+
31
+ ```gem 'volt-webix'```
32
+
33
+ Put a licensed copy of `webix.css` in the application's `assets/css` folder.
34
+
35
+ Put a licensed copy of `webix.js` in the application's `assets/js` folder.
36
+
37
+ Next add volt-webix to the dependencies.rb file:
38
+
39
+ ```component 'webix'```
40
+
41
+ Add the component to a view html file:
42
+
43
+ ```html
44
+ <:webix />
45
+ ```
46
+
47
+ ### Example
48
+
49
+ Coming soon...
50
+
51
+ An example application can be found at https://github.com/balmoral/volt-webix-app.
52
+
53
+ See it running at https://volt-webix-app.herokuapp.com/.
54
+
55
+ ## To do
56
+
57
+ 1. much
58
+
59
+ ## Contributing
60
+
61
+ Contributions, comments and suggestions are welcome.
62
+
63
+ 1. Fork it ( http://github.com/balmoral/volt-webix/fork )
64
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
65
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
66
+ 4. Push to the branch (`git push origin my-new-feature`)
67
+ 5. Create new Pull Request
68
+
69
+ ## Licenses
70
+
71
+ ### Webix
72
+ Open source (GNU GPLv3) - cannot be distributed in non-open source projects.
73
+ Commercial licences available.
74
+ See http://webix.com/ for details.
75
+
76
+ ### volt-webix
77
+ MIT Licence.
78
+ See LICENSE.txt
@@ -0,0 +1,5 @@
1
+ # Component dependencies
2
+
3
+ Opal.use_gem 'opal-webix'
4
+ css_file 'https://cdn.webix.com/edge/webix.css'
5
+ javascript_file 'https://cdn.webix.com/edge/webix.js'
@@ -0,0 +1 @@
1
+ # Component routes
@@ -0,0 +1,54 @@
1
+ if RUBY_PLATFORM == 'opal'
2
+
3
+ require 'native'
4
+ require 'opal-webix'
5
+ require 'volt-watch'
6
+
7
+ module Webix
8
+ class MainController < Volt::ModelController
9
+ include Volt::Watch
10
+
11
+ attr_reader :reactive
12
+
13
+ def index_ready
14
+ debug __method__, __LINE__
15
+ init_layout
16
+ init_webix
17
+ end
18
+
19
+ def before_index_remove
20
+ debug __method__, __LINE__
21
+ stop_watches
22
+ deinit_webix
23
+ end
24
+
25
+ def webix
26
+ page._webix
27
+ end
28
+
29
+ protected
30
+
31
+ def init_layout
32
+ @layout = attrs.layout
33
+ unless @layout
34
+ raise ArgumentError, 'layout attribute must be given for :webix component'
35
+ end
36
+ end
37
+
38
+ def init_webix
39
+ page._webix = $webix
40
+ page._webix.ui << @layout.to_h
41
+ end
42
+
43
+ def deinit_webix
44
+ page._webix = nil
45
+ end
46
+
47
+ def debug(_method, line, s = nil)
48
+ Volt.logger.debug "#{self.class.name}##{_method}[#{line}] : #{s}"
49
+ end
50
+
51
+ end
52
+ end
53
+
54
+ end # RUBY_PLATFORM == 'opal'
@@ -0,0 +1 @@
1
+ <:Body>
@@ -0,0 +1,18 @@
1
+ # If you need to require in code in the gem's app folder, keep in mind that
2
+ # the app is not on the load path when the gem is required. Use
3
+ # app/{gemname}/config/initializers/boot.rb to require in client or server
4
+ # code.
5
+ #
6
+ # Also, in volt apps, you typically use the lib folder in the
7
+ # app/{componentname} folder instead of this lib folder. This lib folder is
8
+ # for setting up gem code when Bundler.require is called. (or the gem is
9
+ # required.)
10
+ #
11
+ # If you need to configure volt in some way, you can add a Volt.configure block
12
+ # in this file.
13
+
14
+ module Volt
15
+ module Webix
16
+ # Your code goes here...
17
+ end
18
+ end
@@ -0,0 +1,5 @@
1
+ module Volt
2
+ module Webix
3
+ VERSION = '0.1.0'
4
+ end
5
+ end
File without changes
@@ -0,0 +1,28 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ puts ">>>> lib=#{lib}"
4
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
+ require 'volt/webix/version'
6
+
7
+ Gem::Specification.new do |spec|
8
+ spec.name = "volt-webix"
9
+ spec.version = Volt::Webix::VERSION
10
+ spec.authors = ["Colin Gunn"]
11
+ spec.email = ["colgunn@icloud.com"]
12
+ spec.summary = %q{Volt component providing reactive wrapper for Webix Javascript library.}
13
+ spec.homepage = "https://github.com/balmoral/volt-webix"
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0")
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.required_ruby_version = '>= 2.1'
22
+ spec.add_runtime_dependency 'opal-webix', '~> 0.1.0'
23
+ spec.add_runtime_dependency 'volt-watch', '~> 0.1.0'
24
+
25
+ # spec.add_development_dependency "volt", "~> 0.9.5.pre3"
26
+ # spec.add_development_dependency 'rspec', '~> 3.2.0'
27
+ # spec.add_development_dependency "rake"
28
+ end
metadata ADDED
@@ -0,0 +1,85 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: volt-webix
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Colin Gunn
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-09-09 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: opal-webix
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 0.1.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 0.1.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: volt-watch
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 0.1.0
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 0.1.0
41
+ description:
42
+ email:
43
+ - colgunn@icloud.com
44
+ executables: []
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - CHANGELOG.md
49
+ - Gemfile
50
+ - LICENSE.txt
51
+ - README.md
52
+ - app/webix/config/dependencies.rb
53
+ - app/webix/config/routes.rb
54
+ - app/webix/controllers/main_controller.rb
55
+ - app/webix/views/main/index.html
56
+ - lib/volt/webix.rb
57
+ - lib/volt/webix/version.rb
58
+ - opal-highcharts.rb
59
+ - volt-webix.gemspec
60
+ homepage: https://github.com/balmoral/volt-webix
61
+ licenses:
62
+ - MIT
63
+ metadata: {}
64
+ post_install_message:
65
+ rdoc_options: []
66
+ require_paths:
67
+ - lib
68
+ required_ruby_version: !ruby/object:Gem::Requirement
69
+ requirements:
70
+ - - ">="
71
+ - !ruby/object:Gem::Version
72
+ version: '2.1'
73
+ required_rubygems_version: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - ">="
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ requirements: []
79
+ rubyforge_project:
80
+ rubygems_version: 2.4.6
81
+ signing_key:
82
+ specification_version: 4
83
+ summary: Volt component providing reactive wrapper for Webix Javascript library.
84
+ test_files: []
85
+ has_rdoc: