foca-integrity 0.1.7 → 0.1.8
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/VERSION.yml +1 -1
- data/integrity.gemspec +2 -2
- data/lib/integrity/helpers/forms.rb +1 -1
- data/lib/integrity/helpers/pretty_output.rb +3 -3
- data/lib/integrity/installer.rb +7 -7
- data/views/new.haml +2 -1
- metadata +2 -2
data/VERSION.yml
CHANGED
data/integrity.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{integrity}
|
5
|
-
s.version = "0.1.
|
5
|
+
s.version = "0.1.8"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Nicol\303\241s Sanguinetti", "Simon Rozet"]
|
9
|
-
s.date = %q{2009-
|
9
|
+
s.date = %q{2009-02-12}
|
10
10
|
s.default_executable = %q{integrity}
|
11
11
|
s.description = %q{Your Friendly Continuous Integration server. Easy, fun and painless!}
|
12
12
|
s.email = %q{contacto@nicolassanguinetti.info}
|
@@ -12,7 +12,7 @@ module Integrity
|
|
12
12
|
|
13
13
|
def checkbox(name, condition, extras={})
|
14
14
|
attrs = { :name => name, :type => "checkbox", :value => "1" }
|
15
|
-
attrs.merge(
|
15
|
+
attrs.merge!(:checked => condition ? true : nil)
|
16
16
|
attrs.merge(extras)
|
17
17
|
end
|
18
18
|
|
@@ -20,10 +20,10 @@ module Integrity
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def pretty_date(date_time)
|
23
|
-
|
24
|
-
if
|
23
|
+
days_away = (Date.today - Date.new(date_time.year, date_time.month, date_time.day)).to_i
|
24
|
+
if days_away == 0
|
25
25
|
"today"
|
26
|
-
elsif
|
26
|
+
elsif days_away == 1
|
27
27
|
"yesterday"
|
28
28
|
else
|
29
29
|
strftime_with_ordinal(date_time, "on %b %d%o")
|
data/lib/integrity/installer.rb
CHANGED
@@ -21,7 +21,7 @@ module Integrity
|
|
21
21
|
"Checks the `database_uri` in CONFIG and creates and bootstraps a database for integrity"
|
22
22
|
def create_db(config, direction="up")
|
23
23
|
Integrity.new(config)
|
24
|
-
migrate_db(direction)
|
24
|
+
migrate_db(direction, 1)
|
25
25
|
end
|
26
26
|
|
27
27
|
desc "version",
|
@@ -33,15 +33,15 @@ module Integrity
|
|
33
33
|
private
|
34
34
|
attr_reader :root
|
35
35
|
|
36
|
-
def migrate_db(direction=
|
36
|
+
def migrate_db(direction, level=nil)
|
37
37
|
require 'migrations'
|
38
38
|
|
39
39
|
set_up_migrations unless migrations_already_set_up?
|
40
40
|
add_initial_migration if tables_from_before_migrations_exist?
|
41
41
|
|
42
|
-
case direction
|
43
|
-
when "up" then Integrity::Migrations.migrate_up!
|
44
|
-
when "down" then Integrity::Migrations.migrate_down!
|
42
|
+
case direction
|
43
|
+
when "up" then Integrity::Migrations.migrate_up!(level)
|
44
|
+
when "down" then Integrity::Migrations.migrate_down!(level)
|
45
45
|
else raise ArgumentError, "DIRECTION must be either up or down"
|
46
46
|
end
|
47
47
|
end
|
@@ -106,8 +106,8 @@ module Integrity
|
|
106
106
|
end
|
107
107
|
|
108
108
|
def tables_from_before_migrations_exist?
|
109
|
-
table_exists?("integrity_projects") &&
|
110
|
-
table_exists?("integrity_builds") &&
|
109
|
+
table_exists?("integrity_projects") &&
|
110
|
+
table_exists?("integrity_builds") &&
|
111
111
|
table_exists?("integrity_notifiers")
|
112
112
|
end
|
113
113
|
|
data/views/new.haml
CHANGED
@@ -21,7 +21,8 @@
|
|
21
21
|
%p.normal{ :class => error_class(@project, :command) }
|
22
22
|
%label{ :for => "project_build_script" }
|
23
23
|
&== Build script #{errors_on @project, :command}
|
24
|
-
%textarea#project_build_script{ :name => "project_data[command]", :cols => 40, :rows => 1 }
|
24
|
+
%textarea#project_build_script{ :name => "project_data[command]", :cols => 40, :rows => 1 }
|
25
|
+
&== #{@project.command.to_s}
|
25
26
|
|
26
27
|
%p.normal.checkbox
|
27
28
|
%label{ :for => "project_public" } Public project
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foca-integrity
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- "Nicol\xC3\xA1s Sanguinetti"
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2009-
|
13
|
+
date: 2009-02-12 00:00:00 -08:00
|
14
14
|
default_executable: integrity
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|