pluto-models 1.5.1 → 1.5.2

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: b81d3634465206e2bac108bcff1629627a250fd0
4
- data.tar.gz: c5b02063eb4ac615fd6e2be6fef55847a24be435
3
+ metadata.gz: a3f3aa900ee09c45deb0049eaba8d2d50c37a226
4
+ data.tar.gz: 608cac74375d1b22df6d0486729b251c84f6cc3c
5
5
  SHA512:
6
- metadata.gz: c925c6718b7ee40814b4bda67fb99fb19347adc5cba20a030ea1dcddb1d48311050cc3c358e77e103459c9fc650aa38641ea3c6200b32eb03e2d7497e9944264
7
- data.tar.gz: 61364d47455fca58c1cc02282d712f846df860162a1455327c774ce73e6cd73af9545f2f5c2fad5effa7b0519e6e192d13302f9e80af29c8b1f56a12665d911d
6
+ metadata.gz: 980818918cfd27d11e3ffd7593977be648e0bfed4d44b5e64ee2f60f67794d71ff3e61bbceffb5ec0c76bfae17f2c6416c21c5bf722b85dd815663718742dcdf
7
+ data.tar.gz: 3b613701225714e04afd3ebceefdd75e7fb8714d5391868e085add8ca21c08ffaa59967a7cba64f425eb1bc487d89d2e7b5f37756d838bd1983722da5496d181
File without changes
data/Manifest.txt CHANGED
@@ -1,4 +1,4 @@
1
- HISTORY.md
1
+ CHANGELOG.md
2
2
  Manifest.txt
3
3
  README.md
4
4
  Rakefile
data/Rakefile CHANGED
@@ -15,12 +15,12 @@ Hoe.spec 'pluto-models' do
15
15
 
16
16
  # switch extension to .markdown for gihub formatting
17
17
  self.readme_file = 'README.md'
18
- self.history_file = 'HISTORY.md'
18
+ self.history_file = 'CHANGELOG.md'
19
19
 
