coreisma-rails 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/.document +4 -0
- data/.rspec +1 -0
- data/Gemfile +7 -0
- data/LICENSE +20 -0
- data/README.md +19 -0
- data/Rakefile +49 -0
- data/VERSION +1 -0
- data/app/assets/javascripts/coreisma.js +112 -0
- data/coreisma-rails.gemspec +59 -0
- data/lib/coreisma-rails.rb +2 -0
- data/lib/coreisma/rails/engine.rb +6 -0
- data/lib/coreisma/rails/version.rb +6 -0
- data/spec/coreisma-rails_spec.rb +5 -0
- data/spec/spec_helper.rb +12 -0
- metadata +101 -0
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
ZjU0ZGQxZGFjZDg3MDVlNTQ2NmNkOGQzZDcwNTlmZjI0OGNlYTg1YQ==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
ODJmN2U2ODg4NWQ4ZGM1ZTM1ZTc3ZjFmMjA4OWE3OGRhMDk1NTkzNw==
|
7
|
+
!binary "U0hBNTEy":
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
NjVjYzI3YjVkYTYwYmE1Mjk1NWUxOThjNDlmZDEyOGRhYjY1YTViOWQwMjY0
|
10
|
+
ZGIxNmUxMmU4YmJjODQxMTg1MzI3ZDZmY2Y2ZWQ1ZjFiMmQyZDZiZjU2Y2Zi
|
11
|
+
MTI5NWZiOTAzYjFjZjM0ODM0YzMxMDMyMDk1MjhhYzFhZjNkOTA=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
YzZlMWQ5MDE4NmMyZTk5MGI2NDViZmYwYThiYWY0ODZhYTBjMTNhMjMyNTFl
|
14
|
+
N2UwMzgyNjVkYzRmMzRmNWJiMzIxZDQ1YWI1ZWJmZjYxYTFiMjBlNDNmMWRj
|
15
|
+
MGRhYjllM2NhZGRiY2M3NjFkMjhkNzE4YzA1ZGVkMjRjMDc4MTI=
|
data/.document
ADDED
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color
|
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2013 Nathan Davis Olds
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
6
|
+
this software and associated documentation files (the "Software"), to deal in
|
7
|
+
the Software without restriction, including without limitation the rights to
|
8
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
9
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
10
|
+
subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
17
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
18
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
19
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
20
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
# coreisma-rails
|
2
|
+
|
3
|
+
Exposes a rails engine for the coreisma javascript framework. The intent is to allow assets to be served through the asset pipeline.
|
4
|
+
|
5
|
+
## Contributing to coreisma-rails
|
6
|
+
|
7
|
+
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
|
8
|
+
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
|
9
|
+
* Fork the project.
|
10
|
+
* Start a feature/bugfix branch.
|
11
|
+
* Commit and push until you are happy with your contribution.
|
12
|
+
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
13
|
+
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
|
14
|
+
|
15
|
+
## Copyright
|
16
|
+
|
17
|
+
Copyright (c) 2013 Nathan Davis Olds. See LICENSE for
|
18
|
+
further details.
|
19
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
require 'bundler'
|
5
|
+
begin
|
6
|
+
Bundler.setup(:default, :development)
|
7
|
+
rescue Bundler::BundlerError => e
|
8
|
+
$stderr.puts e.message
|
9
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
10
|
+
exit e.status_code
|
11
|
+
end
|
12
|
+
require 'rake'
|
13
|
+
|
14
|
+
require 'jeweler'
|
15
|
+
Jeweler::Tasks.new do |gem|
|
16
|
+
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
|
17
|
+
gem.name = "coreisma-rails"
|
18
|
+
gem.homepage = "http://github.com/natedavisolds/coreisma-rails"
|
19
|
+
gem.license = "MIT"
|
20
|
+
gem.summary = %Q{Use Coreisma with Rails asset pipeline}
|
21
|
+
gem.description = %Q{Exposes coreisma javascript framework for use with Rails 3+}
|
22
|
+
gem.email = "nate@davisolds.com"
|
23
|
+
gem.authors = ["Nathan Davis Olds"]
|
24
|
+
# dependencies defined in Gemfile
|
25
|
+
end
|
26
|
+
Jeweler::RubygemsDotOrgTasks.new
|
27
|
+
|
28
|
+
require 'rspec/core'
|
29
|
+
require 'rspec/core/rake_task'
|
30
|
+
RSpec::Core::RakeTask.new(:spec) do |spec|
|
31
|
+
spec.pattern = FileList['spec/**/*_spec.rb']
|
32
|
+
end
|
33
|
+
|
34
|
+
RSpec::Core::RakeTask.new(:rcov) do |spec|
|
35
|
+
spec.pattern = 'spec/**/*_spec.rb'
|
36
|
+
spec.rcov = true
|
37
|
+
end
|
38
|
+
|
39
|
+
task :default => :spec
|
40
|
+
|
41
|
+
require 'rdoc/task'
|
42
|
+
Rake::RDocTask.new do |rdoc|
|
43
|
+
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
44
|
+
|
45
|
+
rdoc.rdoc_dir = 'rdoc'
|
46
|
+
rdoc.title = "coreisma-rails #{version}"
|
47
|
+
rdoc.rdoc_files.include('README*')
|
48
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
49
|
+
end
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.1.0
|
@@ -0,0 +1,112 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2013 Nathan Davis Olds. This software is licensed under the MIT License.
|
3
|
+
|
4
|
+
https://github.com/natedavisolds/coreisma
|
5
|
+
*/
|
6
|
+
|
7
|
+
var Coreisma = {
|
8
|
+
version: "0.1.0",
|
9
|
+
extend: function(extension) {
|
10
|
+
var extensionMethods = (typeof extension === 'function') ? extension(this) : extension;
|
11
|
+
|
12
|
+
for (var property in extensionMethods) {
|
13
|
+
if (extensionMethods.hasOwnProperty(property)) {
|
14
|
+
Coreisma[property] = extensionMethods[property];
|
15
|
+
}
|
16
|
+
}
|
17
|
+
|
18
|
+
return extensionMethods;
|
19
|
+
}
|
20
|
+
};
|
21
|
+
|
22
|
+
Coreisma.extend(function(core) {
|
23
|
+
var extensions = [];
|
24
|
+
|
25
|
+
var addExtension = function(extensionFunction) {
|
26
|
+
if (arguments.length > 1 && typeof arguments[0] !== 'function') { extensionFunction = arguments[1]; }
|
27
|
+
|
28
|
+
var extension = (typeof extensionFunction === 'function') ? extensionFunction(core, core.hub) : extensionFunction;
|
29
|
+
|
30
|
+
core.extend(extension);
|
31
|
+
|
32
|
+
extensions.push(extension);
|
33
|
+
|
34
|
+
return extension;
|
35
|
+
};
|
36
|
+
|
37
|
+
return {
|
38
|
+
addExtension: addExtension
|
39
|
+
};
|
40
|
+
});
|
41
|
+
|
42
|
+
Coreisma.addExtension("Hub", function(core) {
|
43
|
+
var addHub = function(hubFunction) {
|
44
|
+
core.hub = (typeof hubFunction === 'function') ? hubFunction(core) : hubFunction;
|
45
|
+
};
|
46
|
+
|
47
|
+
var addModule = function(moduleName, moduleFunction) {
|
48
|
+
if (core.hub) { core.hub.register(moduleName, moduleFunction); }
|
49
|
+
};
|
50
|
+
|
51
|
+
var getModule = function(moduleName) {
|
52
|
+
return (core.hub) ? core.hub.find(moduleName) : {};
|
53
|
+
};
|
54
|
+
|
55
|
+
var start = function() {
|
56
|
+
core.hub.broadcast('startup.modules', core.hub);
|
57
|
+
};
|
58
|
+
|
59
|
+
var stop = function() {
|
60
|
+
core.hub.broadcast('shutdown.modules', core.hub);
|
61
|
+
};
|
62
|
+
|
63
|
+
return {
|
64
|
+
addHub: addHub,
|
65
|
+
addModule: addModule,
|
66
|
+
getModule: getModule,
|
67
|
+
hub: {},
|
68
|
+
start: start,
|
69
|
+
stop: stop
|
70
|
+
};
|
71
|
+
});
|
72
|
+
|
73
|
+
Coreisma.addHub(function(core) {
|
74
|
+
var modules = {},
|
75
|
+
callBacks = {};
|
76
|
+
|
77
|
+
var broadcast = function(eventName, data) {
|
78
|
+
var eventCallBacks = callBacks[eventName];
|
79
|
+
|
80
|
+
for (var i in eventCallBacks) {
|
81
|
+
if (eventCallBacks.hasOwnProperty(i)) {
|
82
|
+
eventCallBacks[i](data);
|
83
|
+
}
|
84
|
+
}
|
85
|
+
};
|
86
|
+
|
87
|
+
var listen = function(eventName, module) {
|
88
|
+
if (!callBacks[eventName]) { callBacks[eventName] = []; }
|
89
|
+
|
90
|
+
callBacks[eventName].push(module);
|
91
|
+
};
|
92
|
+
|
93
|
+
var register = function(moduleName, moduleDefinition) {
|
94
|
+
var module = (typeof moduleDefinition === 'function') ? moduleDefinition(core, core.hub) : moduleDefinition;
|
95
|
+
|
96
|
+
modules[moduleName] = module;
|
97
|
+
|
98
|
+
if (typeof module.init === 'function') { listen('startup.modules', module.init); }
|
99
|
+
if (typeof module.shutdown === 'function') { listen('shutdown.modules', module.shutdown); }
|
100
|
+
};
|
101
|
+
|
102
|
+
var find = function(moduleName) {
|
103
|
+
return modules[moduleName];
|
104
|
+
};
|
105
|
+
|
106
|
+
return {
|
107
|
+
listen: listen,
|
108
|
+
broadcast: broadcast,
|
109
|
+
register: register,
|
110
|
+
find: find
|
111
|
+
};
|
112
|
+
});
|
@@ -0,0 +1,59 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = "coreisma-rails"
|
8
|
+
s.version = "0.1.0"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Nathan Davis Olds"]
|
12
|
+
s.date = "2013-12-29"
|
13
|
+
s.description = "Exposes coreisma javascript framework for use with Rails 3+"
|
14
|
+
s.email = "nate@davisolds.com"
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE",
|
17
|
+
"README.md"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
".document",
|
21
|
+
".rspec",
|
22
|
+
"Gemfile",
|
23
|
+
"LICENSE",
|
24
|
+
"README.md",
|
25
|
+
"Rakefile",
|
26
|
+
"VERSION",
|
27
|
+
"app/assets/javascripts/coreisma.js",
|
28
|
+
"coreisma-rails.gemspec",
|
29
|
+
"lib/coreisma-rails.rb",
|
30
|
+
"lib/coreisma/rails/engine.rb",
|
31
|
+
"lib/coreisma/rails/version.rb",
|
32
|
+
"spec/coreisma-rails_spec.rb",
|
33
|
+
"spec/spec_helper.rb"
|
34
|
+
]
|
35
|
+
s.homepage = "http://github.com/natedavisolds/coreisma-rails"
|
36
|
+
s.licenses = ["MIT"]
|
37
|
+
s.require_paths = ["lib"]
|
38
|
+
s.rubygems_version = "2.0.3"
|
39
|
+
s.summary = "Use Coreisma with Rails asset pipeline"
|
40
|
+
|
41
|
+
if s.respond_to? :specification_version then
|
42
|
+
s.specification_version = 4
|
43
|
+
|
44
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
45
|
+
s.add_development_dependency(%q<rspec>, ["~> 2.8.0"])
|
46
|
+
s.add_development_dependency(%q<bundler>, ["~> 1.0"])
|
47
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.8.7"])
|
48
|
+
else
|
49
|
+
s.add_dependency(%q<rspec>, ["~> 2.8.0"])
|
50
|
+
s.add_dependency(%q<bundler>, ["~> 1.0"])
|
51
|
+
s.add_dependency(%q<jeweler>, ["~> 1.8.7"])
|
52
|
+
end
|
53
|
+
else
|
54
|
+
s.add_dependency(%q<rspec>, ["~> 2.8.0"])
|
55
|
+
s.add_dependency(%q<bundler>, ["~> 1.0"])
|
56
|
+
s.add_dependency(%q<jeweler>, ["~> 1.8.7"])
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
2
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
3
|
+
require 'rspec'
|
4
|
+
require 'coreisma-rails'
|
5
|
+
|
6
|
+
# Requires supporting files with custom matchers and macros, etc,
|
7
|
+
# in ./support/ and its subdirectories.
|
8
|
+
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
|
9
|
+
|
10
|
+
RSpec.configure do |config|
|
11
|
+
|
12
|
+
end
|
metadata
ADDED
@@ -0,0 +1,101 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: coreisma-rails
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Nathan Davis Olds
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2013-12-29 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rspec
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 2.8.0
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 2.8.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: jeweler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ~>
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 1.8.7
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ~>
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 1.8.7
|
55
|
+
description: Exposes coreisma javascript framework for use with Rails 3+
|
56
|
+
email: nate@davisolds.com
|
57
|
+
executables: []
|
58
|
+
extensions: []
|
59
|
+
extra_rdoc_files:
|
60
|
+
- LICENSE
|
61
|
+
- README.md
|
62
|
+
files:
|
63
|
+
- .document
|
64
|
+
- .rspec
|
65
|
+
- Gemfile
|
66
|
+
- LICENSE
|
67
|
+
- README.md
|
68
|
+
- Rakefile
|
69
|
+
- VERSION
|
70
|
+
- app/assets/javascripts/coreisma.js
|
71
|
+
- coreisma-rails.gemspec
|
72
|
+
- lib/coreisma-rails.rb
|
73
|
+
- lib/coreisma/rails/engine.rb
|
74
|
+
- lib/coreisma/rails/version.rb
|
75
|
+
- spec/coreisma-rails_spec.rb
|
76
|
+
- spec/spec_helper.rb
|
77
|
+
homepage: http://github.com/natedavisolds/coreisma-rails
|
78
|
+
licenses:
|
79
|
+
- MIT
|
80
|
+
metadata: {}
|
81
|
+
post_install_message:
|
82
|
+
rdoc_options: []
|
83
|
+
require_paths:
|
84
|
+
- lib
|
85
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ! '>='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
91
|
+
requirements:
|
92
|
+
- - ! '>='
|
93
|
+
- !ruby/object:Gem::Version
|
94
|
+
version: '0'
|
95
|
+
requirements: []
|
96
|
+
rubyforge_project:
|
97
|
+
rubygems_version: 2.0.3
|
98
|
+
signing_key:
|
99
|
+
specification_version: 4
|
100
|
+
summary: Use Coreisma with Rails asset pipeline
|
101
|
+
test_files: []
|