atom_smasher 0.0.2 → 0.0.3

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.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  SHA1:
3
3
  metadata.gz: !binary |-
4
- N2NkZjVmNGEwOTE4ZTM0YTM5ODA2MjBlZDZhYzM1ODFlODc3OGE4Yg==
4
+ ODgyNWVkMjc5NDlkZDI0MmJjYmQ2NGJiZDdlYzA3YTJjZmY2MzliMg==
5
5
  data.tar.gz: !binary |-
6
- OTUxMDFjZDVkMWExYzhjZTQ2M2E5MzYyZTNkNjAwMjgyZjBkZGI1NA==
6
+ OTMwYzNlNDFhZGYxOTE0ZDRjZGRjNzM0YWMwMmQzMDk2M2VmYjRlOQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZDA2Y2ZhNjFlNzg0MjI3MWIwY2NlOTBmY2RmNWY3YWQyZDhiODUwNjBlZGZi
10
- ZGYwOWVhZDk1OTJiYWM2MTdjNWE5YWYzNDE5OWY1YzY1ZDNkMDFiZTE5ODQy
11
- Y2NjY2FiNmMzYWY2NTlmMGUwNTM0ZjE4ZTZjZGU5NmUwYjY5NjA=
9
+ ZGM0YzkyMDg0MTMzZTg1NzIzMDQxY2ZlNWU3ZjM4ZTQ4YzhlMDIwYzVmY2I2
10
+ ZmM5ZTM1ZGZjNmVjNGEwODk4ZGQ4ZTUwYjRiMGM5ZThjZDY0MGNlN2M5ODE4
11
+ YjEyZGJkMzJmOWI3NWE0ZjMxNWMxZDE2MmY4NTY2ZjEyYzNiY2I=
12
12
  data.tar.gz: !binary |-
13
- MDM1NGJlOGI3ZTZjY2EzNTFkMDBlNjJhZWQzNWJiNDRhOWQ2OThiY2FhZjJm
14
- MjczMGQzZWFlZDljZWJmYjU5Nzk3NjcxNGVkNDg3ZWU4ZDQ1ODA3YzRlNTU1
15
- N2Y5ZTAxNWY0Njk1ZWI2ZGVjYzA2NmE0Y2RjZWU3NDQ2NWJlNjI=
13
+ NGJmM2U1ZjdkMTcyMjZmN2VkZTBiZDA0MjNkOTgwNmI3ODcxNWQ2NjM2ZmZl
14
+ NjM2NGQ2ZmQ3ZDQ2YTY5OTMxNzM5M2NhYmZkNDJjNTkzNzRlZTk2N2RmYmM3
15
+ Mzk0MzkyZjY4ZjYyZjRlZjMxZDViNDhiMTcwMWIwNmQxNjdkZWY=
@@ -13,20 +13,20 @@ module AtomSmasher
13
13
  end
14
14
 
15
15
  def get_attributes_from_feed
16
- @rss = SimpleRSS.parse(open(url))
16
+ @rss = ::SimpleRSS.parse(open(url))
17
17
  @title = @rss.title
18
18
  end
19
19
 
20
20
  def get_new_posts_from_feed
21
21
  recent_items = @rss.items
22
22
  recent_item = recent_items.shift
23
- recent_post = posts.where(link: URI::encode(recent_item.link.strip)).first
23
+ recent_post = posts.where(link: ::URI::encode(recent_item.link.strip)).first
24
24
  until recent_post || !recent_item
25
25
  post = posts.build
26
- post.link = URI::encode(recent_item.link.strip)
26
+ post.link = ::URI::encode(recent_item.link.strip)
27
27
  post.title = recent_item.title
28
- source = open(URI::encode(recent_item.link.strip)).read
29
- post.content = Readability::Document.new(source, tags: %w[], attributes: %w[]).content
28
+ source = open(::URI::encode(recent_item.link.strip)).read
29
+ post.content = ::Readability::Document.new(source, tags: %w[], attributes: %w[]).content
30
30
  recent_item = recent_items.shift
31
31
  recent_post = posts.where(link: recent_item.link).first if recent_item
32
32
  end
@@ -1,5 +1,7 @@
1
1
  require "atom_smasher/engine"
2
2
  require "zurb-foundation"
3
+ require "simple-rss"
4
+ require "ruby-readability"
3
5
 
4
6
  module AtomSmasher
5
7
  end
@@ -1,3 +1,3 @@
1
1
  module AtomSmasher
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: atom_smasher
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Dalton
@@ -24,6 +24,20 @@ dependencies:
24
24
  version: 3.2.13
25
25
  prerelease: false
26
26
  type: :runtime
27
+ - !ruby/object:Gem::Dependency
28
+ name: haml
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 3.1.6
34
+ requirement: !ruby/object:Gem::Requirement
35
+ requirements:
36
+ - - "~>"
37
+ - !ruby/object:Gem::Version
38
+ version: 3.1.6
39
+ prerelease: false
40
+ type: :runtime
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: haml-rails
29
43
  version_requirements: !ruby/object:Gem::Requirement
@@ -248,7 +262,6 @@ files:
248
262
  - test/dummy/tmp/cache/assets/E0C/710/sprockets%2Febadee730bcde3be0798f0c88d68908d
249
263
  - test/dummy/tmp/cache/assets/E35/320/sprockets%2F673e47df2da9eaec80fc3fdb0f662ed4
250
264
  - test/dummy/tmp/cache/assets/E8C/050/sprockets%2Fcaceba04f165a4b7fa69aedb8c49f4cf
251
- - test/dummy/tmp/pids/server.pid
252
265
  - test/fixtures/atom_smasher/feeds.yml
253
266
  - test/fixtures/atom_smasher/posts.yml
254
267
  - test/functional/atom_smasher/feeds_controller_test.rb
@@ -370,7 +383,6 @@ test_files:
370
383
  - test/dummy/tmp/cache/assets/E0C/710/sprockets%2Febadee730bcde3be0798f0c88d68908d
371
384
  - test/dummy/tmp/cache/assets/E35/320/sprockets%2F673e47df2da9eaec80fc3fdb0f662ed4
372
385
  - test/dummy/tmp/cache/assets/E8C/050/sprockets%2Fcaceba04f165a4b7fa69aedb8c49f4cf
373
- - test/dummy/tmp/pids/server.pid
374
386
  - test/fixtures/atom_smasher/feeds.yml
375
387
  - test/fixtures/atom_smasher/posts.yml
376
388
  - test/functional/atom_smasher/feeds_controller_test.rb
@@ -1 +0,0 @@
1
- 42905