houston-core 0.6.2 → 0.6.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c361194e0a6ff4131717027f1c8f2bede7975e06
4
- data.tar.gz: bee82701ad1c78149d4c98ba22d938b172b97114
3
+ metadata.gz: 58c7aad1b031d494b15681933020d9e28e9c3021
4
+ data.tar.gz: cb26b42f8f47117d15f51508ba561dd8885cdaef
5
5
  SHA512:
6
- metadata.gz: ca40622ec31d8b38b2f69e65e0f95a8140bf57f65820afbb17a3107ef70477c350858c4988b1f9240a5e2df881c8dbff1765b5510f7e1bbdcaaef1a36b4d66ad
7
- data.tar.gz: f185ec13de879224f71dcaf7920e80d97f5551bdd504f28ccdf803b37407ad1ed6f01b395babf733ceef9166eb2f0d369f1814f0ceefed8e670d0c5ec22e4586
6
+ metadata.gz: 2150ce342c447ef41e05985a4769db77eb03e952100dce005dca15143e6bf3027d4c35861e176cee039cbbf560e09b3f76f2e13d7f6bb15e55be130650341900
7
+ data.tar.gz: d0d3b7e91ccdc8d82c4348ac4732550679d3920ee9246a8b8669033338bd2e1a01b6369d74e27c2d0e7f7b00636c4c62c7a9fd9adf8d2b248931879503d9f754
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- houston-core (0.6.2)
4
+ houston-core (0.6.3)
5
5
  activerecord-import
6
6
  activerecord-pluck_in_batches
7
7
  addressable
@@ -52,40 +52,40 @@ PATH
52
52
  GEM
53
53
  remote: https://rubygems.org/
54
54
  specs:
55
- actionmailer (4.2.5.1)
56
- actionpack (= 4.2.5.1)
57
- actionview (= 4.2.5.1)
58
- activejob (= 4.2.5.1)
55
+ actionmailer (4.2.5.2)
56
+ actionpack (= 4.2.5.2)
57
+ actionview (= 4.2.5.2)
58
+ activejob (= 4.2.5.2)
59
59
  mail (~> 2.5, >= 2.5.4)
60
60
  rails-dom-testing (~> 1.0, >= 1.0.5)
61
- actionpack (4.2.5.1)
62
- actionview (= 4.2.5.1)
63
- activesupport (= 4.2.5.1)
61
+ actionpack (4.2.5.2)
62
+ actionview (= 4.2.5.2)
63
+ activesupport (= 4.2.5.2)
64
64
  rack (~> 1.6)
65
65
  rack-test (~> 0.6.2)
66
66
  rails-dom-testing (~> 1.0, >= 1.0.5)
67
67
  rails-html-sanitizer (~> 1.0, >= 1.0.2)
68
- actionview (4.2.5.1)
69
- activesupport (= 4.2.5.1)
68
+ actionview (4.2.5.2)
69
+ activesupport (= 4.2.5.2)
70
70
  builder (~> 3.1)
71
71
  erubis (~> 2.7.0)
72
72
  rails-dom-testing (~> 1.0, >= 1.0.5)
73
73
  rails-html-sanitizer (~> 1.0, >= 1.0.2)
74
- activejob (4.2.5.1)
75
- activesupport (= 4.2.5.1)
74
+ activejob (4.2.5.2)
75
+ activesupport (= 4.2.5.2)
76
76
  globalid (>= 0.3.0)
77
- activemodel (4.2.5.1)
78
- activesupport (= 4.2.5.1)
77
+ activemodel (4.2.5.2)
78
+ activesupport (= 4.2.5.2)
79
79
  builder (~> 3.1)
80
- activerecord (4.2.5.1)
81
- activemodel (= 4.2.5.1)
82
- activesupport (= 4.2.5.1)
80
+ activerecord (4.2.5.2)
81
+ activemodel (= 4.2.5.2)
82
+ activesupport (= 4.2.5.2)
83
83
  arel (~> 6.0)
84
84
  activerecord-import (0.11.0)
85
85
  activerecord (>= 3.0)
