Module: Pluto

Defined in:
lib/pluto/lister.rb,
lib/pluto/models.rb,
lib/pluto/schema.rb,
lib/pluto/fetcher.rb,
lib/pluto/updater.rb,
lib/pluto/version.rb,
lib/pluto/connecter.rb,
lib/pluto/formatter.rb,
lib/pluto/installer.rb,
lib/pluto/refresher.rb,
lib/pluto/subscriber.rb,
lib/pluto/models/feed.rb,
lib/pluto/models/item.rb,
lib/pluto/models/site.rb,
lib/pluto/activerecord.rb,
lib/pluto/models/utils.rb,
lib/pluto/models/activity.rb,
lib/pluto/manifest_helpers.rb,
lib/pluto/models/subscription.rb

Defined Under Namespace

Modules: ActiveRecordMethods, ManifestHelper, Models Classes: Connecter, CreateDb, Fetcher, Formatter, Installer, Lister, Refresher, Subscriber, Updater

Constant Summary collapse

MAJOR =
1
MINOR =
1
PATCH =
0
VERSION =
[MAJOR,MINOR,PATCH].join('.')

Class Method Summary collapse

Class Method Details



14
15
16
17
# File 'lib/pluto/version.rb', line 14

def self.banner
  ### todo: add RUBY_PATCHLEVEL or RUBY_PATCH_LEVEL  e.g. -p124
  "pluto-models/#{VERSION} on Ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE}) [#{RUBY_PLATFORM}]"
end

.connect!(config = nil) ⇒ Object

convenience shortcut



59
60
61
# File 'lib/pluto/models.rb', line 59

def self.connect!( config=nil )  # convenience shortcut
  Connecter.new.connect!( config )
end

.generator ⇒ Object

convenience alias for banner (matches HTML generator meta tag)



19
20
21
# File 'lib/pluto/version.rb', line 19

def self.generator   # convenience alias for banner (matches HTML generator meta tag)
  "Pluto #{VERSION} on Ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE}) [#{RUBY_PLATFORM}]"
end

.load_tasks ⇒ Object



77
78
79
80
81
82
83
# File 'lib/pluto/models.rb', line 77

def self.load_tasks
  # load all builtin Rake tasks (from tasks/*rake)
  load 'pluto/tasks/env.rake'
  load 'pluto/tasks/setup.rake'
  load 'pluto/tasks/stats.rake'
  load 'pluto/tasks/update.rake'
end

.root ⇒ Object



23
24
25
# File 'lib/pluto/version.rb', line 23

def self.root
  "#{File.expand_path( File.dirname(File.dirname(File.dirname(__FILE__))) )}"
end

.update_feeds ⇒ Object



69
70
71
# File 'lib/pluto/models.rb', line 69

def self.update_feeds
  Refresher.new.update_feeds
end

.update_sites ⇒ Object



73
74
75
# File 'lib/pluto/models.rb', line 73

def self.update_sites
  Refresher.new.update_sites
end

.update_subscriptions(config) ⇒ Object

todo: add alias update_site( config ) ??



65
66
67
# File 'lib/pluto/models.rb', line 65

def self.update_subscriptions( config )
  Subscriber.new.update_subscriptions( config )
end

.version ⇒ Object



10
11
12
# File 'lib/pluto/version.rb', line 10

def self.version
  VERSION
end