capillary 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- capillary (0.3.0)
4
+ capillary (1.0.0)
5
5
  json (~> 1.5.1)
6
6
 
7
7
  GEM
@@ -21,7 +21,8 @@ require "capillary/ref_collection"
21
21
 
22
22
  module Capillary
23
23
  class Commit
24
- attr_accessor :id, :parent_ids, :committed_at, :message, :committer_email, :seq_id
24
+ attr_accessor :id, :parent_ids, :committed_at, :committer_email, :seq_id
25
+ attr_writer :message
25
26
  attr_reader :refs
26
27
  LOG_SEPARATOR = "§"
27
28
 
@@ -63,5 +64,9 @@ module Capillary
63
64
  "message" => message,
64
65
  "seqId" => seq_id})
65
66
  end
67
+
68
+ def message
69
+ @message.gsub(/[^A-Za-z0-9\s\'\n\.,\/]/,"")
70
+ end
66
71
  end
67
72
  end
@@ -18,5 +18,5 @@
18
18
 
19
19
 
20
20
  module Capillary
21
- VERSION = "1.0.0"
21
+ VERSION = "1.0.1"
22
22
  end
@@ -58,12 +58,17 @@ class CommitTest < MiniTest::Spec
58
58
  assert_equal JSON.parse(@commit.to_json), {
59
59
  "id" => "a7cf78bfff06d52b5b0aa021508b44c00cad067a",
60
60
  "parentIds" => ["db75ad82d678d51b29709d26af64d4a85b6f8071"],
61
- "committedAt" => "Wed Jul 13 07:55:47 +0200 2011",
61
+ "committedAt" => Time.parse("Wed Jul 13 07:55:47 +0200 2011").to_s,
62
62
  "committerEmail" => "chris@example.com",
63
63
  "refs" => { "heads" => ["master", "refactor"], "tags" => ["v2.0.0"], "remotes" => {} },
64
64
  "message" => "And this is commit 10 Merge branch 'topic'",
65
65
  "seqId" => nil
66
66
  }
67
67
  end
68
+
69
+ should "remove HTML tags from output" do
70
+ @commit.message = '<script>hello</script>'
71
+ assert_equal "scripthello/script", @commit.message
72
+ end
68
73
  end
69
74
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capillary
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 0
10
- version: 1.0.0
9
+ - 1
10
+ version: 1.0.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Marius Mathiesen
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-10-14 00:00:00 +02:00
19
+ date: 2012-05-18 00:00:00 +02:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency