ostatus 0.0.12 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 6ba63cce4a938dc9ca74effd289d0e6d3f53efec
4
+ data.tar.gz: b5e1b731394b014d33f6ca09c840f96259cee19a
5
+ SHA512:
6
+ metadata.gz: 63535f478d0be95a044553f0525715569db1e798e59c055fb38bc34c068fc1d7d3d8ef1905801233ccd7c506acf9c3d67ccc518a4789836415209c7da0131fb0
7
+ data.tar.gz: 864ad3ea5f9c82c27773f736f54f503a43c087641da04b48a11f3f7dcfd866fde2a4f9473e78b05e35f00acf42dff5b9beea3f3384d5942c179c566faa2c01ed
@@ -1,5 +1,9 @@
1
1
  language: ruby
2
+ script: bundle exec rake test
2
3
  rvm:
3
4
  - 1.9.2
4
5
  - 1.9.3
5
- script: "bundle exec rake spec"
6
+ - 2.0.0
7
+ - ruby-head
8
+ - rbx-19mode
9
+ script: "bundle exec rake test"
data/Gemfile CHANGED
@@ -1,4 +1,12 @@
1
- source "http://rubygems.org"
1
+ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in ostatus.gemspec
4
4
  gemspec
5
+
6
+ group :test do
7
+ gem "minitest"
8
+ gem "rake"
9
+ gem "ansi"
10
+ gem "turn"
11
+ gem "mocha" # stubs
12
+ end
data/Rakefile CHANGED
@@ -1,15 +1,7 @@
1
- require 'rspec/core/rake_task'
1
+ require "bundler/gem_tasks"
2
2
 
3
- # rake spec
4
- RSpec::Core::RakeTask.new(:spec) do |spec|
5
- spec.pattern = 'spec/*_spec.rb'
6
- end
3
+ require 'rake/testtask'
7
4
 
8
- # rake doc
9
- RSpec::Core::RakeTask.new(:doc) do |spec|
10
- spec.pattern = 'spec/*_spec.rb'
11
- spec.rspec_opts = ['--format documentation']
5
+ Rake::TestTask.new do |t|
6
+ t.pattern = "spec/*_spec.rb"
12
7
  end
13
-
14
- require 'bundler'
15
- Bundler::GemHelper.install_tasks
@@ -1,11 +1,13 @@
1
1
  require_relative 'activity'
2
2
  require_relative 'portable_contacts'
3
- require 'date'
4
3
 
5
4
  module OStatus
5
+ require 'atom'
6
6
 
7
7
  # Holds information about the author of the Feed.
8
8
  class Author < Atom::Person
9
+ require 'date'
10
+
9
11
  include Atom::SimpleExtensions
10
12
 
11
13
  add_extension_namespace :activity, ACTIVITY_NS
@@ -1,3 +1,3 @@
1
1
  module OStatus
2
- VERSION = "0.0.12"
2
+ VERSION = "1.0.0"
3
3
  end
@@ -14,7 +14,7 @@ Gem::Specification.new do |s|
14
14
 
15
15
  s.rubyforge_project = "ostatus"
16
16
 
17
- s.add_dependency "ratom", "~> 0.7.0"
17
+ s.add_dependency "ratom", "~> 0.8.2"
18
18
  s.add_development_dependency "rspec", "~> 2.10.0"
19
19
  s.add_development_dependency "rake", "~> 0.9.2"
20
20
 
@@ -1,10 +1,8 @@
1
- require_relative '../lib/ostatus/feed.rb'
2
- require_relative '../lib/ostatus/entry.rb'
1
+ require_relative 'helper'
3
2
  require_relative '../lib/ostatus/activity.rb'
4
- require_relative '../lib/ostatus/author.rb'
5
3
 
6
4
  describe OStatus::Activity do
7
- before(:each) do
5
+ before do
8
6
  feed = OStatus::Feed.from_url('test/example_feed.atom')
9
7
  entry = feed.entries[0]
10
8
  @activity = entry.activity
