alphasights-integrity 0.1.9.4 → 0.1.9.5
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.
- data/integrity.gemspec +1 -1
- data/lib/integrity/migrations.rb +10 -1
- data/test/unit/migrations_test.rb +2 -2
- data/test/unit/project_test.rb +1 -1
- data/views/home.haml +1 -1
- metadata +1 -1
data/integrity.gemspec
CHANGED
data/lib/integrity/migrations.rb
CHANGED
@@ -86,7 +86,6 @@ module Integrity
|
|
86
86
|
column :identifier, String, :nullable => false
|
87
87
|
column :message, String, :nullable => true, :length => 255
|
88
88
|
column :author, String, :nullable => true, :length => 255
|
89
|
-
column :url, String, :length => 255
|
90
89
|
column :committed_at, DateTime, :nullable => false
|
91
90
|
column :created_at, DateTime
|
92
91
|
column :updated_at, DateTime
|
@@ -149,5 +148,15 @@ module Integrity
|
|
149
148
|
# modify_table(:integrity_notifiers) { drop_column :enabled }
|
150
149
|
end
|
151
150
|
end
|
151
|
+
|
152
|
+
migration 4, :add_url_to_commits do
|
153
|
+
up do
|
154
|
+
modify_table(:integrity_commits) { add_column :url, URI, :length => 255 }
|
155
|
+
end
|
156
|
+
|
157
|
+
down do
|
158
|
+
#modify_table(:integrity_commits) { drop_column :url }
|
159
|
+
end
|
160
|
+
end
|
152
161
|
end
|
153
162
|
end
|
@@ -31,7 +31,7 @@ class MigrationsTest < Test::Unit::TestCase
|
|
31
31
|
test "upgrading a pre migration database" do
|
32
32
|
capture_stdout { Integrity.migrate_db }
|
33
33
|
|
34
|
-
current_migrations.should == ["initial", "add_commits", "add_enabled_column"]
|
34
|
+
current_migrations.should == ["initial", "add_commits", "add_enabled_column", "add_url_to_commits"]
|
35
35
|
assert table_exists?("integrity_projects")
|
36
36
|
assert table_exists?("integrity_builds")
|
37
37
|
assert table_exists?("integrity_notifiers")
|
@@ -42,7 +42,7 @@ class MigrationsTest < Test::Unit::TestCase
|
|
42
42
|
load_initial_migration_fixture
|
43
43
|
|
44
44
|
capture_stdout { Integrity.migrate_db }
|
45
|
-
current_migrations.should == ["initial", "add_commits", "add_enabled_column"]
|
45
|
+
current_migrations.should == ["initial", "add_commits", "add_enabled_column", "add_url_to_commits"]
|
46
46
|
|
47
47
|
sinatra = Project.first(:name => "Sinatra")
|
48
48
|
sinatra.should have(1).commits
|
data/test/unit/project_test.rb
CHANGED
@@ -231,7 +231,7 @@ class ProjectTest < Test::Unit::TestCase
|
|
231
231
|
|
232
232
|
assert_equal 2, @project.notifiers.count
|
233
233
|
end
|
234
|
-
|
234
|
+
|
235
235
|
it "disables notifiers that are not included in the list" do
|
236
236
|
@project.update_notifiers(["IRC"],
|
237
237
|
{"IRC" => {"uri" => "irc://irc.freenode.net/integrity"},
|
data/views/home.haml
CHANGED
@@ -11,12 +11,12 @@
|
|
11
11
|
%li{ :class => cycle("even", "odd") + ' ' + project.status.to_s }
|
12
12
|
%a{ :href => project_path(project) }&= project.name
|
13
13
|
.meta
|
14
|
-
%img.floating_gravatar{ gravatar_attrs(project.last_commit.author, 20) }
|
15
14
|
- if project.building?
|
16
15
|
Building!
|
17
16
|
- elsif project.last_commit.nil?
|
18
17
|
Never built yet
|
19
18
|
- else
|
19
|
+
%img.floating_gravatar{ gravatar_attrs(project.last_commit.author, 20) }
|
20
20
|
= project.human_readable_status
|
21
21
|
%p#new
|
22
22
|
%a{ :href => root_path("/new") } Add a new project
|