marcandre-packable 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Rakefile +111 -0
- data/VERSION.yml +1 -1
- metadata +12 -12
data/Rakefile
ADDED
@@ -0,0 +1,111 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require 'rake'
|
3
|
+
require 'rake/testtask'
|
4
|
+
require 'rake/rdoctask'
|
5
|
+
require 'rcov/rcovtask'
|
6
|
+
|
7
|
+
begin
|
8
|
+
require 'jeweler'
|
9
|
+
Jeweler::Tasks.new do |gem|
|
10
|
+
gem.name = "packable"
|
11
|
+
gem.add_dependency "backports"
|
12
|
+
gem.summary = "Extensive packing and unpacking capabilities"
|
13
|
+
gem.email = "github@marc-andre.ca"
|
14
|
+
gem.homepage = "http://github.com/marcandre/packable"
|
15
|
+
gem.description = <<-EOS
|
16
|
+
If you need to do read and write binary data, there is of course <Array::pack and String::unpack
|
17
|
+
The packable library makes (un)packing nicer, smarter and more powerful.
|
18
|
+
EOS
|
19
|
+
gem.authors = ["Marc-André Lafortune"]
|
20
|
+
gem.rubyforge_project = "marcandre"
|
21
|
+
gem.has_rdoc = true
|
22
|
+
gem.rdoc_options << '--title' << 'Packable library' <<
|
23
|
+
'--main' << 'README.rdoc' <<
|
24
|
+
'--line-numbers' << '--inline-source'
|
25
|
+
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
26
|
+
end
|
27
|
+
rescue LoadError
|
28
|
+
puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
|
29
|
+
end
|
30
|
+
|
31
|
+
Rake::TestTask.new do |t|
|
32
|
+
t.libs << 'lib'
|
33
|
+
t.pattern = 'test/**/*_test.rb'
|
34
|
+
t.verbose = false
|
35
|
+
end
|
36
|
+
|
37
|
+
Rake::RDocTask.new do |rdoc|
|
38
|
+
rdoc.rdoc_dir = 'rdoc'
|
39
|
+
rdoc.title = 'packable'
|
40
|
+
rdoc.options << '--line-numbers' << '--inline-source'
|
41
|
+
rdoc.rdoc_files.include('README*')
|
42
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
43
|
+
end
|
44
|
+
|
45
|
+
Rcov::RcovTask.new do |t|
|
46
|
+
t.libs << 'test'
|
47
|
+
t.test_files = FileList['test/**/*_test.rb']
|
48
|
+
t.verbose = true
|
49
|
+
end
|
50
|
+
|
51
|
+
task :default => :rcov
|
52
|
+
|
53
|
+
# stats
|
54
|
+
begin
|
55
|
+
gem 'rails'
|
56
|
+
require 'code_statistics'
|
57
|
+
namespace :spec do
|
58
|
+
desc "Use Rails's rake:stats task for a gem"
|
59
|
+
task :statsetup do
|
60
|
+
class CodeStatistics
|
61
|
+
def calculate_statistics
|
62
|
+
@pairs.inject({}) do |stats, pair|
|
63
|
+
if 3 == pair.size
|
64
|
+
stats[pair.first] = calculate_directory_statistics(pair[1], pair[2]); stats
|
65
|
+
else
|
66
|
+
stats[pair.first] = calculate_directory_statistics(pair.last); stats
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
::STATS_DIRECTORIES = [['Libraries', 'lib', /.(sql|rhtml|erb|rb|yml)$/],
|
72
|
+
['Tests', 'test', /.(sql|rhtml|erb|rb|yml)$/]]
|
73
|
+
::CodeStatistics::TEST_TYPES << "Tests"
|
74
|
+
end
|
75
|
+
end
|
76
|
+
desc "Report code statistics (KLOCs, etc) from the application"
|
77
|
+
task :stats => "spec:statsetup" do
|
78
|
+
CodeStatistics.new(*STATS_DIRECTORIES).to_s
|
79
|
+
end
|
80
|
+
rescue Gem::LoadError => le
|
81
|
+
task :stats do
|
82
|
+
raise RuntimeError, "'rails' gem not found - you must install it in order to use this task.n"
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
|
87
|
+
begin
|
88
|
+
require 'rake/contrib/sshpublisher'
|
89
|
+
namespace :rubyforge do
|
90
|
+
|
91
|
+
desc "Release gem and RDoc documentation to RubyForge"
|
92
|
+
task :release => ["rubyforge:release:gem", "rubyforge:release:docs"]
|
93
|
+
|
94
|
+
namespace :release do
|
95
|
+
desc "Publish RDoc to RubyForge."
|
96
|
+
task :docs => [:rdoc] do
|
97
|
+
config = YAML.load(
|
98
|
+
File.read(File.expand_path('~/.rubyforge/user-config.yml'))
|
99
|
+
)
|
100
|
+
|
101
|
+
host = "#{config['username']}@rubyforge.org"
|
102
|
+
remote_dir = "/var/www/gforge-projects/marcandre/"
|
103
|
+
local_dir = 'rdoc'
|
104
|
+
|
105
|
+
Rake::SshDirPublisher.new(host, remote_dir, local_dir).upload
|
106
|
+
end
|
107
|
+
end
|
108
|
+
end
|
109
|
+
rescue LoadError
|
110
|
+
puts "Rake SshDirPublisher is unavailable or your rubyforge environment is not configured."
|
111
|
+
end
|
data/VERSION.yml
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: marcandre-packable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- "Marc-Andr\xC3\xA9 Lafortune"
|
@@ -9,11 +9,11 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-04-
|
12
|
+
date: 2009-04-07 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
|
-
name:
|
16
|
+
name: backports
|
17
17
|
type: :runtime
|
18
18
|
version_requirement:
|
19
19
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,14 +29,15 @@ executables: []
|
|
29
29
|
extensions: []
|
30
30
|
|
31
31
|
extra_rdoc_files:
|
32
|
-
- README.rdoc
|
33
32
|
- LICENSE
|
33
|
+
- README.rdoc
|
34
34
|
files:
|
35
35
|
- CHANGELOG.rdoc
|
36
|
+
- LICENSE
|
36
37
|
- README.rdoc
|
38
|
+
- Rakefile
|
37
39
|
- VERSION.yml
|
38
|
-
- lib/packable
|
39
|
-
- lib/packable/extensions
|
40
|
+
- lib/packable.rb
|
40
41
|
- lib/packable/extensions/array.rb
|
41
42
|
- lib/packable/extensions/float.rb
|
42
43
|
- lib/packable/extensions/integer.rb
|
@@ -46,23 +47,20 @@ files:
|
|
46
47
|
- lib/packable/extensions/string.rb
|
47
48
|
- lib/packable/mixin.rb
|
48
49
|
- lib/packable/packers.rb
|
49
|
-
- lib/packable.rb
|
50
50
|
- test/packing_doc_test.rb
|
51
51
|
- test/packing_test.rb
|
52
52
|
- test/test_helper.rb
|
53
|
-
- LICENSE
|
54
53
|
has_rdoc: true
|
55
54
|
homepage: http://github.com/marcandre/packable
|
56
55
|
post_install_message:
|
57
56
|
rdoc_options:
|
57
|
+
- --charset=UTF-8
|
58
58
|
- --title
|
59
59
|
- Packable library
|
60
60
|
- --main
|
61
61
|
- README.rdoc
|
62
62
|
- --line-numbers
|
63
63
|
- --inline-source
|
64
|
-
- --inline-source
|
65
|
-
- --charset=UTF-8
|
66
64
|
require_paths:
|
67
65
|
- lib
|
68
66
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -84,5 +82,7 @@ rubygems_version: 1.2.0
|
|
84
82
|
signing_key:
|
85
83
|
specification_version: 2
|
86
84
|
summary: Extensive packing and unpacking capabilities
|
87
|
-
test_files:
|
88
|
-
|
85
|
+
test_files:
|
86
|
+
- test/packing_doc_test.rb
|
87
|
+
- test/packing_test.rb
|
88
|
+
- test/test_helper.rb
|