env_compare 0.1.4.pre.alpha → 0.1.4

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
  SHA256:
3
- metadata.gz: d4b3d3f36b43327e20252ce4cd37aa306d25de324d0ea234f0003f89910a8f4a
4
- data.tar.gz: 4598c0fa7b5f40783d5d11c4511535e2cc771527eaa28a24c1b030d6dd13d6e9
3
+ metadata.gz: 4768bf53d6d45f53db0e5ce3d35deb883580310a4cd947b9d81fa55677b849e9
4
+ data.tar.gz: 1955b4528296632cca9f5c06c101ee1fff4774a2e47f6fa57a7e94ffb0f407c5
5
5
  SHA512:
6
- metadata.gz: e645f7ac2ee563e461646372f8e24e44ea84b1c72a3e41982e516ffd700ce2a0eb5be08432f649bf91eba41e577f61f2ba55425732cfbf4f094decadb4594882
7
- data.tar.gz: 007ce621b0bd9c3c9f86094fe070a0b19ca4c8d3bd9e839c756ddc8424ef2e1bc1a72098af6a1b3524c589bb28480f6ae19da51b97c6061c53f9725ef26565fd
6
+ metadata.gz: b6ce901f8ec3fa70931bd1257553bdc5a882c5c43b0ab386507fc643bd91fa35e61c46b81dbbac0e1d8f0b5cdbebd1a1811d395c0bdc807013b9d2c323d143e8
7
+ data.tar.gz: be6d7dfbec6b681018ff383b19f269db6aa85bc62c78d34639b635ab7017dbec4a3561f3f0e5c5e00a2af0715b12d893ad71f68ccff8e55e156236796f792d7b
@@ -3,6 +3,9 @@
3
3
  ## main (unreleased)
4
4
  - WIP
5
5
 
6
+ ## 0.1.4 (2020-12-07)
7
+ - Fixed bug with template path reference ([#26](https://github.com/jaydorsey/env_compare/issues/26))
8
+
6
9
  ## 0.1.3.pre.beta (2020-09-02)
7
10
  - Added `force` and `no-force` options for updating environment variables.
8
11
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- env_compare (0.1.3.pre.beta)
4
+ env_compare (0.1.4)
5
5
  launchy
6
6
  platform-api
7
7
  thor
@@ -36,7 +36,7 @@ module EnvCompare
36
36
  data: calculated_output(envs),
37
37
  headers: ['KEY', envs].flatten,
38
38
  theme_base_path: theme_base_path
39
- ).render('dark.html.erb')
39
+ ).render(theme_name(options[:theme]))
40
40
 
41
41
  save_and_open_file(html)
42
42
  end
@@ -108,14 +108,22 @@ module EnvCompare
108
108
  @heroku ||= PlatformAPI.connect_oauth(ENV.fetch('OAUTH_TOKEN'))
109
109
  end
110
110
 
111
- def theme_path(file)
112
- path = File.join(theme_base_path, "#{file}.html.erb")
111
+ # Returns a filename.ext when given a filename
112
+ #
113
+ # Also checks to make sure the file exists.
114
+ def theme_name(theme)
115
+ theme_file = "#{theme}.html.erb"
113
116
 
114
- return path if File.exist?(path)
117
+ path = File.join(theme_base_path, theme_file)
118
+
119
+ return theme_file if File.exist?(path)
115
120
 
116
121
  raise MissingThemeError
117
122
  end
118
123
 
124
+ # Returns a path representing where themes are stored in the library
125
+ #
126
+ # Used for the ERB templates to resolve file locations
119
127
  def theme_base_path
120
128
  @theme_base_path ||= File.expand_path(File.join(File.dirname(__dir__), '..', 'themes'))
121
129
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EnvCompare
4
- VERSION = '0.1.4-alpha'
4
+ VERSION = '0.1.4'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: env_compare
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4.pre.alpha
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jay Dorsey
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-12-03 00:00:00.000000000 Z
11
+ date: 2020-12-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: launchy
@@ -156,9 +156,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
156
156
  version: 2.3.0
157
157
  required_rubygems_version: !ruby/object:Gem::Requirement
158
158
  requirements:
159
- - - ">"
159
+ - - ">="
160
160
  - !ruby/object:Gem::Version
161
- version: 1.3.1
161
+ version: '0'
162
162
  requirements: []
163
163
  rubygems_version: 3.0.3
164
164
  signing_key: