rails-ess 0.9.1 → 0.9.2

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1,5 +1,6 @@
1
1
  *.gem
2
2
  *.rbc
3
+ *.swp
3
4
  .bundle
4
5
  .config
5
6
  .yardoc
data/.travis.yml ADDED
@@ -0,0 +1,6 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.9.2
4
+ - 1.9.3
5
+ - 2.0.0
6
+ script: bundle exec rspec spec
data/Gemfile CHANGED
@@ -3,4 +3,9 @@ source 'https://rubygems.org'
3
3
  # Specify your gem's dependencies in rails-ess.gemspec
4
4
  gemspec
5
5
 
6
- gem "rspec"
6
+ group :test do
7
+ gem 'actionpack', '~> 3.2.0'
8
+ gem 'rake'
9
+ gem 'rspec', '~> 2.13.0'
10
+ end
11
+
data/README.md CHANGED
@@ -1,9 +1,7 @@
1
- rails-ess
2
- ========
1
+ rails-ess [![ESS Feed Standard](http://essfeed.org/images/8/87/ESS_logo_32x32.png)](http://essfeed.org/)
2
+ ========================================================================================================
3
3
 
4
- #### https://github.com/essfeed/rails-ess
5
-
6
- [![ESS Feed Standard](http://essfeed.org/images/8/87/ESS_logo_32x32.png)](http://essfeed.org/)
4
+ [![Build Status](https://travis-ci.org/essfeed/rails-ess.png)](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.1'
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.0"
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[:push => "false"]
11
- maker_options[:aggregators => nil]
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]
@@ -1,5 +1,5 @@
1
1
  module ESS
2
2
  module Rails
3
- VERSION = "0.9.1"
3
+ VERSION = "0.9.2"
4
4
  end
5
5
  end
data/rails-ess.gemspec CHANGED
@@ -18,5 +18,4 @@ Gem::Specification.new do |gem|
18
18
  gem.require_paths = ["lib"]
19
19
 
20
20
  gem.add_runtime_dependency "ess", "0.9.1"
21
- gem.add_runtime_dependency "rails"
22
21
  end
@@ -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
+
@@ -0,0 +1,4 @@
1
+ require 'rubygems'
2
+ require 'action_view'
3
+ require 'rails-ess'
4
+
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.1
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-20 00:00:00.000000000 Z
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