86
86
  activerecord-pluck_in_batches (0.1.1)
87
87
  activerecord
88
- activesupport (4.2.5.1)
88
+ activesupport (4.2.5.2)
89
89
  i18n (~> 0.7)
90
90
  json (~> 1.7, >= 1.7.7)
91
91
  minitest (~> 5.1)
@@ -137,7 +137,7 @@ GEM
137
137
  actionmailer (>= 3.2.6, < 5)
138
138
  devise (>= 3.2.0)
139
139
  docile (1.1.5)
140
- domain_name (0.5.20160128)
140
+ domain_name (0.5.20160216)
141
141
  unf (>= 0.0.5, < 1.0.0)
142
142
  engineyard (3.2.1)
143
143
  engineyard-cloud-client (~> 2.1)
@@ -204,7 +204,7 @@ GEM
204
204
  mail (2.6.3)
205
205
  mime-types (>= 1.16, < 3)
206
206
  method_source (0.8.2)
207
- mime-types (2.99)
207
+ mime-types (2.99.1)
208
208
  mini_portile2 (2.0.0)
209
209
  minitest (5.8.4)
210
210
  minitest-reporters (1.1.7)
@@ -217,7 +217,7 @@ GEM
217
217
  multi_json (1.11.2)
218
218
  multi_xml (0.5.5)
219
219
  multipart-post (2.0.0)
220
- neat-rails (0.1.0)
220
+ neat-rails (0.2.0)
221
221
  nested_editor_for (0.1.0)
222
222
  net-ldap (0.12.1)
223
223
  net-ssh (2.9.4)
@@ -233,8 +233,8 @@ GEM
233
233
  rack (>= 1.2, < 3)
234
234
  octokit (4.1.1)
235
235
  sawyer (~> 0.6.0, >= 0.5.3)
236
- oj (2.14.4)
237
- openxml-package (0.2.2)
236
+ oj (2.14.5)
237
+ openxml-package (0.2.3)
238
238
  nokogiri
239
239
  ox
240
240
  rubyzip (~> 1.1.0)
@@ -242,7 +242,7 @@ GEM
242
242
  nokogiri
243
243
  openxml-package (>= 0.2.0)
244
244
  orm_adapter (0.5.0)
245
- ox (2.2.4)
245
+ ox (2.3.0)
246
246
  pg (0.18.4)
247
247
  pg_search (1.0.5)
248
248
  activerecord (>= 3.1)
@@ -261,16 +261,16 @@ GEM
261
261
  rack (>= 1.0)
262
262
  rack-utf8_sanitizer (1.3.2)
263
263
  rack (>= 1.0, < 3.0)
264
- rails (4.2.5.1)
265
- actionmailer (= 4.2.5.1)
266
- actionpack (= 4.2.5.1)
267
- actionview (= 4.2.5.1)
268
- activejob (= 4.2.5.1)
269
- activemodel (= 4.2.5.1)
270
- activerecord (= 4.2.5.1)
271
- activesupport (= 4.2.5.1)
264
+ rails (4.2.5.2)
265
+ actionmailer (= 4.2.5.2)
266
+ actionpack (= 4.2.5.2)
267
+ actionview (= 4.2.5.2)
268
+ activejob (= 4.2.5.2)
269
+ activemodel (= 4.2.5.2)
270
+ activerecord (= 4.2.5.2)
271
+ activesupport (= 4.2.5.2)
272
272
  bundler (>= 1.3.0, < 2.0)
273
- railties (= 4.2.5.1)
273
+ railties (= 4.2.5.2)
274
274
  sprockets-rails
275
275
  rails-deprecated_sanitizer (1.0.3)
276
276
  activesupport (>= 4.2.0.alpha)
@@ -280,9 +280,9 @@ GEM
280
280
  rails-deprecated_sanitizer (>= 1.0.1)
281
281
  rails-html-sanitizer (1.0.3)
282
282
  loofah (~> 2.0)
