rails-ess 0.9.1 → 0.9.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/.gitignore +1 -0
- data/.travis.yml +6 -0
- data/Gemfile +6 -1
- data/README.md +5 -7
- data/lib/rails-ess/ess_feed_helper.rb +2 -2
- data/lib/rails-ess/version.rb +1 -1
- data/rails-ess.gemspec +0 -1
- data/spec/rails-ess/ess_feed_helper_spec.rb +34 -0
- data/spec/spec_helper.rb +4 -0
- metadata +8 -19
data/.gitignore
CHANGED
data/.travis.yml
ADDED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,9 +1,7 @@
|
|
1
|
-
rails-ess
|
2
|
-
|
1
|
+
rails-ess [](http://essfeed.org/)
|
2
|
+
========================================================================================================
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
[](http://essfeed.org/)
|
4
|
+
[](https://travis-ci.org/essfeed/rails-ess)
|
7
5
|
|
8
6
|
Generate ESS XML feeds with Ruby-on-Rails
|
9
7
|
|
@@ -11,7 +9,7 @@ Generate ESS XML feeds with Ruby-on-Rails
|
|
11
9
|
|
12
10
|
Add this line to your application's Gemfile:
|
13
11
|
|
14
|
-
gem 'rails-ess', '~> 0.9.
|
12
|
+
gem 'rails-ess', '~> 0.9.2'
|
15
13
|
|
16
14
|
And then execute:
|
17
15
|
|
@@ -19,7 +17,7 @@ And then execute:
|
|
19
17
|
|
20
18
|
Or install it yourself as:
|
21
19
|
|
22
|
-
$ gem install rails-ess -v "0.9.
|
20
|
+
$ gem install rails-ess -v "0.9.2"
|
23
21
|
|
24
22
|
## Usage
|
25
23
|
|
@@ -7,8 +7,8 @@ module ActionView
|
|
7
7
|
def ess_feed(options = {}, &block)
|
8
8
|
xml = eval("xml", block.binding)
|
9
9
|
maker_options = options.clone
|
10
|
-
maker_options
|
11
|
-
maker_options
|
10
|
+
maker_options.delete(:push)
|
11
|
+
maker_options.delete(:aggregators)
|
12
12
|
ess = ESS::Maker.make(maker_options, &block)
|
13
13
|
output = ess.to_xml!
|
14
14
|
if options[:aggregators] || options[:push]
|
data/lib/rails-ess/version.rb
CHANGED
data/rails-ess.gemspec
CHANGED
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
class TestClass
|
4
|
+
include ActionView::Helpers::ESSFeedHelper
|
5
|
+
end
|
6
|
+
|
7
|
+
describe "ess_feed helper" do
|
8
|
+
let(:xml) { xml = Builder::XmlMarkup.new }
|
9
|
+
|
10
|
+
it 'should allow creating an xml feed' do
|
11
|
+
ESS::Pusher.should_not_receive(:push_to_aggregators)
|
12
|
+
TestClass.new.ess_feed :validate => false do |ess|
|
13
|
+
ess.channel do |channel|
|
14
|
+
channel.title "A sample title"
|
15
|
+
end
|
16
|
+
end
|
17
|
+
doc = xml.target!
|
18
|
+
doc.should include("<?xml")
|
19
|
+
doc.should include("<ess")
|
20
|
+
doc.should include("<title>A sample title</title>")
|
21
|
+
end
|
22
|
+
|
23
|
+
context 'when given the :push option' do
|
24
|
+
it 'should send the feed to aggregators' do
|
25
|
+
ESS::Pusher.should_receive(:push_to_aggregators)
|
26
|
+
TestClass.new.ess_feed :validate => false, :push => true do |ess|
|
27
|
+
ess.channel do |channel|
|
28
|
+
channel.title "A sample title"
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
data/spec/spec_helper.rb
ADDED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-ess
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-05-
|
13
|
+
date: 2013-05-24 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: ess
|
@@ -28,22 +28,6 @@ dependencies:
|
|
28
28
|
- - '='
|
29
29
|
- !ruby/object:Gem::Version
|
30
30
|
version: 0.9.1
|
31
|
-
- !ruby/object:Gem::Dependency
|
32
|
-
name: rails
|
33
|
-
requirement: !ruby/object:Gem::Requirement
|
34
|
-
none: false
|
35
|
-
requirements:
|
36
|
-
- - ! '>='
|
37
|
-
- !ruby/object:Gem::Version
|
38
|
-
version: '0'
|
39
|
-
type: :runtime
|
40
|
-
prerelease: false
|
41
|
-
version_requirements: !ruby/object:Gem::Requirement
|
42
|
-
none: false
|
43
|
-
requirements:
|
44
|
-
- - ! '>='
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
version: '0'
|
47
31
|
description: This gem extends Rails with the support for ESS feed generation using
|
48
32
|
Builder like sintax.
|
49
33
|
email:
|
@@ -54,6 +38,7 @@ extra_rdoc_files: []
|
|
54
38
|
files:
|
55
39
|
- .gitignore
|
56
40
|
- .rspec
|
41
|
+
- .travis.yml
|
57
42
|
- Gemfile
|
58
43
|
- LICENSE.txt
|
59
44
|
- README.md
|
@@ -62,6 +47,8 @@ files:
|
|
62
47
|
- lib/rails-ess/ess_feed_helper.rb
|
63
48
|
- lib/rails-ess/version.rb
|
64
49
|
- rails-ess.gemspec
|
50
|
+
- spec/rails-ess/ess_feed_helper_spec.rb
|
51
|
+
- spec/spec_helper.rb
|
65
52
|
homepage: https://github.com/essfeed/rails-ess
|
66
53
|
licenses: []
|
67
54
|
post_install_message:
|
@@ -86,4 +73,6 @@ rubygems_version: 1.8.24
|
|
86
73
|
signing_key:
|
87
74
|
specification_version: 3
|
88
75
|
summary: Rails extensions for ESS XML Feeds
|
89
|
-
test_files:
|
76
|
+
test_files:
|
77
|
+
- spec/rails-ess/ess_feed_helper_spec.rb
|
78
|
+
- spec/spec_helper.rb
|