feedjira-opml 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 995fad68b9befabbc9776c9e5ca19758821816ac
4
- data.tar.gz: df04d22d2064d8747d0600f7646032fbcbc28cea
3
+ metadata.gz: 201ffda52b0713dc676b59f0670b8cb06d1047a8
4
+ data.tar.gz: 0404f07ac3fe2dfd6c50b0797994983507034b8b
5
5
  SHA512:
6
- metadata.gz: 3dc1b37746e6018aaa0d1f6050ef649232364184d174b7c52ad64c06c2e84db9c7a9cba076600b604eae1b7d7deafb4c537191a125236bd0376883eacccd0400
7
- data.tar.gz: 698c1e416b7632afbd316cb30c594a24c8040b792d8056fe4e27524c051bb9c4df26b5a6192ac784bb7fd4c65716d3e30ecb6112afa9dd203f3c9a50dc579a71
6
+ metadata.gz: 21bd60a38ef3f0ba63a05f7cad2b0bb4f20f33e1f0981cd38f98b5138ca9aa301f8eb554b87b7149502ac87798ad3ee369cfb8f5be40e3819340c88bee62ac1b
7
+ data.tar.gz: 7338d989446d8211db7ea16fc8a15be453f0a7d7f435dea5b880b0b65d741a0d4fc30caf52ff275ef42b53bd134738fdaff80bedd548550f58d74a9e6d838bf5
data/.gitignore CHANGED
@@ -7,3 +7,5 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
+ /vendor/bundle/
11
+ *.gem
@@ -0,0 +1,13 @@
1
+ # Contributor Code of Conduct
2
+
3
+ As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
4
+
5
+ We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, age, or religion.
6
+
7
+ Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
8
+
9
+ Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
10
+
11
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
12
+
13
+ This Code of Conduct is adapted from the [Contributor Covenant](http:contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 Chris Kalafarski
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -1,5 +1,5 @@
1
1
  module Feedjira
2
2
  module OPML
3
- VERSION = '1.0.2'
3
+ VERSION = '1.0.3'
4
4
  end
5
5
  end
@@ -0,0 +1,15 @@
1
+ module Feedjira
2
+ module Parser
3
+ class OPML
4
+ include SAXMachine
5
+ include FeedUtilities
6
+
7
+ element :head, class: OPMLHead
8
+ element :body, class: OPMLBody
9
+
10
+ def self.able_to_parse?(xml) #:nodoc:
11
+ (/\<opml/ =~ xml)
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,10 @@
1
+ module Feedjira
2
+ module Parser
3
+ class OPMLBody
4
+ include SAXMachine
5
+ include FeedUtilities
6
+
7
+ elements :outline, as: :outlines, class: OPMLOutline
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,22 @@
1
+ module Feedjira
2
+ module Parser
3
+ class OPMLHead
4
+ include SAXMachine
5
+ include FeedUtilities
6
+
7
+ element :title
8
+ element :dateCreated, as: :date_created
9
+ element :dateModified, as: :date_modified
10
+ element :ownerName, as: :owner_name
11
+ element :ownerEmail, as: :owner_email
12
+ element :ownerId, as: :owner_id
13
+ element :docs
14
+ element :expansionState, as: :expansion_state
15
+ element :vertScrollState, as: :vert_scroll_state
16
+ element :windowTop, as: :window_top
17
+ element :windowLeft, as: :window_left
18
+ element :windowBottom, as: :window_bottom
19
+ element :windowRight, as: :window_right
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,22 @@
1
+ module Feedjira
2
+ module Parser
3
+ class OPMLOutline
4
+ include SAXMachine
5
+ include FeedUtilities
6
+
7
+ attribute :type
8
+ attribute :text
9
+ attribute :xmlUrl, as: :xml_url
10
+ attribute :isComment, as: :is_comment
11
+ attribute :isBreakpoint, as: :is_breakpoint
12
+ attribute :created
13
+ attribute :category
14
+ attribute :description
15
+ attribute :htmlUrl, as: :html_url
16
+ attribute :language
17
+ attribute :title
18
+ attribute :version
19
+ attribute :url
20
+ end
21
+ end
22
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: feedjira-opml
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Kalafarski
@@ -75,7 +75,9 @@ extra_rdoc_files: []
75
75
  files:
76
76
  - ".gitignore"
77
77
  - ".travis.yml"
78
+ - CODE_OF_CONDUCT.md
78
79
  - Gemfile
80
+ - LICENSE.txt
79
81
  - README.md
80
82
  - Rakefile
81
83
  - bin/console
@@ -83,6 +85,10 @@ files:
83
85
  - feedjira-opml.gemspec
84
86
  - lib/feedjira/opml.rb
85
87
  - lib/feedjira/opml/version.rb
88
+ - lib/feedjira/parser/opml.rb
89
+ - lib/feedjira/parser/opml_body.rb
90
+ - lib/feedjira/parser/opml_head.rb
91
+ - lib/feedjira/parser/opml_outline.rb
86
92
  homepage: https://github.com/farski/feedjira-opml
87
93
  licenses:
88
94
  - MIT