ruby-aaws 0.4.3 → 0.4.4
Sign up to get free protection for your applications and to get access to all the features.
- data/NEWS +12 -1
- data/README +13 -7
- data/README.rdoc +8 -8
- data/example/browse_node_lookup1 +0 -0
- data/example/customer_content_lookup1 +0 -0
- data/example/customer_content_search1 +0 -0
- data/example/example1 +0 -0
- data/example/help1 +0 -0
- data/example/item_lookup1 +0 -0
- data/example/item_lookup2 +0 -0
- data/example/item_search1 +0 -0
- data/example/item_search2 +0 -0
- data/example/item_search3 +0 -0
- data/example/list_lookup1 +0 -0
- data/example/list_search1 +0 -0
- data/example/multiple_operation1 +0 -0
- data/example/seller_listing_lookup1 +0 -0
- data/example/seller_listing_search1 +0 -0
- data/example/seller_lookup1 +0 -0
- data/example/shopping_cart1 +0 -0
- data/example/similarity_lookup1 +0 -0
- data/example/tag_lookup1 +0 -0
- data/example/transaction_lookup1 +0 -0
- data/lib/amazon.rb +3 -2
- data/lib/amazon/aws.rb +2 -2
- data/lib/amazon/aws/search.rb +0 -0
- data/test/tc_aws.rb +20 -1
- metadata +46 -39
data/NEWS
CHANGED
@@ -1,4 +1,15 @@
|
|
1
|
-
$Id: NEWS,v 1.
|
1
|
+
$Id: NEWS,v 1.14 2008/10/03 12:00:57 ianmacd Exp $
|
2
|
+
|
3
|
+
|
4
|
+
0.4.4
|
5
|
+
-----
|
6
|
+
|
7
|
+
It's now possible to have Ruby/AWS use a user configuration file with a name
|
8
|
+
other than .amazonrc. This is achieved by defining $AMAZONRCFILE. If left
|
9
|
+
undefined, the default of .amazonrc is used.
|
10
|
+
|
11
|
+
Locations other than $HOME were not being checked for .amazonrc. This bug has
|
12
|
+
now been fixed.
|
2
13
|
|
3
14
|
|
4
15
|
0.4.3
|
data/README
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
$Id: README,v 1.
|
1
|
+
$Id: README,v 1.17 2008/10/03 12:00:19 ianmacd Exp $
|
2
2
|
|
3
3
|
|
4
4
|
Introduction
|
@@ -169,16 +169,18 @@ look something like this:
|
|
169
169
|
cache = false
|
170
170
|
|
171
171
|
Because you're embedding your key ID in the file, you should protect it (on
|
172
|
-
UNIX and
|
172
|
+
UNIX and equivalent systems) by making it mode 0600:
|
173
173
|
|
174
174
|
$ chmod 600 ~/.amazonrc
|
175
175
|
|
176
176
|
If you define 'cache' to be 'true', you may also define 'cache_dir' to point
|
177
177
|
to somewhere other the default, /tmp/amazon.
|
178
178
|
|
179
|
-
If
|
180
|
-
|
181
|
-
|
179
|
+
If you want to place .amazonrc somewhere other than $HOME, you may set
|
180
|
+
$AMAZONRCDIR in the environment, as this location is checked prior to $HOME.
|
181
|
+
|
182
|
+
If you're using Windows, $HOME is usually undefined, so a number of additional
|
183
|
+
locations are checked for .amazonrc.
|
182
184
|
|
183
185
|
The exact search order is as follows:
|
184
186
|
|
@@ -187,8 +189,12 @@ $HOME
|
|
187
189
|
$HOMEDRIVE + $HOMEPATH
|
188
190
|
$USERPROFILE
|
189
191
|
|
190
|
-
|
191
|
-
|
192
|
+
Note that only the first defined location is used, so if, for example, both
|
193
|
+
$AMAZONRCDIR and $HOME are defined, but only the path specified by $HOME
|
194
|
+
contains a file called .amazonrc, it will not be found.
|
195
|
+
|
196
|
+
If you want the user configuration file to be called something other than
|
197
|
+
.amazonrc, you may define $AMAZONRCFILE in the environment.
|
192
198
|
|
193
199
|
Once you have your configuration file, you can get started on your code.
|
194
200
|
|
data/README.rdoc
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#--
|
2
|
-
# $Id: README.rdoc,v 1.
|
2
|
+
# $Id: README.rdoc,v 1.19 2008/10/03 12:00:57 ianmacd Exp $
|
3
3
|
#++
|
4
4
|
#
|
5
5
|
#
|
@@ -120,15 +120,15 @@
|
|
120
120
|
#
|
121
121
|
# == Download
|
122
122
|
#
|
123
|
-
# Version 0.4.
|
124
|
-
# === {gzip'ed tar archive}[http://www.caliban.org/files/ruby/ruby-aws-0.4.
|
125
|
-
# === {Ruby Gem}[http://www.caliban.org/files/ruby/ruby-aaws-0.4.
|
126
|
-
# === {Fedora 9 RPM}[http://www.caliban.org/files/redhat/RPMS/noarch/ruby-aws-0.4.
|
127
|
-
# === {Fedora 9 doc RPM}[http://www.caliban.org/files/redhat/RPMS/noarch/ruby-aws-doc-0.4.
|
128
|
-
# === {Fedora 9 source RPM}[http://www.caliban.org/files/redhat/SRPMS/ruby-aws-0.4.
|
123
|
+
# Version 0.4.4
|
124
|
+
# === {gzip'ed tar archive}[http://www.caliban.org/files/ruby/ruby-aws-0.4.4.tar.gz]
|
125
|
+
# === {Ruby Gem}[http://www.caliban.org/files/ruby/ruby-aaws-0.4.4.gem]
|
126
|
+
# === {Fedora 9 RPM}[http://www.caliban.org/files/redhat/RPMS/noarch/ruby-aws-0.4.4-1.fc9.noarch.rpm]
|
127
|
+
# === {Fedora 9 doc RPM}[http://www.caliban.org/files/redhat/RPMS/noarch/ruby-aws-doc-0.4.4-1.fc9.noarch.rpm]
|
128
|
+
# === {Fedora 9 source RPM}[http://www.caliban.org/files/redhat/SRPMS/ruby-aws-0.4.4-1.fc9.src.rpm]
|
129
129
|
#
|
130
130
|
#
|
131
131
|
# ---
|
132
132
|
# Author:: Ian Macdonald <mailto:ian@caliban.org>
|
133
|
-
# Version:: 0.4.
|
133
|
+
# Version:: 0.4.4
|
134
134
|
# Licence:: GPL[http://www.gnu.org/copyleft/gpl.html]
|
data/example/browse_node_lookup1
CHANGED
File without changes
|
File without changes
|
File without changes
|
data/example/example1
CHANGED
File without changes
|
data/example/help1
CHANGED
File without changes
|
data/example/item_lookup1
CHANGED
File without changes
|
data/example/item_lookup2
CHANGED
File without changes
|
data/example/item_search1
CHANGED
File without changes
|
data/example/item_search2
CHANGED
File without changes
|
data/example/item_search3
CHANGED
File without changes
|
data/example/list_lookup1
CHANGED
File without changes
|
data/example/list_search1
CHANGED
File without changes
|
data/example/multiple_operation1
CHANGED
File without changes
|
File without changes
|
File without changes
|
data/example/seller_lookup1
CHANGED
File without changes
|
data/example/shopping_cart1
CHANGED
File without changes
|
data/example/similarity_lookup1
CHANGED
File without changes
|
data/example/tag_lookup1
CHANGED
File without changes
|
data/example/transaction_lookup1
CHANGED
File without changes
|
data/lib/amazon.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# $Id: amazon.rb,v 1.
|
1
|
+
# $Id: amazon.rb,v 1.25 2008/10/03 09:35:37 ianmacd Exp $
|
2
2
|
#
|
3
3
|
|
4
4
|
module Amazon
|
@@ -83,9 +83,10 @@ module Amazon
|
|
83
83
|
home = ENV['AMAZONRCDIR'] ||
|
84
84
|
ENV['HOME'] || ENV['HOMEDRIVE'] + ENV['HOMEPATH'] ||
|
85
85
|
ENV['USERPROFILE']
|
86
|
+
user_rcfile = ENV['AMAZONRCFILE'] || '.amazonrc'
|
86
87
|
|
87
88
|
if home
|
88
|
-
config_files << File.expand_path( File.join(
|
89
|
+
config_files << File.expand_path( File.join( home, user_rcfile ) )
|
89
90
|
end
|
90
91
|
|
91
92
|
config_class = File
|
data/lib/amazon/aws.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# $Id: aws.rb,v 1.
|
1
|
+
# $Id: aws.rb,v 1.72 2008/10/03 09:37:25 ianmacd Exp $
|
2
2
|
#
|
3
3
|
#:include: ../../README.rdoc
|
4
4
|
|
@@ -12,7 +12,7 @@ module Amazon
|
|
12
12
|
require 'rexml/document'
|
13
13
|
|
14
14
|
NAME = '%s/%s' % [ Amazon::NAME, 'AWS' ]
|
15
|
-
VERSION = '0.4.
|
15
|
+
VERSION = '0.4.4'
|
16
16
|
USER_AGENT = '%s %s' % [ NAME, VERSION ]
|
17
17
|
|
18
18
|
# Default Associate tags to use per locale.
|
data/lib/amazon/aws/search.rb
CHANGED
File without changes
|
data/test/tc_aws.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# $Id: tc_aws.rb,v 1.
|
1
|
+
# $Id: tc_aws.rb,v 1.11 2008/10/02 21:33:58 ianmacd Exp $
|
2
2
|
#
|
3
3
|
|
4
4
|
require 'test/unit'
|
@@ -93,17 +93,36 @@ class TestAWSBasics < AWSTest
|
|
93
93
|
end
|
94
94
|
|
95
95
|
def test_config
|
96
|
+
# Test bad quoting.
|
97
|
+
#
|
96
98
|
assert_raise( Amazon::Config::ConfigError ) do
|
97
99
|
cf = Amazon::Config.new( <<' EOF' )
|
98
100
|
bad_syntax = 'bad quotes"
|
99
101
|
EOF
|
100
102
|
end
|
101
103
|
|
104
|
+
# Test good quoting.
|
105
|
+
#
|
102
106
|
assert_nothing_raised do
|
103
107
|
cf = Amazon::Config.new( <<' EOF' )
|
104
108
|
good_syntax = 'good quotes'
|
105
109
|
EOF
|
106
110
|
end
|
111
|
+
|
112
|
+
# Test that config files are properly read from $AMAZONRC.
|
113
|
+
#
|
114
|
+
Dir.mktmpdir do |td|
|
115
|
+
ENV['AMAZONRCDIR'] = td
|
116
|
+
ENV['AMAZONRCFILE'] = '.user_defined_name'
|
117
|
+
File.open( File.join( td, '.user_defined_name' ), 'w' ) do |tf|
|
118
|
+
tf.puts( 'foo = bar' )
|
119
|
+
end
|
120
|
+
|
121
|
+
cf = Amazon::Config.new
|
122
|
+
assert_equal( 'bar', cf['foo'] )
|
123
|
+
ENV['AMAZONRCDIR'] = nil
|
124
|
+
ENV['AMAZONRCFILE'] = nil
|
125
|
+
end
|
107
126
|
end
|
108
127
|
|
109
128
|
def test_exceptions
|
metadata
CHANGED
@@ -1,33 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.9.4
|
3
|
-
specification_version: 1
|
4
2
|
name: ruby-aaws
|
5
3
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.4.
|
7
|
-
date: 2008-09-22 00:00:00 +02:00
|
8
|
-
summary: Ruby interface to Amazon Associates Web Services
|
9
|
-
require_paths:
|
10
|
-
- lib
|
11
|
-
email: ian@caliban.org
|
12
|
-
homepage:
|
13
|
-
rubyforge_project:
|
14
|
-
description:
|
15
|
-
autorequire: amazon/aws/search
|
16
|
-
default_executable:
|
17
|
-
bindir: bin
|
18
|
-
has_rdoc: true
|
19
|
-
required_ruby_version: !ruby/object:Gem::Version::Requirement
|
20
|
-
requirements:
|
21
|
-
- - ">="
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
version: 1.8.6
|
24
|
-
version:
|
4
|
+
version: 0.4.4
|
25
5
|
platform: ruby
|
26
|
-
signing_key:
|
27
|
-
cert_chain:
|
28
|
-
post_install_message:
|
29
6
|
authors:
|
30
7
|
- Ian Macdonald
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2008-10-03 00:00:00 +02:00
|
13
|
+
default_executable:
|
14
|
+
dependencies: []
|
15
|
+
|
16
|
+
description:
|
17
|
+
email: ian@caliban.org
|
18
|
+
executables: []
|
19
|
+
|
20
|
+
extensions: []
|
21
|
+
|
22
|
+
extra_rdoc_files:
|
23
|
+
- COPYING
|
24
|
+
- NEWS
|
25
|
+
- README
|
26
|
+
- README.rdoc
|
31
27
|
files:
|
32
28
|
- example/customer_content_lookup1
|
33
29
|
- example/browse_node_lookup1
|
@@ -68,6 +64,32 @@ files:
|
|
68
64
|
- NEWS
|
69
65
|
- README
|
70
66
|
- README.rdoc
|
67
|
+
has_rdoc: true
|
68
|
+
homepage: http://www.caliban.org/ruby/ruby-aws/
|
69
|
+
post_install_message:
|
70
|
+
rdoc_options: []
|
71
|
+
|
72
|
+
require_paths:
|
73
|
+
- lib
|
74
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
75
|
+
requirements:
|
76
|
+
- - ">="
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: 1.8.6
|
79
|
+
version:
|
80
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
81
|
+
requirements:
|
82
|
+
- - ">="
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
version: "0"
|
85
|
+
version:
|
86
|
+
requirements: []
|
87
|
+
|
88
|
+
rubyforge_project: Ruby/(A)AWS
|
89
|
+
rubygems_version: 1.2.0
|
90
|
+
signing_key:
|
91
|
+
specification_version: 2
|
92
|
+
summary: Ruby interface to Amazon Associates Web Services
|
71
93
|
test_files:
|
72
94
|
- test/tc_amazon.rb
|
73
95
|
- test/setup.rb
|
@@ -78,18 +100,3 @@ test_files:
|
|
78
100
|
- test/tc_shopping_cart.rb
|
79
101
|
- test/ts_aws.rb
|
80
102
|
- test/tc_serialisation.rb
|
81
|
-
rdoc_options: []
|
82
|
-
|
83
|
-
extra_rdoc_files:
|
84
|
-
- COPYING
|
85
|
-
- NEWS
|
86
|
-
- README
|
87
|
-
- README.rdoc
|
88
|
-
executables: []
|
89
|
-
|
90
|
-
extensions: []
|
91
|
-
|
92
|
-
requirements: []
|
93
|
-
|
94
|
-
dependencies: []
|
95
|
-
|