pluto-models 1.6.2 → 1.6.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
- SHA1:
3
- metadata.gz: 929cce8604ed70070a58181f54d4dd42c0e028eb
4
- data.tar.gz: 53e6ddd2905e2790ee0d1727d0a64566baec84f3
2
+ SHA256:
3
+ metadata.gz: d39c25f14faa811583ec87874ba2a2ce3921b3fd6789eec7f7063d69a7d92d4f
4
+ data.tar.gz: c7978160efe47ae1b13a91341c06a64af29206dfeae99bd06a1a21f4824d221b
5
5
  SHA512:
6
- metadata.gz: b42db115a5b8fb0ce87e2a42d192abb121b7c260ac5e894bb2e55d9352c7aac25707e9f2cde5e5f3e3735461d8c32b49fd4be13d6e6763742bad096ec178e72c
7
- data.tar.gz: 61604bbc1d4c213bfda49fda83d6514bb4eee66c5b156e49206e2bd6cce5c8e0dadc3a81a4330da404366c2226e75913e3ace28527903af39b8282e935ef4c14
6
+ metadata.gz: 05ed18f554f2f1936a2b5515cd6c821f6bbe64cc6e4df9eec9c47462719453508be1e4bd1fb7977c1f512a361e7129d25b52a3255eb00719020b4fcfdb95a3be
7
+ data.tar.gz: 10071e0a4e38f6d056ec8743c12007271948e2cc7718471c7d41f04ba4306571c2c6889338d9a69ed4af56476d8cd78d05452df04d262a23322c0c7e20c9efeb
data/CHANGELOG.md CHANGED
@@ -1,3 +1,4 @@
1
+ ### 1.6.3
1
2
 
2
3
  ### 0.0.1 / 2012-07-14
3
4
 
data/Rakefile CHANGED
@@ -8,7 +8,7 @@ Hoe.spec 'pluto-models' do
8
8
  self.summary = "pluto-models - planet schema 'n' models for easy (re)use"
9
9
  self.description = summary
10
10
 
11
- self.urls = ['https://github.com/feedreader/pluto']
11
+ self.urls = { 'home': 'https://github.com/feedreader/pluto' }
12
12
 
13
13
  self.author = 'Gerald Bauer'
14
14
  self.email = 'wwwmake@googlegroups.com'
@@ -9,7 +9,7 @@ module Pluto
9
9
  class Connecter
10
10
 
11
11
  include LogUtils::Logging
12
-
12
+
13
13
 
14
14
 
15
15
  def initialize
@@ -49,31 +49,31 @@ class Connecter
49
49
  logger.info 'db settings:'
50
50
  logger.info config.pretty_inspect
51
51
 
52
+ ##
52
53
  ### for dbbrowser and other tools add to ActiveRecord
54
+ ## todo/fix - find out how to add db config with code
55
+ ## in ActiveRecord 6+ !!!!
56
+ ## for now (old) registration removed / commented out
57
+ ##
58
+ ## if ActiveRecord::Base.configurations.nil? # todo/check: can this ever happen? remove?
59
+ ## logger.debug "ActiveRecord configurations nil - set to empty hash"
60
+ ## ActiveRecord::Base.configurations = {} # make it an empty hash
61
+ ## end
53
62
 
54
- if ActiveRecord::Base.configurations.nil? # todo/check: can this ever happen? remove?
55
- logger.debug "ActiveRecord configurations nil - set to empty hash"
56
- ActiveRecord::Base.configurations = {} # make it an empty hash
57
- end
58
63
 
59
64
  ## todo/fix: remove debug? option - why? why not?
60
65
  ## (just) use logger level eg. logger.debug
61
- if debug?
62
- logger.debug 'ar configurations (before):'
63
- logger.debug ActiveRecord::Base.configurations.pretty_inspect
64
- end
66
+ # if debug?
67
+ # logger.debug 'ar configurations (before):'
68
+ # logger.debug ActiveRecord::Base.configurations.pretty_inspect
69
+ # end
65
70
 
66
- # note: for now always use pluto key for config storage
67
- configs = ActiveRecord::Base.configurations.to_h.reject { |db_config| db_config.env_name == 'pluto' }
68
- configs['pluto'] = config
69
-
70
- ActiveRecord::Base.configurations = configs
71
-
72
- if debug?
73
- logger.debug 'ar configurations (after):'
74
- logger.debug ActiveRecord::Base.configurations.pretty_inspect
75
- end
71
+ ## ActiveRecord::Base.configurations[ 'pluto' ] = config
76
72
 
73
+ # if debug?
74
+ # logger.debug 'ar configurations (after):'
75
+ # logger.debug ActiveRecord::Base.configurations.pretty_inspect
76
+ # end
77
77
 
78
78
  # for debugging - disable for production use
79
79
  if debug?
@@ -134,8 +134,8 @@ class Feed < ActiveRecord::Base
134
134
  #####
135
135
  ## apply some fix-up for "broken" feed data
136
136
  fix_dates( data )
137
-
138
-
137
+
138
+
139
139
  ######
140
140
  ## check for filters (includes/excludes) if present
141
141
  ## for now just check for includes
@@ -222,14 +222,14 @@ class Feed < ActiveRecord::Base
222
222
  -
223
223
  (?<month>[0-9]{2})
224
224
  -
