tog-tog 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +3 -0
- data/lib/tasks/platform.rake +23 -6
- data/lib/tog/version.rb +1 -1
- data/tog.gemspec +2 -2
- metadata +9 -2
data/CHANGELOG.md
CHANGED
data/lib/tasks/platform.rake
CHANGED
@@ -1,6 +1,20 @@
|
|
1
1
|
namespace :tog do
|
2
2
|
namespace :plugins do
|
3
|
-
|
3
|
+
namespace :db do
|
4
|
+
desc "Retrieves the current schema version numbers of the tog plugins in this app. Use PLUGIN=plugin_name to retrieves a specific plugin version."
|
5
|
+
task :version do
|
6
|
+
plugin_roots(ENV["PLUGIN"]).each do |directory|
|
7
|
+
require File.expand_path(File.join(RAILS_ROOT, "config","environment"))
|
8
|
+
name = File.basename(directory)
|
9
|
+
Desert::PluginMigrations::Migrator.current_plugin = Desert::Manager.find_plugin(name)
|
10
|
+
current_version = Desert::PluginMigrations::Migrator.current_version
|
11
|
+
max_version = max_migration_number(directory)
|
12
|
+
msg = "[#{name}] Current Version : #{current_version}"
|
13
|
+
msg << " (This plugin is NOT uptodate. Most recent migration available: #{max_version})" if max_version > current_version
|
14
|
+
puts msg
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
4
18
|
desc "Update the tog plugins on this app. This will pull the changes on the HEAD of every tog plugins on your app. Use PLUGIN=plugin_name to update a specific plugin."
|
5
19
|
task :update do
|
6
20
|
plugin_roots(ENV["PLUGIN"]).each do |directory|
|
@@ -21,11 +35,8 @@ namespace :tog do
|
|
21
35
|
output = %x{#{cmd}}
|
22
36
|
puts "Generating migration to integrate #{plugin} in the app"
|
23
37
|
|
24
|
-
to_version=
|
25
|
-
|
26
|
-
if n > max then n else max end
|
27
|
-
end
|
28
|
-
from_version=0
|
38
|
+
to_version = max_migration_number("#{RAILS_ROOT}/vendor/plugins/#{plugin}")
|
39
|
+
from_version = 0
|
29
40
|
cmd = "script/generate tog_migration Integrate#{plugin.classify}Version#{to_version}From#{from_version}"
|
30
41
|
output = %x{#{cmd}}
|
31
42
|
|
@@ -101,4 +112,10 @@ def plugin_roots(plugin=nil)
|
|
101
112
|
end
|
102
113
|
end
|
103
114
|
roots
|
115
|
+
end
|
116
|
+
def max_migration_number(plugin)
|
117
|
+
to_version=Dir.glob("#{plugin}/db/migrate/*.rb").inject(0) do |max, file_path|
|
118
|
+
n = File.basename(file_path).split('_', 2).first.to_i
|
119
|
+
if n > max then n else max end
|
120
|
+
end
|
104
121
|
end
|
data/lib/tog/version.rb
CHANGED
data/tog.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{tog}
|
5
|
-
s.version = "0.4.
|
5
|
+
s.version = "0.4.2"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Aitor Garc\303\255a", "Alberto Molpeceres", "Roberto Salicio"]
|
9
|
-
s.date = %q{2009-
|
9
|
+
s.date = %q{2009-02-17}
|
10
10
|
s.default_executable = %q{togify}
|
11
11
|
s.description = %q{extensible open source social network platform}
|
12
12
|
s.email = ["aitor@linkingpaths.com", "alberto@linkingpaths.com", "roberto@linkingpaths.com"]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tog-tog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- "Aitor Garc\xC3\xADa"
|
@@ -11,11 +11,12 @@ autorequire:
|
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
13
|
|
14
|
-
date: 2009-
|
14
|
+
date: 2009-02-17 00:00:00 -08:00
|
15
15
|
default_executable: togify
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: mislav-will_paginate
|
19
|
+
type: :runtime
|
19
20
|
version_requirement:
|
20
21
|
version_requirements: !ruby/object:Gem::Requirement
|
21
22
|
requirements:
|
@@ -25,6 +26,7 @@ dependencies:
|
|
25
26
|
version:
|
26
27
|
- !ruby/object:Gem::Dependency
|
27
28
|
name: rubigen
|
29
|
+
type: :runtime
|
28
30
|
version_requirement:
|
29
31
|
version_requirements: !ruby/object:Gem::Requirement
|
30
32
|
requirements:
|
@@ -34,6 +36,7 @@ dependencies:
|
|
34
36
|
version:
|
35
37
|
- !ruby/object:Gem::Dependency
|
36
38
|
name: tog-desert
|
39
|
+
type: :runtime
|
37
40
|
version_requirement:
|
38
41
|
version_requirements: !ruby/object:Gem::Requirement
|
39
42
|
requirements:
|
@@ -43,6 +46,7 @@ dependencies:
|
|
43
46
|
version:
|
44
47
|
- !ruby/object:Gem::Dependency
|
45
48
|
name: RedCloth
|
49
|
+
type: :runtime
|
46
50
|
version_requirement:
|
47
51
|
version_requirements: !ruby/object:Gem::Requirement
|
48
52
|
requirements:
|
@@ -52,6 +56,7 @@ dependencies:
|
|
52
56
|
version:
|
53
57
|
- !ruby/object:Gem::Dependency
|
54
58
|
name: rubyzip
|
59
|
+
type: :runtime
|
55
60
|
version_requirement:
|
56
61
|
version_requirements: !ruby/object:Gem::Requirement
|
57
62
|
requirements:
|
@@ -61,6 +66,7 @@ dependencies:
|
|
61
66
|
version:
|
62
67
|
- !ruby/object:Gem::Dependency
|
63
68
|
name: oauth
|
69
|
+
type: :runtime
|
64
70
|
version_requirement:
|
65
71
|
version_requirements: !ruby/object:Gem::Requirement
|
66
72
|
requirements:
|
@@ -70,6 +76,7 @@ dependencies:
|
|
70
76
|
version:
|
71
77
|
- !ruby/object:Gem::Dependency
|
72
78
|
name: hoe
|
79
|
+
type: :development
|
73
80
|
version_requirement:
|
74
81
|
version_requirements: !ruby/object:Gem::Requirement
|
75
82
|
requirements:
|