jasper-sample 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 8fa85838b02197b56c8f7c0380d98db4dfcf967a
4
+ data.tar.gz: aa48eea995fef539dc0e2d78b5aab4ab8e3ad6c9
5
+ SHA512:
6
+ metadata.gz: 6343902f21c6d896702a2593745ce25327e3a2846b97de7530fd6abc1ca8007d50262ab1d1f910c01ea9a6ea5f226ddc7d5fb0c03ebdbac3187231a7861b727c
7
+ data.tar.gz: b757413e67a83250452d97fcee92cd09d7cfff3c54b4890e1a484dca286020352140be117e716f74e451e5b7576ed06bef54ea81ab8a9d7fdb0e85e6a59cfae5
data/LICENSE ADDED
@@ -0,0 +1,27 @@
1
+ Copyright (c) 2015, MediariuM Ltd.
2
+ All rights reserved.
3
+
4
+ Redistribution and use in source and binary forms, with or without modification,
5
+ are permitted provided that the following conditions are met:
6
+
7
+ 1. Redistributions of source code must retain the above copyright notice,
8
+ this list of conditions and the following disclaimer.
9
+
10
+ 2. Redistributions in binary form must reproduce the above copyright notice,
11
+ this list of conditions and the following disclaimer in the documentation
12
+ and/or other materials provided with the distribution.
13
+
14
+ 3. Neither the name of the copyright holder nor the names of its contributors
15
+ may be used to endorse or promote products derived from this software
16
+ without specific prior written permission.
17
+
18
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21
+ IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
23
+ BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
25
+ OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
26
+ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
27
+ OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,3 @@
1
+ = Jasper Sample
2
+
3
+ Sample data (including images) for use with Jasper (Video Management System).
@@ -0,0 +1,30 @@
1
+ require 'jasper_core'
2
+ require 'jasper/sample/engine'
3
+
4
+ module Jasper
5
+ module Sample
6
+
7
+ def self.load_sample(file_name)
8
+ # If file exists within application it takes precedence.
9
+ if File.exists?(File.join(Rails.root, 'db', 'samples', "#{file_name}.rb"))
10
+ path = File.expand_path(File.join(Rails.root, 'db', 'samples', "#{file_name}.rb"))
11
+ else
12
+ # Otherwise we will use this gems default file.
13
+ path = File.expand_path(samples_path + "#{file_name}.rb")
14
+ end
15
+
16
+ # Check to see if the specified file has been loaded before
17
+ unless $LOADED_FEATURES.include?(path)
18
+ require path
19
+ puts "Loaded #{file_name.titleize} samples"
20
+ end
21
+ end
22
+
23
+ private
24
+
25
+ def self.samples_path
26
+ Pathname.new(File.join(File.dirname(__FILE__), '..', '..', 'db', 'samples'))
27
+ end
28
+
29
+ end
30
+ end
@@ -0,0 +1,14 @@
1
+ module Jasper
2
+ module Sample
3
+ class Engine < ::Rails::Engine
4
+ isolate_namespace Jasper
5
+ engine_name 'jasper_sample'
6
+
7
+ def self.load_samples
8
+ # TODO: ...
9
+ # Jasper::Sample.load_sample(...)
10
+ end
11
+
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,19 @@
1
+ module Jasper
2
+ module Sample
3
+
4
+ # Returns the version of the currently loaded Jasper as a <tt>Gem::Version</tt>
5
+ def self.gem_version
6
+ Gem::Version.new VERSION::STRING
7
+ end
8
+
9
+ module VERSION
10
+ MAJOR = 0
11
+ MINOR = 0
12
+ TINY = 8
13
+ PRE = nil
14
+
15
+ STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
16
+ end
17
+
18
+ end
19
+ end
@@ -0,0 +1,12 @@
1
+ require 'jasper/sample/gem_version'
2
+
3
+ module Jasper
4
+ module Sample
5
+
6
+ # Returns the version of the currently loaded Jasper as a string.
7
+ def self.version
8
+ VERSION::STRING
9
+ end
10
+
11
+ end
12
+ end
@@ -0,0 +1 @@
1
+ require 'jasper/sample'
metadata ADDED
@@ -0,0 +1,66 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: jasper-sample
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.8
5
+ platform: ruby
6
+ authors:
7
+ - Alexander Bragin
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-03-28 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: jasper-core
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '='
18
+ - !ruby/object:Gem::Version
19
+ version: 0.0.8
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '='
25
+ - !ruby/object:Gem::Version
26
+ version: 0.0.8
27
+ description: Required dependency for Jasper (Video Management System).
28
+ email: bragin-av@mediarium.com
29
+ executables: []
30
+ extensions: []
31
+ extra_rdoc_files: []
32
+ files:
33
+ - LICENSE
34
+ - README.rdoc
35
+ - lib/jasper/sample.rb
36
+ - lib/jasper/sample/engine.rb
37
+ - lib/jasper/sample/gem_version.rb
38
+ - lib/jasper/sample/version.rb
39
+ - lib/jasper_sample.rb
40
+ homepage: http://jasper-vms.com
41
+ licenses:
42
+ - BSD-3
43
+ metadata: {}
44
+ post_install_message:
45
+ rdoc_options:
46
+ - "--exclude"
47
+ - "."
48
+ require_paths:
49
+ - lib
50
+ required_ruby_version: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: 2.2.1
55
+ required_rubygems_version: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - ">="
58
+ - !ruby/object:Gem::Version
59
+ version: '0'
60
+ requirements: []
61
+ rubyforge_project:
62
+ rubygems_version: 2.4.5
63
+ signing_key:
64
+ specification_version: 4
65
+ summary: Sample data (including images) for use with Jasper (Video Management System).
66
+ test_files: []