alexa 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1,5 +1,3 @@
1
- *.sw?
2
- .DS_Store
3
- coverage
4
- rdoc
5
- pkg
1
+ pkg/*
2
+ *.gem
3
+ .bundle
data/Gemfile ADDED
@@ -0,0 +1,5 @@
1
+ source :rubygems
2
+
3
+ gem "rake"
4
+
5
+ gemspec
@@ -0,0 +1,23 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ alexa (0.1.1)
5
+ xml-simple
6
+
7
+ GEM
8
+ remote: http://rubygems.org/
9
+ specs:
10
+ rake (0.8.7)
11
+ shoulda (2.11.3)
12
+ test-unit (2.1.1)
13
+ xml-simple (1.0.12)
14
+
15
+ PLATFORMS
16
+ ruby
17
+
18
+ DEPENDENCIES
19
+ alexa!
20
+ rake
21
+ shoulda
22
+ test-unit
23
+ xml-simple
@@ -25,4 +25,4 @@ You can set configuration in block like this:
25
25
 
26
26
  == Copyright
27
27
 
28
- Copyright (c) 2009 Wojciech Wnętrzak. See LICENSE for details.
28
+ Copyright (c) 2010 Wojciech Wnętrzak. See LICENSE for details.
data/Rakefile CHANGED
@@ -1,60 +1,12 @@
1
- # encoding: UTF-8
1
+ require "bundler"
2
+ Bundler::GemHelper.install_tasks
3
+ Bundler.setup
2
4
 
3
- require 'rubygems'
4
- require 'rake'
5
-
6
- begin
7
- require 'jeweler'
8
- Jeweler::Tasks.new do |gem|
9
- gem.name = "alexa"
10
- gem.description = %Q{Alexa Web Information Service library (AWIS)}
11
- gem.summary = %Q{Alexa Web Information Service library}
12
- gem.email = "w.wnetrzak@gmail.com"
13
- gem.homepage = "http://github.com/morgoth/alexa"
14
- gem.authors = ["Wojciech Wnętrzak"]
15
- gem.add_dependency('xml-simple')
16
- # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
17
- end
18
-
19
- rescue LoadError
20
- puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
21
- end
22
-
23
- require 'rake/testtask'
5
+ require "rake/testtask"
24
6
  Rake::TestTask.new(:test) do |test|
25
- test.libs << 'lib' << 'test'
26
- test.pattern = 'test/**/*_test.rb'
7
+ test.libs << "lib" << "test"
8
+ test.pattern = "test/**/*_test.rb"
27
9
  test.verbose = true
28
10
  end
29
11
 
30
- begin
31
- require 'rcov/rcovtask'
32
- Rcov::RcovTask.new do |test|
33
- test.libs << 'test'
34
- test.pattern = 'test/**/*_test.rb'
35
- test.verbose = true
36
- end
37
- rescue LoadError
38
- task :rcov do
39
- abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
40
- end
41
- end
42
-
43
-
44
12
  task :default => :test
45
-
46
- require 'rake/rdoctask'
47
- Rake::RDocTask.new do |rdoc|
48
- if File.exist?('VERSION.yml')
49
- config = YAML.load(File.read('VERSION.yml'))
50
- version = "#{config[:major]}.#{config[:minor]}.#{config[:patch]}"
51
- else
52
- version = ""
53
- end
54
-
55
- rdoc.rdoc_dir = 'rdoc'
56
- rdoc.title = "alexa #{version}"
57
- rdoc.rdoc_files.include('README*')
58
- rdoc.rdoc_files.include('lib/**/*.rb')
59
- end
60
-
@@ -1,61 +1,26 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
1
  # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "alexa/version"
5
4
 
6
5
  Gem::Specification.new do |s|
7
- s.name = %q{alexa}
8
- s.version = "0.1.0"
9
-
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Wojciech Wnętrzak"]
12
- s.date = %q{2010-01-28}
6
+ s.name = "alexa"
7
+ s.version = Alexa::VERSION
8
+ s.platform = Gem::Platform::RUBY
9
+ s.authors = ["Wojciech Wnętrzak"]
10
+ s.email = ["w.wnetrzak@gmail.com"]
11
+ s.homepage = "https://github.com/morgoth/alexa"
12
+ s.summary = %q{Alexa Web Information Service library}
13
13
  s.description = %q{Alexa Web Information Service library (AWIS)}
