soup 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -21,7 +21,7 @@ spec = Gem::Specification.new do |s|
21
21
 
22
22
  # Change these as appropriate
23
23
  s.name = "soup"
24
- s.version = "1.0.2"
24
+ s.version = "1.0.3"
25
25
  s.summary = "A super-simple data store"
26
26
  s.author = "James Adam"
27
27
  s.email = "james@lazyatom.com"
@@ -23,6 +23,7 @@ class Soup
23
23
  content = data[0, attribute_start].strip
24
24
  attributes = default_attributes.merge(YAML.load(data[attribute_start, data.length]))
25
25
  else
26
+ content = data
26
27
  attributes = default_attributes
27
28
  end
28
29
  attributes.update(:content => content) if content && content.length > 0
@@ -38,6 +38,11 @@ of the snip
38
38
  assert_equal "blahface", @soup["blahface"].name
39
39
  end
40
40
 
41
+ should "not require snip attributes to give content" do
42
+ write_snip "test", "snip content"
43
+ assert_equal "snip content", @soup["test"].content
44
+ end
45
+
41
46
  should "take updated_at and created_at from file timestamps if not supplied" do
42
47
  @soup << {:name => "snip", :content => "whatever"}
43
48
  time = Time.parse("2010-11-04 14:56")
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: soup
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
5
- prerelease: false
4
+ hash: 17
5
+ prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 2
10
- version: 1.0.2
9
+ - 3
10
+ version: 1.0.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - James Adam
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-11-30 00:00:00 +00:00
18
+ date: 2011-02-22 00:00:00 +00:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -89,7 +89,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
89
89
  requirements: []
90
90
 
91
91
  rubyforge_project:
92
- rubygems_version: 1.3.7
92
+ rubygems_version: 1.4.1
93
93
  signing_key:
94
94
  specification_version: 3
95
95
  summary: A super-simple data store