225
- (?<day>[0-9]{2})
225
+ (?<day>[0-9]{2})
226
226
  \b}x
227
227
 
228
228
  ###################################################
229
- # helpers to fix-up some "broken" feed data
229
+ # helpers to fix-up some "broken" feed data
230
230
  def fix_dates( data )
231
231
 
232
- ## check for missing / no dates
232
+ ## check for missing / no dates
233
233
  ## examples
234
234
  ## - rubytogether feed @ https://rubytogether.org/news.xml
235
235
  data.items.each do |item|
@@ -248,7 +248,7 @@ class Feed < ActiveRecord::Base
248
248
  end
249
249
  end
250
250
 
251
-
251
+
252
252
  ## check if all updated dates are the same (uniq count is 1)
253
253
  ## AND if all published dates are present
254
254
  ## than assume "fake" updated dates and nullify updated dates
@@ -259,7 +259,7 @@ class Feed < ActiveRecord::Base
259
259
  ## todo/check - limit to atom feed format only - why? why not?
260
260
 
261
261
  count = data.items.size
262
- count_published = data.items.reduce( 0 ) {|count,item| count += 1 if item.published; count }
262
+ count_published = data.items.reduce( 0 ) {|sum,item| sum += 1 if item.published; sum }
263
263
 
264
264
  if count == count_published
265
265
  uniq_count_updated = 0
data/lib/pluto/version.rb CHANGED
@@ -4,7 +4,7 @@ module Pluto
4
4
 
5
5
  MAJOR = 1
6
6
  MINOR = 6
7
- PATCH = 2
7
+ PATCH = 3
8
8
  VERSION = [MAJOR,MINOR,PATCH].join('.')
9
9
 
10
10
  def self.version
@@ -5,7 +5,7 @@
5
5
 
6
6
  require 'helper'
7
7
 
8
- class TestDeleteRemoved < MiniTest::Test
8
+ class TestDeleteRemoved < Minitest::Test
9
9
 
10
10
  def test_delete_removed
11
11
 
data/test/test_filter.rb CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  require 'helper'
7
7
 
8
- class TestFilter < MiniTest::Test
8
+ class TestFilter < Minitest::Test
9
9
 
10
10
  def test_includes
11
11
 
data/test/test_helpers.rb CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  require 'helper'
7
7
 
8
- class TestHelper < MiniTest::Test
8
+ class TestHelper < Minitest::Test
9
9
 
10
10
  def setup
11
11
  Log.delete_all
data/test/test_regex.rb CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  require 'helper'
7
7
 
8
- class TestRegex < MiniTest::Test
8
+ class TestRegex < Minitest::Test
9
9
 
10
10
  FIX_DATE_SLUG_RE = Pluto::Model::Feed::FIX_DATE_SLUG_RE
11
11
 
data/test/test_site.rb CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  require 'helper'
7
7
 
8
- class TestSite < MiniTest::Test
8
+ class TestSite < Minitest::Test
9
9
 
10
10
  def setup
11
11
  Log.delete_all
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.6.2
4
+ version: 1.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gerald Bauer
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-10 00:00:00.000000000 Z
11
+ date: 2024-09-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: props
@@ -168,30 +168,36 @@ dependencies:
168
168
  name: rdoc
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
- - - "~>"
171
+ - - ">="
172
172
  - !ruby/object:Gem::Version
173
173
  version: '4.0'
174
+ - - "<"
175
+ - !ruby/object:Gem::Version
176
+ version: '7'
174
177
  type: :development
175
178
  prerelease: false
176
179
  version_requirements: !ruby/object:Gem::Requirement
177
180
  requirements:
178
- - - "~>"
181
+ - - ">="
179
182
  - !ruby/object:Gem::Version
180
183
  version: '4.0'
184
+ - - "<"
185
+ - !ruby/object:Gem::Version
186
+ version: '7'
181
187
  - !ruby/object:Gem::Dependency
182
188
  name: hoe
183
189
  requirement: !ruby/object:Gem::Requirement
184
190
  requirements:
185
191
  - - "~>"
186
192
  - !ruby/object:Gem::Version
187
- version: '3.16'
193
+ version: '4.1'
188
194
  type: :development
189
195
  prerelease: false
190
196
  version_requirements: !ruby/object:Gem::Requirement
191
197
  requirements:
192
198
  - - "~>"
193
199
  - !ruby/object:Gem::Version
194
- version: '3.16'
200
+ version: '4.1'
195
201
  description: pluto-models - planet schema 'n' models for easy (re)use
196
202
  email: wwwmake@googlegroups.com
197
203
  executables: []
@@ -226,7 +232,7 @@ homepage: https://github.com/feedreader/pluto
226
232
  licenses:
227
233
  - Public Domain
228
234
  metadata: {}
229
- post_install_message:
235
+ post_install_message:
230
236
  rdoc_options:
231
237
  - "--main"
232
238
  - README.md
@@ -243,9 +249,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
243
249
  - !ruby/object:Gem::Version
244
250
  version: '0'
245
251
  requirements: []
246
- rubyforge_project:
247
- rubygems_version: 2.5.2
248
- signing_key:
252
+ rubygems_version: 3.4.10
253
+ signing_key:
249
254
  specification_version: 4
250
255
  summary: pluto-models - planet schema 'n' models for easy (re)use
251
256
  test_files: []