myprecious_python 0.0.6 → 0.0.7
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/lib/myprecious_python.rb +13 -5
- metadata +23 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 043e555f393b91589e5caaf61ad546b606d8b80c060ded64dd3560f13afae943
|
4
|
+
data.tar.gz: 489b09b8f66690d46f88005006dcba441fc50c1686aab1608d7348c42d9258eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ae8559d897806295a4bd3f5a3a6e85e05476437461d000cbc35940703cb65273bf24ed662b4a7c554f2901baacb0853fe4adb95ac59cb8addbeab6626cec348
|
7
|
+
data.tar.gz: 30a016fba83b1e0314b04dad05053e3869ce59f48df7ef8eff19a2353e936f360b1778e5e60237a022b8ae887a51229036c36dd1398172a4f7715e9ad03bc00c
|
data/lib/myprecious_python.rb
CHANGED
@@ -3,9 +3,13 @@ require 'byebug'
|
|
3
3
|
require 'httparty'
|
4
4
|
require 'json'
|
5
5
|
require 'rest-client'
|
6
|
+
require 'git'
|
6
7
|
|
7
8
|
class MyPreciousPython
|
8
9
|
def self.update
|
10
|
+
g = Git.open(Dir.pwd)
|
11
|
+
repo_name = g.repo.path.split(".git")[0].split("/").last
|
12
|
+
repo_name = repo_name + "-dependency-tracking"
|
9
13
|
gem_lines = {}
|
10
14
|
gem_name_pos = 0
|
11
15
|
gem_version_pos = 1
|
@@ -14,9 +18,10 @@ class MyPreciousPython
|
|
14
18
|
gem_age_pos = 4
|
15
19
|
gem_change_pos = 5
|
16
20
|
default_length = 6
|
17
|
-
|
21
|
+
|
22
|
+
if File.file?(repo_name+'.md')
|
18
23
|
puts "reading the dependency file...."
|
19
|
-
File.open("
|
24
|
+
File.open(repo_name+".md", "r").each_with_index do |line, line_number|
|
20
25
|
#puts line + " dds " + line_number.to_s
|
21
26
|
word_array = line.split('|')
|
22
27
|
if line_number == 0
|
@@ -48,7 +53,8 @@ class MyPreciousPython
|
|
48
53
|
#puts gem_lines
|
49
54
|
else
|
50
55
|
puts "creating the dependency file...."
|
51
|
-
File.open('
|
56
|
+
File.open(repo_name+'.md', 'w') { |write_file|
|
57
|
+
write_file.puts "Last updated:" + Date.today.to_s + "; Use for directional purposes only, this data is not real time and might be slightly inaccurate" + "\n\n"
|
52
58
|
write_file.puts "Dependency | Our Version | Latest Version | Date available | Age (in days) | Change Log"
|
53
59
|
write_file.puts "--- | --- | --- | --- | --- | ---"
|
54
60
|
}
|
@@ -56,7 +62,7 @@ class MyPreciousPython
|
|
56
62
|
|
57
63
|
file = File.new("Packages", "r")
|
58
64
|
|
59
|
-
final_write = File.readlines('
|
65
|
+
final_write = File.readlines(repo_name+'.md')
|
60
66
|
|
61
67
|
while (line = file.gets)
|
62
68
|
gem_line = line.strip
|
@@ -153,7 +159,9 @@ class MyPreciousPython
|
|
153
159
|
end
|
154
160
|
end
|
155
161
|
end
|
156
|
-
File.open('
|
162
|
+
File.open(repo_name+'.md', 'w') { |f| f.write(final_write.join) }
|
157
163
|
file.close
|
158
164
|
end
|
159
165
|
end
|
166
|
+
|
167
|
+
MyPreciousPython.update
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: myprecious_python
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Balki Kodarapu
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-03-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: byebug
|
@@ -90,6 +90,26 @@ dependencies:
|
|
90
90
|
- - "~>"
|
91
91
|
- !ruby/object:Gem::Version
|
92
92
|
version: 2.0.2
|
93
|
+
- !ruby/object:Gem::Dependency
|
94
|
+
name: git
|
95
|
+
requirement: !ruby/object:Gem::Requirement
|
96
|
+
requirements:
|
97
|
+
- - ">="
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
version: 1.5.0
|
100
|
+
- - "~>"
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '1.5'
|
103
|
+
type: :runtime
|
104
|
+
prerelease: false
|
105
|
+
version_requirements: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - ">="
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: 1.5.0
|
110
|
+
- - "~>"
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
version: '1.5'
|
93
113
|
description: A simple, markdown generated with information about your python dependencies
|
94
114
|
email: balki.kodarapu@gmail.com
|
95
115
|
executables:
|
@@ -118,7 +138,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
118
138
|
- !ruby/object:Gem::Version
|
119
139
|
version: '0'
|
120
140
|
requirements: []
|
121
|
-
rubygems_version: 3.0.
|
141
|
+
rubygems_version: 3.0.3
|
122
142
|
signing_key:
|
123
143
|
specification_version: 4
|
124
144
|
summary: Your precious python dependencies!
|