alphasights-integrity 0.1.9.6 → 0.1.9.7

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "integrity"
3
- s.version = "0.1.9.6"
3
+ s.version = "0.1.9.7"
4
4
  s.date = "2009-04-06"
5
5
 
6
6
  s.description = "Your Friendly Continuous Integration server. Easy, fun and painless!"
@@ -57,5 +57,12 @@ module Integrity
57
57
  def output
58
58
  build && build.output
59
59
  end
60
+
61
+ def committed_at=(time_with_timezone)
62
+ unless time_with_timezone.respond_to?(:utc)
63
+ time_with_timezone = Time.parse(time_with_timezone)
64
+ end
65
+ attribute_set(:committed_at, time_with_timezone.utc)
66
+ end
60
67
  end
61
68
  end
@@ -39,9 +39,9 @@ module Integrity
39
39
  column :id, Integer, :serial => true
40
40
  column :name, String, :nullable => false
41
41
  column :permalink, String
42
- column :uri, URI, :nullable => false
42
+ column :uri, Text, :nullable => false
43
43
  column :branch, String, :nullable => false, :default => "master"
44
- column :command, String, :nullable => false, :default => "rake"
44
+ column :command, Text, :nullable => false, :default => "rake"
45
45
  column :public, Boolean, :default => true
46
46
  column :building, Boolean, :default => false
47
47
  column :created_at, DateTime
@@ -83,7 +83,7 @@ module Integrity
83
83
 
84
84
  create_table :integrity_commits do
85
85
  column :id, Integer, :serial => true
86
- column :identifier, String, :nullable => false
86
+ column :identifier, String, :size => 40, :nullable => false
87
87
  column :message, Text, :nullable => true
88
88
  column :author, String, :nullable => true, :length => 255
89
89
  column :committed_at, DateTime, :nullable => false
@@ -151,7 +151,7 @@ module Integrity
151
151
 
152
152
  migration 4, :add_url_to_commits do
153
153
  up do
154
- modify_table(:integrity_commits) { add_column :url, URI }
154
+ modify_table(:integrity_commits) { add_column :url, Text }
155
155
  end
156
156
 
157
157
  down do
@@ -11,7 +11,7 @@ module Integrity
11
11
  property :permalink, String
12
12
  property :uri, URI, :nullable => false, :length => 255
13
13
  property :branch, String, :nullable => false, :default => "master"
14
- property :command, String, :nullable => false, :length => 255, :default => "rake"
14
+ property :command, Text, :nullable => false, :default => "rake"
15
15
  property :public, Boolean, :default => true
16
16
  property :building, Boolean, :default => false
17
17
  property :created_at, DateTime
@@ -51,6 +51,12 @@ class CommitTest < Test::Unit::TestCase
51
51
  commit = Commit.gen(:committed_at => Time.utc(2008, 10, 12, 14, 18, 20))
52
52
  commit.committed_at.to_s.should == "2008-10-12T14:18:20+00:00"
53
53
  end
54
+
55
+ it "normalizes the commit date time to UTC " do
56
+ time = Time.parse('Thu Apr 16 08:52:25 BST 2009')
57
+ commit = Commit.gen(:committed_at => time)
58
+ commit.committed_at.to_s.should == "2009-04-16T07:52:25+00:00"
59
+ end
54
60
 
55
61
  it "has a human readable status" do
56
62
  commit = Commit.gen(:successful, :identifier => "658ba96cb0235e82ee720510c049883955200fa9")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alphasights-integrity
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9.6
4
+ version: 0.1.9.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - "Nicol\xC3\xA1s Sanguinetti"