bowline 0.1.6 → 0.3.9
Sign up to get free protection for your applications and to get access to all the features.
- data/README.txt +26 -23
- data/Rakefile +18 -23
- data/VERSION +1 -0
- data/assets/jquery.bowline.js +51 -29
- data/assets/jquery.js +2122 -1295
- data/bin/bowline-gen +1 -1
- data/bowline.gemspec +94 -17
- data/examples/twitter.html +18 -18
- data/lib/bowline.rb +10 -14
- data/lib/bowline/async.rb +29 -0
- data/lib/bowline/binders.rb +11 -40
- data/lib/bowline/binders/collection.rb +11 -8
- data/lib/bowline/binders/singleton.rb +9 -6
- data/lib/bowline/commands/run.rb +4 -11
- data/lib/bowline/dependencies/FAQ.markdown +6 -0
- data/lib/bowline/dependencies/MIT-LICENSE +20 -0
- data/lib/bowline/dependencies/README.markdown +51 -0
- data/lib/bowline/dependencies/Rakefile +10 -0
- data/lib/bowline/dependencies/TODO.markdown +4 -0
- data/lib/bowline/dependencies/init.rb +41 -0
- data/lib/bowline/dependencies/lib/dependencies.rb +9 -0
- data/lib/bowline/dependencies/lib/dependencies/dependency.rb +12 -0
- data/lib/bowline/dependencies/lib/dependencies/reader.rb +30 -0
- data/lib/bowline/dependencies/lib/dependencies/repository.rb +64 -0
- data/lib/bowline/dependencies/lib/ext/rubygems.rb +125 -0
- data/lib/bowline/dependencies/lib/template/app_script.rb +31 -0
- data/lib/bowline/dependencies/spec/spec.opts +4 -0
- data/lib/bowline/dependencies/tasks/dependencies.rake +164 -0
- data/lib/bowline/ext/array.rb +1 -1
- data/lib/bowline/generators.rb +1 -0
- data/lib/bowline/generators/application.rb +7 -2
- data/lib/bowline/generators/helper.rb +28 -0
- data/lib/bowline/helpers.rb +7 -0
- data/lib/bowline/initializer.rb +75 -41
- data/lib/bowline/observer.rb +42 -19
- data/lib/bowline/tasks/app.rake +143 -77
- data/lib/bowline/tasks/gems.rake +34 -0
- data/lib/bowline/tasks/{misk.rake → misc.rake} +0 -0
- data/lib/bowline/version.rb +11 -0
- data/lib/bowline/window.rb +19 -0
- data/templates/config/boot.rb +4 -3
- data/templates/config/environment.rb +8 -4
- data/templates/gitignore +0 -2
- data/templates/helper.rb +2 -0
- data/templates/public/icon.png +0 -0
- data/templates/public/index.html +8 -10
- metadata +38 -41
- data/Manifest.txt +0 -58
- data/lib/bowline/gem_dependency.rb +0 -42
- data/templates/config/manifest +0 -18
- data/templates/config/tiapp.xml +0 -24
@@ -0,0 +1,34 @@
|
|
1
|
+
namespace :gems do
|
2
|
+
desc "Install gems locally"
|
3
|
+
task :sync => [:environment] do
|
4
|
+
conf = Bowline.configuration
|
5
|
+
repo = Dependencies::Repository.new(
|
6
|
+
conf.gem_path
|
7
|
+
)
|
8
|
+
|
9
|
+
conf.gems.each do |dep|
|
10
|
+
gem = repo.gem(dep.name, dep.versions)
|
11
|
+
next unless repo.search(gem).empty?
|
12
|
+
repo.install(gem)
|
13
|
+
end
|
14
|
+
|
15
|
+
repo.reload_index!
|
16
|
+
|
17
|
+
full_list = conf.gems.map do |dep|
|
18
|
+
gem = repo.gem(dep.name, dep.versions)
|
19
|
+
spec = repo.index.search(gem).last
|
20
|
+
unless spec
|
21
|
+
raise Exception.new("A required dependency #{gem} was not found")
|
22
|
+
end
|
23
|
+
deps = spec.recursive_dependencies(gem, repo.index)
|
24
|
+
[spec] + deps
|
25
|
+
end.flatten.uniq.map do |spec|
|
26
|
+
"#{spec.name}-#{spec.version}"
|
27
|
+
end
|
28
|
+
|
29
|
+
(repo.installed - full_list).each do |g|
|
30
|
+
/^(.*)\-(.*)$/ =~ g
|
31
|
+
repo.uninstall($1, $2)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
File without changes
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module Bowline
|
2
|
+
class Window
|
3
|
+
def self.window
|
4
|
+
defined?(Titanium) && Titanium.UI.mainWindow.window
|
5
|
+
end
|
6
|
+
|
7
|
+
def initialize(obj = self.class.window)
|
8
|
+
@object = obj
|
9
|
+
end
|
10
|
+
|
11
|
+
def method_missing(*args)
|
12
|
+
Bowline.logger.info "Sending to Window: #{args.inspect}"
|
13
|
+
if defined?(Titanium)
|
14
|
+
@object = @object.send(*args)
|
15
|
+
end
|
16
|
+
self
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
data/templates/config/boot.rb
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
# Don't change this file!
|
2
2
|
# Configure your app in config/environment.rb and config/environments/*.rb
|
3
3
|
|
4
|
-
APP_ROOT = File.join(File.dirname(__FILE__), "..") unless defined?(APP_ROOT)
|
4
|
+
APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), "..")) unless defined?(APP_ROOT)
|
5
5
|
|
6
|
-
|
6
|
+
gems_path = File.join(APP_ROOT, *%w{vendor gems gems})
|
7
|
+
bowline_path = Dir[File.join(gems_path, *%w{{maccman-bowline*,bowline*} lib bowline.rb})][-1]
|
7
8
|
|
8
|
-
if
|
9
|
+
if bowline_path
|
9
10
|
require bowline_path
|
10
11
|
else
|
11
12
|
require "rubygems"
|
@@ -2,11 +2,15 @@
|
|
2
2
|
require File.join(File.dirname(__FILE__), 'boot')
|
3
3
|
|
4
4
|
Bowline::Initializer.run do |config|
|
5
|
-
config.name
|
6
|
-
|
5
|
+
config.name = <%= full_name.inspect %>
|
6
|
+
config.id = "com.<%= full_name.underscore %>"
|
7
|
+
config.version = "0.1.0"
|
8
|
+
config.publisher = "Example"
|
9
|
+
config.url = "http://example.com"
|
10
|
+
|
7
11
|
# config.gem "net-mdns", :lib => 'net/dns/mdns'
|
8
12
|
# config.gem "rack"
|
9
13
|
# config.gem "rubyzip", :lib => 'zip/zip'
|
10
|
-
|
11
|
-
config.
|
14
|
+
# Bowline Edge:
|
15
|
+
# config.gem "maccman-bowline", :lib => "bowline", :source => "http://gems.github.com"
|
12
16
|
end
|
data/templates/gitignore
CHANGED
data/templates/helper.rb
ADDED
Binary file
|
data/templates/public/index.html
CHANGED
@@ -1,22 +1,20 @@
|
|
1
|
-
<!DOCTYPE html
|
2
|
-
|
3
|
-
|
4
|
-
<html lang="en">
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
5
3
|
<head>
|
6
4
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
7
5
|
<title><%= full_name %></title>
|
8
|
-
|
9
|
-
<script src="http://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js" type="text/javascript"></script>
|
10
|
-
-->
|
6
|
+
<link rel="stylesheet" href="stylesheets/application.css" type="text/css" charset="utf-8">
|
11
7
|
<script src="javascripts/jquery.js" type="text/javascript" charset="utf-8"></script>
|
12
8
|
<script src="javascripts/jquery.chain.js" type="text/javascript" charset="utf-8"></script>
|
13
9
|
<script src="javascripts/jquery.bowline.js" type="text/javascript" charset="utf-8"></script>
|
14
|
-
<script src="../script/init" type="text/ruby" charset="utf-8"></script>
|
15
10
|
<script src="javascripts/application.js" type="text/javascript" charset="utf-8"></script>
|
16
|
-
<link rel="stylesheet" href="stylesheets/application.css" type="text/css" charset="utf-8">
|
17
11
|
<script type="text/javascript" charset="utf-8">
|
12
|
+
// Example:
|
18
13
|
// jQuery(function($){
|
19
|
-
//
|
14
|
+
// $.bowline.ready(function(){
|
15
|
+
// $('#tweets').bowline('tweets');
|
16
|
+
// $('#tweets').invoke('index');
|
17
|
+
// })
|
20
18
|
// });
|
21
19
|
</script>
|
22
20
|
</head>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bowline
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex MacCaw
|
@@ -9,8 +9,8 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
13
|
-
default_executable:
|
12
|
+
date: 2009-07-15 00:00:00 +01:00
|
13
|
+
default_executable: bowline-gen
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: templater
|
@@ -32,44 +32,21 @@ dependencies:
|
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 2.3.2
|
34
34
|
version:
|
35
|
-
|
36
|
-
|
37
|
-
type: :development
|
38
|
-
version_requirement:
|
39
|
-
version_requirements: !ruby/object:Gem::Requirement
|
40
|
-
requirements:
|
41
|
-
- - ">="
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
version: 1.3.0
|
44
|
-
version:
|
45
|
-
- !ruby/object:Gem::Dependency
|
46
|
-
name: hoe
|
47
|
-
type: :development
|
48
|
-
version_requirement:
|
49
|
-
version_requirements: !ruby/object:Gem::Requirement
|
50
|
-
requirements:
|
51
|
-
- - ">="
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: 1.8.0
|
54
|
-
version:
|
55
|
-
description: Ruby desktop application framework
|
56
|
-
email:
|
57
|
-
- info@eribium.org
|
35
|
+
description: Ruby/JS GUI framework
|
36
|
+
email: alex@leadthinking.com
|
58
37
|
executables:
|
59
38
|
- bowline-gen
|
60
39
|
extensions: []
|
61
40
|
|
62
41
|
extra_rdoc_files:
|
63
|
-
- History.txt
|
64
|
-
- Manifest.txt
|
65
42
|
- README.txt
|
66
43
|
files:
|
67
44
|
- .gitignore
|
68
45
|
- History.txt
|
69
46
|
- MIT-LICENSE
|
70
|
-
- Manifest.txt
|
71
47
|
- README.txt
|
72
48
|
- Rakefile
|
49
|
+
- VERSION
|
73
50
|
- assets/jquery.bowline.js
|
74
51
|
- assets/jquery.chain.js
|
75
52
|
- assets/jquery.js
|
@@ -77,45 +54,64 @@ files:
|
|
77
54
|
- bowline.gemspec
|
78
55
|
- examples/account.rb
|
79
56
|
- examples/example.js
|
80
|
-
- examples/twitter.html
|
81
57
|
- examples/tweets.rb
|
58
|
+
- examples/twitter.html
|
82
59
|
- examples/users.rb
|
83
60
|
- lib/bowline.rb
|
61
|
+
- lib/bowline/async.rb
|
84
62
|
- lib/bowline/binders.rb
|
85
63
|
- lib/bowline/binders/collection.rb
|
86
64
|
- lib/bowline/binders/singleton.rb
|
87
65
|
- lib/bowline/commands/console.rb
|
88
66
|
- lib/bowline/commands/generate.rb
|
89
67
|
- lib/bowline/commands/run.rb
|
68
|
+
- lib/bowline/dependencies/FAQ.markdown
|
69
|
+
- lib/bowline/dependencies/MIT-LICENSE
|
70
|
+
- lib/bowline/dependencies/README.markdown
|
71
|
+
- lib/bowline/dependencies/Rakefile
|
72
|
+
- lib/bowline/dependencies/TODO.markdown
|
73
|
+
- lib/bowline/dependencies/init.rb
|
74
|
+
- lib/bowline/dependencies/lib/dependencies.rb
|
75
|
+
- lib/bowline/dependencies/lib/dependencies/dependency.rb
|
76
|
+
- lib/bowline/dependencies/lib/dependencies/reader.rb
|
77
|
+
- lib/bowline/dependencies/lib/dependencies/repository.rb
|
78
|
+
- lib/bowline/dependencies/lib/ext/rubygems.rb
|
79
|
+
- lib/bowline/dependencies/lib/template/app_script.rb
|
80
|
+
- lib/bowline/dependencies/spec/spec.opts
|
81
|
+
- lib/bowline/dependencies/tasks/dependencies.rake
|
90
82
|
- lib/bowline/ext/array.rb
|
91
83
|
- lib/bowline/ext/class.rb
|
92
84
|
- lib/bowline/ext/object.rb
|
93
85
|
- lib/bowline/ext/string.rb
|
94
|
-
- lib/bowline/gem_dependency.rb
|
95
86
|
- lib/bowline/generators.rb
|
96
87
|
- lib/bowline/generators/application.rb
|
97
88
|
- lib/bowline/generators/binder.rb
|
89
|
+
- lib/bowline/generators/helper.rb
|
98
90
|
- lib/bowline/generators/migration.rb
|
99
91
|
- lib/bowline/generators/model.rb
|
92
|
+
- lib/bowline/helpers.rb
|
100
93
|
- lib/bowline/initializer.rb
|
101
94
|
- lib/bowline/jquery.rb
|
102
95
|
- lib/bowline/observer.rb
|
103
96
|
- lib/bowline/tasks/app.rake
|
104
97
|
- lib/bowline/tasks/bowline.rb
|
105
98
|
- lib/bowline/tasks/database.rake
|
99
|
+
- lib/bowline/tasks/gems.rake
|
106
100
|
- lib/bowline/tasks/log.rake
|
107
|
-
- lib/bowline/tasks/
|
101
|
+
- lib/bowline/tasks/misc.rake
|
102
|
+
- lib/bowline/version.rb
|
103
|
+
- lib/bowline/window.rb
|
108
104
|
- templates/Rakefile
|
109
105
|
- templates/binder.rb
|
110
106
|
- templates/config/application.yml
|
111
107
|
- templates/config/boot.rb
|
112
108
|
- templates/config/database.yml
|
113
109
|
- templates/config/environment.rb
|
114
|
-
- templates/config/manifest
|
115
|
-
- templates/config/tiapp.xml
|
116
110
|
- templates/gitignore
|
111
|
+
- templates/helper.rb
|
117
112
|
- templates/migration.rb
|
118
113
|
- templates/model.rb
|
114
|
+
- templates/public/icon.png
|
119
115
|
- templates/public/index.html
|
120
116
|
- templates/public/javascripts/application.js
|
121
117
|
- templates/public/stylesheets/application.css
|
@@ -128,8 +124,7 @@ licenses: []
|
|
128
124
|
|
129
125
|
post_install_message:
|
130
126
|
rdoc_options:
|
131
|
-
- --
|
132
|
-
- README.txt
|
127
|
+
- --charset=UTF-8
|
133
128
|
require_paths:
|
134
129
|
- lib
|
135
130
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -146,10 +141,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
146
141
|
version:
|
147
142
|
requirements: []
|
148
143
|
|
149
|
-
rubyforge_project:
|
150
|
-
rubygems_version: 1.3.
|
144
|
+
rubyforge_project:
|
145
|
+
rubygems_version: 1.3.4
|
151
146
|
signing_key:
|
152
147
|
specification_version: 3
|
153
|
-
summary:
|
154
|
-
test_files:
|
155
|
-
|
148
|
+
summary: Bowline GUI framework
|
149
|
+
test_files:
|
150
|
+
- examples/account.rb
|
151
|
+
- examples/tweets.rb
|
152
|
+
- examples/users.rb
|
data/Manifest.txt
DELETED
@@ -1,58 +0,0 @@
|
|
1
|
-
.gitignore
|
2
|
-
History.txt
|
3
|
-
MIT-LICENSE
|
4
|
-
Manifest.txt
|
5
|
-
README.txt
|
6
|
-
Rakefile
|
7
|
-
assets/jquery.bowline.js
|
8
|
-
assets/jquery.chain.js
|
9
|
-
assets/jquery.js
|
10
|
-
bin/bowline-gen
|
11
|
-
bowline.gemspec
|
12
|
-
examples/account.rb
|
13
|
-
examples/example.js
|
14
|
-
examples/twitter.html
|
15
|
-
examples/tweets.rb
|
16
|
-
examples/users.rb
|
17
|
-
lib/bowline.rb
|
18
|
-
lib/bowline/binders.rb
|
19
|
-
lib/bowline/binders/collection.rb
|
20
|
-
lib/bowline/binders/singleton.rb
|
21
|
-
lib/bowline/commands/console.rb
|
22
|
-
lib/bowline/commands/generate.rb
|
23
|
-
lib/bowline/commands/run.rb
|
24
|
-
lib/bowline/ext/array.rb
|
25
|
-
lib/bowline/ext/class.rb
|
26
|
-
lib/bowline/ext/object.rb
|
27
|
-
lib/bowline/ext/string.rb
|
28
|
-
lib/bowline/gem_dependency.rb
|
29
|
-
lib/bowline/generators.rb
|
30
|
-
lib/bowline/generators/application.rb
|
31
|
-
lib/bowline/generators/binder.rb
|
32
|
-
lib/bowline/generators/migration.rb
|
33
|
-
lib/bowline/generators/model.rb
|
34
|
-
lib/bowline/initializer.rb
|
35
|
-
lib/bowline/jquery.rb
|
36
|
-
lib/bowline/observer.rb
|
37
|
-
lib/bowline/tasks/app.rake
|
38
|
-
lib/bowline/tasks/bowline.rb
|
39
|
-
lib/bowline/tasks/database.rake
|
40
|
-
lib/bowline/tasks/log.rake
|
41
|
-
lib/bowline/tasks/misk.rake
|
42
|
-
templates/Rakefile
|
43
|
-
templates/binder.rb
|
44
|
-
templates/config/application.yml
|
45
|
-
templates/config/boot.rb
|
46
|
-
templates/config/database.yml
|
47
|
-
templates/config/environment.rb
|
48
|
-
templates/config/manifest
|
49
|
-
templates/config/tiapp.xml
|
50
|
-
templates/gitignore
|
51
|
-
templates/migration.rb
|
52
|
-
templates/model.rb
|
53
|
-
templates/public/index.html
|
54
|
-
templates/public/javascripts/application.js
|
55
|
-
templates/public/stylesheets/application.css
|
56
|
-
templates/script/console
|
57
|
-
templates/script/init
|
58
|
-
templates/script/run
|
@@ -1,42 +0,0 @@
|
|
1
|
-
module Bowline
|
2
|
-
class GemDependency
|
3
|
-
attr_accessor :lib, :source
|
4
|
-
|
5
|
-
def initialize(name, options = {})
|
6
|
-
require 'rubygems' unless Object.const_defined?(:Gem)
|
7
|
-
|
8
|
-
if options[:requirement]
|
9
|
-
req = options[:requirement]
|
10
|
-
elsif options[:version]
|
11
|
-
req = Gem::Requirement.create(options[:version])
|
12
|
-
else
|
13
|
-
req = Gem::Requirement.default
|
14
|
-
end
|
15
|
-
|
16
|
-
@dep = Gem::Dependency.new(name, req)
|
17
|
-
@lib = options[:lib]
|
18
|
-
@source = options[:source]
|
19
|
-
end
|
20
|
-
|
21
|
-
def add_load_paths
|
22
|
-
end
|
23
|
-
|
24
|
-
def name
|
25
|
-
@dep.name.to_s
|
26
|
-
end
|
27
|
-
|
28
|
-
def requirement
|
29
|
-
r = @dep.version_requirements
|
30
|
-
(r == Gem::Requirement.default) ? nil : r
|
31
|
-
end
|
32
|
-
|
33
|
-
def load
|
34
|
-
return if @loaded
|
35
|
-
require(@lib || name) unless @lib == false
|
36
|
-
@loaded = true
|
37
|
-
rescue LoadError
|
38
|
-
puts $!.to_s
|
39
|
-
$!.backtrace.each { |b| puts b }
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
data/templates/config/manifest
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
runtime: 0.4
|
2
|
-
api:0.4
|
3
|
-
python:0.4
|
4
|
-
javascript:0.4
|
5
|
-
ruby:0.4
|
6
|
-
tiapp:0.4
|
7
|
-
tiui:0.4
|
8
|
-
tinetwork:0.4
|
9
|
-
tigrowl:0.4
|
10
|
-
tifilesystem:0.4
|
11
|
-
timedia:0.4
|
12
|
-
tidesktop:0.4
|
13
|
-
tiplatform:0.4
|
14
|
-
tiprocess:0.4
|
15
|
-
tinotification:0.4
|
16
|
-
timonkey:0.4
|
17
|
-
tianalytics:0.4
|
18
|
-
tidatabase:0.4
|
data/templates/config/tiapp.xml
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<ti:app xmlns:ti="http://ti.appcelerator.org" xmlns:appc="http://www.appcelerator.org">
|
3
|
-
<id><%= app_id %></id>
|
4
|
-
<name><%= name %></name>
|
5
|
-
<version>0.1</version>
|
6
|
-
<window>
|
7
|
-
<id>initial</id>
|
8
|
-
<title>Bowline</title>
|
9
|
-
<url>app://public/index.html</url>
|
10
|
-
<width>750</width>
|
11
|
-
<height>800</height>
|
12
|
-
<fullscreen>false</fullscreen>
|
13
|
-
<!--
|
14
|
-
<minimizable>true</minimizable>
|
15
|
-
<maximizable>false</maximizable>
|
16
|
-
<max-width>900</max-width>
|
17
|
-
<max-height>800</max-height>
|
18
|
-
<min-width>400</min-width>
|
19
|
-
<min-height>300</min-height>
|
20
|
-
-->
|
21
|
-
<closeable>true</closeable>
|
22
|
-
<chrome>true</chrome>
|
23
|
-
</window>
|
24
|
-
</ti:app>
|