zoro 0.0.3 → 0.0.4

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a20433f04a55f1cd508ae70de63c22a1ff14eea8
4
- data.tar.gz: f8d942db362352625fa3accfd38e16c00c9a28cf
3
+ metadata.gz: ae76e9a3e3f46e003237d662796a96ddfe1b48f6
4
+ data.tar.gz: ac63ade2bd5a20cced97861fde25ce629cff1045
5
5
  SHA512:
6
- metadata.gz: 5f166155e509eac6df7e34077893c9fd4b25258331f535f9890f98cce72cc1d8c07e6ae20d544a23f6b7632d0459251e41929ee77222acc9d449ecbfceac7e31
7
- data.tar.gz: 02c19b7c974e0f2786ffde4a32a00a34011edb0bf34ea46715bb588f047a23cee5ec223a59e0044d3ebcee5de3291d7b581f0d5e96ddd826725f1227ba3bc770
6
+ metadata.gz: a1ac257e0a8bbf644c5756f0231986d8d2a769645b52008212e1c02de981590861854306a23e7620c1e996d244b398086cc2790a916cdf75ade7e4dc737d070c
7
+ data.tar.gz: 26de6957f778b2d96cc928144a5c7f207fe471b91e1d3d280fd8bd34a88f7fec120e24cbb4335ebb84fdd9c825e9f7dc9620f8e379f484de079e2566f6d90f3e
data/lib/zoro/record.rb CHANGED
@@ -2,7 +2,7 @@ module Zoro
2
2
  class Record
3
3
  attr_reader :zoho_module, :fields
4
4
 
5
- def initialize(zoho_module= self.class.name)
5
+ def initialize(zoho_module= self.class.name.split("::").last)
6
6
  @zoho_module = zoho_module
7
7
  @fields = {}
8
8
  end
data/lib/zoro/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Zoro
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -1,12 +1,12 @@
1
1
  require './test/test_helper.rb'
2
2
  require 'zoro/record.rb'
3
3
 
4
- class TestRecord < Zoro::Record
4
+ class Zoro::TestRecord < Zoro::Record
5
5
  end
6
6
 
7
7
  describe Zoro::Record do
8
8
  it "serializes itself out to zoho xml" do
9
- r = TestRecord.new
9
+ r = Zoro::TestRecord.new
10
10
  r.fields["Foo"] = "a foo"
11
11
  r.fields["Bar"] = "a bar"
12
12
  xml = r.to_xml
@@ -20,7 +20,7 @@ describe Zoro::Record do
20
20
  end
21
21
 
22
22
  it "relays itself to zoho api" do
23
- r = TestRecord.new
23
+ r = Zoro::TestRecord.new
24
24
  api = stub
25
25
  api.expects(:insert_records).with(r)
26
26
  r.api = api
@@ -28,7 +28,7 @@ describe Zoro::Record do
28
28
  end
29
29
 
30
30
  it "uses the name of anything not defined as a field in the record" do
31
- r = TestRecord.new
31
+ r = Zoro::TestRecord.new
32
32
  r.property_one = "foo"
33
33
  r.another_name = "value"
34
34
  r.fields["Property One"].must_equal "foo"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zoro
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Trevor Redfern