social_stream-base 0.7.9 → 0.7.10

Sign up to get free protection for your applications and to get access to all the features.
@@ -17,7 +17,7 @@ h2{padding-left:10px;}
17
17
  /******* Main Structure SECTION***************************/
18
18
  body{font-size:1.0em; color:#2A3890; background-color:#ffffff; }
19
19
  #wrapper { background-color: #f5f5f5; width: 100%; margin: 0px auto; }
20
- #wrapper_body{min-height: 552px; width: 960px; margin:0px auto; margin-left: auto; margin-right: auto;
20
+ #wrapper_body{min-height: 552px; width: 960px; margin:0px auto; margin-left: auto; margin-right: auto;
21
21
  margin-top: auto; margin-bottom:auto;}
22
22
 
23
23
 
@@ -189,6 +189,7 @@ textarea.new_contact_text_area{ height: 100px; color: #2A3890;}
189
189
  /* For IE 8 */
190
190
  -MS-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=80)";
191
191
  }
192
+
192
193
  .logo_full .logo_caption {
193
194
  top: 119px;
194
195
  left: 23px;
@@ -1,5 +1,4 @@
1
1
  /*
2
2
  *= require jqcloud
3
3
  *= require fcbkComplete
4
- *= require smoothness/jquery-ui-1.8.4.custom
5
4
  */
@@ -14,7 +14,7 @@
14
14
  #sponsor{background-color:#fff}
15
15
  #toolbar { width: 160px; border-color: #000; vertical-align: top; display: table-cell;padding: 5px 5px 5px 5px;}
16
16
  #toolbarContent{}
17
- #wrapper_body{}
17
+ #wrapper_body{ background-color: #ffffff; }
18
18
  #content_logo{/*width: 779px*/}
19
19
 
20
20
 
@@ -25,10 +25,11 @@
25
25
  <%= render :partial => "frontpage/header" %>
26
26
  </header>
27
27
  <section>
28
- <div id="flash">
29
- <%= render :partial => "layouts/flash", :locals => {:flash => flash} %>
30
- </div>
31
28
  <div id="wrapper_body">
29
+ <div class="space_center"></div>
30
+ <div id="flash">
31
+ <%= render :partial => "layouts/flash", :locals => {:flash => flash} %>
32
+ </div>
32
33
  <%= yield %>
33
34
  </div>
34
35
  <%= render :partial => "frontpage/sponsor" %>
@@ -1,5 +1,5 @@
1
1
  module SocialStream
2
2
  module Base
3
- VERSION = "0.7.9".freeze
3
+ VERSION = "0.7.10".freeze
4
4
  end
5
5
  end
@@ -0,0 +1,55 @@
1
+ require 'social_stream/migrations/finder'
2
+
3
+ module SocialStream
4
+ module Migrations
5
+ class Base
6
+ def initialize
7
+ find_old_migration 'acts-as-taggable-on',
8
+ ["generators", "acts_as_taggable_on", "migration", "templates", "active_record", "migration"]
9
+
10
+ @mailboxer_migration = find_migration 'mailboxer'
11
+ @base_migration = find_migration 'social_stream-base'
12
+ end
13
+
14
+ def up
15
+ ActsAsTaggableOnMigration.up
16
+
17
+ ActiveRecord::Migrator.migrate @mailboxer_migration
18
+
19
+ # Run any available migration
20
+ ActiveRecord::Migrator.migrate @base_migration
21
+ end
22
+
23
+ def down
24
+ begin
25
+ ActiveRecord::Migrator.migrate @base_migration, 0
26
+ rescue
27
+ puts "WARNING: Social Stream Base failed to rollback"
28
+ end
29
+
30
+ begin
31
+ ActiveRecord::Migrator.migrate @mailboxer_migration, 0
32
+ rescue
33
+ puts "WARNING: Mailboxer migration failed to rollback"
34
+ end
35
+
36
+ begin
37
+ ActsAsTaggableOnMigration.down
38
+ rescue
39
+ puts "WARNING: ActsAsTaggableOnMigration failed to rollback"
40
+ end
41
+ end
42
+
43
+ protected
44
+
45
+ def find_migration(gem)
46
+ path = Gem::GemPathSearcher.new.find(gem).full_gem_path
47
+ File.join([path,'db', 'migrate'])
48
+ end
49
+
50
+ def find_old_migration(gem, path)
51
+ SocialStream::Migrations::Finder.new gem, path
52
+ end
53
+ end
54
+ end
55
+ end
@@ -0,0 +1,20 @@
1
+ module SocialStream
2
+ module Migrations
3
+ # Searches for migrations in a gem and requires them.
4
+ # Example:
5
+ #
6
+ # MigrationFinder.new 'acts-as-taggable-on',
7
+ # ["generators", "acts_as_taggable_on", "migration", "templates", "active_record", "migration"]
8
+ # ActsAsTaggableOnMigration.up
9
+ class Finder
10
+ def initialize gem, path
11
+ finder = Gem::GemPathSearcher.new
12
+ taggable_spec = finder.find(gem)
13
+ taggable_migration = finder.matching_files(taggable_spec,
14
+ File.join(*path)).first
15
+
16
+ require taggable_migration
17
+ end
18
+ end
19
+ end
20
+ end
@@ -101,11 +101,9 @@ describe Relation::CustomsController do
101
101
  end
102
102
 
103
103
  it "should allow destroying" do
104
- pending "Delete relations"
105
-
106
104
  count = Relation::Custom.count
107
105
 
108
- delete :destroy, :id => @relation.to_param, :format => :js
106
+ delete :destroy, :id => @relation.to_param
109
107
 
110
108
  Relation::Custom.count.should eq(count - 1)
111
109
  end
data/spec/support/db.rb CHANGED
@@ -1,33 +1,7 @@
1
- require File.join(File.dirname(__FILE__), 'migrations')
1
+ require 'social_stream/migrations/base'
2
2
 
3
+ SocialStream::Migrations::Base.new.down
3
4
 
4
- begin
5
- ActsAsTaggableOnMigration.down
6
- rescue
7
- puts "WARNING: ActsAsTaggableOnMigration failed to rollback"
8
- end
9
-
10
- mailboxer_path = Gem::GemPathSearcher.new.find('mailboxer').full_gem_path
11
- mailboxer_migration = File.join([mailboxer_path,'db', 'migrate'])
12
-
13
- begin
14
- ActiveRecord::Migrator.migrate mailboxer_migration, 0
15
- rescue
16
- puts "WARNING: Mailboxer migration failed to rollback"
17
- end
18
-
19
- begin
20
- ActiveRecord::Migrator.migrate File.expand_path("../../dummy/db/migrate/", __FILE__), 0
21
- rescue
22
- puts "WARNING: Social Stream Base failed to rollback"
23
- end
24
-
25
-
26
- ActsAsTaggableOnMigration.up
27
-
28
- ActiveRecord::Migrator.migrate mailboxer_migration
29
-
30
- # Run any available migration
31
- ActiveRecord::Migrator.migrate File.expand_path("../../dummy/db/migrate/", __FILE__)
5
+ SocialStream::Migrations::Base.new.up
32
6
 
33
7
  require File.expand_path("../../dummy/db/seeds", __FILE__)
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: social_stream-base
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 7
9
- - 9
10
- version: 0.7.9
9
+ - 10
10
+ version: 0.7.10
11
11
  platform: ruby
12
12
  authors:
13
13
  - GING - DIT - UPM
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-07-27 00:00:00 +02:00
19
+ date: 2011-07-28 00:00:00 +02:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
@@ -882,7 +882,8 @@ files:
882
882
  - lib/social_stream/base.rb
883
883
  - lib/social_stream/base/version.rb
884
884
  - lib/social_stream/controllers/helpers.rb
885
- - lib/social_stream/migration_finder.rb
885
+ - lib/social_stream/migrations/base.rb
886
+ - lib/social_stream/migrations/finder.rb
886
887
  - lib/social_stream/models/object.rb
887
888
  - lib/social_stream/models/subject.rb
888
889
  - lib/social_stream/models/supertype.rb
@@ -966,7 +967,6 @@ files:
966
967
  - spec/support/cancan.rb
967
968
  - spec/support/db.rb
968
969
  - spec/support/devise.rb
969
- - spec/support/migrations.rb
970
970
  - spec/support/mock.rb
971
971
  - vendor/assets/javascripts/ajax.paginate.js
972
972
  - vendor/assets/javascripts/chosen.jquery.js
@@ -1,19 +0,0 @@
1
- module SocialStream
2
- # Searches for migrations in a gem and requires them.
3
- # Example:
4
- #
5
- # MigrationFinder.new 'acts-as-taggable-on',
6
- # ["generators", "acts_as_taggable_on", "migration", "templates", "active_record", "migration"]
7
- # ActsAsTaggableOnMigration.up
8
- class MigrationFinder
9
- def initialize gem, path
10
- finder = Gem::GemPathSearcher.new
11
- taggable_spec = finder.find(gem)
12
- taggable_migration = finder.matching_files(taggable_spec,
13
- File.join(*path)).first
14
-
15
- require taggable_migration
16
- end
17
- end
18
-
19
- end
@@ -1,6 +0,0 @@
1
- require 'social_stream/migration_finder'
2
-
3
- # acts-as-taggable-on
4
- SocialStream::MigrationFinder.new 'acts-as-taggable-on',
5
- ["generators", "acts_as_taggable_on", "migration", "templates", "active_record", "migration"]
6
-