infovore-ruminant 0.9.5 → 0.9.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/README +4 -4
  2. data/lib/design.rb +1 -1
  3. data/spec/product_spec.rb +18 -0
  4. metadata +2 -2
data/README CHANGED
@@ -10,13 +10,12 @@ If you've never installed a gem from github before - enter the following and you
10
10
  gem sources -a http://gems.github.com
11
11
 
12
12
  Then you can install this like any other gem:
13
- gem install james-ruminant
14
-
13
+ gem install infovore-ruminant
15
14
 
16
15
  Usage
17
16
  -----
18
17
 
19
- All parameters are done in an ActiveRecord attributes style, i.e. they can be passed into new() as a hash, and are all attr-accessors
18
+ All parameters are done in an ActiveRecord attributes style, i.e. they can be passed into new() as a hash, and are all attr-accessors. Note that product objects do not have attributes that are not impossible for that product, and that a Sticker will raise an error if you try to give it text.
20
19
 
21
20
  Making an order:
22
21
  require 'rubygems'
@@ -48,7 +47,7 @@ end
48
47
  Current Limitations
49
48
  -------------------
50
49
 
51
- Currently I only support MiniCards, but have made it incredibly easy to add the other supported products.
50
+ Currently I only support MiniCards and Stickers, but have made it incredibly easy to add the other supported products.
52
51
  I haven't yet, as I do not have a personal need, so don't feel I can test it. If you have such a need, do let me know, as we can add it.
53
52
 
54
53
  Manual Cropping is not currently supported for the same reason.
@@ -60,6 +59,7 @@ Contributors thus far
60
59
  Xenia Kingsley - Naming powers
61
60
  Chris Mear - Fixing stuff, and provides the wine
62
61
  Dan Webb - Wisdom
62
+ Tom Armitage - adding Moo::Sticker
63
63
 
64
64
 
65
65
  (__)
data/lib/design.rb CHANGED
@@ -47,7 +47,7 @@ module Moo
47
47
  }
48
48
  if !product_type.eql?("sticker")
49
49
  xml.text_collection {
50
- xml.tag! product_type {
50
+ xml.tag!(product_type) {
51
51
  lines.each_with_index do |line, index|
52
52
  xml.text_line {
53
53
  xml.id index+1
data/spec/product_spec.rb CHANGED
@@ -26,4 +26,22 @@ describe "The Design base class" do
26
26
  @design.line(1).bold.should == true
27
27
  @design.line(2).bold.should == true
28
28
  end
29
+
30
+ it "should have a text_collection element when converted to xml" do
31
+ @design.to_xml.should include("<text_collection>")
32
+ end
33
+
34
+ it "should have a text_line element when converted to xml" do
35
+ @design.to_xml.should include("<text_line>")
36
+ end
37
+ end
38
+
39
+ describe "The Sticker subclass" do
40
+ before(:each) do
41
+ @design = Moo::Sticker.new(:url => "http://farm3.static.flickr.com/2300/2179038972_23d2a1ff40_o.jpg")
42
+ end
43
+
44
+ it "should not have a text_collection element when converted to xml" do
45
+ @design.to_xml.should_not include("<text_collection>")
46
+ end
29
47
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: infovore-ruminant
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.5
4
+ version: 0.9.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Darling
@@ -46,7 +46,7 @@ files:
46
46
  - lib/core_ext/options_struct.rb
47
47
  - README
48
48
  has_rdoc: false
49
- homepage: http://github.com/infovore/ruminant/tree/master
49
+ homepage: http://github.com/james/ruminant/tree/master
50
50
  post_install_message:
51
51
  rdoc_options: []
52
52