r7z 1.0.2

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.
@@ -0,0 +1,54 @@
1
+
2
+ if HAVE_SPEC_RAKE_SPECTASK and not PROJ.spec.files.to_a.empty?
3
+ require 'spec/rake/verify_rcov'
4
+
5
+ namespace :spec do
6
+
7
+ desc 'Run all specs with basic output'
8
+ Spec::Rake::SpecTask.new(:run) do |t|
9
+ t.ruby_opts = PROJ.ruby_opts
10
+ t.spec_opts = PROJ.spec.opts
11
+ t.spec_files = PROJ.spec.files
12
+ t.libs += PROJ.libs
13
+ end
14
+
15
+ desc 'Run all specs with text output'
16
+ Spec::Rake::SpecTask.new(:specdoc) do |t|
17
+ t.ruby_opts = PROJ.ruby_opts
18
+ t.spec_opts = PROJ.spec.opts + ['--format', 'specdoc']
19
+ t.spec_files = PROJ.spec.files
20
+ t.libs += PROJ.libs
21
+ end
22
+
23
+ if HAVE_RCOV
24
+ desc 'Run all specs with RCov'
25
+ Spec::Rake::SpecTask.new(:rcov) do |t|
26
+ t.ruby_opts = PROJ.ruby_opts
27
+ t.spec_opts = PROJ.spec.opts
28
+ t.spec_files = PROJ.spec.files
29
+ t.libs += PROJ.libs
30
+ t.rcov = true
31
+ t.rcov_dir = PROJ.rcov.dir
32
+ t.rcov_opts = PROJ.rcov.opts + ['--exclude', 'spec']
33
+ end
34
+
35
+ RCov::VerifyTask.new(:verify) do |t|
36
+ t.threshold = PROJ.rcov.threshold
37
+ t.index_html = File.join(PROJ.rcov.dir, 'index.html')
38
+ t.require_exact_threshold = PROJ.rcov.threshold_exact
39
+ end
40
+
41
+ task :verify => :rcov
42
+ remove_desc_for_task %w(spec:clobber_rcov)
43
+ end
44
+
45
+ end # namespace :spec
46
+
47
+ desc 'Alias to spec:run'
48
+ task :spec => 'spec:run'
49
+
50
+ task :clobber => 'spec:clobber_rcov' if HAVE_RCOV
51
+
52
+ end # if HAVE_SPEC_RAKE_SPECTASK
53
+
54
+ # EOF
@@ -0,0 +1,47 @@
1
+
2
+ if HAVE_SVN
3
+
4
+ unless PROJ.svn.root
5
+ info = %x/svn info ./
6
+ m = %r/^Repository Root:\s+(.*)$/.match(info)
7
+ PROJ.svn.root = (m.nil? ? '' : m[1])
8
+ end
9
+ PROJ.svn.root = File.join(PROJ.svn.root, PROJ.svn.path) unless PROJ.svn.path.empty?
10
+
11
+ namespace :svn do
12
+
13
+ # A prerequisites task that all other tasks depend upon
14
+ task :prereqs
15
+
16
+ desc 'Show tags from the SVN repository'
17
+ task :show_tags => 'svn:prereqs' do |t|
18
+ tags = %x/svn list #{File.join(PROJ.svn.root, PROJ.svn.tags)}/
19
+ tags.gsub!(%r/\/$/, '')
20
+ tags = tags.split("\n").sort {|a,b| b <=> a}
21
+ puts tags
22
+ end
23
+
24
+ desc 'Create a new tag in the SVN repository'
25
+ task :create_tag => 'svn:prereqs' do |t|
26
+ v = ENV['VERSION'] or abort 'Must supply VERSION=x.y.z'
27
+ abort "Versions don't match #{v} vs #{PROJ.version}" if v != PROJ.version
28
+
29
+ svn = PROJ.svn
30
+ trunk = File.join(svn.root, svn.trunk)
31
+ tag = "%s-%s" % [PROJ.name, PROJ.version]
32
+ tag = File.join(svn.root, svn.tags, tag)
33
+ msg = "Creating tag for #{PROJ.name} version #{PROJ.version}"
34
+
35
+ puts "Creating SVN tag '#{tag}'"
36
+ unless system "svn cp -m '#{msg}' #{trunk} #{tag}"
37
+ abort "Tag creation failed"
38
+ end
39
+ end
40
+
41
+ end # namespace :svn
42
+
43
+ task 'gem:release' => 'svn:create_tag'
44
+
45
+ end # if PROJ.svn.path
46
+
47
+ # EOF
@@ -0,0 +1,40 @@
1
+
2
+ if test(?e, PROJ.test.file) or not PROJ.test.files.to_a.empty?
3
+ require 'rake/testtask'
4
+
5
+ namespace :test do
6
+
7
+ Rake::TestTask.new(:run) do |t|
8
+ t.libs = PROJ.libs
9
+ t.test_files = if test(?f, PROJ.test.file) then [PROJ.test.file]
10
+ else PROJ.test.files end
11
+ t.ruby_opts += PROJ.ruby_opts
12
+ t.ruby_opts += PROJ.test.opts
13
+ end
14
+
15
+ if HAVE_RCOV
16
+ desc 'Run rcov on the unit tests'
17
+ task :rcov => :clobber_rcov do
18
+ opts = PROJ.rcov.opts.dup << '-o' << PROJ.rcov.dir
19
+ opts = opts.join(' ')
20
+ files = if test(?f, PROJ.test.file) then [PROJ.test.file]
21
+ else PROJ.test.files end
22
+ files = files.join(' ')
23
+ sh "#{RCOV} #{files} #{opts}"
24
+ end
25
+
26
+ task :clobber_rcov do
27
+ rm_r 'coverage' rescue nil
28
+ end
29
+ end
30
+
31
+ end # namespace :test
32
+
33
+ desc 'Alias to test:run'
34
+ task :test => 'test:run'
35
+
36
+ task :clobber => 'test:clobber_rcov' if HAVE_RCOV
37
+
38
+ end
39
+
40
+ # EOF
@@ -0,0 +1,21 @@
1
+ $:.unshift File.join(File.dirname(__FILE__),'..','lib')
2
+ require 'r7z'
3
+
4
+
5
+ #cpx = R7z::Compress.new(:archive_file => 'C:/temporaire/20090520.7z', :inner_directory => '20090520/SAG1')
6
+ #cpx.extract_to('c:/temporaire/SAG1')
7
+
8
+ #cpx = R7z::Compress.new(:archive_file => 'C:/temporaire/20090520.7z', :inner_file => '20090520/SAG1/SAG.log')
9
+ #cpx.extract_to('c:/temporaire/SAG1.log')
10
+
11
+
12
+ #cpx = R7z::Compress.new(:archive_file => 'C:/temporaire/RE_PROD_PRCGestionCorbeille_20090520_1113-20090520.zip', :inner_file => '*.log')
13
+ #cpx.extract_to('c:/temporaire/PRC-20090520.log')
14
+
15
+
16
+ #cpx = R7z::Compress.new(:source_file => 'C:/AAG/R_AnalyseLogs/workdir/logs/PRCGestionCorbeille_20091102_1113.LOG', :archive_file => 'C:/temporaire/PRC_Affectation/Resultat/LOGS/PRCGestionCorbeille_20091102.7z')
17
+ #cpx.compress('7z', :verbose => true)
18
+
19
+
20
+ cpx = R7z::Compress.new
21
+ cpx.execute_7z_command(*%w{a -t7z "C:/temporaire/PRC_Affectation/Resultat/LOGS/PRCGestionCorbeille_20091102.7z" "C:/AAG/R_AnalyseLogs/workdir/logs/PRCGestionCorbeille_20091102_1113.LOG"} + [:verbose => true])
metadata ADDED
@@ -0,0 +1,94 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: r7z
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 1
7
+ - 0
8
+ - 2
9
+ version: 1.0.2
10
+ platform: ruby
11
+ authors:
12
+ - Yohan BARUKH
13
+ autorequire:
14
+ bindir: bin
15
+ cert_chain: []
16
+
17
+ date: 2009-05-25 00:00:00 +02:00
18
+ default_executable: r7z
19
+ dependencies: []
20
+
21
+ description: Utilitaire de compression/decompression base sur 7zip
22
+ email: yohan_barukh@systalians.com
23
+ executables:
24
+ - r7z
25
+ extensions: []
26
+
27
+ extra_rdoc_files:
28
+ - History.txt
29
+ - README.txt
30
+ - bin/r7z
31
+ - nbproject/private/rake-d.txt
32
+ files:
33
+ - 7z/7-zip.chm
34
+ - 7z/7za.exe
35
+ - History.txt
36
+ - README.txt
37
+ - Rakefile
38
+ - bin/r7z
39
+ - lib/r7z.rb
40
+ - lib/r7z/compress.rb
41
+ - nbproject/private/private.properties
42
+ - nbproject/private/rake-d.txt
43
+ - nbproject/project.properties
44
+ - nbproject/project.xml
45
+ - spec/r7z_spec.rb
46
+ - spec/spec_helper.rb
47
+ - tasks/ann.rake
48
+ - tasks/bones.rake
49
+ - tasks/gem.rake
50
+ - tasks/git.rake
51
+ - tasks/notes.rake
52
+ - tasks/post_load.rake
53
+ - tasks/rdoc.rake
54
+ - tasks/rubyforge.rake
55
+ - tasks/setup.rb
56
+ - tasks/spec.rake
57
+ - tasks/svn.rake
58
+ - tasks/test.rake
59
+ - test/test_r7z.rb
60
+ has_rdoc: true
61
+ homepage:
62
+ licenses: []
63
+
64
+ post_install_message:
65
+ rdoc_options:
66
+ - --main
67
+ - README.txt
68
+ require_paths:
69
+ - lib
70
+ required_ruby_version: !ruby/object:Gem::Requirement
71
+ none: false
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ segments:
76
+ - 0
77
+ version: "0"
78
+ required_rubygems_version: !ruby/object:Gem::Requirement
79
+ none: false
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ segments:
84
+ - 0
85
+ version: "0"
86
+ requirements: []
87
+
88
+ rubyforge_project: r7z
89
+ rubygems_version: 1.3.7
90
+ signing_key:
91
+ specification_version: 3
92
+ summary: Permet d'extraire les fichiers, les repertoires d'une archive 7z
93
+ test_files:
94
+ - test/test_r7z.rb