instrumental-components 0.1.32 → 0.1.34

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: b91fde31945f313b326f37ab1e9a389ac04e4c0011ee6820a6801219d74fb0d1
4
- data.tar.gz: a2b3ed177b1a2f8e5ffac6aaf6f7cba990e7b5eb4c1bf7ad8f7de50886f31e20
3
+ metadata.gz: 6a9336e6dbfeda58c11a4577d07701ee206bd720c28111531e996a4bce645b5a
4
+ data.tar.gz: b59e3b95367eb206e9938a2e9338afdd1d5ff2e8a5500a92d6826f9ce87e38ba
5
5
  SHA512:
6
- metadata.gz: 53aa3cbb0722c5916fb4437daac97a0ad53944a2b340e63f3a2c036234370b95a9ed9eb2b3e336722f922578fa3336f55be6afffa0f063a70dab399518ea0912
7
- data.tar.gz: f4e90aabce528ea02e1352c3f920365f2ba604867a0f944b5fbc2df78d61cdb034781b8b82ac4d8d4c960cc1e109693b7d45d8b7132c04bf57d5b3662a51da4d
6
+ metadata.gz: dd8f93cb29051be5d76147bc392441be9dd4c8bc38129796debb754b60d017fea97dc7f20c549ebf89e141ad60feefbc96407c432112ea567e26d23f095dba8e
7
+ data.tar.gz: 93ba9fed8e2a92a58c571854aee878d2369f3b91f943c1f045b275b8c508b48cdc55e08ea678586dc6c03f458b85470b0205b7702f763b2113bc03dc374587d7
@@ -8,7 +8,7 @@ require 'open-uri'
8
8
 
9
9
  options = {}
10
10
  OptionParser.new do |opts|
11
- opts.banner = "Usage: latest-instrumental-version"
11
+ opts.banner = "Usage: instrumental-version"
12
12
  end.parse!
13
13
 
14
14
  version_checker = InstrumentalComponents::VersionChecker.new
@@ -13,7 +13,9 @@ module InstrumentalComponents
13
13
  latest_version = fetch_latest_version
14
14
  current_version = get_current_version
15
15
 
16
- if current_version == latest_version
16
+ if current_version.nil?
17
+ puts "You're not using Instrumental Components. To install, run:\nbundle exec install-instrumental"
18
+ elsif current_version == latest_version
17
19
  puts "You're on the latest version!"
18
20
  else
19
21
  puts "You're running version #{current_version}. To update to the latest version (#{latest_version}), run:\nbundle exec install-instrumental"
@@ -58,20 +58,12 @@ module InstrumentalComponents
58
58
  private
59
59
 
60
60
  def updating?
61
- # Only consider it updating if the gem is in the current project's Gemfile
62
- # and Gemfile.lock, not just installed system-wide
63
- gemfile_has_gem? && gemfile_lock_has_gem? && File.exist?('Gemfile.lock')
64
- end
65
-
66
- def gemfile_has_gem?
67
- return false unless File.exist?('Gemfile')
68
- # Use a more precise regex to match the gem declaration
69
- File.read('Gemfile').match?(/^\s*gem\s+['"]instrumental-components-library['"]/)
70
- end
71
-
72
- def gemfile_lock_has_gem?
73
- return false unless File.exist?('Gemfile.lock')
74
- File.read('Gemfile.lock').include?('instrumental-components-library (')
61
+ # It's an update if:
62
+ # 1. The gem is in the Gemfile
63
+ # 2. The .instrumental/license.yml file exists (indicating a previous installation)
64
+ File.exist?('Gemfile') &&
65
+ File.read('Gemfile').include?("instrumental-components-library") &&
66
+ File.exist?('.instrumental/license.yml')
75
67
  end
76
68
 
77
69
  def download_gem
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: instrumental-components
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.32
4
+ version: 0.1.34
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Casel
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-05-20 00:00:00.000000000 Z
10
+ date: 2025-05-22 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: open-uri
@@ -42,12 +42,12 @@ email:
42
42
  - support@instrumental.dev
43
43
  executables:
44
44
  - install-instrumental
45
- - latest-instrumental-version
45
+ - instrumental-version
46
46
  extensions: []
47
47
  extra_rdoc_files: []
48
48
  files:
49
49
  - bin/install-instrumental
50
- - bin/latest-instrumental-version
50
+ - bin/instrumental-version
51
51
  - lib/instrumental-components.rb
52
52
  - lib/instrumental-components/version_checker.rb
53
53
  homepage: https://instrumental.dev