@@ -14,41 +12,41 @@ describe OStatus::Activity do
14
12
 
15
13
  describe "#object" do
16
14
  it "should give an Author containing the content of the activity:object tag" do
17
- @activity.object.class.should eql(OStatus::Author)
15
+ @activity.object.class.must_equal(OStatus::Author)
18
16
  end
19
17
 
20
18
  it "should give nil when no activity:object was given" do
21
- @activity_empty.object.should eql(nil)
19
+ @activity_empty.object.must_equal(nil)
22
20
  end
23
21
  end
24
22
 
25
23
  describe "#object-type" do
26
24
  it "should give a String containing the content of the activity:object-type tag" do
27
- @activity.object_type.should eql(:note)
25
+ @activity.object_type.must_equal(:note)
28
26
  end
29
27
 
30
28
  it "should give nil when no activity:object-type was given" do
31
- @activity_empty.object_type.should eql(nil)
29
+ @activity_empty.object_type.must_equal(nil)
32
30
  end
33
31
  end
34
32
 
35
33
  describe "#verb" do
36
34
  it "should give a String containing the content of the activity:verb tag" do
37
- @activity.verb.should eql(:post)
35
+ @activity.verb.must_equal(:post)
38
36
  end
39
37
 
40
38
  it "should give nil when no activity:verb was given" do
41
- @activity_empty.verb.should eql(nil)
39
+ @activity_empty.verb.must_equal(nil)
42
40
  end
43
41
  end
44
42
 
45
43
  describe "#target" do
46
44
  it "should give a String containing the content of the activity:target tag" do
47
- @activity.target.should eql('Barbaz')
45
+ @activity.target.must_equal('Barbaz')
48
46
  end
49
47
 
50
48
  it "should give nil when no activity:target was given" do
51
- @activity_empty.target.should eql(nil)
49
+ @activity_empty.target.must_equal(nil)
52
50
  end
53
51
  end
54
52
  end
@@ -1,6 +1,5 @@
1
- require_relative '../lib/ostatus/feed.rb'
1
+ require_relative 'helper'
2
2
  require_relative '../lib/ostatus/author.rb'
3
- require_relative '../lib/ostatus/portable_contacts.rb'
4
3
 
5
4
  describe OStatus::Author do
6
5
  before(:each) do
@@ -12,51 +11,51 @@ describe OStatus::Author do
12
11
 
13
12
  describe "#activity" do
14
13
  it "should return an Activity instance" do
15
- @author.activity.class.should eql(OStatus::Activity)
14
+ @author.activity.class.must_equal(OStatus::Activity)
16
15
  end
17
16
 
18
17
  it "should give an Activity instance that is relevant to the author subtree" do
19
- @author.activity.object_type.should eql(:person)
18
+ @author.activity.object_type.must_equal(:person)
20
19
  end
21
20
  end
22
21
 
23
22
  describe "#portable_contacts" do
24
23
  it "should return an PortableContacts instance" do
25
- @author.portable_contacts.class.should eql(OStatus::PortableContacts)
24
+ @author.portable_contacts.class.must_equal(OStatus::PortableContacts)
26
25
  end
27
26
 
28
27
  it "should give an PortableContacts instance that is relevant to the author subtree" do
29
- @author.portable_contacts.preferred_username.should eql('greenmanspirit')
28
+ @author.portable_contacts.preferred_username.must_equal('greenmanspirit')
30
29
  end
31
30
  end
32
31
 
33
32
  describe "#uri" do
34
33
  it "should give a String containing the content of the uri tag" do
35
- @author.uri.should eql('http://identi.ca/user/141464')
34
+ @author.uri.must_equal('http://identi.ca/user/141464')
36
35
  end
37
36
 
38
37
  it "should give nil when no uri is given" do
39
- @author_empty.uri.should eql(nil)
38
+ @author_empty.uri.must_equal(nil)
40
39
  end
41
40
  end
42
41
 
43
42
  describe "#name" do
44
43
  it "should give a String containing the content of the name tag" do
