casket 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/Gemfile +7 -0
- data/LICENSE.txt +20 -0
- data/Rakefile +42 -0
- data/VERSION +1 -0
- data/bin/casket +50 -0
- data/examples/barcode_generator/Gemfile +2 -0
- data/examples/barcode_generator/Rakefile +8 -0
- data/examples/barcode_generator/generator.rb +12 -0
- data/examples/hello_world/Gemfile +0 -0
- data/examples/hello_world/Rakefile +5 -0
- data/examples/hello_world/hello_world.rb +1 -0
- metadata +108 -18
- data/.gitignore +0 -4
- data/casket.gemspec +0 -35
data/.document
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2010 Paweł Placzyński
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rake'
|
3
|
+
|
4
|
+
require 'jeweler'
|
5
|
+
Jeweler::Tasks.new do |gem|
|
6
|
+
gem.name = "casket"
|
7
|
+
gem.homepage = "http://github.com/placek/casket"
|
8
|
+
gem.license = "MIT"
|
9
|
+
gem.summary = "Packaging project for Ruby similar to JAR for Java"
|
10
|
+
gem.description = "Packaging project for Ruby similar to JAR for Java"
|
11
|
+
gem.email = "placek@ragnarson.com"
|
12
|
+
gem.authors = ["Paweł Placzyński"]
|
13
|
+
gem.add_development_dependency 'rspec', '> 1.3.0'
|
14
|
+
gem.add_development_dependency "jeweler", ">= 1.4.0"
|
15
|
+
end
|
16
|
+
Jeweler::RubygemsDotOrgTasks.new
|
17
|
+
|
18
|
+
require 'spec/rake/spectask'
|
19
|
+
Spec::Rake::SpecTask.new(:spec) do |spec|
|
20
|
+
spec.libs << 'lib' << 'spec'
|
21
|
+
spec.spec_files = FileList['spec/**/*_spec.rb']
|
22
|
+
end
|
23
|
+
|
24
|
+
Spec::Rake::SpecTask.new(:rcov) do |spec|
|
25
|
+
spec.libs << 'lib' << 'spec'
|
26
|
+
spec.pattern = 'spec/**/*_spec.rb'
|
27
|
+
spec.rcov = true
|
28
|
+
end
|
29
|
+
|
30
|
+
task :spec => :check_dependencies
|
31
|
+
|
32
|
+
task :default => :spec
|
33
|
+
|
34
|
+
require 'rake/rdoctask'
|
35
|
+
Rake::RDocTask.new do |rdoc|
|
36
|
+
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
37
|
+
|
38
|
+
rdoc.rdoc_dir = 'rdoc'
|
39
|
+
rdoc.title = "casket #{version}"
|
40
|
+
rdoc.rdoc_files.include('README*')
|
41
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
42
|
+
end
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.1.3
|
data/bin/casket
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
require 'casket'
|
5
|
+
|
6
|
+
def parse_options args
|
7
|
+
options = Hash.new
|
8
|
+
if args.include? "--build"
|
9
|
+
options[:build] = true
|
10
|
+
else
|
11
|
+
|
12
|
+
if args.first == "--no-bundle"
|
13
|
+
options[:no_bundle] = true
|
14
|
+
args.shift
|
15
|
+
end
|
16
|
+
options[:path] = args.first
|
17
|
+
end
|
18
|
+
options
|
19
|
+
end
|
20
|
+
|
21
|
+
options = parse_options(ARGV)
|
22
|
+
casket = Casket.new
|
23
|
+
|
24
|
+
if options[:build]
|
25
|
+
casket.pack Dir.pwd
|
26
|
+
puts "[in #{Dir.pwd}]"
|
27
|
+
puts " Package created!"
|
28
|
+
else
|
29
|
+
if options[:path].nil?
|
30
|
+
puts "Usage:"
|
31
|
+
puts " casket [--no-bundle] PATH"
|
32
|
+
puts " casket --build"
|
33
|
+
puts
|
34
|
+
puts "Options:"
|
35
|
+
puts " --no-bundle Do not check dependencies while executing."
|
36
|
+
puts " --build Build package from current directory"
|
37
|
+
puts
|
38
|
+
else
|
39
|
+
unless options[:no_bundle]
|
40
|
+
casket.unpack options[:path]
|
41
|
+
casket.bundle
|
42
|
+
casket.rake
|
43
|
+
casket.close
|
44
|
+
else
|
45
|
+
casket.unpack options[:path]
|
46
|
+
casket.rake
|
47
|
+
casket.close
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'barby'
|
3
|
+
require 'barby/outputter/rmagick_outputter'
|
4
|
+
|
5
|
+
class Barcode
|
6
|
+
def self.create_barcode string
|
7
|
+
barcode = Barby::Code128.new string, "A"
|
8
|
+
File.open(ENV['HOME'] + File::SEPARATOR + 'out.png','w') do |f|
|
9
|
+
f.write barcode.to_png
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
puts "Hello World!"
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: casket
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 3
|
10
|
+
version: 0.1.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- "Pawe\xC5\x82 Placzy\xC5\x84ski"
|
@@ -15,22 +15,110 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-11-
|
19
|
-
default_executable:
|
20
|
-
dependencies:
|
21
|
-
|
22
|
-
|
18
|
+
date: 2010-11-16 00:00:00 +01:00
|
19
|
+
default_executable: casket
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
22
|
+
version_requirements: &id001 !ruby/object:Gem::Requirement
|
23
|
+
none: false
|
24
|
+
requirements:
|
25
|
+
- - ~>
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
hash: 23
|
28
|
+
segments:
|
29
|
+
- 1
|
30
|
+
- 0
|
31
|
+
- 0
|
32
|
+
version: 1.0.0
|
33
|
+
requirement: *id001
|
34
|
+
prerelease: false
|
35
|
+
type: :development
|
36
|
+
name: bundler
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
version_requirements: &id002 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ~>
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
hash: 1
|
44
|
+
segments:
|
45
|
+
- 1
|
46
|
+
- 5
|
47
|
+
- 1
|
48
|
+
version: 1.5.1
|
49
|
+
requirement: *id002
|
50
|
+
prerelease: false
|
51
|
+
type: :development
|
52
|
+
name: jeweler
|
53
|
+
- !ruby/object:Gem::Dependency
|
54
|
+
version_requirements: &id003 !ruby/object:Gem::Requirement
|
55
|
+
none: false
|
56
|
+
requirements:
|
57
|
+
- - ">="
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
hash: 3
|
60
|
+
segments:
|
61
|
+
- 0
|
62
|
+
version: "0"
|
63
|
+
requirement: *id003
|
64
|
+
prerelease: false
|
65
|
+
type: :development
|
66
|
+
name: rspec
|
67
|
+
- !ruby/object:Gem::Dependency
|
68
|
+
version_requirements: &id004 !ruby/object:Gem::Requirement
|
69
|
+
none: false
|
70
|
+
requirements:
|
71
|
+
- - ">"
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
hash: 27
|
74
|
+
segments:
|
75
|
+
- 1
|
76
|
+
- 3
|
77
|
+
- 0
|
78
|
+
version: 1.3.0
|
79
|
+
requirement: *id004
|
80
|
+
prerelease: false
|
81
|
+
type: :development
|
82
|
+
name: rspec
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
version_requirements: &id005 !ruby/object:Gem::Requirement
|
85
|
+
none: false
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
hash: 7
|
90
|
+
segments:
|
91
|
+
- 1
|
92
|
+
- 4
|
93
|
+
- 0
|
94
|
+
version: 1.4.0
|
95
|
+
requirement: *id005
|
96
|
+
prerelease: false
|
97
|
+
type: :development
|
98
|
+
name: jeweler
|
99
|
+
description: Packaging project for Ruby similar to JAR for Java
|
23
100
|
email: placek@ragnarson.com
|
24
|
-
executables:
|
25
|
-
|
101
|
+
executables:
|
102
|
+
- casket
|
26
103
|
extensions: []
|
27
104
|
|
28
105
|
extra_rdoc_files:
|
106
|
+
- LICENSE.txt
|
29
107
|
- README.rdoc
|
30
108
|
files:
|
31
|
-
- .
|
109
|
+
- .document
|
110
|
+
- Gemfile
|
111
|
+
- LICENSE.txt
|
32
112
|
- README.rdoc
|
33
|
-
-
|
113
|
+
- Rakefile
|
114
|
+
- VERSION
|
115
|
+
- bin/casket
|
116
|
+
- examples/barcode_generator/Gemfile
|
117
|
+
- examples/barcode_generator/Rakefile
|
118
|
+
- examples/barcode_generator/generator.rb
|
119
|
+
- examples/hello_world/Gemfile
|
120
|
+
- examples/hello_world/Rakefile
|
121
|
+
- examples/hello_world/hello_world.rb
|
34
122
|
- lib/casket.rb
|
35
123
|
- lib/minitar.rb
|
36
124
|
- lib/minitar/command.rb
|
@@ -38,11 +126,11 @@ files:
|
|
38
126
|
- spec/spec_helper.rb
|
39
127
|
has_rdoc: true
|
40
128
|
homepage: http://github.com/placek/casket
|
41
|
-
licenses:
|
42
|
-
|
129
|
+
licenses:
|
130
|
+
- MIT
|
43
131
|
post_install_message:
|
44
|
-
rdoc_options:
|
45
|
-
|
132
|
+
rdoc_options: []
|
133
|
+
|
46
134
|
require_paths:
|
47
135
|
- lib
|
48
136
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -69,7 +157,9 @@ rubyforge_project:
|
|
69
157
|
rubygems_version: 1.3.7
|
70
158
|
signing_key:
|
71
159
|
specification_version: 3
|
72
|
-
summary: Packaging
|
160
|
+
summary: Packaging project for Ruby similar to JAR for Java
|
73
161
|
test_files:
|
74
|
-
-
|
162
|
+
- examples/barcode_generator/generator.rb
|
163
|
+
- examples/hello_world/hello_world.rb
|
75
164
|
- spec/casket_spec.rb
|
165
|
+
- spec/spec_helper.rb
|
data/.gitignore
DELETED
data/casket.gemspec
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
|
3
|
-
CASKET_GEMSPEC = Gem::Specification.new do |s|
|
4
|
-
s.name = "casket"
|
5
|
-
s.version = "0.1.2"
|
6
|
-
|
7
|
-
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
|
-
s.authors = ["Paweł Placzyński"]
|
9
|
-
s.date = "2010-11-15"
|
10
|
-
s.description = "Packaging system for Ruby similar to JAR in Java."
|
11
|
-
s.email = "placek@ragnarson.com"
|
12
|
-
s.extra_rdoc_files = [
|
13
|
-
"README.rdoc"
|
14
|
-
]
|
15
|
-
s.files = [
|
16
|
-
".gitignore",
|
17
|
-
"README.rdoc",
|
18
|
-
"casket.gemspec",
|
19
|
-
"lib/casket.rb",
|
20
|
-
"lib/minitar.rb",
|
21
|
-
"lib/minitar/command.rb",
|
22
|
-
"spec/casket_spec.rb",
|
23
|
-
"spec/spec_helper.rb"
|
24
|
-
]
|
25
|
-
s.homepage = "http://github.com/placek/casket"
|
26
|
-
s.rdoc_options = ["--charset=UTF-8"]
|
27
|
-
s.require_paths = ["lib"]
|
28
|
-
s.rubygems_version = "1.3.7"
|
29
|
-
s.summary = "Packaging system for Ruby similar to JAR in Java."
|
30
|
-
s.test_files = [
|
31
|
-
"spec/spec_helper.rb",
|
32
|
-
"spec/casket_spec.rb"
|
33
|
-
]
|
34
|
-
|
35
|
-
end
|