houston-core 0.9.0 → 0.9.1

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: 06ebed2d9d99936c2a7af336bcda0410aacae58a
4
- data.tar.gz: c96eab16bd2f7a4715b0fc5fef032240bc980bbd
3
+ metadata.gz: aea60d0e5a29fcaf7c05ccc0978f6f2ec93c5fab
4
+ data.tar.gz: 5e886c3a86565a55679dd3852c2f623b368faac9
5
5
  SHA512:
6
- metadata.gz: 4df4808a53d7eee91148629fa711782d2ce688ca3cf32411d6f1f36e4dc32f4b4542fbeb3402a5ce456a7358c28d773b30cf2fa186e51989ca1573348cd8e940
7
- data.tar.gz: a0c0219e18afaface0ecf9d56697db4101b667a82baaf804d57def8247ba38aafd442f1de293ae2a3dc9de66dfd294603b06578c62709e39560f949d021276b5
6
+ metadata.gz: 620021cdcfbb49903f623f64d73becdb0d65a16b5a9e140925b3492b7073c4cff8ee24c0baeb0073d21c632c7fcefa6dcdaf26c82c11e583b43f49bbfa67b938
7
+ data.tar.gz: 76c018cf2d8a4eed980008319f3e91ac67c82fd95afe75a3e55daddb0b6d13a144860c71c993d9249c28563eb834ee43c2cd73393a6137ff5ff2c0a4746be90a
data/.gitignore CHANGED
@@ -6,6 +6,7 @@
6
6
 
7
7
  # Ignore bundler config.
8
8
  /.bundle
9
+ Gemfile.lock
9
10
 
10
11
  # Ignore all logfiles and tempfiles.