45
- @author.name.should eql('greenmanspirit')
44
+ @author.name.must_equal('greenmanspirit')
46
45
  end
47
46
 
48
47
  it "should give nil when no name is given" do
49
- @author_empty.name.should eql(nil)
48
+ @author_empty.name.must_equal(nil)
50
49
  end
51
50
  end
52
51
 
53
52
  describe "email" do
54
53
  it "should give a String containing the content of the email tag" do
55
- @author.email.should eql('foo@example.com')
54
+ @author.email.must_equal('foo@example.com')
56
55
  end
57
56
 
58
57
  it "should give nil when no email is given" do
59
- @author_empty.email.should eql(nil)
58
+ @author_empty.email.must_equal(nil)
60
59
  end
61
60
  end
62
61
  end
@@ -1,3 +1,4 @@
1
+ require_relative 'helper'
1
2
  require_relative '../lib/ostatus/feed.rb'
2
3
 
3
4
  describe 'XML builder' do
@@ -22,30 +23,30 @@ describe 'XML builder' do
22
23
  end
23
24
 
24
25
  it 'should generate the title' do
25
- @feed.atom.should match("<title>Dean's Updates")
26
+ @feed.atom.must_match("<title>Dean's Updates")
26
27
  end
27
28
 
28
29
  it 'should generate the id' do
29
- @feed.atom.should match("<id>#{@feed_url}")
30
+ @feed.atom.must_match("<id>#{@feed_url}")
30
31
  end
31
32
 
32
33
  it 'should generate a self link' do
33
34
  # depending on this attribute order is a really terrible idea, but oh well.
34
- @feed.atom.should match("<link rel=\"self\" href=\"#{@feed_url}\"/>")
35
+ @feed.atom.must_match("<link rel=\"self\" href=\"#{@feed_url}\"/>")
35
36
  end
36
37
 
37
38
  it 'should generate the hub link' do
38
39
  # depending on this attribute order is a really terrible idea, but oh well.
39
- @feed.atom.should match('<link rel="hub" href="http://example.org/hub"/>')
40
+ @feed.atom.must_match('<link rel="hub" href="http://example.org/hub"/>')
40
41
  end
41
42
 
42
43
  describe 'when generating the author' do
43
- specify { @feed.atom.should match('<name>Dean Venture') }
44
- specify { @feed.atom.should match('<email>dean@venture.com') }
45
- specify { @feed.atom.should match('<uri>http://geocities.com/~dean') }
46
- specify { @feed.atom.should match("<poco:id>#{@poco_id}") }
47
- specify { @feed.atom.should match('<poco:displayName>Dean Venture') }
48
- specify { @feed.atom.should match('<poco:preferredUsername>dean') }
44
+ specify { @feed.atom.must_match('<name>Dean Venture') }
45
+ specify { @feed.atom.must_match('<email>dean@venture.com') }
46
+ specify { @feed.atom.must_match('<uri>http://geocities.com/~dean') }
47
+ specify { @feed.atom.must_match("<poco:id>#{@poco_id}") }
48
+ specify { @feed.atom.must_match('<poco:displayName>Dean Venture') }
49
+ specify { @feed.atom.must_match('<poco:preferredUsername>dean') }
49
50
  end
50
51
 
51
52
  describe 'when generating a feed with entries' do
@@ -62,11 +63,11 @@ describe 'XML builder' do
62
63
  )
63
64
  end
64
65
 