20
20
  self.extra_deps = [
21
21
  ['props', '>= 1.2.0'],
22
22
  ['logutils', '>= 0.6.1'],
23
- ['feedparser', '>= 2.1.0'],
23
+ ['feedparser', '>= 2.1.1'],
24
24
  ['feedfilter', '>= 1.1.1'],
25
25
  ['textutils', '>= 1.4.0'],
26
26
  ['activerecord'],
@@ -34,7 +34,7 @@ Hoe.spec 'pluto-models' do
34
34
  self.licenses = ['Public Domain']
35
35
 
36
36
  self.spec_extras = {
37
- required_ruby_version: '>= 2.3'
37
+ required_ruby_version: '>= 2.2.2'
38
38
  }
39
39
 
40
40
  end
@@ -63,7 +63,10 @@ class Connecter
63
63
  end
64
64
 
65
65
  # note: for now always use pluto key for config storage
66
- ActiveRecord::Base.configurations['pluto'] = config
66
+ configs = ActiveRecord::Base.configurations.to_h.reject { |db_config| db_config.env_name == 'pluto' }
67
+ configs['pluto'] = config
68
+
69
+ ActiveRecord::Base.configurations = configs
67
70
 
68
71
  if debug?
69
72
  logger.debug 'ar configurations (after):'
@@ -35,7 +35,7 @@ class Feed < ActiveRecord::Base
35
35
 
36
36
  # note: if not updated or published use hardcoded 1971-01-01 for now
37
37
  ## order( "coalesce(updated,published,'1971-01-01') desc" )
38
- order( "coalesce(feeds.items_last_updated,'1971-01-01') desc" )
38
+ order( Arel.sql( "coalesce(feeds.items_last_updated,'1971-01-01') desc" ) )
39
39
  end
40
40
 
41
41
  ##################################
@@ -208,7 +208,7 @@ class Feed < ActiveRecord::Base
208
208
  end
209
209
  end
210
210
 
211
- update_attributes!( feed_attribs )
211
+ update!( feed_attribs )
212
212
  end
213
213
 
214
214
  end # class Feed
@@ -37,7 +37,7 @@ class Item < ActiveRecord::Base
37
37
  # coalesce - supported by sqlite (yes), postgres (yes)
38
38
 
39
39
  # note: if not updated,published use hardcoded 1971-01-01 for now
40
- order( "coalesce(items.updated,items.published,'1971-01-01') desc" )
40
+ order( Arel.sql( "coalesce(items.updated,items.published,'1971-01-01') desc" ) )
41
41
  end
42
42
 
43
43
  def updated?() read_attribute(:updated).present?; end
@@ -85,7 +85,7 @@ class Item < ActiveRecord::Base
85
85
  end
86
86
  end
87
87
 
88
- update_attributes!( item_attribs )
88
+ update!( item_attribs )
89
89
  end
90
90
 
91
91
  end # class Item
@@ -72,7 +72,7 @@ class Site < ActiveRecord::Base
72
72
  Activity.create!( text: "new site >#{key}< - #{title}" )
73
73
  end
74
74
 
75
- update_attributes!( site_attribs )
75
+ update!( site_attribs )
76
76
 
77
77
 
78
78
  # -- log update activity
@@ -186,7 +186,7 @@ class Site < ActiveRecord::Base
186
186
  Activity.create!( text: "new feed >#{feed_key}< - #{feed_attribs[:title]}" )
187
187
  end
188
188
 
189
- feed_rec.update_attributes!( feed_attribs )
189
+ feed_rec.update!( feed_attribs )
190
190
 
191
191
  # add subscription record
192
192
  # note: subscriptions get cleaned out on update first (see above)
data/lib/pluto/version.rb CHANGED
@@ -4,7 +4,7 @@ module Pluto
4
4
 
5
5
  MAJOR = 1
6
6
  MINOR = 5
7
- PATCH = 1
7
+ PATCH = 2
8
8
  VERSION = [MAJOR,MINOR,PATCH].join('.')
9
9
 
10
10
  def self.version
data/test/data/ruby.ini CHANGED
@@ -1,5 +1,5 @@
1
1
  title = Planet Ruby
2
- source = https://github.com/feedreader/pluto.models/raw/master/test/data/ruby.ini
2
+ source = https://github.com/feedreader/pluto/raw/master/pluto-models/test/data/ruby.ini
3
3
 
4
4
  [rubylang]
5
5
  title = Ruby Lang News
@@ -11,8 +11,3 @@ source = https://github.com/feedreader/pluto.models/raw/master/test/data/ruby.in
11
11
  link = http://weblog.rubyonrails.org
12
12
  feed = http://weblog.rubyonrails.org/feed/atom.xml
13
13
 
14
- [viennarb]
15
- title = Vienna.rb News
16
- link = http://vienna-rb.at
17
- feed = http://vienna-rb.at/atom.xml
18
-
data/test/test_site.rb CHANGED
@@ -30,12 +30,12 @@ class TestSite < MiniTest::Test
30
30
  Site.deep_create_or_update_from_hash!( 'ruby', site_config )
31
31
 
32
32
  assert_equal 1, Site.count
33
- assert_equal 3, Feed.count
33
+ assert_equal 2, Feed.count
34
34
 
35
35
  ruby = Site.find_by_key!( 'ruby' )
36
36
  assert_equal 'Planet Ruby', ruby.title
37
- assert_equal 3, ruby.subscriptions.count
38
- assert_equal 3, ruby.feeds.count
37
+ assert_equal 2, ruby.subscriptions.count
38
+ assert_equal 2, ruby.feeds.count
39
39
 
40
40
  rubylang = Feed.find_by_key!( 'rubylang' )
41
41
  assert_equal 'Ruby Lang News', rubylang.title
@@ -43,6 +43,7 @@ class TestSite < MiniTest::Test
43
43
  assert_equal 'http://www.ruby-lang.org/en/feeds/news.rss', rubylang.feed_url
44
44
  end
45
45
 
46
+
46
47
  def test_site_update
47
48
  site_text = File.read( "#{Pluto.root}/test/data/ruby.ini")
48
49
  site_config = INI.load( site_text )
@@ -56,12 +57,12 @@ class TestSite < MiniTest::Test
56
57
  Site.deep_create_or_update_from_hash!( 'ruby', site_config )
57
58
 
58
59
  assert_equal 1, Site.count
59
- assert_equal 3, Feed.count
60
+ assert_equal 2, Feed.count
60
61
 
61
62
  ruby = Site.find_by_key!( 'ruby' )
62
63
  assert_equal 'Planet Ruby', ruby.title
63
- assert_equal 3, ruby.subscriptions.count
64
- assert_equal 3, ruby.feeds.count
64
+ assert_equal 2, ruby.subscriptions.count
65
+ assert_equal 2, ruby.feeds.count
65
66
 
66
67
  rubylang = Feed.find_by_key!( 'rubylang' )
67
68
  assert_equal 'Ruby Lang News', rubylang.title
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pluto-models
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.1
4
+ version: 1.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gerald Bauer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-06-14 00:00:00.000000000 Z
11
+ date: 2020-01-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: props
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: 2.1.0
47
+ version: 2.1.1
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: 2.1.0
54
+ version: 2.1.1
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: feedfilter
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -183,11 +183,11 @@ email: wwwmake@googlegroups.com
183
183
  executables: []
184
184
  extensions: []
185
185
  extra_rdoc_files:
186
- - HISTORY.md
186
+ - CHANGELOG.md
187
187
  - Manifest.txt
188
188
  - README.md
189
189
  files:
190
- - HISTORY.md
190
+ - CHANGELOG.md
191
191
  - Manifest.txt
192
192
  - README.md
193
193
  - Rakefile
@@ -221,7 +221,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
221
221
  requirements:
222
222
  - - ">="
223
223
  - !ruby/object:Gem::Version
224
- version: '2.3'
224
+ version: 2.2.2
225
225
  required_rubygems_version: !ruby/object:Gem::Requirement
226
226
  requirements:
227
227
  - - ">="