maccman-bowline 0.4.1 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.txt +3 -1
- data/VERSION +1 -1
- data/bowline.gemspec +2 -8
- data/lib/bowline/tasks/app.rake +1 -1
- data/lib/bowline/version.rb +1 -1
- metadata +2 -8
- data/lib/bowline/dependencies/Rakefile +0 -10
- data/lib/bowline/dependencies/init.rb +0 -41
- data/lib/bowline/dependencies/lib/dependencies/reader.rb +0 -30
- data/lib/bowline/dependencies/lib/template/app_script.rb +0 -31
- data/lib/bowline/dependencies/spec/spec.opts +0 -4
- data/lib/bowline/dependencies/tasks/dependencies.rake +0 -164
data/README.txt
CHANGED
@@ -12,12 +12,14 @@ Ruby desktop application framework
|
|
12
12
|
* Uses Webkit
|
13
13
|
* View in HTML/JavaScript
|
14
14
|
* Binding between HTML & Ruby
|
15
|
-
* Cross platform (osx
|
15
|
+
* Cross platform (only osx atm)
|
16
16
|
|
17
17
|
= INTRODUCTION
|
18
18
|
|
19
19
|
If you've ever wished creating a desktop application was as simple
|
20
20
|
as creating a Rails website you'll be interested in Bowline.
|
21
|
+
Bowline is a Ruby GUI framework. You can design and build your
|
22
|
+
applications in an agile way, deploying them cross platform.
|
21
23
|
|
22
24
|
Bowline lets you take your existing skills and apply them to the desktop.
|
23
25
|
You can write apps in HTML/JavaScript/Ruby without having to worry about
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.3
|
data/bowline.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{bowline}
|
5
|
-
s.version = "0.4.
|
5
|
+
s.version = "0.4.3"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Alex MacCaw"]
|
9
|
-
s.date = %q{2009-07-
|
9
|
+
s.date = %q{2009-07-22}
|
10
10
|
s.default_executable = %q{bowline-gen}
|
11
11
|
s.description = %q{Ruby/JS GUI framework}
|
12
12
|
s.email = %q{alex@leadthinking.com}
|
@@ -42,17 +42,11 @@ Gem::Specification.new do |s|
|
|
42
42
|
"lib/bowline/dependencies/FAQ.markdown",
|
43
43
|
"lib/bowline/dependencies/MIT-LICENSE",
|
44
44
|
"lib/bowline/dependencies/README.markdown",
|
45
|
-
"lib/bowline/dependencies/Rakefile",
|
46
45
|
"lib/bowline/dependencies/TODO.markdown",
|
47
|
-
"lib/bowline/dependencies/init.rb",
|
48
46
|
"lib/bowline/dependencies/lib/dependencies.rb",
|
49
47
|
"lib/bowline/dependencies/lib/dependencies/dependency.rb",
|
50
|
-
"lib/bowline/dependencies/lib/dependencies/reader.rb",
|
51
48
|
"lib/bowline/dependencies/lib/dependencies/repository.rb",
|
52
49
|
"lib/bowline/dependencies/lib/ext/rubygems.rb",
|
53
|
-
"lib/bowline/dependencies/lib/template/app_script.rb",
|
54
|
-
"lib/bowline/dependencies/spec/spec.opts",
|
55
|
-
"lib/bowline/dependencies/tasks/dependencies.rake",
|
56
50
|
"lib/bowline/ext/array.rb",
|
57
51
|
"lib/bowline/ext/class.rb",
|
58
52
|
"lib/bowline/ext/object.rb",
|
data/lib/bowline/tasks/app.rake
CHANGED
@@ -119,7 +119,7 @@ tiprocess:0.4.4
|
|
119
119
|
build_path = File.join(APP_ROOT, 'build')
|
120
120
|
app_path = File.join(build_path, 'app')
|
121
121
|
|
122
|
-
ti_path = ENV['TIPATH']
|
122
|
+
ti_path = ENV['TIPATH'] ? ENV['TIPATH'].dup : begin
|
123
123
|
if RUBY_PLATFORM =~ /darwin/
|
124
124
|
'/Library/Application Support/Titanium'
|
125
125
|
elsif RUBY_PLATFORM =~ /win/
|
data/lib/bowline/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: maccman-bowline
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex MacCaw
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-07-
|
12
|
+
date: 2009-07-22 00:00:00 -07:00
|
13
13
|
default_executable: bowline-gen
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -68,17 +68,11 @@ files:
|
|
68
68
|
- lib/bowline/dependencies/FAQ.markdown
|
69
69
|
- lib/bowline/dependencies/MIT-LICENSE
|
70
70
|
- lib/bowline/dependencies/README.markdown
|
71
|
-
- lib/bowline/dependencies/Rakefile
|
72
71
|
- lib/bowline/dependencies/TODO.markdown
|
73
|
-
- lib/bowline/dependencies/init.rb
|
74
72
|
- lib/bowline/dependencies/lib/dependencies.rb
|
75
73
|
- lib/bowline/dependencies/lib/dependencies/dependency.rb
|
76
|
-
- lib/bowline/dependencies/lib/dependencies/reader.rb
|
77
74
|
- lib/bowline/dependencies/lib/dependencies/repository.rb
|
78
75
|
- 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
|
82
76
|
- lib/bowline/ext/array.rb
|
83
77
|
- lib/bowline/ext/class.rb
|
84
78
|
- lib/bowline/ext/object.rb
|
@@ -1,41 +0,0 @@
|
|
1
|
-
unless $block_dependencies_plugin_init
|
2
|
-
|
3
|
-
require File.join(File.dirname(__FILE__), 'lib', 'dependencies')
|
4
|
-
|
5
|
-
Gem.clear_paths
|
6
|
-
Gem.path.unshift(File.join(Rails.root, 'gems'))
|
7
|
-
|
8
|
-
deps = ::Dependencies::Reader.read_file(File.join(Rails.root, 'config', 'dependencies.rb'))
|
9
|
-
|
10
|
-
deps.each do |dep|
|
11
|
-
current_environment = ENV['RAILS_ENV'] || 'development'
|
12
|
-
|
13
|
-
options = {
|
14
|
-
:only => [current_environment],
|
15
|
-
:except => [],
|
16
|
-
:require_as => dep.name
|
17
|
-
}.merge(dep.options)
|
18
|
-
|
19
|
-
# swap their :only and :except to an array if they used a not-Array
|
20
|
-
[ :only, :except ].each do |option|
|
21
|
-
options[option] = [options[option].to_s] unless options[option].is_a?(Array)
|
22
|
-
end
|
23
|
-
|
24
|
-
# don't run if require_as is nil or false
|
25
|
-
next if [nil, false].include?(options[:require_as])
|
26
|
-
|
27
|
-
# don't run if the dependency wants an env that is not the current one
|
28
|
-
next unless options[:only].include?(current_environment)
|
29
|
-
|
30
|
-
# don't run if the dependency does not want to load in the current env
|
31
|
-
next if options[:except].include?(current_environment)
|
32
|
-
|
33
|
-
begin
|
34
|
-
require options[:require_as]
|
35
|
-
rescue LoadError => e
|
36
|
-
puts "was unable to require #{dep.name} as '#{options[:require_as]}'
|
37
|
-
Reason: #{e.class.name} error raised with message: #{e.message}"
|
38
|
-
end
|
39
|
-
end
|
40
|
-
|
41
|
-
end
|
@@ -1,30 +0,0 @@
|
|
1
|
-
require 'active_support/core_ext/hash/deep_merge'
|
2
|
-
require 'active_support/option_merger'
|
3
|
-
|
4
|
-
class Dependencies::Reader
|
5
|
-
|
6
|
-
attr_reader :dependencies
|
7
|
-
|
8
|
-
def self.read(definitions)
|
9
|
-
reader = new
|
10
|
-
reader.instance_eval(definitions)
|
11
|
-
reader.dependencies
|
12
|
-
end
|
13
|
-
|
14
|
-
def self.read_file(filename)
|
15
|
-
self.read(File.read(filename))
|
16
|
-
end
|
17
|
-
|
18
|
-
def initialize
|
19
|
-
@dependencies = []
|
20
|
-
end
|
21
|
-
|
22
|
-
def dependency(name, *options)
|
23
|
-
@dependencies << ::Dependencies::Dependency.new(name, *options)
|
24
|
-
end
|
25
|
-
|
26
|
-
def with_options(options)
|
27
|
-
yield ActiveSupport::OptionMerger.new(self, options)
|
28
|
-
end
|
29
|
-
|
30
|
-
end
|
@@ -1,31 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
# This was added by Merb's bundler
|
4
|
-
|
5
|
-
require "rubygems"
|
6
|
-
require File.join(File.dirname(__FILE__), "common")
|
7
|
-
|
8
|
-
gems_dir = File.join(File.dirname(__FILE__), '..', 'gems')
|
9
|
-
|
10
|
-
if File.directory?(gems_dir)
|
11
|
-
$BUNDLE = true
|
12
|
-
Gem.clear_paths
|
13
|
-
Gem.path.replace([File.expand_path(gems_dir)])
|
14
|
-
ENV["PATH"] = "#{File.dirname(__FILE__)}:#{ENV["PATH"]}"
|
15
|
-
|
16
|
-
gem_file = File.join(gems_dir, "specifications", "<%= spec.name %>-*.gemspec")
|
17
|
-
|
18
|
-
if local_gem = Dir[gem_file].last
|
19
|
-
version = File.basename(local_gem)[/-([\.\d]+)\.gemspec$/, 1]
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
version ||= "<%= Gem::Requirement.default %>"
|
24
|
-
|
25
|
-
if ARGV.first =~ /^_(.*)_$/ and Gem::Version.correct? $1 then
|
26
|
-
version = $1
|
27
|
-
ARGV.shift
|
28
|
-
end
|
29
|
-
|
30
|
-
gem '<%= @spec.name %>', version
|
31
|
-
load '<%= bin_file_name %>'
|
@@ -1,164 +0,0 @@
|
|
1
|
-
require "rubygems"
|
2
|
-
require "rubygems/source_index"
|
3
|
-
require "rubygems/dependency_installer"
|
4
|
-
require "rubygems/uninstaller"
|
5
|
-
require "fileutils"
|
6
|
-
|
7
|
-
# there has got to be a better way to do this
|
8
|
-
unless ARGV.first == 'dependencies:import'
|
9
|
-
Gem.clear_paths
|
10
|
-
Gem.path.unshift(File.join(RAILS_ROOT, 'gems'))
|
11
|
-
end
|
12
|
-
|
13
|
-
namespace :dependencies do
|
14
|
-
|
15
|
-
task :setup do
|
16
|
-
# avoid requiring environment by working up from vendor/plugins/dependencies/tasks
|
17
|
-
rails_root = File.expand_path(File.join(File.dirname(__FILE__), %w(.. .. .. ..)))
|
18
|
-
|
19
|
-
# Dependencies isn't loaded when running from rake. This is a good place to load it.
|
20
|
-
require File.expand_path(File.join(File.dirname(__FILE__), %w(.. lib dependencies))) unless defined?(Dependencies)
|
21
|
-
|
22
|
-
SETTINGS = {
|
23
|
-
:dependencies_file => File.join(rails_root, 'config', 'dependencies.rb'),
|
24
|
-
:gem_dir => File.join(rails_root, 'gems')
|
25
|
-
}
|
26
|
-
FileUtils.mkdir(SETTINGS[:gem_dir]) unless File.exists?(SETTINGS[:gem_dir])
|
27
|
-
end
|
28
|
-
|
29
|
-
task :load => :setup do
|
30
|
-
SETTINGS[:dependencies] = ::Dependencies::Reader.read_file(SETTINGS[:dependencies_file])
|
31
|
-
end
|
32
|
-
|
33
|
-
namespace :transaction do
|
34
|
-
task :setup do
|
35
|
-
SETTINGS[:gem_original_dir] = SETTINGS[:gem_dir]
|
36
|
-
SETTINGS[:gem_dir] = SETTINGS[:gem_dir] + '.install'
|
37
|
-
end
|
38
|
-
|
39
|
-
task :begin => :setup do
|
40
|
-
FileUtils.rm_rf(SETTINGS[:gem_dir])
|
41
|
-
FileUtils.cp_r(SETTINGS[:gem_original_dir], SETTINGS[:gem_dir])
|
42
|
-
end
|
43
|
-
|
44
|
-
task :commit => :setup do
|
45
|
-
FileUtils.rm_rf(SETTINGS[:gem_original_dir])
|
46
|
-
FileUtils.mv(SETTINGS[:gem_dir], SETTINGS[:gem_original_dir])
|
47
|
-
end
|
48
|
-
|
49
|
-
task :rollback => :setup do
|
50
|
-
FileUtils.rm_rf(SETTINGS[:gem_dir])
|
51
|
-
end
|
52
|
-
end
|
53
|
-
|
54
|
-
desc 'synchronize the stuff'
|
55
|
-
task :sync => [ :setup, :load ] do
|
56
|
-
Rake::Task['dependencies:transaction:begin'].invoke
|
57
|
-
|
58
|
-
begin
|
59
|
-
repo = Dependencies::Repository.new(SETTINGS[:gem_dir])
|
60
|
-
|
61
|
-
SETTINGS[:dependencies].each do |dep|
|
62
|
-
gem = repo.gem(dep.name, dep.versions)
|
63
|
-
next unless repo.search(gem).empty?
|
64
|
-
repo.install(gem)
|
65
|
-
end
|
66
|
-
|
67
|
-
repo.reload_index!
|
68
|
-
|
69
|
-
full_list = SETTINGS[:dependencies].map do |dep|
|
70
|
-
gem = repo.gem(dep.name, dep.versions)
|
71
|
-
spec = repo.index.search(gem).last
|
72
|
-
unless spec
|
73
|
-
# Rake::Task['dependencies:transaction:rollback'].invoke # gets run on rescue below.
|
74
|
-
raise Exception.new("A required dependency #{gem} was not found")
|
75
|
-
end
|
76
|
-
deps = spec.recursive_dependencies(gem, repo.index)
|
77
|
-
[spec] + deps
|
78
|
-
end.flatten.uniq.map do |spec|
|
79
|
-
"#{spec.name}-#{spec.version}"
|
80
|
-
end
|
81
|
-
|
82
|
-
(repo.installed - full_list).each do |g|
|
83
|
-
/^(.*)\-(.*)$/ =~ g
|
84
|
-
repo.uninstall($1, $2)
|
85
|
-
end
|
86
|
-
|
87
|
-
#confirm(gems)
|
88
|
-
|
89
|
-
Rake::Task['dependencies:transaction:commit'].invoke
|
90
|
-
|
91
|
-
rescue Exception => ex
|
92
|
-
puts ex.message
|
93
|
-
puts ex.backtrace
|
94
|
-
Rake::Task['dependencies:transaction:rollback'].invoke
|
95
|
-
end
|
96
|
-
end
|
97
|
-
|
98
|
-
desc 'Build a dependencies.rb from old config.gem style declarations'
|
99
|
-
task :import do
|
100
|
-
|
101
|
-
# gross
|
102
|
-
$block_dependencies_plugin_init = true
|
103
|
-
$gems_rake_task = true
|
104
|
-
$gems_build_rake_task = true
|
105
|
-
|
106
|
-
Rake::Task['environment'].invoke
|
107
|
-
environments = %w( development test production )
|
108
|
-
|
109
|
-
gems = environments.inject({}) do |memo, environment|
|
110
|
-
begin
|
111
|
-
ENV['RAILS_ENV'] = environment
|
112
|
-
RAILS_ENV = environment
|
113
|
-
load File.join(RAILS_ROOT, 'config', 'environment.rb')
|
114
|
-
rescue StandardError => ex
|
115
|
-
puts "Something went wrong: #{ex.message}"
|
116
|
-
exit 1
|
117
|
-
end
|
118
|
-
|
119
|
-
Rails.configuration.gems.each do |gem|
|
120
|
-
signature = [gem.name, gem.requirement.to_s]
|
121
|
-
memo[signature] ||= {
|
122
|
-
:name => gem.name,
|
123
|
-
:version => gem.requirement.to_s,
|
124
|
-
:require_as => gem.lib,
|
125
|
-
:environments => []
|
126
|
-
}
|
127
|
-
memo[signature][:environments] << environment
|
128
|
-
end
|
129
|
-
|
130
|
-
memo
|
131
|
-
end
|
132
|
-
|
133
|
-
all_environments, some_environments = gems.values.partition do |gem|
|
134
|
-
gem[:environments].sort == environments.sort
|
135
|
-
end
|
136
|
-
|
137
|
-
all_environments.each do |gem|
|
138
|
-
puts dependency_declaration_from_hash(gem)
|
139
|
-
end
|
140
|
-
|
141
|
-
environments.each do |environment|
|
142
|
-
gems = some_environments.select do |gem|
|
143
|
-
gem[:environments].include?(environment)
|
144
|
-
end
|
145
|
-
|
146
|
-
unless gems.length.zero?
|
147
|
-
puts
|
148
|
-
puts "with_options(:only => '#{environment}') do |#{environment}|"
|
149
|
-
gems.each do |gem|
|
150
|
-
puts " #{environment}." + dependency_declaration_from_hash(gem)
|
151
|
-
end
|
152
|
-
puts 'end'
|
153
|
-
end
|
154
|
-
end
|
155
|
-
end
|
156
|
-
end
|
157
|
-
|
158
|
-
def dependency_declaration_from_hash(gem)
|
159
|
-
declaration = []
|
160
|
-
declaration << "dependency '#{gem[:name]}'"
|
161
|
-
declaration << "'#{gem[:version]}'" unless gem[:version].blank?
|
162
|
-
declaration << ":require_as => '#{gem[:lib]}'" unless gem[:lib] == nil
|
163
|
-
declaration.join(', ')
|
164
|
-
end
|