happymapper 0.1.1 → 0.1.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.
- data/History.txt +4 -0
- data/TODO.txt +2 -1
- data/happymapper.gemspec +4 -2
- data/lib/happymapper/item.rb +1 -1
- data/lib/happymapper/version.rb +1 -1
- data/spec/happymapper_spec.rb +5 -2
- data/tasks/deployment.rake +1 -1
- metadata +2 -2
data/History.txt
CHANGED
data/TODO.txt
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
* doesn't do xml namespaces really (does work with default namespace though)
|
1
|
+
* doesn't do xml namespaces really (does work with default namespace though)
|
2
|
+
* switch gem management to echoe as i did with httparty
|
data/happymapper.gemspec
CHANGED
@@ -1,10 +1,12 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
1
3
|
Gem::Specification.new do |s|
|
2
4
|
s.name = %q{happymapper}
|
3
|
-
s.version = "0.1.
|
5
|
+
s.version = "0.1.2"
|
4
6
|
|
5
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
6
8
|
s.authors = ["John Nunemaker"]
|
7
|
-
s.date = %q{2008-
|
9
|
+
s.date = %q{2008-12-12}
|
8
10
|
s.description = %q{object to xml mapping library}
|
9
11
|
s.email = ["nunemaker@gmail.com"]
|
10
12
|
s.extra_rdoc_files = ["History.txt", "License.txt", "Manifest.txt", "PostInstall.txt", "README.txt", "TODO.txt"]
|
data/lib/happymapper/item.rb
CHANGED
@@ -75,7 +75,7 @@ module HappyMapper
|
|
75
75
|
node.register_default_namespace(namespace.chop) if namespace
|
76
76
|
|
77
77
|
if element?
|
78
|
-
depth = options[:deep] ? '
|
78
|
+
depth = options[:deep] ? './/' : ''
|
79
79
|
result = node.find_first("#{depth}#{namespace}#{tag}")
|
80
80
|
result ? result.content : nil
|
81
81
|
else
|
data/lib/happymapper/version.rb
CHANGED
data/spec/happymapper_spec.rb
CHANGED
@@ -176,7 +176,7 @@ describe HappyMapper do
|
|
176
176
|
it "should properly create objects" do
|
177
177
|
first = @statuses.first
|
178
178
|
first.id.should == 882281424
|
179
|
-
first.created_at.should == Time.
|
179
|
+
first.created_at.should == Time.utc(2008, 8, 9, 5, 38, 12)
|
180
180
|
first.source.should == 'web'
|
181
181
|
first.truncated.should be_false
|
182
182
|
first.in_reply_to_status_id.should == 1234
|
@@ -204,10 +204,13 @@ describe HappyMapper do
|
|
204
204
|
it "should properly create objects" do
|
205
205
|
@items.total_results.should == 22
|
206
206
|
@items.total_pages.should == 3
|
207
|
-
first
|
207
|
+
first = @items.items[0]
|
208
|
+
second = @items.items[1]
|
208
209
|
first.asin.should == '0321480791'
|
209
210
|
first.detail_page_url.should == 'http://www.amazon.com/gp/redirect.html%3FASIN=0321480791%26tag=ws%26lcode=xm2%26cID=2025%26ccmID=165953%26location=/o/ASIN/0321480791%253FSubscriptionId=dontbeaswoosh'
|
210
211
|
first.manufacturer.should == 'Addison-Wesley Professional'
|
212
|
+
second.asin.should == '047022388X'
|
213
|
+
second.manufacturer.should == 'Wrox'
|
211
214
|
end
|
212
215
|
end
|
213
216
|
end
|
data/tasks/deployment.rake
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: happymapper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Nunemaker
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-
|
12
|
+
date: 2008-12-12 00:00:00 -05:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|