furoshiki 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +21 -0
- data/.rvmrc +1 -0
- data/Gemfile +2 -0
- data/Gemfile.lock +7 -0
- data/LICENSE +14 -0
- data/README.rdoc +61 -0
- data/Rakefile +19 -0
- data/furoshiki.gemspec +20 -0
- data/lib/furoshiki/version.rb +4 -0
- data/lib/furoshiki.rb +5 -0
- metadata +73 -0
data/.gitignore
ADDED
data/.rvmrc
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
rvm use 1.9.2@furoshiki
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
2
|
+
Version 2, December 2004
|
3
|
+
|
4
|
+
Copyright (C) 2010 Steve Klabnik <steve@steveklabnik.com>
|
5
|
+
|
6
|
+
Everyone is permitted to copy and distribute verbatim or modified
|
7
|
+
copies of this license document, and changing it is allowed as long
|
8
|
+
as the name is changed.
|
9
|
+
|
10
|
+
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
11
|
+
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
12
|
+
|
13
|
+
0. You just DO WHAT THE FUCK YOU WANT TO.
|
14
|
+
|
data/README.rdoc
ADDED
@@ -0,0 +1,61 @@
|
|
1
|
+
= furoshiki
|
2
|
+
|
3
|
+
風呂敷 (Furoshiki) is a simple way to package your Ruby applications for distribution on Windows, Linux, and OSX. A 風呂敷 is "a type of traditional Japanese wrapping cloth that were frequently used to transport clothes, gifts, or other goods."
|
4
|
+
|
5
|
+
In our case, you can distribute your Ruby script with 風呂敷 by adding this to your Rakefile:
|
6
|
+
|
7
|
+
require 'furoshiki'
|
8
|
+
|
9
|
+
PackageTask.new
|
10
|
+
|
11
|
+
If you'd like to set a different entry point, just configure your task:
|
12
|
+
|
13
|
+
PackageTask.new do
|
14
|
+
entry "SomeClass#some_method"
|
15
|
+
end
|
16
|
+
|
17
|
+
and it'll do the right thing.
|
18
|
+
|
19
|
+
== ALPHA WARNING
|
20
|
+
|
21
|
+
This is all super alpha, and is subject to change at any time.
|
22
|
+
|
23
|
+
== Inspiration
|
24
|
+
|
25
|
+
The inspiriation for 風呂敷 came from Shoes[http://shoesrb.com]. One of Shoes' best features is packaging up scripts made with Shoes into their own executables. You could take any little script and make a .app, .exe, or .run file. However, this code was really complicated, and made Shoes hard to maintain. It was often the source of people's problems when trying to build Shoes of their own. So, while working on Shoes 4, I decided to see if anyone else was doing anything similar. I came across the .app for libgosu[http://code.google.com/p/gosu/wiki/RubyPackagingOnOsx], which was doing a similar thing. After emailing Julian, I decided that if this was useful for Shoes, and useful for libgosu, it'd probably be useful for other projects, too. So I've set out to figure out the Shoes packager, play with the libgosu versions, and come up with an easy way for you to bundle and distribute GUI programs written in Ruby.
|
26
|
+
|
27
|
+
== Helping out with 風呂敷
|
28
|
+
|
29
|
+
風呂敷uses the following 'stack':
|
30
|
+
|
31
|
+
* Ruby 1.9.2
|
32
|
+
* Bundler
|
33
|
+
* git flow
|
34
|
+
|
35
|
+
I personally use rvm, so I also have a .rvmrc set up. It'll switch to the right Ruby when you cd into the directory, so you might see something about needing to create a gemset. If you use rvm, it's probably a good idea:
|
36
|
+
|
37
|
+
$ rvm gemset create furoshiki
|
38
|
+
|
39
|
+
Since you've made a new gemset, you'll probably need to install bundler:
|
40
|
+
|
41
|
+
$ gem install bundler
|
42
|
+
|
43
|
+
and then you should be good to go. Currently, we have no dependancies. I'm sure that'll change. :)
|
44
|
+
|
45
|
+
=== A note about git flow
|
46
|
+
|
47
|
+
git-flow[http://github.com/nvie/gitflow] is totally awesome, so I use it to manage my branches. I'm just using the default settings. What this means for you: you can use git-flow, but if you don't, master is just for stable stuff, develop is where all the action is happening. Patches and pull requests should be created off of develop.
|
48
|
+
|
49
|
+
=== Note on Patches/Pull Requests
|
50
|
+
|
51
|
+
* Fork the project.
|
52
|
+
* Make your feature addition or bug fix.
|
53
|
+
* Add tests for it. This is important so I don't break it in a
|
54
|
+
future version unintentionally.
|
55
|
+
* Commit, do not mess with rakefile, version, or history.
|
56
|
+
(if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
|
57
|
+
* Send me a pull request. Bonus points for topic branches.
|
58
|
+
|
59
|
+
== Copyright
|
60
|
+
|
61
|
+
Copyright (c) 2010 Steve Klabnik. See LICENSE for details.
|
data/Rakefile
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'bundler'
|
2
|
+
Bundler::GemHelper.install_tasks
|
3
|
+
|
4
|
+
@types = %w[rb]
|
5
|
+
namespace :whitespace do
|
6
|
+
desc 'Removes trailing whitespace'
|
7
|
+
task :cleanup do
|
8
|
+
@types.each do |type|
|
9
|
+
sh %{find . -name '*.#{type}' -exec sed -i '' 's/ *$//g' {} \\;}
|
10
|
+
end
|
11
|
+
end
|
12
|
+
desc 'Turns tabs into two spaces'
|
13
|
+
task :retab do
|
14
|
+
@types.each do |type|
|
15
|
+
sh %{find . -name '*.#{type}' -exec sed -i '' 's/\t/ /g' {} \\;}
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
data/furoshiki.gemspec
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "furoshiki/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "furoshiki"
|
7
|
+
s.version = Furoshiki::VERSION
|
8
|
+
s.authors = ["Steve Klabnik"]
|
9
|
+
s.email = "steve@steveklabnik.com"
|
10
|
+
s.homepage = "http://github.com/steveklabnik/furoshiki"
|
11
|
+
s.summary = %q{Package and distribute applications with Ruby.}
|
12
|
+
s.description = %q{Create .app, .exe, and $LINUX_PACKAGE versions of your application, with its own embedded Ruby.}
|
13
|
+
|
14
|
+
s.files = `git ls-files`.split("\n")
|
15
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
16
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
17
|
+
s.require_paths = ["lib"]
|
18
|
+
|
19
|
+
#s.add_dependency "gem", "version"
|
20
|
+
end
|
data/lib/furoshiki.rb
ADDED
metadata
ADDED
@@ -0,0 +1,73 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: furoshiki
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 0
|
8
|
+
- 1
|
9
|
+
version: 0.0.1
|
10
|
+
platform: ruby
|
11
|
+
authors:
|
12
|
+
- Steve Klabnik
|
13
|
+
autorequire:
|
14
|
+
bindir: bin
|
15
|
+
cert_chain: []
|
16
|
+
|
17
|
+
date: 2010-10-18 00:00:00 -04:00
|
18
|
+
default_executable:
|
19
|
+
dependencies: []
|
20
|
+
|
21
|
+
description: Create .app, .exe, and $LINUX_PACKAGE versions of your application, with its own embedded Ruby.
|
22
|
+
email: steve@steveklabnik.com
|
23
|
+
executables: []
|
24
|
+
|
25
|
+
extensions: []
|
26
|
+
|
27
|
+
extra_rdoc_files: []
|
28
|
+
|
29
|
+
files:
|
30
|
+
- .gitignore
|
31
|
+
- .rvmrc
|
32
|
+
- Gemfile
|
33
|
+
- Gemfile.lock
|
34
|
+
- LICENSE
|
35
|
+
- README.rdoc
|
36
|
+
- Rakefile
|
37
|
+
- furoshiki.gemspec
|
38
|
+
- lib/furoshiki.rb
|
39
|
+
- lib/furoshiki/version.rb
|
40
|
+
has_rdoc: true
|
41
|
+
homepage: http://github.com/steveklabnik/furoshiki
|
42
|
+
licenses: []
|
43
|
+
|
44
|
+
post_install_message:
|
45
|
+
rdoc_options: []
|
46
|
+
|
47
|
+
require_paths:
|
48
|
+
- lib
|
49
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
segments:
|
55
|
+
- 0
|
56
|
+
version: "0"
|
57
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
58
|
+
none: false
|
59
|
+
requirements:
|
60
|
+
- - ">="
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
segments:
|
63
|
+
- 0
|
64
|
+
version: "0"
|
65
|
+
requirements: []
|
66
|
+
|
67
|
+
rubyforge_project:
|
68
|
+
rubygems_version: 1.3.7
|
69
|
+
signing_key:
|
70
|
+
specification_version: 3
|
71
|
+
summary: Package and distribute applications with Ruby.
|
72
|
+
test_files: []
|
73
|
+
|