deploy-info 0.1.1 → 0.1.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 23ee52b7092ea51cf8bfebd38b5bdd2dda7d2695
4
- data.tar.gz: 0f600a8c23fb578e6d53783d8bb964e5ba8baa6d
3
+ metadata.gz: 4267469a8e88c9abaf731a9bffe896e927a24d63
4
+ data.tar.gz: 5fec66918cfdde0c52c102bb67f68f391b412a09
5
5
  SHA512:
6
- metadata.gz: 1bc4fefe2cce0dba5e806c8bec3bfcdca0e126700b13cd862483ab3dac342a81a019b0f71ed88567a4025ef27baca699d3449586a46d57e943a3646525af7e80
7
- data.tar.gz: c47b5e9c87eae24b66f3dbf99296b0c417e901dc5da4839bf2d4840e54c9c4b33643cc32ae92b1b393ab44c916a687394919de8ff0f3234aec80cf09490570af
6
+ metadata.gz: a89b56dba6ece085af03c8806d67c8992cb718d55601ec19ca3aefcae9cff9d1ec1adaa1d30045c4f3316b6385d013a1a283ae54db8508945fa72d6d31e98888
7
+ data.tar.gz: 51418f795e25bf761b12a328a979bd77a66ffcb72cb96a7b1c217def0c6d462c0112eb620ab4b4274cd4a2cfab143773c3174f5efdf95d2839b340fbb43ca23f
data/.gitignore CHANGED
@@ -5,4 +5,5 @@
5
5
  .*.sw[a-z]
6
6
  *.un~
7
7
  pkg/
8
- vendor/
8
+ vendor/
9
+ config.json
data/CHANGELOG.md ADDED
@@ -0,0 +1,19 @@
1
+ Deploy-Info Changelog
2
+ =========================
3
+ This file is used to list changes made in each version of the `deploy-info` gem.
4
+
5
+ v0.1.2 (2016-10-31)
6
+ ### Enhancements
7
+ - Security: Hide the config endpoint except in development mode
8
+
9
+ ### Bugs Fixed
10
+ - Should automatically pick up the JSON config if developing locally and it is inside config/config.json
11
+
12
+ v0.1.1 (2016-09-06)
13
+ -------------------
14
+ ### Enhancements
15
+ - Fix revision retrieval endpoint. Supports GET or POST methods. Will return the short SHA value.
16
+
17
+ v0.1.0 (2016-09-02)
18
+ -------------------
19
+ - Initial Release
data/Gemfile CHANGED
@@ -1,8 +1,6 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gem 'github_api' # => Github API Interaction
4
- # => gem 'hashie' # => Data Structure
5
- # => gem 'logify' # => Logging
6
4
  gem 'mixlib-cli' # => Option Parsing
7
5
  gem 'rack-cache' # => Cache Responses
8
6
  gem 'sinatra' # => Web Server
data/deploy-info.gemspec CHANGED
@@ -31,7 +31,7 @@ Gem::Specification.new do |spec|
31
31
 
32
32
  # => Dependencies
33
33
  spec.add_runtime_dependency 'github_api', '~> 0.14'
34
- spec.add_runtime_dependency 'mixlib-cli', '~> 1.6'
34
+ spec.add_runtime_dependency 'mixlib-cli', '~> 1.7'
35
35
  spec.add_runtime_dependency 'rack-cache', '~> 1.6'
36
36
  spec.add_runtime_dependency 'sinatra', '~> 1.4'
37
37
  spec.add_runtime_dependency 'sinatra-contrib', '~> 1.4'
@@ -70,7 +70,7 @@ module DeployInfo
70
70
  { 'Sinatra Info' => env }
71
71
  ].compact
72
72
  )
73
- end
73
+ end if development?
74
74
 
75
75
  get '/state' do
76
76
  content_type 'application/json'
@@ -64,8 +64,7 @@ module DeployInfo
64
64
  option :environment,
65
65
  short: '-e ENV',
66
66
  long: '--env ENV',
67
- description: 'Sets the environment for deploy-info to execute under. Use "development" for more logging.',
68
- default: 'production'
67
+ description: "Sets the environment for deploy-info to execute under. Use 'development' for more logging. (Default: #{Config.environment})"
69
68
  end
70
69
 
71
70
  # => Launch the Application
@@ -75,28 +74,28 @@ module DeployInfo
75
74
  cli.parse_options(argv)
76
75
 
77
76
  # => Parse JSON Config File (If Specified & Exists)
78
- json_config = Util.parse_json_config(cli.config[:config_file])
77
+ json_config = Util.parse_json_config(cli.config[:config_file] || Config.config_file)
79
78
 
80
79
  # => Grab the Default Values
81
- default = DeployInfo::Config.options
80
+ default = Config.options
82
81
 
83
- # => Merge Configuration (JSON File Wins)
82
+ # => Merge Configuration (CLI Wins)
84
83
  config = [default, json_config, cli.config].compact.reduce(:merge)
85
84
 
86
85
  # => Apply Configuration
87
- DeployInfo::Config.setup do |cfg|
86
+ Config.setup do |cfg|
88
87
  cfg.config_file = config[:config_file]
89
88
  cfg.cache_timeout = config[:cache_timeout].to_i
90
89
  cfg.bind = config[:bind]
91
90
  cfg.port = config[:port]
92
91
  cfg.state_file = config[:state_file]
93
- cfg.environment = config[:environment].to_sym
92
+ cfg.environment = config[:environment].to_sym.downcase
94
93
  cfg.github_oauth_token = config[:github_oauth_token]
95
94
  cfg.nr_api_key = config[:nr_api_key]
96
95
  end
97
96
 
98
97
  # => Launch the API
99
- DeployInfo::API.run!
98
+ API.run!
100
99
  end
101
100
  end
102
101
  end
@@ -1,3 +1,3 @@
1
1
  module DeployInfo
2
- VERSION = '0.1.1'.freeze
2
+ VERSION = '0.1.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deploy-info
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Dwyer
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-09-06 00:00:00.000000000 Z
11
+ date: 2016-10-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: github_api
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '1.6'
33
+ version: '1.7'
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: '1.6'
40
+ version: '1.7'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rack-cache
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -147,6 +147,7 @@ files:
147
147
  - ".gitignore"
148
148
  - ".gitlab-ci.yml"
149
149
  - ".rubocop.yml"
150
+ - CHANGELOG.md
150
151
  - Gemfile
151
152
  - Gemfile.lock
152
153
  - LICENSE.txt
@@ -187,7 +188,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
187
188
  version: '0'
188
189
  requirements: []
189
190
  rubyforge_project:
190
- rubygems_version: 2.6.6
191
+ rubygems_version: 2.6.7
191
192
  signing_key:
192
193
  specification_version: 4
193
194
  summary: Deployment Notification and State Provider