283
- railties (4.2.5.1)
284
- actionpack (= 4.2.5.1)
285
- activesupport (= 4.2.5.1)
283
+ railties (4.2.5.2)
284
+ actionpack (= 4.2.5.2)
285
+ activesupport (= 4.2.5.2)
286
286
  rake (>= 0.8.7)
287
287
  thor (>= 0.18.1, < 2.0)
288
288
  rake (10.5.0)
@@ -380,4 +380,4 @@ DEPENDENCIES
380
380
  webmock
381
381
 
382
382
  BUNDLED WITH
383
- 1.10.6
383
+ 1.11.2
@@ -74,6 +74,12 @@ html { height: 100%; }
74
74
  box-shadow: none;
75
75
  }
76
76
 
77
+ hr {
78
+ border: none;
79
+ height: 1px;
80
+ background: #222;
81
+ }
82
+
77
83
  a, a:visited { color: inherit; }
78
84
  a:hover, a:active { color: #ccc; }
79
85
 
@@ -14,4 +14,8 @@ module MarkdownHelper
14
14
  emojify markdown.render(text).html_safe
15
15
  end
16
16
 
17
+ def slackdown(text)
18
+ Slackdown.new(text).convert
19
+ end
20
+
17
21
  end
@@ -4,8 +4,6 @@ class Milestone < ActiveRecord::Base
4
4
  belongs_to :project
5
5
  has_many :tickets, -> { reorder("NULLIF(tickets.extended_attributes->'milestoneSequence', '')::int") }
6
6
 
7
- versioned only: [:name, :start_date, :end_date, :band, :lanes, :destroyed_at], class_name: "MilestoneVersion", initial_version: true
8
-
9
7
  default_scope { where(destroyed_at: nil).order(:start_date) }
10
8
 
11
9
  validates :project_id, presence: true
@@ -39,21 +37,6 @@ class Milestone < ActiveRecord::Base
39
37
  end
40
38
  alias :open :uncompleted
41
39
 
42
- def visible
43
- where(arel_table[:start_date].not_eq(nil)).
44
- where(arel_table[:end_date].not_eq(nil))
45
- end
46
-
47
- def current
48
- during(Date.today..Date.today)
49
- end
50
-
51
- def during(range)
52
- visible
53
- .where(arel_table[:start_date].lteq(range.end))
54
- .where(arel_table[:end_date].gteq(range.begin))
55
- end
56
-
57
40
  def without(milestones)
58
41
  without_remote_ids(milestones.map(&:remote_id))
59
42
  end
@@ -0,0 +1,23 @@
1
+ # Converts GitHub-flavored Markdown to Slack-flavored Markdown
2
+ class Slackdown
3
+ attr_reader :markdown
4
+
5
+ def initialize(markdown)
6
+ @markdown = markdown
7
+ end
8
+
9
+ def convert
10
+ # Remove the source name from fenced code blocks
11
+ slackdown = markdown.gsub(/^```(ruby|diff|css|json|sql|html|xml|coffee(?:script)?|javascript|js|bash)/, "```")
12
+
13
+ # Convert `__` and `**` to `*`
14
+ slackdown = slackdown.gsub(/(?<!_)__(?!_)/, "*")
15
+ .gsub(/(?<!\*)\*\*(?!\*)/, "*")
16
+
17
+ # Replace images with their URLs: Slack will unfurl them
18
+ slackdown = slackdown.gsub(/<img[^>]*src="([^"]+)"[^>]*>/, "\\1")
19
+ slackdown
20
+ end
21
+ alias :to_s :convert
22
+
23
+ end
@@ -1,3 +1,3 @@
1
1
  module Houston
2
- VERSION = "0.6.2"
2
+ VERSION = "0.6.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: houston-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bob Lail
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-07 00:00:00.000000000 Z
11
+ date: 2016-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -1033,6 +1033,7 @@ files:
1033
1033
  - app/models/run_tests_on_post_receive.rb
1034
1034
  - app/models/setting.rb
1035
1035
  - app/models/settings.rb
1036
+ - app/models/slackdown.rb
1036
1037
  - app/models/source_file_coverage.rb
1037
1038
  - app/models/sprint.rb
1038
1039
  - app/models/sprint_report.rb