14
- s.email = %q{w.wnetrzak@gmail.com}
15
- s.extra_rdoc_files = [
16
- "LICENSE",
17
- "README.rdoc"
18
- ]
19
- s.files = [
20
- ".document",
21
- ".gitignore",
22
- "LICENSE",
23
- "README.rdoc",
24
- "Rakefile",
25
- "VERSION",
26
- "alexa.gemspec",
27
- "lib/alexa.rb",
28
- "lib/alexa/config.rb",
29
- "lib/alexa/url_info.rb",
30
- "test/config_test.rb",
31
- "test/fixtures/empty.xml",
32
- "test/fixtures/polsl.xml",
33
- "test/fixtures/polsl_small.xml",
34
- "test/test_helper.rb",
35
- "test/url_info_test.rb"
36
- ]
37
- s.homepage = %q{http://github.com/morgoth/alexa}
38
- s.rdoc_options = ["--charset=UTF-8"]
14
+
15
+ s.rubyforge_project = "alexa"
16
+
17
+ s.files = `git ls-files`.split("\n")
18
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
19
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
39
20
  s.require_paths = ["lib"]
40
- s.rubygems_version = %q{1.3.5}
41
- s.summary = %q{Alexa Web Information Service library}
42
- s.test_files = [
43
- "test/url_info_test.rb",
44
- "test/config_test.rb",
45
- "test/test_helper.rb"
46
- ]
47
21
 
48
- if s.respond_to? :specification_version then
49
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
50
- s.specification_version = 3
22
+ s.add_dependency "xml-simple"
51
23
 
52
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
53
- s.add_runtime_dependency(%q<xml-simple>, [">= 0"])
54
- else
55
- s.add_dependency(%q<xml-simple>, [">= 0"])
56
- end
57
- else
58
- s.add_dependency(%q<xml-simple>, [">= 0"])
59
- end
24
+ s.add_development_dependency "test-unit"
25
+ s.add_development_dependency "shoulda"
60
26
  end
61
-
@@ -1,4 +1,3 @@
1
- #/usr/bin/ruby
2
1
  require "cgi"
3
2
  require "base64"
4
3
  require "openssl"
@@ -8,8 +7,9 @@ require "net/https"
8
7
  require "xmlsimple"
9
8
  require "time"
10
9
 
11
- require 'alexa/config'
12
- require 'alexa/url_info'
10
+ require "alexa/config"
11
+ require "alexa/url_info"
12
+ require "alexa/version"
13
13
 
14
14
  module Alexa
15
15
  def self.url_info(options = {})
@@ -19,4 +19,3 @@ module Alexa
19
19
  url_info
20
20
  end
21
21
  end
22
-
@@ -84,12 +84,12 @@ module Alexa
84
84
  url = URI.parse(
85
85
  "http://awis.amazonaws.com/?" +
86
86
  {
87
- "Action" => action,
88
- "AWSAccessKeyId" => access_key_id,
89
- "Signature" => signature,
90
- "Timestamp" => timestamp,
91
- "ResponseGroup" => response_group,
92
- "Url" => host
87
+ "Action" => action,
88
+ "AWSAccessKeyId" => access_key_id,
89
+ "Signature" => signature,
90
+ "Timestamp" => timestamp,
91
+ "ResponseGroup" => response_group,
92
+ "Url" => host
93
93
  }.to_a.collect{ |item| item.first + "=" + CGI::escape(item.last) }.sort.join("&")
94
94
  )
95
95
  end
@@ -0,0 +1,3 @@
1
+ module Alexa
2
+ VERSION = "0.1.1"
3
+ end
@@ -1,4 +1,4 @@
1
- require 'test_helper'
1
+ require 'helper'
2
2
 
3
3
  class ConfigTest < Test::Unit::TestCase
4
4
  context "Config test" do
@@ -0,0 +1,15 @@
1
+ Bundler.require
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 'alexa'
8
+
9
+ class Test::Unit::TestCase
10
+ def fixture_file(filename)
11
+ return '' if filename == ''
12
+ file_path = File.expand_path(File.dirname(__FILE__) + '/fixtures/' + filename)
13
+ File.read(file_path)
14
+ end
15
+ end
@@ -1,4 +1,4 @@
1
- require 'test_helper'
1
+ require 'helper'
2
2
 
3
3
  class UrlInfoTest < Test::Unit::TestCase
4
4
  context "Alexa::UrlInfo" do
metadata CHANGED
@@ -1,7 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alexa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 1
8
+ - 1
9
+ version: 0.1.1
5
10
  platform: ruby
6
11
  authors:
7
12
  - "Wojciech Wn\xC4\x99trzak"
@@ -9,74 +14,108 @@ autorequire:
9
14
  bindir: bin
10
15
  cert_chain: []
11
16
 
12
- date: 2010-01-28 00:00:00 +01:00
17
+ date: 2010-11-15 00:00:00 +01:00
13
18
  default_executable:
14
19
  dependencies:
15
20
  - !ruby/object:Gem::Dependency
16
21
  name: xml-simple
22
+ requirement: &id001 !ruby/object:Gem::Requirement
23
+ none: false
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ segments:
28
+ - 0
29
+ version: "0"
17
30
  type: :runtime
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
31
+ prerelease: false
32
+ version_requirements: *id001
33
+ - !ruby/object:Gem::Dependency
34
+ name: test-unit
35
+ requirement: &id002 !ruby/object:Gem::Requirement
36
+ none: false
20
37
  requirements:
21
38
  - - ">="
22
39
  - !ruby/object:Gem::Version
40
+ segments:
41
+ - 0
23
42
  version: "0"
24
- version:
43
+ type: :development
44
+ prerelease: false
45
+ version_requirements: *id002
46
+ - !ruby/object:Gem::Dependency
47
+ name: shoulda
48
+ requirement: &id003 !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ segments:
54
+ - 0
55
+ version: "0"
56
+ type: :development
57
+ prerelease: false
58
+ version_requirements: *id003
25
59
  description: Alexa Web Information Service library (AWIS)
26
- email: w.wnetrzak@gmail.com
60
+ email:
61
+ - w.wnetrzak@gmail.com
27
62
  executables: []
28
63
 
29
64
  extensions: []
30
65
 
31
- extra_rdoc_files:
32
- - LICENSE
33
- - README.rdoc
66
+ extra_rdoc_files: []
67
+
34
68
  files:
35
- - .document
36
69
  - .gitignore
70
+ - Gemfile
71
+ - Gemfile.lock
37
72
  - LICENSE
38
73
  - README.rdoc
39
74
  - Rakefile
40
- - VERSION
41
75
  - alexa.gemspec
42
76
  - lib/alexa.rb
43
77
  - lib/alexa/config.rb
44
78
  - lib/alexa/url_info.rb
79
+ - lib/alexa/version.rb
45
80
  - test/config_test.rb
46
81
  - test/fixtures/empty.xml
47
82
  - test/fixtures/polsl.xml
48
83
  - test/fixtures/polsl_small.xml
49
- - test/test_helper.rb
84
+ - test/helper.rb
50
85
  - test/url_info_test.rb
51
86
  has_rdoc: true
52
- homepage: http://github.com/morgoth/alexa
87
+ homepage: https://github.com/morgoth/alexa
53
88
  licenses: []
54
89
 
55
90
  post_install_message:
56
- rdoc_options:
57
- - --charset=UTF-8
91
+ rdoc_options: []
92
+
58
93
  require_paths:
59
94
  - lib
60
95
  required_ruby_version: !ruby/object:Gem::Requirement
96
+ none: false
61
97
  requirements:
62
98
  - - ">="
63
99
  - !ruby/object:Gem::Version
100
+ hash: 3607547385087715805
101
+ segments:
102
+ - 0
64
103
  version: "0"
65
- version:
66
104
  required_rubygems_version: !ruby/object:Gem::Requirement
105
+ none: false
67
106
  requirements:
68
107
  - - ">="
69
108
  - !ruby/object:Gem::Version
109
+ hash: 3607547385087715805
110
+ segments:
111
+ - 0
70
112
  version: "0"
71
- version:
72
113
  requirements: []
73
114
 
74
- rubyforge_project:
75
- rubygems_version: 1.3.5
115
+ rubyforge_project: alexa
116
+ rubygems_version: 1.3.7
76
117
  signing_key:
77
118
  specification_version: 3
78
119
  summary: Alexa Web Information Service library
79
- test_files:
80
- - test/url_info_test.rb
81
- - test/config_test.rb
82
- - test/test_helper.rb
120
+ test_files: []
121
+
data/.document DELETED
@@ -1,5 +0,0 @@
1
- README.rdoc
2
- lib/**/*.rb
3
- bin/*
4
- features/**/*.feature
5
- LICENSE
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 0.1.0
@@ -1,14 +0,0 @@
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 'alexa'
8
-
9
- def fixture_file(filename)
10
- return '' if filename == ''
11
- file_path = File.expand_path(File.dirname(__FILE__) + '/fixtures/' + filename)
12
- File.read(file_path)
13
- end
14
-