pluto-tasks 1.2.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Manifest.txt +3 -1
- data/README.md +2 -2
- data/Rakefile +3 -3
- data/lib/pluto/tasks/environment.rake +38 -0
- data/lib/pluto/tasks/setup.rake +1 -1
- data/lib/pluto/tasks/stats.rake +1 -1
- data/lib/pluto/tasks/update.rake +3 -2
- data/lib/pluto/tasks/version.rb +1 -1
- data/lib/pluto/tasks.rb +3 -1
- data/test/helper.rb +27 -0
- metadata +9 -8
- data/lib/pluto/tasks/env.rake +0 -25
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 40c6fa8bfc508ba077015ecabd24ed84585edd2a
|
4
|
+
data.tar.gz: b2de7d731cdc5a4e845cc7768bc10fd32e1facb2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f48824619f36a1c9874d5cc6353200db9981b69f687a61749385a4fa54d1b7edf24056728da3b5bd07d03eac3ddbf4c5c2ba061f2c94f31ed0c94d6485e7dee4
|
7
|
+
data.tar.gz: fd0a505d4bb2ff870bc874e3c69783e0290b1280682695bf59df917e019305b4593f5b70aa07db37655353b38d91bbbde57ecec7f09f1bb56acf7583ab52ef05
|
data/Manifest.txt
CHANGED
@@ -3,8 +3,10 @@ Manifest.txt
|
|
3
3
|
README.md
|
4
4
|
Rakefile
|
5
5
|
lib/pluto/tasks.rb
|
6
|
-
lib/pluto/tasks/
|
6
|
+
lib/pluto/tasks/environment.rake
|
7
7
|
lib/pluto/tasks/setup.rake
|
8
8
|
lib/pluto/tasks/stats.rake
|
9
9
|
lib/pluto/tasks/update.rake
|
10
10
|
lib/pluto/tasks/version.rb
|
11
|
+
test/helper.rb
|
12
|
+
test/test_fetch.rb
|
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# pluto-tasks gem - planet rake tasks (setup, update, stats, etc.)
|
2
2
|
|
3
|
-
* home :: [github.com/feedreader/pluto
|
4
|
-
* bugs :: [github.com/feedreader/pluto
|
3
|
+
* home :: [github.com/feedreader/pluto.tasks](https://github.com/feedreader/pluto.tasks)
|
4
|
+
* bugs :: [github.com/feedreader/pluto.tasks/issues](https://github.com/feedreader/pluto.tasks/issues)
|
5
5
|
* gem :: [rubygems.org/gems/pluto-tasks](https://rubygems.org/gems/pluto-tasks)
|
6
6
|
* rdoc :: [rubydoc.info/gems/pluto-tasks](http://rubydoc.info/gems/pluto-tasks)
|
7
7
|
* forum :: [groups.google.com/group/feedreader](http://groups.google.com/group/feedreader)
|
data/Rakefile
CHANGED
@@ -8,7 +8,7 @@ Hoe.spec 'pluto-tasks' do
|
|
8
8
|
self.summary = "pluto-tasks - planet rake tasks (setup, update, stats, etc.)"
|
9
9
|
self.description = summary
|
10
10
|
|
11
|
-
self.urls = ['https://github.com/feedreader/pluto
|
11
|
+
self.urls = ['https://github.com/feedreader/pluto.tasks']
|
12
12
|
|
13
13
|
self.author = 'Gerald Bauer'
|
14
14
|
self.email = 'feedreader@googlegroups.com'
|
@@ -18,8 +18,8 @@ Hoe.spec 'pluto-tasks' do
|
|
18
18
|
self.history_file = 'HISTORY.md'
|
19
19
|
|
20
20
|
self.extra_deps = [
|
21
|
-
['pluto-models', '>= 1.3.
|
22
|
-
['pluto-update'],
|
21
|
+
['pluto-models', '>= 1.3.2'],
|
22
|
+
['pluto-update', '>= 1.3.0'],
|
23
23
|
]
|
24
24
|
|
25
25
|
self.licenses = ['Public Domain']
|
@@ -0,0 +1,38 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
###
|
4
|
+
# Note: check if running as part of Rails? if yes - use (builtin) rails :environment task/dependency
|
5
|
+
|
6
|
+
|
7
|
+
if defined?( Rails )
|
8
|
+
### todo:
|
9
|
+
## check if task :environment exists? in rake - why? why not?
|
10
|
+
|
11
|
+
## do nothing; use "builtin" :environment task
|
12
|
+
## to setup database connection etc.
|
13
|
+
else
|
14
|
+
task :environment do
|
15
|
+
LogUtils::Logger.root.level = :debug
|
16
|
+
|
17
|
+
Pluto.connect!
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
#########
|
24
|
+
# for debugging
|
25
|
+
|
26
|
+
desc 'pluto - debug site setup'
|
27
|
+
task :site => :environment do
|
28
|
+
site = Pluto::Model::Site.first # FIX: for now assume one planet per DB (fix later; allow planet key or similar)
|
29
|
+
if site.present?
|
30
|
+
puts "site found:"
|
31
|
+
pp site
|
32
|
+
else
|
33
|
+
puts "no site found"
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
### todo: add new task :sites
|
38
|
+
|
data/lib/pluto/tasks/setup.rake
CHANGED
data/lib/pluto/tasks/stats.rake
CHANGED
data/lib/pluto/tasks/update.rake
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
|
2
2
|
|
3
3
|
desc 'pluto -=- update planet (site configs)'
|
4
|
-
task :update_sites => :
|
4
|
+
task :update_sites => :environment do
|
5
5
|
|
6
6
|
Pluto.update_sites # update all site configs if source (url) present/specified
|
7
7
|
|
@@ -10,7 +10,7 @@ end
|
|
10
10
|
|
11
11
|
|
12
12
|
desc 'pluto -=- update planet (feeds)'
|
13
|
-
task :update_feeds => :
|
13
|
+
task :update_feeds => :environment do
|
14
14
|
|
15
15
|
Pluto.update_feeds
|
16
16
|
|
@@ -22,3 +22,4 @@ desc 'pluto -=- update planet (site configs + feeds)'
|
|
22
22
|
task :update => [:update_sites, :update_feeds] do
|
23
23
|
puts 'Done.'
|
24
24
|
end
|
25
|
+
|
data/lib/pluto/tasks/version.rb
CHANGED
data/lib/pluto/tasks.rb
CHANGED
@@ -14,13 +14,15 @@ module Pluto
|
|
14
14
|
|
15
15
|
def self.load_tasks
|
16
16
|
# load all builtin Rake tasks (from tasks/*rake)
|
17
|
-
load 'pluto/tasks/
|
17
|
+
load 'pluto/tasks/environment.rake'
|
18
18
|
load 'pluto/tasks/setup.rake'
|
19
19
|
load 'pluto/tasks/stats.rake'
|
20
20
|
load 'pluto/tasks/update.rake'
|
21
21
|
end
|
22
22
|
|
23
23
|
|
24
|
+
###
|
25
|
+
## todo/fix: move to pluto-update for (re)use !!!!
|
24
26
|
def self.fetch_config_for( key )
|
25
27
|
###
|
26
28
|
## todo:
|
data/test/helper.rb
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
## $:.unshift(File.dirname(__FILE__))
|
2
|
+
|
3
|
+
|
4
|
+
## minitest setup
|
5
|
+
|
6
|
+
require 'minitest/autorun'
|
7
|
+
|
8
|
+
|
9
|
+
|
10
|
+
## our own code
|
11
|
+
require 'pluto/tasks'
|
12
|
+
|
13
|
+
|
14
|
+
LogUtils::Logger.root.level = :debug
|
15
|
+
|
16
|
+
|
17
|
+
## some shortcuts
|
18
|
+
Log = LogDb::Model::Log
|
19
|
+
Prop = ConfDb::Model::Prop
|
20
|
+
|
21
|
+
Site = Pluto::Model::Site
|
22
|
+
Feed = Pluto::Model::Feed
|
23
|
+
Item = Pluto::Model::Item
|
24
|
+
Subscription = Pluto::Model::Subscription
|
25
|
+
|
26
|
+
|
27
|
+
### Pluto.setup_in_memory_db
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pluto-tasks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gerald Bauer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pluto-models
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.3.
|
19
|
+
version: 1.3.2
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.3.
|
26
|
+
version: 1.3.2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: pluto-update
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 1.3.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 1.3.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rdoc
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -81,13 +81,14 @@ files:
|
|
81
81
|
- README.md
|
82
82
|
- Rakefile
|
83
83
|
- lib/pluto/tasks.rb
|
84
|
-
- lib/pluto/tasks/
|
84
|
+
- lib/pluto/tasks/environment.rake
|
85
85
|
- lib/pluto/tasks/setup.rake
|
86
86
|
- lib/pluto/tasks/stats.rake
|
87
87
|
- lib/pluto/tasks/update.rake
|
88
88
|
- lib/pluto/tasks/version.rb
|
89
|
+
- test/helper.rb
|
89
90
|
- test/test_fetch.rb
|
90
|
-
homepage: https://github.com/feedreader/pluto
|
91
|
+
homepage: https://github.com/feedreader/pluto.tasks
|
91
92
|
licenses:
|
92
93
|
- Public Domain
|
93
94
|
metadata: {}
|
data/lib/pluto/tasks/env.rake
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
task :env do
|
4
|
-
LogUtils::Logger.root.level = :debug
|
5
|
-
|
6
|
-
Pluto.connect!
|
7
|
-
end
|
8
|
-
|
9
|
-
|
10
|
-
#########
|
11
|
-
# for debugging
|
12
|
-
|
13
|
-
desc 'pluto - debug site setup'
|
14
|
-
task :site => :env do
|
15
|
-
site = Pluto::Model::Site.first # FIX: for now assume one planet per DB (fix later; allow planet key or similar)
|
16
|
-
if site.present?
|
17
|
-
puts "site found:"
|
18
|
-
pp site
|
19
|
-
else
|
20
|
-
puts "no site found"
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
### todo: add new task :sites
|
25
|
-
|