65
- specify { @feed.atom.should match('<title>atom powered robots') }
66
- specify { @feed.atom.should match('<content>atom powered robots') }
67
- specify { @feed.atom.should match(Regexp.escape("<updated>#{@now.iso8601}")) }
68
- specify { @feed.atom.should match(Regexp.escape("<published>#{@now.iso8601}")) }
69
- specify { @feed.atom.should match('<id>http://example.org/feed/1') }
70
- specify { @feed.atom.should match('<link href="http://example.org/feed/1"/>') }
66
+ specify { @feed.atom.must_match('<title>atom powered robots') }
67
+ specify { @feed.atom.must_match('<content>atom powered robots') }
68
+ specify { @feed.atom.must_match(/#{Regexp.escape("<updated>#{@now.iso8601}")}/) }
69
+ specify { @feed.atom.must_match(/#{Regexp.escape("<published>#{@now.iso8601}")}/) }
70
+ specify { @feed.atom.must_match('<id>http://example.org/feed/1') }
71
+ specify { @feed.atom.must_match('<link href="http://example.org/feed/1"/>') }
71
72
  end
72
73
  end
@@ -1,7 +1,5 @@
1
- require_relative '../lib/ostatus/feed.rb'
1
+ require_relative 'helper'
2
2
  require_relative '../lib/ostatus/entry.rb'
3
- require_relative '../lib/ostatus/activity.rb'
4
- require_relative '../lib/ostatus/link.rb'
5
3
 
6
4
  describe OStatus::Entry do
7
5
  before(:each) do
@@ -13,93 +11,93 @@ describe OStatus::Entry do
13
11
 
14
12
  describe "#activity" do
15
13
  it "should return an Activity instance" do
16
- @entry.activity.class.should eql(OStatus::Activity)
14
+ @entry.activity.class.must_equal(OStatus::Activity)
17
15
  end
18
16
  end
19
17
 
20
18
  describe "#title" do
21
19
  it "should give a String containing the content of the title tag" do
22
- @entry.title.should eql("staples come out of the head tomorrow, oh yeah")
20
+ @entry.title.must_equal("staples come out of the head tomorrow, oh yeah")
23
21
  end
24
22
  end
25
23
 
26
24
  describe "#content" do
27
25
  it "should give a String containing the content of the content tag" do
28
- @entry.content.should eql("staples come out of the head tomorrow, oh yeah")
26
+ @entry.content.must_equal("staples come out of the head tomorrow, oh yeah")
29
27
  end
30
28
  end
31
29
 
32
30
  describe "#updated" do
33
31
  it "should return a DateTime instance" do
34
- @entry.updated.instance_of?(DateTime).should eql(true)
32
+ @entry.updated.instance_of?(DateTime).must_equal(true)
35
33
  end
36
34
 
37
35
  it "should return a DateTime representing the time given in the updated tag" do
38
- @entry.updated.strftime("%Y-%m-%dT%I:%M:%S%z").should eql('2011-03-22T02:15:14+0000')
36
+ @entry.updated.strftime("%Y-%m-%dT%I:%M:%S%z").must_equal('2011-03-22T02:15:14+0000')
39
37
  end
40
38
  end
41
39
 
42
40
  describe "#published" do
43
41
  it "should return a DateTime instance" do
44
- @entry.published.instance_of?(DateTime).should eql(true)
42
+ @entry.published.instance_of?(DateTime).must_equal(true)
45
43
  end
46
44
 
47
45
  it "should return a DateTime representing the time given in the published tag" do
48
- @entry.published.strftime("%Y-%m-%dT%I:%M:%S%z").should eql('2011-02-21T02:15:14+0000')
46
+ @entry.published.strftime("%Y-%m-%dT%I:%M:%S%z").must_equal('2011-02-21T02:15:14+0000')
49
47
  end
50
48
  end
51
49
 
52
50
  describe "#id" do
53
51
  it "should return the id given in the id tag" do
54
- @entry.id.should eql('http://identi.ca/notice/64991641')
52
+ @entry.id.must_equal('http://identi.ca/notice/64991641')
55
53
  end
56
54
  end
57
55
 
58
56
  describe "#info" do
59
57
  it "should give a Hash" do
60
- @entry.info.instance_of?(Hash).should eql(true)
58
+ @entry.info.instance_of?(Hash).must_equal(true)
61
59
  end
62
60
 
63
61
  it "should contain the id" do
64
- @entry.info[:id].should eql('http://identi.ca/notice/64991641')
62
+ @entry.info[:id].must_equal('http://identi.ca/notice/64991641')
65
63
  end
66
64
 
67
65
  it "should contain the content" do
68
- @entry.info[:content].should eql("staples come out of the head tomorrow, oh yeah")
66
+ @entry.info[:content].must_equal("staples come out of the head tomorrow, oh yeah")
69
67
  end
70
68
 
71
69
  it "should contain the title" do
72
- @entry.info[:title].should eql("staples come out of the head tomorrow, oh yeah")
70
+ @entry.info[:title].must_equal("staples come out of the head tomorrow, oh yeah")
73
71
  end
74
72
 
75
73
  it "should contain a Hash for the link" do
76
- @entry.info[:link].class.should eql(Hash)
74
+ @entry.info[:link].class.must_equal(Hash)
77
75
  end
78
76
 
79
77
  it "should contain the published DateTime" do
80
- @entry.info[:published].class.should eql(DateTime)
81
- @entry.info[:published].strftime("%Y-%m-%dT%I:%M:%S%z").should eql('2011-02-21T02:15:14+0000')
78
+ @entry.info[:published].class.must_equal(DateTime)
79
+ @entry.info[:published].strftime("%Y-%m-%dT%I:%M:%S%z").must_equal('2011-02-21T02:15:14+0000')
82
80
  end
83
81
 
84
82
  it "should contain the updated DateTime" do
85
- @entry.info[:updated].class.should eql(DateTime)
86
- @entry.info[:updated].strftime("%Y-%m-%dT%I:%M:%S%z").should eql('2011-03-22T02:15:14+0000')
83
+ @entry.info[:updated].class.must_equal(DateTime)
84
+ @entry.info[:updated].strftime("%Y-%m-%dT%I:%M:%S%z").must_equal('2011-03-22T02:15:14+0000')
87
85
  end
88
86
  end
89
87
 
90
88
  describe "#links" do
91
89
  it "should use OStatus::Link elements" do
92
- @entry.links.first.class.should eql(OStatus::Link)
90
+ @entry.links.first.class.must_equal(OStatus::Link)
93
91
  end
94
92
  end
95
93
 
96
94
  describe "#url" do
97
95
  it "should return the alternate link's href attribute" do
98
- @entry.url.should eql("http://identi.ca/notice/64991641")
96
+ @entry.url.must_equal("http://identi.ca/notice/64991641")
99
97
  end
100
98
 
101
99
  it "should return the alternate link's content if there's no href" do
102
- @entry_link_without_href.url.should eql("http://identi.ca/notice/89057569")
100
+ @entry_link_without_href.url.must_equal("http://identi.ca/notice/89057569")
103
101
  end
104
102
  end
105
103
  end
@@ -1,12 +1,11 @@
1
+ require_relative 'helper'
1
2
  require_relative '../lib/ostatus/feed.rb'
2
- require_relative '../lib/ostatus/entry.rb'
3
3
 
4
4
  describe OStatus::Feed do
5
-
6
5
  describe "#initialize" do
7
6
  it "should detect a feed URI in an HTML page" do
8
7
  @feed = OStatus::Feed.from_url('test/example_page.html')
9
- @feed.url.should == 'test/example_feed.atom'
8
+ @feed.url.must_equal 'test/example_feed.atom'
10
9
  end
11
10
  end
12
11
 
@@ -17,34 +16,28 @@ describe OStatus::Feed do
17
16
 
18
17
  describe "#atom" do
19
18
  it "should return a String containing the atom information" do
20
- @feed.atom.start_with?("<?xml").should eql(true)
19
+ @feed.atom.start_with?("<?xml").must_equal(true)
21
20
  end
22
21
  end
23
22
 
24
23
  describe "#hubs" do
25
24
  it "should return a String containing the hub url given in the link tag" do
26
- @feed.hubs.should eql(['http://identi.ca/main/push/hub', 'http://identi.ca/main/push/hub2'])
25
+ @feed.hubs.must_equal(['http://identi.ca/main/push/hub', 'http://identi.ca/main/push/hub2'])
27
26
  end
28
27
  end
29
28
 
30
29
  describe "#salmon" do
31
30
  it "should return a String containing the salmon url given in the link tag" do
32
- @feed.salmon.should eql('http://identi.ca/main/salmon/user/141464')
31
+ @feed.salmon.must_equal('http://identi.ca/main/salmon/user/141464')
33
32
  end
34
33
  end
35
34
 
36
35
  describe "#entries" do
37
36
  it "should return an Array of Entry instances" do
38
37
  @feed.entries.each do |entry|
39
- entry.instance_of?(OStatus::Entry).should eql(true)
38
+ entry.instance_of?(OStatus::Entry).must_equal(true)
40
39
  end
41
40
  end
42
41
  end
43
42
  end
44
-
45
- describe "#from_url" do
46
- it "should be able to sort link elements with unknown MIME types" do
47
- @feed = OStatus::Feed.from_url('test/mime_type_bug_feed.atom')
48
- end
49
- end
50
43
  end
@@ -0,0 +1,8 @@
1
+ require 'minitest/spec'
2
+ require 'turn/autorun'
3
+
4
+ Turn.config do |c|
5
+ c.natural = true
6
+ end
7
+
8
+ require "mocha/setup"
@@ -1,3 +1,4 @@
1
+ require_relative 'helper'
1
2
  require_relative '../lib/ostatus/feed.rb'
2
3
  require_relative '../lib/ostatus/entry.rb'
3
4
  require_relative '../lib/ostatus/activity.rb'
@@ -17,141 +18,141 @@ describe OStatus::PortableContacts do
17
18
 
18
19
  describe "#id" do
19
20
  it "should give a String containing the content of the title tag" do
20
- @poco.id.should eql('foobar')
21
+ @poco.id.must_equal('foobar')
21
22
  end
22
23
 
23
24
  it "should give nil if the id tag does not exist" do
24
- @poco_empty.id.should eql(nil)
25
+ @poco_empty.id.must_equal(nil)
25
26
  end
26
27
  end
27
28
 
28
29
  describe "#display_name" do
29
30
  it "should give a String containing the content of the displayName tag" do
30
- @poco.display_name.should eql('Adam Hobaugh')
31
+ @poco.display_name.must_equal('Adam Hobaugh')
31
32
  end
32
33
 
33
34
  it "should give nil if the displayName tag does not exist" do
34
- @poco_empty.display_name.should eql(nil)
35
+ @poco_empty.display_name.must_equal(nil)
35
36
  end
36
37
  end
37
38
 
38
39
  describe "#name" do
39
40
  it "should give a String containing the content of the name tag" do
40
- @poco.name.should eql('barbaz')
41
+ @poco.name.must_equal('barbaz')
41
42
  end
42
43
 
43
44
  it "should give nil if the name tag does not exist" do
44
- @poco_empty.name.should eql(nil)
45
+ @poco_empty.name.must_equal(nil)
45
46
  end
46
47
  end
47
48
 
48
49
  describe "#nickname" do
49
50
  it "should give a String containing the content of the nickname tag" do
50
- @poco.nickname.should eql('spaz')
51
+ @poco.nickname.must_equal('spaz')
51
52
  end
52
53
 
53
54
  it "should give nil if the nickname tag does not exist" do
54
- @poco_empty.nickname.should eql(nil)
55
+ @poco_empty.nickname.must_equal(nil)
55
56
  end
56
57
  end
57
58
 
58
59
  describe "#published" do
59
60
  it "should give a DateTime instance" do
60
- @poco.published.class.should eql(DateTime)
61
+ @poco.published.class.must_equal(DateTime)
61
62
  end
62
63
 
63
64
  it "should give a DateTime containing the content of the published tag" do
64
- @poco.published.strftime("%Y-%m-%dT%I:%M:%S%z").should eql('2012-02-21T02:15:14+0000')
65
+ @poco.published.strftime("%Y-%m-%dT%I:%M:%S%z").must_equal('2012-02-21T02:15:14+0000')
65
66
  end
66
67
 
67
68
  it "should give nil if the published tag does not exist" do
68
- @poco_empty.published.should eql(nil)
69
+ @poco_empty.published.must_equal(nil)
69
70
  end
70
71
  end
71
72
 
72
73
  describe "#updated" do
73
74
  it "should give a DateTime instance" do
74
- @poco.updated.class.should eql(DateTime)
75
+ @poco.updated.class.must_equal(DateTime)
75
76
  end
76
77
 
77
78
  it "should give a DateTime containing the content of the updated tag" do
78
- @poco.updated.strftime("%Y-%m-%dT%I:%M:%S%z").should eql('2013-02-21T02:15:14+0000')
79
+ @poco.updated.strftime("%Y-%m-%dT%I:%M:%S%z").must_equal('2013-02-21T02:15:14+0000')
79
80
  end
80
81
 
81
82
  it "should give nil if the updated tag does not exist" do
82
- @poco_empty.updated.should eql(nil)
83
+ @poco_empty.updated.must_equal(nil)
83
84
  end
84
85
  end
85
86
 
86
87
  describe "#birthday" do
87
88
  it "should give a Date instance" do
88
- @poco.birthday.class.should eql(Date)
89
+ @poco.birthday.class.must_equal(Date)
89
90
  end
90
91
 
91
92
  it "should give a Date containing the content of the birthday tag" do
92
- @poco.birthday.strftime("%Y-%m-%d").should eql('2014-02-21')
93
+ @poco.birthday.strftime("%Y-%m-%d").must_equal('2014-02-21')
93
94
  end
94
95
 
95
96
  it "should give nil if the birthday tag does not exist" do
96
- @poco_empty.birthday.should eql(nil)
97
+ @poco_empty.birthday.must_equal(nil)
97
98
  end
98
99
  end
99
100
 
100
101
  describe "#anniversary" do
101
102
  it "should give a Date instance" do
102
- @poco.anniversary.class.should eql(Date)
103
+ @poco.anniversary.class.must_equal(Date)
103
104
  end
104
105
 
105
106
  it "should give a Date containing the content of the anniversary tag" do
106
- @poco.anniversary.strftime("%Y-%m-%d").should eql('2015-02-21')
107
+ @poco.anniversary.strftime("%Y-%m-%d").must_equal('2015-02-21')
107
108
  end
108
109
 
109
110
  it "should give nil if the anniversary tag does not exist" do
110
- @poco_empty.anniversary.should eql(nil)
111
+ @poco_empty.anniversary.must_equal(nil)
111
112
  end
112
113
  end
113
114
 
114
115
  describe "#gender" do
115
116
  it "should give a String containing the content of the gender tag" do
116
- @poco.gender.should eql('male')
117
+ @poco.gender.must_equal('male')
117
118
  end
118
119
 
119
120
  it "should give nil if the gender tag does not exist" do
120
- @poco_empty.gender.should eql(nil)
121
+ @poco_empty.gender.must_equal(nil)
121
122
  end
122
123
  end
123
124
 
124
125
  describe "#note" do
125
126
  it "should give a String containing the content of the note tag" do
126
- @poco.note.should eql("foo\nbar")
127
+ @poco.note.must_equal("foo\nbar")
127
128
  end
128
129
 
129
130
  it "should give nil if the note tag does not exist" do
130
- @poco_empty.note.should eql(nil)
131
+ @poco_empty.note.must_equal(nil)
131
132
  end
132
133
  end
133
134
 
134
135
  describe "#preferred_username" do
135
136
  it "should give a String containing the content of the preferred_username tag" do
136
- @poco.preferred_username.should eql("greenmanspirit")
137
+ @poco.preferred_username.must_equal("greenmanspirit")
137
138
  end
138
139
 
139
140
  it "should give nil if the preferred_username tag does not exist" do
140
- @poco_empty.preferred_username.should eql(nil)
141
+ @poco_empty.preferred_username.must_equal(nil)
141
142
  end
142
143
  end
143
144
 
144
145
  describe "#connected" do
145
146
  it "should give a boolean true when the content of the connected tag is 'true'" do
146
- @poco.connected.should eql(true)
147
+ @poco.connected.must_equal(true)
147
148
  end
148
149
 
149
150
  it "should give a boolean false when the content of the connected tag is 'false'" do
150
- @poco_false.connected.should eql(false)
151
+ @poco_false.connected.must_equal(false)
151
152
  end
152
153
 
153
154
  it "should give nil if the connected tag does not exist" do
154
- @poco_empty.connected.should eql(nil)
155
+ @poco_empty.connected.must_equal(nil)
155
156
  end
156
157
  end
157
158
  end
@@ -1,9 +1,10 @@
1
+ require_relative 'helper'
1
2
  require_relative '../lib/ostatus/salmon.rb'
2
3
 
3
4
  describe OStatus::Salmon do
4
5
  describe "Salmon.from_xml" do
5
6
  it "returns nil if source is empty string" do
6
- OStatus::Salmon.from_xml("").should be_nil
7
+ OStatus::Salmon.from_xml("").must_equal(nil)
7
8
  end
8
9
  end
9
10
  end
metadata CHANGED
@@ -1,36 +1,32 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ostatus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12
5
- prerelease:
4
+ version: 1.0.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Hackers of the Severed Hand
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-08-14 00:00:00.000000000 Z
11
+ date: 2014-08-05 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: ratom
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ~>
20
18
  - !ruby/object:Gem::Version
21
- version: 0.7.0
19
+ version: 0.8.2
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - ~>
28
25
  - !ruby/object:Gem::Version
29
- version: 0.7.0
26
+ version: 0.8.2
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: rspec
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
31
  - - ~>
36
32
  - !ruby/object:Gem::Version
@@ -38,7 +34,6 @@ dependencies:
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
38
  - - ~>
44
39
  - !ruby/object:Gem::Version
@@ -46,7 +41,6 @@ dependencies:
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: rake
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
45
  - - ~>
52
46
  - !ruby/object:Gem::Version
@@ -54,7 +48,6 @@ dependencies:
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
52
  - - ~>
60
53
  - !ruby/object:Gem::Version
@@ -89,6 +82,7 @@ files:
89
82
  - spec/builder_spec.rb
90
83
  - spec/entry_spec.rb
91
84
  - spec/feed_spec.rb
85
+ - spec/helper.rb
92
86
  - spec/portable_contacts_spec.rb
93
87
  - spec/salmon_spec.rb
94
88
  - test/example_feed.atom
@@ -99,27 +93,26 @@ files:
99
93
  - test/mime_type_bug_feed.atom
100
94
  homepage: http://github.com/hotsh/ostatus
101
95
  licenses: []
96
+ metadata: {}
102
97
  post_install_message:
103
98
  rdoc_options: []
104
99
  require_paths:
105
100
  - lib
106
101
  required_ruby_version: !ruby/object:Gem::Requirement
107
- none: false
108
102
  requirements:
109
- - - ! '>='
103
+ - - '>='
110
104
  - !ruby/object:Gem::Version
111
105
  version: '0'
112
106
  required_rubygems_version: !ruby/object:Gem::Requirement
113
- none: false
114
107
  requirements:
115
- - - ! '>='
108
+ - - '>='
116
109
  - !ruby/object:Gem::Version
117
110
  version: '0'
118
111
  requirements: []
119
112
  rubyforge_project: ostatus
120
- rubygems_version: 1.8.23
113
+ rubygems_version: 2.1.11
121
114
  signing_key:
122
- specification_version: 3
115
+ specification_version: 4
123
116
  summary: Implementations of the OStatus data stream objects.
124
117
  test_files:
125
118
  - spec/activity_spec.rb
@@ -127,6 +120,7 @@ test_files:
127
120
  - spec/builder_spec.rb
128
121
  - spec/entry_spec.rb
129
122
  - spec/feed_spec.rb
123
+ - spec/helper.rb
130
124
  - spec/portable_contacts_spec.rb
131
125
  - spec/salmon_spec.rb
132
126
  - test/example_feed.atom