11
12
  /log/*
data/Gemfile CHANGED
@@ -14,7 +14,7 @@ group :test do
14
14
  gem "timecop"
15
15
  gem "rr"
16
16
  gem "webmock", require: "webmock/minitest"
17
- gem "factory_girl_rails"
17
+ gem "factory_girl_rails", "4.9.0"
18
18
  gem "launchy"
19
19
 
20
20
  # For Jenkins
@@ -15,6 +15,8 @@ class Action < ActiveRecord::Base
15
15
  Faraday::SSLError,
16
16
  Faraday::HTTP::ServerError,
17
17
  Faraday::HTTP::Unauthorized,
18
+ Faraday::HTTP::TooManyRequests,
19
+ Faraday::HTTP::RequestTimeout,
18
20
  Faraday::TimeoutError,
19
21
  Net::OpenTimeout,
20
22
  exceptions_wrapping(PG::ConnectionBad),
@@ -8,13 +8,14 @@ class MeasurementsPresenter
8
8
  def to_json(*args)
9
9
  Houston.benchmark "[#{self.class.name.underscore}] Render JSON" do
10
10
  query = measurements.select(<<-SQL)
11
- taken_at "timestamp",
11
+ id,
12
+ (taken_at AT TIME ZONE 'UTC') AT TIME ZONE '#{Time.zone.now.strftime("%Z")}' "timestamp",
12
13
  name,
13
14
  value,
14
15
  json_build_object('type', subject_type, 'id', subject_id) "subject"
15
16
  SQL
16
17
 
17
- ActiveRecord::Base.connection.select_value("select array_to_json(array_agg(row_to_json(t))) from (#{query.to_sql}) t")
18
+ ActiveRecord::Base.connection.select_value("select array_to_json(array_agg(row_to_json(t))) from (#{query.to_sql}) t") || []
18
19
  end
19
20
  end
20
21
 
@@ -5,7 +5,7 @@
5
5
  <% end %>
6
6
 
7
7
  <% if $scheduler %>
8
- <p><b>Status:</b> <%= $scheduler.up? ? "Up (Started #{format_time $scheduler.started_at.to_time})".html_safe : "Down" %></p>
8
+ <p><b>Status:</b> <%= $scheduler.up? ? "Up (Started #{format_time $scheduler.started_at.to_t})".html_safe : "Down" %></p>
9
9
  <% else %>
10
10
  <p><b>Status:</b> Unavailable</p>
11
11
  <% end %>
@@ -2,7 +2,7 @@
2
2
 
3
3
  <p>Someone has requested a link to change your password, and you can do this through the link below.</p>
4
4
 
5
- <p><%= link_to 'Change my password', edit_password_url(@resource, :reset_password_token => @resource.reset_password_token) %></p>
5
+ <p><%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %></p>
6
6
 
7
7
  <p>If you didn't request this, please ignore this email.</p>
8
8
  <p>Your password won't change until you access the link above and create a new one.</p>
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
24
24
 
25
25
  # For Houston as a Web Application
26
26
  spec.add_dependency "rails", "~> 5.0.0"
27
- spec.add_dependency "pg", "~> 0.19.0"
27
+ spec.add_dependency "pg", "~> 0.21.0"
28
28
  # --------------------------------
29
29
  spec.add_dependency "activerecord-import"
30
30
  spec.add_dependency "activerecord-pluck_in_batches", "~> 0.2.0"
@@ -37,13 +37,14 @@ Gem::Specification.new do |spec|
37
37
  spec.add_dependency "devise_invitable"
38
38
  spec.add_dependency "faraday", "~> 0.9.2"
39
39
  spec.add_dependency "faraday-http-cache", "~> 1.2.2"
40
- spec.add_dependency "faraday-raise-errors", "~> 0.2.0"
40
+ spec.add_dependency "faraday-raise-errors", "~> 0.3.0"
41
41
  spec.add_dependency "gemoji", "~> 2.1.0"
42
42
  spec.add_dependency "handlebars_assets", "~> 0.23.0"
43
+ spec.add_dependency "mail", "~> 2.6.6"
43
44
  spec.add_dependency "neat-rails", "~> 0.5.1"
44
- spec.add_dependency "nokogiri", "~> 1.7"
45
+ spec.add_dependency "nokogiri", "~> 1.8"
45
46
  spec.add_dependency "oauth2"
46
- spec.add_dependency "oj", "~> 2.18"
47
+ spec.add_dependency "oj", "~> 3.0"
47
48
  spec.add_dependency "openxml-xlsx", ">= 0.2.0"
48
49
  spec.add_dependency "pg_search", "~> 1.0.5"
49
50
  spec.add_dependency "premailer", "~> 1.10.0"
@@ -61,6 +62,6 @@ Gem::Specification.new do |spec|
61
62
  spec.add_dependency "coffee-rails", "~> 4.1.0"
62
63
 
63
64
  # Houston's background jobs daemon
64
- spec.add_dependency "rufus-scheduler", "~> 3.3.4"
65
+ spec.add_dependency "rufus-scheduler", "~> 3.4.0"
65
66
 
66
67
  end
@@ -24,13 +24,14 @@ module Houston
24
24
  module AbilityBlock
25
25
  def ability(&block)
26
26
  __getobj__.instance_variable_set :@ability_block, block
27
+ self
27
28
  end
28
29
  end
29
30
 
30
31
  module AcceptsName
31
- def name(*args)
32
- __getobj__.name = args.first if args.any?
33
- __getobj__.name
32
+ def name(name)
33
+ __getobj__.name = name
34
+ self
34
35
  end
35
36
  end
36
37
 
@@ -1,3 +1,3 @@
1
1
  module Houston
2
- VERSION = "0.9.0"
2
+ VERSION = "0.9.1"
3
3
  end
@@ -19,7 +19,7 @@ class EventsExtensionTest < ActiveSupport::TestCase
19
19
  end
20
20
 
21
21
  should "return nil for an unregistered event" do
22
- assert_equal nil, Houston.events["anything"]
22
+ assert_nil Houston.events["anything"]
23
23
  end
24
24
  end
25
25
 
@@ -19,7 +19,7 @@ class SerializerTest < ActiveSupport::TestCase
19
19
  end
20
20
 
21
21
  should "let Oj serialize times" do
22
- assert_equal '{"^t":1468587630.542999999e59}',
22
+ assert_equal '{"^t":1468587630.542999999}',
23
23
  dump(Time.new(2016, 7, 15, 13, 1, 30, 59.457))
24
24
  end
25
25
 
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.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bob Lail
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-14 00:00:00.000000000 Z
11
+ date: 2018-09-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.19.0
33
+ version: 0.21.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 0.19.0
40
+ version: 0.21.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: activerecord-import
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -198,14 +198,14 @@ dependencies:
198
198
  requirements:
199
199
  - - "~>"
200
200
  - !ruby/object:Gem::Version
201
- version: 0.2.0
201
+ version: 0.3.0
202
202
  type: :runtime
203
203
  prerelease: false
204
204
  version_requirements: !ruby/object:Gem::Requirement
205
205
  requirements:
206
206
  - - "~>"
207
207
  - !ruby/object:Gem::Version
208
- version: 0.2.0
208
+ version: 0.3.0
209
209
  - !ruby/object:Gem::Dependency
210
210
  name: gemoji
211
211
  requirement: !ruby/object:Gem::Requirement
@@ -234,6 +234,20 @@ dependencies:
234
234
  - - "~>"
235
235
  - !ruby/object:Gem::Version
236
236
  version: 0.23.0
237
+ - !ruby/object:Gem::Dependency
238
+ name: mail
239
+ requirement: !ruby/object:Gem::Requirement
240
+ requirements:
241
+ - - "~>"
242
+ - !ruby/object:Gem::Version
243
+ version: 2.6.6
244
+ type: :runtime
245
+ prerelease: false
246
+ version_requirements: !ruby/object:Gem::Requirement
247
+ requirements:
248
+ - - "~>"
249
+ - !ruby/object:Gem::Version
250
+ version: 2.6.6
237
251
  - !ruby/object:Gem::Dependency
238
252
  name: neat-rails
239
253
  requirement: !ruby/object:Gem::Requirement
@@ -254,14 +268,14 @@ dependencies:
254
268
  requirements:
255
269
  - - "~>"
256
270
  - !ruby/object:Gem::Version
257
- version: '1.7'
271
+ version: '1.8'
258
272
  type: :runtime
259
273
  prerelease: false
260
274
  version_requirements: !ruby/object:Gem::Requirement
261
275
  requirements:
262
276
  - - "~>"
263
277
  - !ruby/object:Gem::Version
264
- version: '1.7'
278
+ version: '1.8'
265
279
  - !ruby/object:Gem::Dependency
266
280
  name: oauth2
267
281
  requirement: !ruby/object:Gem::Requirement
@@ -282,14 +296,14 @@ dependencies:
282
296
  requirements:
283
297
  - - "~>"
284
298
  - !ruby/object:Gem::Version
285
- version: '2.18'
299
+ version: '3.0'
286
300
  type: :runtime
287
301
  prerelease: false
288
302
  version_requirements: !ruby/object:Gem::Requirement
289
303
  requirements:
290
304
  - - "~>"
291
305
  - !ruby/object:Gem::Version
292
- version: '2.18'
306
+ version: '3.0'
293
307
  - !ruby/object:Gem::Dependency
294
308
  name: openxml-xlsx
295
309
  requirement: !ruby/object:Gem::Requirement
@@ -450,14 +464,14 @@ dependencies:
450
464
  requirements:
451
465
  - - "~>"
452
466
  - !ruby/object:Gem::Version
453
- version: 3.3.4
467
+ version: 3.4.0
454
468
  type: :runtime
455
469
  prerelease: false
456
470
  version_requirements: !ruby/object:Gem::Requirement
457
471
  requirements:
458
472
  - - "~>"
459
473
  - !ruby/object:Gem::Version
460
- version: 3.3.4
474
+ version: 3.4.0
461
475
  description:
462
476
  email:
463
477
  - bob.lailfamily@gmail.com
@@ -472,7 +486,6 @@ files:
472
486
  - ".travis.yml"
473
487
  - CHANGELOG.md
474
488
  - Gemfile
475
- - Gemfile.lock
476
489
  - README.md
477
490
  - ROADMAP.md
478
491
  - Rakefile
@@ -1,306 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- houston-core (0.9.0)
5
- activerecord-import
6
- activerecord-pluck_in_batches (~> 0.2.0)
7
- addressable (~> 2.3.8)
8
- attentive (>= 0.3.9)
9
- browser (~> 2.3.0)
10
- cancancan (~> 1.16.0)
11
- coffee-rails (~> 4.1.0)
12
- concurrent-ruby (~> 1.0.2)
13
- devise
14
- devise_invitable
15
- faraday (~> 0.9.2)
16
- faraday-http-cache (~> 1.2.2)
17
- faraday-raise-errors (~> 0.2.0)
18
- gemoji (~> 2.1.0)
19
- handlebars_assets (~> 0.23.0)
20
- kramdown
21
- neat-rails (~> 0.5.1)
22
- nokogiri (~> 1.7)
23
- oauth2
24
- oj (~> 2.18)
25
- openxml-xlsx (>= 0.2.0)
26
- pg (~> 0.19.0)
27
- pg_search (~> 1.0.5)
28
- premailer (~> 1.10.0)
29
- progressbar (~> 0.21.0)
30
- rack-utf8_sanitizer (~> 1.3.1)
31
- rails (~> 5.0.0)
32
- rufus-scheduler (~> 3.3.4)
33
- sass-rails (~> 5.0)
34
- slackdown (>= 0.2.1)
35
- thor
36
- uglifier (>= 2.7.2)
37
-
38
- GEM
39
- remote: https://rubygems.org/
40
- specs:
41
- actioncable (5.0.2)
42
- actionpack (= 5.0.2)
43
- nio4r (>= 1.2, < 3.0)
44
- websocket-driver (~> 0.6.1)
45
- actionmailer (5.0.2)
46
- actionpack (= 5.0.2)
47
- actionview (= 5.0.2)
48
- activejob (= 5.0.2)
49
- mail (~> 2.5, >= 2.5.4)
50
- rails-dom-testing (~> 2.0)
51
- actionpack (5.0.2)
52
- actionview (= 5.0.2)
53
- activesupport (= 5.0.2)
54
- rack (~> 2.0)
55
- rack-test (~> 0.6.3)
56
- rails-dom-testing (~> 2.0)
57
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
58
- actionview (5.0.2)
59
- activesupport (= 5.0.2)
60
- builder (~> 3.1)
61
- erubis (~> 2.7.0)
62
- rails-dom-testing (~> 2.0)
63
- rails-html-sanitizer (~> 1.0, >= 1.0.3)
64
- activejob (5.0.2)
65
- activesupport (= 5.0.2)
66
- globalid (>= 0.3.6)
67
- activemodel (5.0.2)
68
- activesupport (= 5.0.2)
69
- activerecord (5.0.2)
70
- activemodel (= 5.0.2)
71
- activesupport (= 5.0.2)
72
- arel (~> 7.0)
73
- activerecord-import (0.18.3)
74
- activerecord (>= 3.2)
75
- activerecord-pluck_in_batches (0.2.0)
76
- activerecord (>= 4.2.7, < 5.1.0)
77
- activesupport (5.0.2)
78
- concurrent-ruby (~> 1.0, >= 1.0.2)
79
- i18n (~> 0.7)
80
- minitest (~> 5.1)
81
- tzinfo (~> 1.1)
82
- addressable (2.3.8)
83
- ansi (1.5.0)
84
- arel (7.1.4)
85
- attentive (0.3.9)
86
- concurrent-ruby
87
- bcrypt (3.1.11)
88
- browser (2.3.0)
89
- builder (3.2.3)
90
- cancancan (1.16.0)
91
- capybara (2.13.0)
92
- addressable
93
- mime-types (>= 1.16)
94
- nokogiri (>= 1.3.3)
95
- rack (>= 1.0.0)
96
- rack-test (>= 0.5.4)
97
- xpath (~> 2.0)
98
- coderay (1.1.1)
99
- coffee-rails (4.1.1)
100
- coffee-script (>= 2.2.0)
101
- railties (>= 4.0.0, < 5.1.x)
102
- coffee-script (2.4.1)
103
- coffee-script-source
104
- execjs
105
- coffee-script-source (1.12.2)
106
- concurrent-ruby (1.0.5)
107
- crack (0.4.3)
108
- safe_yaml (~> 1.0.0)
109
- css_parser (1.5.0)
110
- addressable
111
- devise (4.2.1)
112
- bcrypt (~> 3.0)
113
- orm_adapter (~> 0.1)
114
- railties (>= 4.1.0, < 5.1)
115
- responders
116
- warden (~> 1.2.3)
117
- devise_invitable (1.7.2)
118
- actionmailer (>= 4.1.0)
119
- devise (>= 4.0.0)
120
- docile (1.1.5)
121
- erubis (2.7.0)
122
- execjs (2.7.0)
123
- factory_girl (4.8.0)
124
- activesupport (>= 3.0.0)
125
- factory_girl_rails (4.8.0)
126
- factory_girl (~> 4.8.0)
127
- railties (>= 3.0.0)
128
- faraday (0.9.2)
129
- multipart-post (>= 1.2, < 3)
130
- faraday-http-cache (1.2.2)
131
- faraday (~> 0.8)
132
- faraday-raise-errors (0.2.0)
133
- faraday
134
- gemoji (2.1.0)
135
- globalid (0.4.0)
136
- activesupport (>= 4.2.0)
137
- handlebars_assets (0.23.2)
138
- execjs (~> 2.0)
139
- sprockets (>= 2.0.0)
140
- tilt (>= 1.2)
141
- hashdiff (0.3.2)
142
- htmlentities (4.3.4)
143
- i18n (0.8.1)
144
- json (2.0.3)
145
- jwt (1.5.6)
146
- kramdown (1.13.2)
147
- launchy (2.4.3)
148
- addressable (~> 2.3)
149
- loofah (2.0.3)
150
- nokogiri (>= 1.5.9)
151
- mail (2.6.5)
152
- mime-types (>= 1.16, < 4)
153
- method_source (0.8.2)
154
- mime-types (3.1)
155
- mime-types-data (~> 3.2015)
156
- mime-types-data (3.2016.0521)
157
- mini_portile2 (2.1.0)
158
- minitest (5.10.1)
159
- minitest-reporters (1.1.14)
160
- ansi
161
- builder
162
- minitest (>= 5.0)
163
- ruby-progressbar
164
- minitest-reporters-turn_reporter (0.1.2)
165
- minitest-reporters
166
- multi_json (1.12.1)
167
- multi_xml (0.6.0)
168
- multipart-post (2.0.0)
169
- neat-rails (0.5.1)
170
- nio4r (2.0.0)
171
- nokogiri (1.7.1)
172
- mini_portile2 (~> 2.1.0)
173
- oauth2 (1.3.1)
174
- faraday (>= 0.8, < 0.12)
175
- jwt (~> 1.0)
176
- multi_json (~> 1.3)
177
- multi_xml (~> 0.5)
178
- rack (>= 1.2, < 3)
179
- oj (2.18.5)
180
- openxml-package (0.2.8)
181
- nokogiri
182
- ox
183
- rubyzip (~> 1.2.1)
184
- openxml-xlsx (0.2.3)
185
- nokogiri
186
- openxml-package (>= 0.2.0)
187
- orm_adapter (0.5.0)
188
- ox (2.5.0)
189
- pg (0.19.0)
190
- pg_search (1.0.6)
191
- activerecord (>= 3.1)
192
- activesupport (>= 3.1)
193
- arel
194
- premailer (1.10.3)
195
- addressable
196
- css_parser (>= 1.4.10)
197
- htmlentities (>= 4.0.0)
198
- progressbar (0.21.0)
199
- pry (0.10.4)
200
- coderay (~> 1.1.0)
201
- method_source (~> 0.8.1)
202
- slop (~> 3.4)
203
- rack (2.0.1)
204
- rack-test (0.6.3)
205
- rack (>= 1.0)
206
- rack-utf8_sanitizer (1.3.2)
207
- rack (>= 1.0, < 3.0)
208
- rails (5.0.2)
209
- actioncable (= 5.0.2)
210
- actionmailer (= 5.0.2)
211
- actionpack (= 5.0.2)
212
- actionview (= 5.0.2)
213
- activejob (= 5.0.2)
214
- activemodel (= 5.0.2)
215
- activerecord (= 5.0.2)
216
- activesupport (= 5.0.2)
217
- bundler (>= 1.3.0, < 2.0)
218
- railties (= 5.0.2)
219
- sprockets-rails (>= 2.0.0)
220
- rails-dom-testing (2.0.2)
221
- activesupport (>= 4.2.0, < 6.0)
222
- nokogiri (~> 1.6)
223
- rails-html-sanitizer (1.0.3)
224
- loofah (~> 2.0)
225
- railties (5.0.2)
226
- actionpack (= 5.0.2)
227
- activesupport (= 5.0.2)
228
- method_source
229
- rake (>= 0.8.7)
230
- thor (>= 0.18.1, < 2.0)
231
- rake (12.0.0)
232
- responders (2.4.0)
233
- actionpack (>= 4.2.0, < 5.3)
234
- railties (>= 4.2.0, < 5.3)
235
- rr (1.2.0)
236
- ruby-progressbar (1.8.1)
237
- rubyzip (1.2.1)
238
- rufus-scheduler (3.3.4)
239
- tzinfo
240
- safe_yaml (1.0.4)
241
- sass (3.4.23)
242
- sass-rails (5.0.6)
243
- railties (>= 4.0.0, < 6)
244
- sass (~> 3.1)
245
- sprockets (>= 2.8, < 4.0)
246
- sprockets-rails (>= 2.0, < 4.0)
247
- tilt (>= 1.1, < 3)
248
- shoulda-context (1.2.2)
249
- simplecov (0.13.0)
250
- docile (~> 1.1.0)
251
- json (>= 1.8, < 3)
252
- simplecov-html (~> 0.10.0)
253
- simplecov-html (0.10.0)
254
- simplecov-json (0.2)
255
- json
256
- simplecov
257
- slackdown (0.2.2)
258
- kramdown (~> 1.13.2)
259
- slop (3.6.0)
260
- sprockets (3.7.1)
261
- concurrent-ruby (~> 1.0)
262
- rack (> 1, < 3)
263
- sprockets-rails (3.2.0)
264
- actionpack (>= 4.0)
265
- activesupport (>= 4.0)
266
- sprockets (>= 3.0.0)
267
- thor (0.19.4)
268
- thread_safe (0.3.6)
269
- tilt (2.0.7)
270
- timecop (0.8.1)
271
- tzinfo (1.2.2)
272
- thread_safe (~> 0.1)
273
- uglifier (3.2.0)
274
- execjs (>= 0.3.0, < 3)
275
- warden (1.2.7)
276
- rack (>= 1.0)
277
- webmock (2.3.2)
278
- addressable (>= 2.3.6)
279
- crack (>= 0.3.2)
280
- hashdiff
281
- websocket-driver (0.6.5)
282
- websocket-extensions (>= 0.1.0)
283
- websocket-extensions (0.1.2)
284
- xpath (2.0.0)
285
- nokogiri (~> 1.3)
286
-
287
- PLATFORMS
288
- ruby
289
-
290
- DEPENDENCIES
291
- capybara
292
- factory_girl_rails
293
- houston-core!
294
- launchy
295
- minitest
296
- minitest-reporters
297
- minitest-reporters-turn_reporter
298
- pry
299
- rr
300
- shoulda-context
301
- simplecov-json
302
- timecop
303
- webmock
304
-
305
- BUNDLED WITH
306
- 1.14.6