graphql_scaffold_fan 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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/generators/graphql_scaffold/init_generator.rb +20 -0
- data/lib/graphql_scaffold_fan/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c5d1ca8a0189f63ad24ce0019951498fd7ca52cece5e315ab891ae45a4644a9c
|
|
4
|
+
data.tar.gz: f5c422b16830b29a6c53c78a826f884fd4f94f5cbc621431394b63b4d9bf07fd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1cd7db1267f68770cea00fdaa8c50f92dbae8238f5acca3f12abd190766dafb63f4c342d684324586d2616a8ef500d57bc8943ddf635c8156578c8907a914cb4
|
|
7
|
+
data.tar.gz: 2b1e7e7eab3ef3c1cc39e3e8c47b0210bb537c9c0d46f71ceef3c337e3d69526c0303e4dd809d44fe984308ddc6ad38a3a360c36ed76f41a09e61bdc9d33bf74
|
data/Gemfile.lock
CHANGED
|
@@ -57,6 +57,26 @@ module GraphqlScaffold
|
|
|
57
57
|
p 'Please create routes.rb file under config folder firstly'
|
|
58
58
|
end
|
|
59
59
|
end
|
|
60
|
+
|
|
61
|
+
def add_gem_dependencies
|
|
62
|
+
|
|
63
|
+
route_file_path = 'Gemfile'
|
|
64
|
+
|
|
65
|
+
p 'Gemfile does not exist' unless File.exist?(route_file_path)
|
|
66
|
+
|
|
67
|
+
if File.exist?(route_file_path)
|
|
68
|
+
file = File.open(route_file_path)
|
|
69
|
+
file_data = file.read
|
|
70
|
+
new_file_data = file_data.insert(-2, "\ngem 'graphql_playground-rails'")
|
|
71
|
+
File.write(file, new_file_data)
|
|
72
|
+
Bundler.with_clean_env do
|
|
73
|
+
run "bundle install"
|
|
74
|
+
end
|
|
75
|
+
p 'Write to Gemfile successfully'
|
|
76
|
+
else
|
|
77
|
+
p 'Please create Gemfile file firstly'
|
|
78
|
+
end
|
|
79
|
+
end
|
|
60
80
|
end
|
|
61
81
|
end
|
|
62
82
|
end
|