gris 0.4.9 → 0.5.0
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.
- checksums.yaml +4 -4
- data/.rubocop_todo.yml +3 -3
- data/Gemfile.lock +16 -16
- data/lib/gris.rb +0 -1
- data/lib/gris/application.rb +0 -5
- data/lib/gris/identity.rb +5 -0
- data/lib/gris/version.rb +1 -1
- data/spec/identity_spec.rb +12 -0
- metadata +2 -4
- data/lib/gris/deprecations.rb +0 -9
- data/lib/gris/deprecations/gris_setup.rb +0 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 550e4f144b637368714bd390e68c236e0a67aae7
|
4
|
+
data.tar.gz: 2160f95e41f042d8f695a11d6a93291c22cd04f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8dc4e8525516860bbea7fa3801638aefe3af742f51ca37dff86fc3d82fd5a3d50afd5d35632123cf5b6ced2378ae8690e0a71b18511c8c01e7c00a0418d6cbb
|
7
|
+
data.tar.gz: 274ef5d32c0e21e8ab21d77e0e6f859fe9c5ffc5155b00b52d5c73fa8bb18b09d36061459aceef15cef14600be70722570c83657de4323aa2db4190f2330837a
|
data/.rubocop_todo.yml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on 2015-08-
|
3
|
+
# on 2015-08-28 20:12:20 -0400 using RuboCop version 0.33.0.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
@@ -30,7 +30,7 @@ Metrics/ClassLength:
|
|
30
30
|
Metrics/CyclomaticComplexity:
|
31
31
|
Max: 11
|
32
32
|
|
33
|
-
# Offense count:
|
33
|
+
# Offense count: 76
|
34
34
|
# Configuration parameters: AllowURI, URISchemes.
|
35
35
|
Metrics/LineLength:
|
36
36
|
Max: 159
|
@@ -46,7 +46,7 @@ Metrics/MethodLength:
|
|
46
46
|
Style/CaseIndentation:
|
47
47
|
Enabled: false
|
48
48
|
|
49
|
-
# Offense count:
|
49
|
+
# Offense count: 25
|
50
50
|
Style/Documentation:
|
51
51
|
Enabled: false
|
52
52
|
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
gris (0.
|
4
|
+
gris (0.5.0)
|
5
5
|
activesupport (~> 4.2, >= 4.2.0)
|
6
6
|
chronic (~> 0.10.0)
|
7
7
|
dalli (~> 2.7)
|
@@ -20,14 +20,14 @@ PATH
|
|
20
20
|
GEM
|
21
21
|
remote: https://rubygems.org/
|
22
22
|
specs:
|
23
|
-
activemodel (4.2.
|
24
|
-
activesupport (= 4.2.
|
23
|
+
activemodel (4.2.4)
|
24
|
+
activesupport (= 4.2.4)
|
25
25
|
builder (~> 3.1)
|
26
|
-
activerecord (4.2.
|
27
|
-
activemodel (= 4.2.
|
28
|
-
activesupport (= 4.2.
|
26
|
+
activerecord (4.2.4)
|
27
|
+
activemodel (= 4.2.4)
|
28
|
+
activesupport (= 4.2.4)
|
29
29
|
arel (~> 6.0)
|
30
|
-
activesupport (4.2.
|
30
|
+
activesupport (4.2.4)
|
31
31
|
i18n (~> 0.7)
|
32
32
|
json (~> 1.7, >= 1.7.7)
|
33
33
|
minitest (~> 5.1)
|
@@ -95,20 +95,20 @@ GEM
|
|
95
95
|
hashie (3.4.2)
|
96
96
|
hashie-forbidden_attributes (0.1.1)
|
97
97
|
hashie (>= 3.0)
|
98
|
-
hyperclient (0.7.
|
99
|
-
faraday
|
100
|
-
faraday-digestauth
|
101
|
-
faraday_hal_middleware
|
102
|
-
faraday_middleware
|
103
|
-
futuroscope
|
104
|
-
net-http-digest_auth
|
105
|
-
uri_template
|
98
|
+
hyperclient (0.7.2)
|
99
|
+
faraday
|
100
|
+
faraday-digestauth
|
101
|
+
faraday_hal_middleware
|
102
|
+
faraday_middleware
|
103
|
+
futuroscope
|
104
|
+
net-http-digest_auth
|
105
|
+
uri_template
|
106
106
|
i18n (0.7.0)
|
107
107
|
ice_nine (0.11.1)
|
108
108
|
indefinite_article (0.2.4)
|
109
109
|
activesupport
|
110
110
|
json (1.8.3)
|
111
|
-
little-plugger (1.1.
|
111
|
+
little-plugger (1.1.4)
|
112
112
|
logging (2.0.0)
|
113
113
|
little-plugger (~> 1.1)
|
114
114
|
multi_json (~> 1.10)
|
data/lib/gris.rb
CHANGED
@@ -13,7 +13,6 @@ require 'hashie-forbidden_attributes'
|
|
13
13
|
# require internal files
|
14
14
|
require 'gris/application'
|
15
15
|
require 'gris/caching'
|
16
|
-
require 'gris/deprecations'
|
17
16
|
require 'gris/grape_extensions/crud_helpers'
|
18
17
|
require 'gris/grape_extensions/date_time_helpers'
|
19
18
|
require 'gris/grape_extensions/error_helpers'
|
data/lib/gris/application.rb
CHANGED
@@ -5,11 +5,6 @@ module Gris
|
|
5
5
|
include ActiveSupport::Configurable
|
6
6
|
config_accessor :use_health_middleware
|
7
7
|
|
8
|
-
def initialize
|
9
|
-
Gris::Deprecations.initialization_checks
|
10
|
-
@filenames = ['', '.html', 'index.html', '/index.html']
|
11
|
-
end
|
12
|
-
|
13
8
|
def self.instance(config = {})
|
14
9
|
@instance ||= Rack::Builder.new do
|
15
10
|
use Gris::Middleware::Health unless config[:use_health_middleware] == false
|
data/lib/gris/identity.rb
CHANGED
@@ -6,6 +6,7 @@ module Gris
|
|
6
6
|
base_url: base_url,
|
7
7
|
hostname: hostname,
|
8
8
|
revision: revision,
|
9
|
+
database_version: database_version,
|
9
10
|
pid: pid,
|
10
11
|
parent_pid: parent_pid,
|
11
12
|
platform: platform
|
@@ -28,6 +29,10 @@ module Gris
|
|
28
29
|
@revision ||= `git rev-parse HEAD`.strip
|
29
30
|
end
|
30
31
|
|
32
|
+
def self.database_version
|
33
|
+
ActiveRecord::Migrator.current_version if defined? ActiveRecord
|
34
|
+
end
|
35
|
+
|
31
36
|
def self.pid
|
32
37
|
@pid ||= Process.pid
|
33
38
|
end
|
data/lib/gris/version.rb
CHANGED
data/spec/identity_spec.rb
CHANGED
@@ -13,21 +13,33 @@ describe Gris::Identity do
|
|
13
13
|
it 'includes name' do
|
14
14
|
expect(Gris::Identity.health[:name]).to eq Gris::Identity.name
|
15
15
|
end
|
16
|
+
|
16
17
|
it 'includes base_url' do
|
17
18
|
expect(Gris::Identity.health[:base_url]).to eq Gris::Identity.base_url
|
18
19
|
end
|
20
|
+
|
19
21
|
it 'includes hostname' do
|
20
22
|
expect(Gris::Identity.health[:hostname]).to eq Gris::Identity.hostname
|
21
23
|
end
|
24
|
+
|
25
|
+
it 'includes database_version' do
|
26
|
+
stub_const 'ActiveRecord::Migrator', Class.new
|
27
|
+
allow(ActiveRecord::Migrator).to receive(:current_version).and_return('awww-yeah')
|
28
|
+
expect(Gris::Identity.health[:database_version]).to eq 'awww-yeah'
|
29
|
+
end
|
30
|
+
|
22
31
|
it 'includes revision' do
|
23
32
|
expect(Gris::Identity.health[:revision]).to eq Gris::Identity.revision
|
24
33
|
end
|
34
|
+
|
25
35
|
it 'includes pid' do
|
26
36
|
expect(Gris::Identity.health[:pid]).to eq Gris::Identity.pid
|
27
37
|
end
|
38
|
+
|
28
39
|
it 'includes parent_pid' do
|
29
40
|
expect(Gris::Identity.health[:parent_pid]).to eq Gris::Identity.parent_pid
|
30
41
|
end
|
42
|
+
|
31
43
|
it 'includes platform' do
|
32
44
|
expect(Gris::Identity.health[:platform]).to eq Gris::Identity.platform
|
33
45
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gris
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dylan Fareed
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-08-
|
11
|
+
date: 2015-08-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -330,8 +330,6 @@ files:
|
|
330
330
|
- lib/gris/application.rb
|
331
331
|
- lib/gris/caching.rb
|
332
332
|
- lib/gris/cli.rb
|
333
|
-
- lib/gris/deprecations.rb
|
334
|
-
- lib/gris/deprecations/gris_setup.rb
|
335
333
|
- lib/gris/generators.rb
|
336
334
|
- lib/gris/generators/api_generator.rb
|
337
335
|
- lib/gris/generators/migration_generator.rb
|
data/lib/gris/deprecations.rb
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
module Gris
|
2
|
-
class Deprecations
|
3
|
-
# TODO: Called when Gris appliation loads.
|
4
|
-
#
|
5
|
-
# Use this method to check that embedding applications
|
6
|
-
# follow current established best practices.
|
7
|
-
# cf. https://github.com/bellycard/napa/blob/master/lib/napa/deprecations.rb
|
8
|
-
# https://github.com/bellycard/napa/blob/master/lib/napa/deprecations/napa_setup.rb
|
9
|
-
# https://github.com/bellycard/napa/blob/master/lib/napa/deprecations/application_api.rb
|
10
|
-
#
|
11
|
-
def self.gris_setup_check
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|