pasco 1.0.0

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/.document ADDED
@@ -0,0 +1,5 @@
1
+ README.rdoc
2
+ lib/**/*.rb
3
+ bin/*
4
+ features/**/*.feature
5
+ LICENSE
data/.gitignore ADDED
@@ -0,0 +1,21 @@
1
+ ## MAC OS
2
+ .DS_Store
3
+
4
+ ## TEXTMATE
5
+ *.tmproj
6
+ tmtags
7
+
8
+ ## EMACS
9
+ *~
10
+ \#*
11
+ .\#*
12
+
13
+ ## VIM
14
+ *.swp
15
+
16
+ ## PROJECT::GENERAL
17
+ coverage
18
+ rdoc
19
+ pkg
20
+
21
+ ## PROJECT::SPECIFIC
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2009 amardaxini
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/README.rdoc ADDED
@@ -0,0 +1,15 @@
1
+ = Pasco
2
+ Pasco is a gem that reads ie histories on provideing ie history file i.e *.dat.
3
+
4
+ It is based on open source library [http://sourceforge.net/projects/odessa/files/]
5
+
6
+ == Example
7
+ Pasco.get_history(path of ie history file)
8
+
9
+ It will return an array of object that contains
10
+ url,modified_time,access_time,file_name,directory,http_header
11
+
12
+
13
+ == Copyright
14
+
15
+ Copyright (c) 2010 amardaxini. See LICENSE for details.
data/Rakefile ADDED
@@ -0,0 +1,57 @@
1
+ require 'rubygems'
2
+ require 'rake'
3
+
4
+ begin
5
+ require 'jeweler'
6
+ Jeweler::Tasks.new do |gem|
7
+ gem.name = "pasco"
8
+ gem.summary = %Q{read ie browsing histories based on pasco open source project}
9
+ gem.description = %Q{pasco is a gem that reads ie histories on provideing ie history file i.e *.dat}
10
+ gem.email = "amardaxini@gmail.com"
11
+ gem.homepage = "http://github.com/amardaxini/pasco"
12
+ gem.authors = ["amardaxini"]
13
+ gem.rubyforge_project = "pasco"
14
+ gem.add_development_dependency "thoughtbot-shoulda", ">= 0"
15
+ # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
16
+ end
17
+ Jeweler::GemcutterTasks.new
18
+ Jeweler::RubyforgeTasks.new do |rubyforge|
19
+ rubyforge.doc_task = "rdoc"
20
+ end
21
+ rescue LoadError
22
+ puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
23
+ end
24
+
25
+ require 'rake/testtask'
26
+ Rake::TestTask.new(:test) do |test|
27
+ test.libs << 'lib' << 'test'
28
+ test.pattern = 'test/**/test_*.rb'
29
+ test.verbose = true
30
+ end
31
+
32
+ begin
33
+ require 'rcov/rcovtask'
34
+ Rcov::RcovTask.new do |test|
35
+ test.libs << 'test'
36
+ test.pattern = 'test/**/test_*.rb'
37
+ test.verbose = true
38
+ end
39
+ rescue LoadError
40
+ task :rcov do
41
+ abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
42
+ end
43
+ end
44
+
45
+ task :test => :check_dependencies
46
+
47
+ task :default => :test
48
+
49
+ require 'rake/rdoctask'
50
+ Rake::RDocTask.new do |rdoc|
51
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
52
+
53
+ rdoc.rdoc_dir = 'rdoc'
54
+ rdoc.title = "pasco #{version}"
55
+ rdoc.rdoc_files.include('README*')
56
+ rdoc.rdoc_files.include('lib/**/*.rb')
57
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 1.0.0
data/bin/cygwin1.dll ADDED
Binary file
data/bin/pasco ADDED
Binary file
data/bin/pasco.exe ADDED
Binary file
data/lib/pasco.rb ADDED
@@ -0,0 +1,50 @@
1
+ require 'rubygems'
2
+ require 'ruby-debug'
3
+ class Pasco
4
+ attr_reader :url,:modified_time,:acess_time,:file_name,:directory,:http_header
5
+ def initialize(url="",modified_time="",acess_time="",file_name="",directory="",http_header="")
6
+ @url = url
7
+ @modified_time = modified_time
8
+ @acess_time = acess_time;
9
+ @file_name = file_name
10
+ @directory =directory
11
+ @http_header = http_header
12
+ end
13
+
14
+ def self.get_history(file_name)
15
+ @ie_histories =[]
16
+ if !file_name.nil? && File.extname(file_name) == ".dat"
17
+ if RUBY_PLATFORM=~ /linux/ || RUBY_PLATFORM =~ /darwin/
18
+ result =`../bin/pasco "#{file_name}"`
19
+ else #FOR Windows Ihave Not tested yet
20
+ result=`../bin/pasco.exe "#{file_name}"`
21
+ end
22
+ @ie_histories = self.process_history(result)
23
+ else
24
+ puts "Please enter file name"
25
+ return -1
26
+ end
27
+ return @ie_histories
28
+ end
29
+
30
+
31
+ def self.process_history(result)
32
+ ie_histories = []
33
+ results =result.split("\n")
34
+ results.each do |result|
35
+ if !result.match(/^URL/).nil?
36
+ result_of_url = result.split("\t")
37
+ browsing_url = result_of_url[1].match(/((\w+):\/\/(.+))/)[0]
38
+ modified_time = result_of_url[2]
39
+ acess_time = result_of_url[3]
40
+ file_name = result_of_url[4]
41
+ directory = result_of_url[5]
42
+ http_header = result_of_url[6]
43
+ ie_histories << Pasco.new(browsing_url,modified_time,acess_time,file_name,directory,http_header)
44
+ end
45
+ end
46
+ ie_histories
47
+ end
48
+
49
+ end
50
+
data/pasco.gemspec ADDED
@@ -0,0 +1,59 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{pasco}
8
+ s.version = "1.0.0"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["amardaxini"]
12
+ s.date = %q{2010-06-22}
13
+ s.description = %q{pasco is a gem that reads ie histories on provideing ie history file i.e *.dat}
14
+ s.email = %q{amardaxini@gmail.com}
15
+ s.executables = ["pasco", "pasco.exe", "cygwin1.dll"]
16
+ s.extra_rdoc_files = [
17
+ "LICENSE",
18
+ "README.rdoc"
19
+ ]
20
+ s.files = [
21
+ ".document",
22
+ ".gitignore",
23
+ "LICENSE",
24
+ "README.rdoc",
25
+ "Rakefile",
26
+ "VERSION",
27
+ "bin/cygwin1.dll",
28
+ "bin/pasco",
29
+ "bin/pasco.exe",
30
+ "lib/pasco.rb",
31
+ "pasco.gemspec",
32
+ "test/helper.rb",
33
+ "test/test_pasco.rb"
34
+ ]
35
+ s.homepage = %q{http://github.com/amardaxini/pasco}
36
+ s.rdoc_options = ["--charset=UTF-8"]
37
+ s.require_paths = ["lib"]
38
+ s.rubyforge_project = %q{pasco}
39
+ s.rubygems_version = %q{1.3.5}
40
+ s.summary = %q{read ie browsing histories based on pasco open source project}
41
+ s.test_files = [
42
+ "test/test_pasco.rb",
43
+ "test/helper.rb"
44
+ ]
45
+
46
+ if s.respond_to? :specification_version then
47
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
48
+ s.specification_version = 3
49
+
50
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
51
+ s.add_development_dependency(%q<thoughtbot-shoulda>, [">= 0"])
52
+ else
53
+ s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
54
+ end
55
+ else
56
+ s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
57
+ end
58
+ end
59
+
data/test/helper.rb ADDED
@@ -0,0 +1,10 @@
1
+ require 'rubygems'
2
+ require 'test/unit'
3
+ require 'shoulda'
4
+
5
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
6
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
7
+ require 'pasco'
8
+
9
+ class Test::Unit::TestCase
10
+ end
@@ -0,0 +1,7 @@
1
+ require 'helper'
2
+
3
+ class TestPasco < Test::Unit::TestCase
4
+ should "probably rename this file and start testing for real" do
5
+ flunk "hey buddy, you should probably rename this file and start testing for real"
6
+ end
7
+ end
metadata ADDED
@@ -0,0 +1,80 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: pasco
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - amardaxini
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2010-06-22 00:00:00 +05:30
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: thoughtbot-shoulda
17
+ type: :development
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: "0"
24
+ version:
25
+ description: pasco is a gem that reads ie histories on provideing ie history file i.e *.dat
26
+ email: amardaxini@gmail.com
27
+ executables:
28
+ - pasco
29
+ - pasco.exe
30
+ - cygwin1.dll
31
+ extensions: []
32
+
33
+ extra_rdoc_files:
34
+ - LICENSE
35
+ - README.rdoc
36
+ files:
37
+ - .document
38
+ - .gitignore
39
+ - LICENSE
40
+ - README.rdoc
41
+ - Rakefile
42
+ - VERSION
43
+ - bin/cygwin1.dll
44
+ - bin/pasco
45
+ - bin/pasco.exe
46
+ - lib/pasco.rb
47
+ - pasco.gemspec
48
+ - test/helper.rb
49
+ - test/test_pasco.rb
50
+ has_rdoc: true
51
+ homepage: http://github.com/amardaxini/pasco
52
+ licenses: []
53
+
54
+ post_install_message:
55
+ rdoc_options:
56
+ - --charset=UTF-8
57
+ require_paths:
58
+ - lib
59
+ required_ruby_version: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - ">="
62
+ - !ruby/object:Gem::Version
63
+ version: "0"
64
+ version:
65
+ required_rubygems_version: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: "0"
70
+ version:
71
+ requirements: []
72
+
73
+ rubyforge_project: pasco
74
+ rubygems_version: 1.3.5
75
+ signing_key:
76
+ specification_version: 3
77
+ summary: read ie browsing histories based on pasco open source project
78
+ test_files:
79
+ - test/test_pasco.rb
80
+ - test/helper.rb