solargraph-rails-init 0.2.1 → 0.2.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
  SHA256:
3
- metadata.gz: c13c83e7eac6813b378f0242c69aab57df0f5f865c861fd29e04ad3806fa6dff
4
- data.tar.gz: b7096dbc6252b49fdb7e70a1d0c05fa7f1806ce7a5438d2992299648cea72b11
3
+ metadata.gz: 71482d5ec7ab7c9fc9d2570f7481faf861c945ae0aab67b80a9c40eb83231684
4
+ data.tar.gz: 78bd251739017e2597f2e9484897dcd5d26638a0088c07016f06317d6fc4fd8e
5
5
  SHA512:
6
- metadata.gz: 36da0959f215857bf96edfe4870fa4fdb8e59072b8ed0aeef46eae53bf057b2b2b0d1411e8cbd96242eadfb9dac0509519bdf3e385c5443ef36f4c623b1582f6
7
- data.tar.gz: 4171cc4940ebdc680420f5e14f3810fc5403bdf094c45d402dd7aa87ddbc6f9570fa0db3e02ab588e5c8b79d2c500b6e8ed4c5a6e0dc9be3db21321d889584b5
6
+ metadata.gz: 4d03b1e98f4924c51d42ff0b69a31f17844d117ef7e321d165c061f482e5fc66f43aad2e83856e10c48be18cfc338c7b850a4c88dc2e323ce62e7ba1f753164a
7
+ data.tar.gz: 1160d3f8eb881926537641cd6e0823b1489435c25b44745c9eb59fe834ebb9a67c5f7d2ab327251c4765ecc6a38ceec2395e4d44135d49669df0d430769708df
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- solargraph-rails-init (0.2.1)
4
+ solargraph-rails-init (0.2.2)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -9,6 +9,7 @@ GEM
9
9
  rake (13.0.3)
10
10
 
11
11
  PLATFORMS
12
+ ruby
12
13
  x86_64-darwin-20
13
14
 
14
15
  DEPENDENCIES
@@ -8,6 +8,12 @@ DEFINITIONS_RB = "config/definitions.rb"
8
8
 
9
9
  def run
10
10
  parse_options
11
+
12
+ unless is_rails?
13
+ puts "Must run from a Rails app folder. Aborting."
14
+ exit 1
15
+ end
16
+
11
17
  exec_cmd "gem install solargraph", title: "Installing Solargraph gem..."
12
18
  exec_cmd "solargraph download-core", title: "Installing documentation. This might take a while..."
13
19
  exec_cmd "yard gems"
@@ -30,6 +36,10 @@ def run
30
36
  puts "Done!"
31
37
  end
32
38
 
39
+ def is_rails?
40
+ File.exist?(File.join(Dir.pwd, './bin/rails'))
41
+ end
42
+
33
43
  def exec_cmd(cmd, title: nil)
34
44
  puts title if title
35
45
  out = `#{cmd}`
@@ -3,7 +3,7 @@
3
3
  module Solargraph
4
4
  module Rails
5
5
  module Init
6
- VERSION = "0.2.1"
6
+ VERSION = "0.2.2"
7
7
  end
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solargraph-rails-init
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carl Mercier
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-03-15 00:00:00.000000000 Z
11
+ date: 2021-03-17 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A simple script that configures Solargraph to work with Rails.
14
14
  email:
@@ -51,7 +51,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
51
51
  - !ruby/object:Gem::Version
52
52
  version: '0'
53
53
  requirements: []
54
- rubygems_version: 3.1.4
54
+ rubygems_version: 3.1.2
55
55
  signing_key:
56
56
  specification_version: 4
57
57
  summary: A simple script that configures Solargraph to work with Rails.