pluto 1.2.0 → 1.2.1
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 +4 -4
- data/Manifest.txt +2 -0
- data/lib/pluto/cli/sysinfo.rb +55 -0
- data/lib/pluto/cli/updater.rb +70 -0
- data/lib/pluto/cli/version.rb +1 -1
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 36a39d80a3d43b40c6c1edf21ecded29e7d7a9d5
|
4
|
+
data.tar.gz: 7f8ebcd00f3c053c67b8c277192164bbe085e087
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e6dd0b61811087de75cdcd739885add5ae9aa4b4f0b66611b7315db2066068881c084f38ebd362a12970b1c35827bac746e90c578b8f09641a5d8119bb31da09
|
7
|
+
data.tar.gz: a700490cbcb0d071c227f1368a12cb349d255765b718f4a7b73ca0729ea698448b9721b76a5d720987e99f0bf8ac8d2483d462d7cc53179851c6cec1a0d4753a
|
data/Manifest.txt
CHANGED
@@ -0,0 +1,55 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
module Pluto
|
4
|
+
|
5
|
+
class SysInfo
|
6
|
+
|
7
|
+
## todo/fix:
|
8
|
+
## pass in/use config (props)
|
9
|
+
|
10
|
+
def initialize( opts )
|
11
|
+
@opts = opts
|
12
|
+
end
|
13
|
+
|
14
|
+
attr_reader :opts
|
15
|
+
|
16
|
+
|
17
|
+
def dump
|
18
|
+
puts <<EOS
|
19
|
+
|
20
|
+
#{Pluto.banner}
|
21
|
+
|
22
|
+
Gems versions:
|
23
|
+
- pakman #{Pakman::VERSION}
|
24
|
+
- fetcher #{Fetcher::VERSION}
|
25
|
+
- feedutils #{FeedUtils::VERSION}
|
26
|
+
- textutils #{TextUtils::VERSION}
|
27
|
+
- logutils #{LogKernel::VERSION}
|
28
|
+
- props #{Props::VERSION}
|
29
|
+
|
30
|
+
- pluto #{PlutoCli::VERSION}
|
31
|
+
- pluto-models #{Pluto::VERSION}
|
32
|
+
- pluto-update #{PlutoUpdate::VERSION}
|
33
|
+
- pluto-feedfetcher #{PlutoFeedFetcher::VERSION}
|
34
|
+
- pluto-merge #{PlutoMerge::VERSION}
|
35
|
+
- pluto-tasks #{PlutoTasks::VERSION}
|
36
|
+
|
37
|
+
Env home: #{Env.home}
|
38
|
+
Pluto config: #{opts.config_path}
|
39
|
+
Pluto root: #{Pluto.root}
|
40
|
+
|
41
|
+
EOS
|
42
|
+
|
43
|
+
# dump Pluto settings
|
44
|
+
# config.dump
|
45
|
+
# puts
|
46
|
+
|
47
|
+
|
48
|
+
## todo: add more gem version info
|
49
|
+
# todo: add logutils version
|
50
|
+
# add gli2 version
|
51
|
+
end
|
52
|
+
|
53
|
+
end # class SysInfo
|
54
|
+
|
55
|
+
end # module Pluto
|
@@ -0,0 +1,70 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
|
4
|
+
####
|
5
|
+
##
|
6
|
+
## todo:
|
7
|
+
## check if Updater used by pluto-tasks???
|
8
|
+
### if NOT - move to pluto ( use commands/updater or something)
|
9
|
+
##
|
10
|
+
|
11
|
+
|
12
|
+
module Pluto
|
13
|
+
|
14
|
+
class Updater
|
15
|
+
|
16
|
+
include LogUtils::Logging
|
17
|
+
|
18
|
+
### fix!!!!!: change config to text - yes/no - why? why not??
|
19
|
+
# or pass along struct
|
20
|
+
# - with hash and text and format(e.g. ini) as fields???
|
21
|
+
#
|
22
|
+
# - why? - we need to get handle on md5 digest/hash plus on plain text, ideally to store in db
|
23
|
+
## - pass along unparsed text!! - not hash struct
|
24
|
+
# - will get saved in db plus we need to generate md5 hash
|
25
|
+
# - add filename e.g. ruby.ini|ruby.conf as opt ??
|
26
|
+
# or add config format as opt e.g. ini?
|
27
|
+
|
28
|
+
def initialize( opts, config )
|
29
|
+
@opts = opts
|
30
|
+
@config = config
|
31
|
+
end
|
32
|
+
|
33
|
+
attr_reader :opts, :config
|
34
|
+
|
35
|
+
def run( arg )
|
36
|
+
arg = arg.downcase.gsub('.ini','') # remove file extension if present
|
37
|
+
|
38
|
+
update_for( arg )
|
39
|
+
end
|
40
|
+
|
41
|
+
def update_for( name )
|
42
|
+
|
43
|
+
## note: allow (optional) config of site key too
|
44
|
+
site_key = config['key'] || config['slug']
|
45
|
+
if site_key.nil?
|
46
|
+
## if no key configured; use (file)name; remove -_ chars
|
47
|
+
## e.g. jekyll-meta becomes jekyllmeta etc.
|
48
|
+
site_key = name.downcase.gsub( /[\-_]/, '' )
|
49
|
+
end
|
50
|
+
|
51
|
+
###################
|
52
|
+
# step 1) update site subscriptions
|
53
|
+
site_updater = SiteUpdater.new
|
54
|
+
|
55
|
+
# pass along debug/verbose setting/switch
|
56
|
+
site_updater.debug = true if opts.verbose?
|
57
|
+
site_updater.update_subscriptions_for( site_key, config )
|
58
|
+
|
59
|
+
##############################
|
60
|
+
# step 2) update feeds
|
61
|
+
feed_refresher = FeedRefresher.new
|
62
|
+
|
63
|
+
# pass along debug/verbose setting/switch
|
64
|
+
feed_refresher.debug = true if opts.verbose?
|
65
|
+
feed_refresher.refresh_feeds_for( site_key )
|
66
|
+
end # method run
|
67
|
+
|
68
|
+
end # class Updater
|
69
|
+
|
70
|
+
end # module Pluto
|
data/lib/pluto/cli/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pluto
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gerald Bauer
|
@@ -141,6 +141,8 @@ files:
|
|
141
141
|
- lib/pluto.rb
|
142
142
|
- lib/pluto/cli/main.rb
|
143
143
|
- lib/pluto/cli/opts.rb
|
144
|
+
- lib/pluto/cli/sysinfo.rb
|
145
|
+
- lib/pluto/cli/updater.rb
|
144
146
|
- lib/pluto/cli/version.rb
|
145
147
|
homepage: https://github.com/feedreader/pluto
|
146
148
|
licenses:
|