flok 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 6dd5854740ffca215345f553e605128fe4c96eaf
4
+ data.tar.gz: b8d705a36091be26a782332e85951e81d8cdb6b5
5
+ SHA512:
6
+ metadata.gz: b212db2926d45f322bbd5398f98507bc36a65bd13e9ca5572a2852e7b1fd206058cfb46a5103a2a6e4e81bc10cd107231ed6bbf86fdc2b6bc9fc1bb6051eccc3
7
+ data.tar.gz: 6dc1bd4f98989edca5e3a4555213456e3cb901b2668c82c406d6005b9fbf5cc54da2ff707d461d8b75944539271e7883fa963639284484ce6374bba61b5b3256
data/.gitignore ADDED
@@ -0,0 +1,22 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
18
+ *.bundle
19
+ *.so
20
+ *.o
21
+ *.a
22
+ mkmf.log
data/.travis.yml ADDED
@@ -0,0 +1,3 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.1.0
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in flok.gemspec
4
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2015 seo
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.
data/README.md ADDED
@@ -0,0 +1,47 @@
1
+ ![flok: The mobile application framework](https://raw.githubusercontent.com/sotownsend/flok/master/logo.png)
2
+
3
+ [![Gem Version](https://badge.fury.io/rb/iarrogant.svg)](http://badge.fury.io/rb/flok)
4
+ [![Build Status](https://travis-ci.org/sotownsend/flok.svg)](https://travis-ci.org/sotownsend/flok)
5
+ [![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/sotownsend/flok/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
6
+ [![License](http://img.shields.io/badge/license-MIT-green.svg?style=flat)](https://github.com/sotownsend/flok/blob/master/LICENSE)
7
+
8
+ # What is this?
9
+
10
+ A work in progress
11
+
12
+ ## Requirements
13
+
14
+ - Mac OS X 10.9+ (Untested)
15
+ - Ruby 2.1 or Higher
16
+
17
+ ## Communication
18
+
19
+ - If you **found a bug**, open an issue.
20
+ - If you **have a feature request**, open an issue.
21
+ - If you **want to contribute**, submit a pull request.
22
+
23
+ ## Installation
24
+
25
+ Run `sudo gem install flok`
26
+
27
+ ---
28
+
29
+ ## FAQ
30
+
31
+ ### When should I use flok?
32
+
33
+ Todo
34
+
35
+ ### What's Fittr?
36
+
37
+ Fittr is a SaaS company that focuses on providing personalized workouts and health information to individuals and corporations through phenomenal interfaces and algorithmic data-collection and processing.
38
+
39
+ * * *
40
+
41
+ ### Creator
42
+
43
+ - [Seo Townsend](http://github.com/sotownsend) ([@seotownsend](https://twitter.com/seotownsend))
44
+
45
+ ## License
46
+
47
+ flok is released under the MIT license. See LICENSE for details.
data/Rakefile ADDED
@@ -0,0 +1,8 @@
1
+ require 'rspec/core/rake_task'
2
+ require "bundler/gem_tasks"
3
+
4
+ # Default directory to look in is `/specs`
5
+ # Run with `rake spec`
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ task :default => :spec
data/bin/banner.png ADDED
Binary file
data/bin/flok ADDED
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'flok'
4
+ require 'thor'
5
+
6
+ class FlokCLI < Thor
7
+ desc "new <path>", "Create a new flok project and/or module, you may supply an absolute path or relative, the last entry in the path will be the module name and folder name of the project"
8
+ def new path
9
+ Dir.mkdir path
10
+ end
11
+ end
12
+
13
+ FlokCLI.start(ARGV)
data/flok.gemspec ADDED
@@ -0,0 +1,26 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'flok/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "flok"
8
+ spec.version = Flok::VERSION
9
+ spec.authors = ["seo"]
10
+ spec.email = ["seotownsend@icloud.com"]
11
+ spec.summary = "A boring javascript application framework"
12
+ spec.description = "Flok is a cross-platform application framework system that exports javascript files"
13
+ spec.homepage = "https://github.com/sotownsend/flok"
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.add_development_dependency "bundler", "~> 1.6"
22
+ spec.add_development_dependency "rake", "~> 10.3"
23
+ spec.add_development_dependency "rspec", "~> 3.2"
24
+ spec.add_runtime_dependency "thor", "~> 0.19"
25
+ spec.executables << 'flok'
26
+ end
@@ -0,0 +1,3 @@
1
+ module Flok
2
+ VERSION = "0.0.1"
3
+ end
data/lib/flok.rb ADDED
@@ -0,0 +1,5 @@
1
+ require "flok/version"
2
+
3
+ module Flok
4
+ # Your code goes here...
5
+ end
@@ -0,0 +1,8 @@
1
+ //Forward all custom events to all tasks
2
+ Rebar.handleCustomEvent = function(type, event) {
3
+ var len = Rebar.tasks.length;
4
+ for (var i = 0; i < len; ++i) {
5
+ var task = Rebar.tasks[i]
6
+ task.handle(type, event)
7
+ }
8
+ }
@@ -0,0 +1,4 @@
1
+ Rebar.hasInit = false
2
+ Rebar.handleInitEvent = function(event) {
3
+ Rebar.hasInit = true
4
+ }
@@ -0,0 +1,2 @@
1
+ Rebar.handleTickEvent = function(event){
2
+ }
@@ -0,0 +1,30 @@
1
+ Rebar.process = function(event) {
2
+ var type = event.type;
3
+ //All events need a type
4
+ if (type === undefined) { throw "Rebar got an event that had no type!"; }
5
+
6
+ if (Rebar.hasInit === false) {
7
+ if (type === "init") {
8
+ Rebar.handleInitEvent(event);
9
+ } else {
10
+ throw "Rebar got a first event that was not an init, it was " + type
11
+ }
12
+ } else {
13
+ //Is this a special event?
14
+ if (type === "tick") {
15
+ Rebar.handleTickEvent(event);
16
+ } else {
17
+ Rebar.handleCustomEvent(type, event);
18
+ }
19
+ }
20
+
21
+ //Return outbound event queue
22
+ var queue = Rebar.outboundEventQueue;
23
+ Rebar.outboundEventQueue = [];
24
+ return queue;
25
+ }
26
+
27
+ Rebar.outboundEventQueue = [];
28
+ Rebar.sendEvent = function(event) {
29
+ Rebar.outboundEventQueue.push(event);
30
+ }
@@ -0,0 +1,24 @@
1
+ //Global task list
2
+ Rebar.tasks = [];
3
+
4
+ Rebar.Task = function(name) {
5
+ this.name = name;
6
+ Rebar.tasks.push(this);
7
+
8
+ this.sendEvent = function(type, info) {
9
+ info.type = type;
10
+ Rebar.sendEvent(info);
11
+ }
12
+
13
+ var handlers = [];
14
+ this.on = function(name, callback) {
15
+ handlers[name] = callback;
16
+ }
17
+
18
+ this.handle = function(type, event) {
19
+ handler = handlers[type];
20
+ if (handler != undefined) {
21
+ handler(event)
22
+ }
23
+ }
24
+ }
data/logo.png ADDED
Binary file
data/spec/cli_spec.rb ADDED
@@ -0,0 +1,17 @@
1
+ require './lib/flok.rb'
2
+ require 'tempfile'
3
+ require 'securerandom'
4
+
5
+ RSpec.describe "CLI" do
6
+ it "Creates a new module folder" do
7
+ #Get a temporary file, delete it, but save the path
8
+ temp = Tempfile.new "flok-temp"
9
+ path = temp.path
10
+ temp.close
11
+ temp.unlink
12
+
13
+ `ruby -Ilib ./bin/flok new #{path}`
14
+
15
+ (Dir.exists? path).should eq(true)
16
+ end
17
+ end
metadata ADDED
@@ -0,0 +1,123 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: flok
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - seo
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-03-29 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.6'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.6'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.3'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.3'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.2'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.2'
55
+ - !ruby/object:Gem::Dependency
56
+ name: thor
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '0.19'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '0.19'
69
+ description: Flok is a cross-platform application framework system that exports javascript
70
+ files
71
+ email:
72
+ - seotownsend@icloud.com
73
+ executables:
74
+ - banner.png
75
+ - flok
76
+ extensions: []
77
+ extra_rdoc_files: []
78
+ files:
79
+ - ".gitignore"
80
+ - ".travis.yml"
81
+ - Gemfile
82
+ - LICENSE
83
+ - README.md
84
+ - Rakefile
85
+ - bin/banner.png
86
+ - bin/flok
87
+ - flok.gemspec
88
+ - lib/flok.rb
89
+ - lib/flok/version.rb
90
+ - lib/js/kernel/handleCustomEvent.js
91
+ - lib/js/kernel/handleInitEvent.js
92
+ - lib/js/kernel/handleTickEvent.js
93
+ - lib/js/kernel/pipe.js
94
+ - lib/js/kernel/task.js
95
+ - logo.png
96
+ - spec/cli_spec.rb
97
+ homepage: https://github.com/sotownsend/flok
98
+ licenses:
99
+ - MIT
100
+ metadata: {}
101
+ post_install_message:
102
+ rdoc_options: []
103
+ require_paths:
104
+ - lib
105
+ required_ruby_version: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - ">="
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
110
+ required_rubygems_version: !ruby/object:Gem::Requirement
111
+ requirements:
112
+ - - ">="
113
+ - !ruby/object:Gem::Version
114
+ version: '0'
115
+ requirements: []
116
+ rubyforge_project:
117
+ rubygems_version: 2.4.1
118
+ signing_key:
119
+ specification_version: 4
120
+ summary: A boring javascript application framework
121
+ test_files:
122
+ - spec/cli_spec.rb
123
+ has_rdoc: