gem_monitor 0.1.1
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 +7 -0
- data/.gitignore +9 -0
- data/.rspec +3 -0
- data/.simplecov +4 -0
- data/.travis.yml +5 -0
- data/CODE_OF_CONDUCT.md +49 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +44 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/gem_monitor.gemspec +32 -0
- data/lib/gem_monitor.rb +66 -0
- data/lib/gem_monitor/error.rb +8 -0
- data/lib/gem_monitor/extractor.rb +55 -0
- data/lib/gem_monitor/gem_object.rb +51 -0
- data/lib/gem_monitor/inspector.rb +34 -0
- data/lib/gem_monitor/reader.rb +18 -0
- data/lib/gem_monitor/service.rb +23 -0
- data/lib/gem_monitor/tasks/gem_monitor.rake +8 -0
- data/lib/gem_monitor/templates/index.html.erb +60 -0
- data/lib/gem_monitor/version.rb +3 -0
- data/lib/generators/gem_monitor/install_generator.rb +34 -0
- metadata +195 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 9f868d02a7183a5597098d78329d44b2129aacac
|
4
|
+
data.tar.gz: 937fbf1ee7e28cff553e5aaed20eedbb51b4904b
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: ae2934ca77351cc6fece580c6968f950ab01b1aa1cd1afaa957a595f0ad27468365b45cbdb929a8e04e7dfa9953cd38ffb00f5ae1699226578d24f6355e6b213
|
7
|
+
data.tar.gz: 725c4271ae131b4b1d9625337ed553262d501978a76eab622c9ff8a04c9758da453553506c6e94a88020f35117028d94b15c497bc47b178d565f5c2a977b1453
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.simplecov
ADDED
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
# Contributor Code of Conduct
|
2
|
+
|
3
|
+
As contributors and maintainers of this project, and in the interest of
|
4
|
+
fostering an open and welcoming community, we pledge to respect all people who
|
5
|
+
contribute through reporting issues, posting feature requests, updating
|
6
|
+
documentation, submitting pull requests or patches, and other activities.
|
7
|
+
|
8
|
+
We are committed to making participation in this project a harassment-free
|
9
|
+
experience for everyone, regardless of level of experience, gender, gender
|
10
|
+
identity and expression, sexual orientation, disability, personal appearance,
|
11
|
+
body size, race, ethnicity, age, religion, or nationality.
|
12
|
+
|
13
|
+
Examples of unacceptable behavior by participants include:
|
14
|
+
|
15
|
+
* The use of sexualized language or imagery
|
16
|
+
* Personal attacks
|
17
|
+
* Trolling or insulting/derogatory comments
|
18
|
+
* Public or private harassment
|
19
|
+
* Publishing other's private information, such as physical or electronic
|
20
|
+
addresses, without explicit permission
|
21
|
+
* Other unethical or unprofessional conduct
|
22
|
+
|
23
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
24
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
25
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
26
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
27
|
+
threatening, offensive, or harmful.
|
28
|
+
|
29
|
+
By adopting this Code of Conduct, project maintainers commit themselves to
|
30
|
+
fairly and consistently applying these principles to every aspect of managing
|
31
|
+
this project. Project maintainers who do not follow or enforce the Code of
|
32
|
+
Conduct may be permanently removed from the project team.
|
33
|
+
|
34
|
+
This code of conduct applies both within project spaces and in public spaces
|
35
|
+
when an individual is representing the project or its community.
|
36
|
+
|
37
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
38
|
+
reported by contacting a project maintainer at ruben.a.estevez@gmail.com. All
|
39
|
+
complaints will be reviewed and investigated and will result in a response that
|
40
|
+
is deemed necessary and appropriate to the circumstances. Maintainers are
|
41
|
+
obligated to maintain confidentiality with regard to the reporter of an
|
42
|
+
incident.
|
43
|
+
|
44
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
45
|
+
version 1.3.0, available at
|
46
|
+
[http://contributor-covenant.org/version/1/3/0/][version]
|
47
|
+
|
48
|
+
[homepage]: http://contributor-covenant.org
|
49
|
+
[version]: http://contributor-covenant.org/version/1/3/0/
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2016 Ruben Estevez
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
# GemMonitor 
|
2
|
+
|
3
|
+
Crosscheck projects gem versions against rubygems.org latest versions and creates a report.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```
|
10
|
+
group :development
|
11
|
+
gem 'gem_monitor'
|
12
|
+
end
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle install
|
18
|
+
|
19
|
+
Initialize the `gem_monitor` directory with:
|
20
|
+
|
21
|
+
rails generate gem_monitor:install
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
run:
|
26
|
+
|
27
|
+
bin/rake gem_monitor:run
|
28
|
+
|
29
|
+
open up gem_monitor/index.html in your browser and check out what gems are outdated.
|
30
|
+
|
31
|
+
## Development
|
32
|
+
|
33
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
34
|
+
|
35
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
36
|
+
|
37
|
+
## Contributing
|
38
|
+
|
39
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/gem_monitor. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
40
|
+
|
41
|
+
|
42
|
+
## License
|
43
|
+
|
44
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "gem_monitor"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/bin/setup
ADDED
data/gem_monitor.gemspec
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'gem_monitor/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "gem_monitor"
|
8
|
+
spec.version = GemMonitor::VERSION
|
9
|
+
spec.authors = ["Ruben Estevez"]
|
10
|
+
spec.email = ["ruben.a.estevez@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{Crosscheck the gem file versions against ruby gems latest versions and create a report.}
|
13
|
+
spec.description = %q{Crosscheck the gem file versions against ruby gems latest versions and create a report.}
|
14
|
+
spec.homepage = "https://github.com/rubene/gem_monitor"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
18
|
+
spec.bindir = "exe"
|
19
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
|
+
spec.require_paths = ["lib"]
|
21
|
+
|
22
|
+
spec.add_dependency "rest-client"
|
23
|
+
spec.add_dependency "colorize"
|
24
|
+
spec.add_dependency "railties"
|
25
|
+
|
26
|
+
spec.add_development_dependency "bundler", "~> 1.12"
|
27
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
28
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
29
|
+
spec.add_development_dependency "pry"
|
30
|
+
spec.add_development_dependency "simplecov"
|
31
|
+
spec.add_development_dependency "webmock"
|
32
|
+
end
|
data/lib/gem_monitor.rb
ADDED
@@ -0,0 +1,66 @@
|
|
1
|
+
require "gem_monitor/version"
|
2
|
+
require "gem_monitor/reader"
|
3
|
+
require "gem_monitor/gem_object"
|
4
|
+
require "gem_monitor/extractor"
|
5
|
+
require "gem_monitor/service"
|
6
|
+
require "gem_monitor/inspector"
|
7
|
+
require "gem_monitor/error"
|
8
|
+
|
9
|
+
require "colorize"
|
10
|
+
require "rest-client"
|
11
|
+
require "json"
|
12
|
+
|
13
|
+
module GemMonitor
|
14
|
+
class << self
|
15
|
+
attr_accessor :configuration
|
16
|
+
end
|
17
|
+
|
18
|
+
def self.configure
|
19
|
+
yield(configuration)
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.configuration
|
23
|
+
@configuration ||= Configuration.new
|
24
|
+
end
|
25
|
+
|
26
|
+
class Configuration
|
27
|
+
attr_accessor :gemfile_path, :gemfile_lock_path
|
28
|
+
|
29
|
+
def initialize
|
30
|
+
@gemfile_path = "Gemfile"
|
31
|
+
@gemfile_lock_path = "Gemfile.lock"
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
def self.root
|
36
|
+
File.expand_path('../..',__FILE__)
|
37
|
+
end
|
38
|
+
|
39
|
+
def self.main_url
|
40
|
+
"https://github.com/rubene/gem_monitor"
|
41
|
+
end
|
42
|
+
|
43
|
+
def self.issues_url
|
44
|
+
"#{main_url}/issues"
|
45
|
+
end
|
46
|
+
|
47
|
+
def self.report_erb_template
|
48
|
+
"#{root}/lib/gem_monitor/templates/index.html.erb"
|
49
|
+
end
|
50
|
+
|
51
|
+
def self.report_file_path
|
52
|
+
"#{output_folder_name}/#{File.basename(report_erb_template, ".erb")}"
|
53
|
+
end
|
54
|
+
|
55
|
+
def self.output_folder_name
|
56
|
+
"gem_monitor"
|
57
|
+
end
|
58
|
+
|
59
|
+
def self.run
|
60
|
+
begin
|
61
|
+
GemMonitor::Inspector.new.scan
|
62
|
+
rescue => e
|
63
|
+
puts e.message.red
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
module GemMonitor
|
2
|
+
class Extractor
|
3
|
+
attr_accessor :gem_objects, :gemfile_content, :gemfile_lock_content
|
4
|
+
|
5
|
+
def initialize args = {}
|
6
|
+
self.gem_objects = []
|
7
|
+
end
|
8
|
+
|
9
|
+
def gemfile_content
|
10
|
+
@gemfile_content ||= read_gemfile
|
11
|
+
end
|
12
|
+
|
13
|
+
def gemfile_lock_content
|
14
|
+
@gemfile_content ||= read_gemfile_lock
|
15
|
+
end
|
16
|
+
|
17
|
+
def extract_project_gem_objects
|
18
|
+
extract_and_create_gems_objects
|
19
|
+
gem_objects
|
20
|
+
end
|
21
|
+
|
22
|
+
private
|
23
|
+
|
24
|
+
def read_gemfile
|
25
|
+
GemMonitor::Reader.new(file_path: GemMonitor.configuration.gemfile_path).read
|
26
|
+
end
|
27
|
+
|
28
|
+
def read_gemfile_lock
|
29
|
+
GemMonitor::Reader.new(file_path: GemMonitor.configuration.gemfile_lock_path).read
|
30
|
+
end
|
31
|
+
|
32
|
+
def project_gems_names
|
33
|
+
(read_gemfile.scan(/^\s*gem "(.*?)"/) + read_gemfile.scan(/^\s*gem '(.*?)'/)).flatten
|
34
|
+
end
|
35
|
+
|
36
|
+
def extract_and_create_gems_objects
|
37
|
+
gem_names_from_gemfile = project_gems_names
|
38
|
+
raise_project_gems_error if gem_names_from_gemfile.empty?
|
39
|
+
gem_names_from_gemfile.each do |project_gem_name|
|
40
|
+
gem_object = GemObject.new(name: project_gem_name, project_version: extract_gem_version_for(project_gem_name))
|
41
|
+
gem_object.latest_version
|
42
|
+
self.gem_objects.push gem_object
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
def raise_project_gems_error
|
47
|
+
raise GemMonitor::Error.new("Could not extract gem names from your Gemfile, please submit an issue on #{GemMonitor.issues_url} along with your gemfile for the team to address the issue.")
|
48
|
+
end
|
49
|
+
|
50
|
+
def extract_gem_version_for gem_name
|
51
|
+
raw_gem_version = gemfile_lock_content.scan(/\s{2}#{gem_name} \(\S*\)/).join
|
52
|
+
raw_gem_version.scan(/\(\S*\)/).join.gsub("(", "").gsub(")", "")
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
module GemMonitor
|
2
|
+
class GemObject
|
3
|
+
|
4
|
+
attr_accessor :name, :project_version, :latest_version
|
5
|
+
|
6
|
+
LATEST_VERSION_ERRORS = ["unknown"]
|
7
|
+
|
8
|
+
def latest_version
|
9
|
+
@latest_version ||= get_gem_latest_version
|
10
|
+
end
|
11
|
+
|
12
|
+
def initialize(args = {})
|
13
|
+
self.name = args.fetch(:name, "")
|
14
|
+
self.project_version = args.fetch(:project_version, "")
|
15
|
+
end
|
16
|
+
|
17
|
+
# TODO: maybe move this to a decorator but debating into
|
18
|
+
# adding another run dependency.
|
19
|
+
def output_html_class
|
20
|
+
return "red" if latest_version_error?
|
21
|
+
project_version < latest_version ? "red" : "green"
|
22
|
+
end
|
23
|
+
|
24
|
+
def output_project_version
|
25
|
+
project_version.empty? ? project_version_error_message : project_version
|
26
|
+
end
|
27
|
+
|
28
|
+
def output_latest_version
|
29
|
+
latest_version_error? ? latest_version_error_message : latest_version
|
30
|
+
end
|
31
|
+
|
32
|
+
private
|
33
|
+
|
34
|
+
def latest_version_error?
|
35
|
+
return true if LATEST_VERSION_ERRORS.include? latest_version
|
36
|
+
false
|
37
|
+
end
|
38
|
+
|
39
|
+
def latest_version_error_message
|
40
|
+
"Something went wrong checking the latest version for #{name} gem"
|
41
|
+
end
|
42
|
+
|
43
|
+
def project_version_error_message
|
44
|
+
"Something went wrong finding the project version for #{name} gem"
|
45
|
+
end
|
46
|
+
|
47
|
+
def get_gem_latest_version
|
48
|
+
GemMonitor::Service.get_latest_version_for name
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
module GemMonitor
|
2
|
+
class Inspector
|
3
|
+
require "erb"
|
4
|
+
|
5
|
+
attr_accessor :project_gems
|
6
|
+
|
7
|
+
def project_gems
|
8
|
+
@project_gems ||= GemMonitor::Extractor.new.extract_project_gem_objects
|
9
|
+
end
|
10
|
+
|
11
|
+
def scan
|
12
|
+
project_gems
|
13
|
+
create_report_folder
|
14
|
+
create_report_file
|
15
|
+
puts "GemMonitor report completed!"
|
16
|
+
end
|
17
|
+
|
18
|
+
private
|
19
|
+
|
20
|
+
def create_report_folder
|
21
|
+
FileUtils.mkdir GemMonitor.output_folder_name unless Dir.exists? GemMonitor.output_folder_name
|
22
|
+
end
|
23
|
+
|
24
|
+
def create_report_file
|
25
|
+
File.open(GemMonitor.report_file_path, "w") do |f|
|
26
|
+
f.write(build_template)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
def build_template
|
31
|
+
ERB.new(File.read(GemMonitor.report_erb_template).to_s).result(binding)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module GemMonitor
|
2
|
+
class Reader
|
3
|
+
|
4
|
+
attr_accessor :file_path
|
5
|
+
|
6
|
+
def initialize args = {}
|
7
|
+
self.file_path = args.fetch(:file_path, nil)
|
8
|
+
end
|
9
|
+
|
10
|
+
def read
|
11
|
+
begin
|
12
|
+
File.read file_path
|
13
|
+
rescue => e
|
14
|
+
raise GemMonitor::Error.new("Could not find file #{file_path}.")
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module GemMonitor
|
2
|
+
class Service
|
3
|
+
BASE_URL = "https://rubygems.org"
|
4
|
+
VERSIONS_ENDPOINT = "/api/v1/versions/"
|
5
|
+
|
6
|
+
# TODO: create an oject to handle this response
|
7
|
+
#def self.get_gem_versions_for gem_name
|
8
|
+
# RestClient.get "#{BASE_URL}#{VERSIONS_ENDPOINT}#{gem_name}.json"
|
9
|
+
#end
|
10
|
+
|
11
|
+
# TODO: create an oject to handle this response
|
12
|
+
def self.get_latest_version_for gem_name
|
13
|
+
begin
|
14
|
+
response = RestClient.get("#{BASE_URL}#{VERSIONS_ENDPOINT}#{gem_name}/latest.json")
|
15
|
+
JSON.parse(response.body).fetch("version")
|
16
|
+
rescue RestClient::Exception => e
|
17
|
+
"unknown"
|
18
|
+
rescue JSON::ParserError => e
|
19
|
+
raise GemMonitor::Error.new("Error parsing response please submit an issue on #{GemMonitor.issues_url} along the response #{response.body}")
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
<html>
|
2
|
+
<head>
|
3
|
+
<title>GemMonitor Report</title>
|
4
|
+
<script src="http://code.jquery.com/jquery-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" crossorigin="anonymous"></script>
|
5
|
+
<script src="http://code.jquery.com/ui/1.11.4/jquery-ui.min.js" integrity="sha256-xNjb53/rY+WmG+4L6tTl9m6PpqknWZvRt0rO1SRnJzw=" crossorigin="anonymous"></script>
|
6
|
+
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/foundation/6.2.3/foundation.css">
|
7
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/foundation/6.2.3/foundation.js"></script>
|
8
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/foundation/6.2.3/plugins/foundation.accordion.js"></script>
|
9
|
+
<style>
|
10
|
+
.green{
|
11
|
+
color: green;
|
12
|
+
}
|
13
|
+
|
14
|
+
.red{
|
15
|
+
color: red;
|
16
|
+
}
|
17
|
+
</style>
|
18
|
+
</head>
|
19
|
+
<body>
|
20
|
+
<div class="top-bar">
|
21
|
+
<div class="top-bar-title"><b>GemMonitor Report</b></div>
|
22
|
+
<div>
|
23
|
+
<div class="top-bar-left"></div>
|
24
|
+
<div class="top-bar-right"><%= Date.today.to_s %></div>
|
25
|
+
</div>
|
26
|
+
</div>
|
27
|
+
<div class="row">
|
28
|
+
<div class="small-8 medium-8 large-8 large-push-2 medium-push-2 small-push-2">
|
29
|
+
<div class="callout">
|
30
|
+
<div class="row">
|
31
|
+
<div class="small-4 medium-4 large-4 columns"><b>Gem Name</b></div>
|
32
|
+
<div class="small-4 medium-4 large-4 columns"><b>Project Version</b></div>
|
33
|
+
<div class="small-4 medium-4 large-4 columns"><b>Latest Version</b></div>
|
34
|
+
</div>
|
35
|
+
<ul class="accordion" data-accordion data-multi-expand="true" data-allow-all-closed="true">
|
36
|
+
<% if @project_gems %>
|
37
|
+
<% @project_gems.each do |project_gem| %>
|
38
|
+
<li class="accordion-item" data-accordion-item>
|
39
|
+
<a href="#" class="accordion-title <%= project_gem.output_html_class %>">
|
40
|
+
<div class="row">
|
41
|
+
<div class="small-4 medium-4 large-4 columns"><b><%= project_gem.name %></b></div>
|
42
|
+
<div class="small-4 medium-4 large-4 columns"><b><%= project_gem.output_project_version %></b></div>
|
43
|
+
<div class="small-4 medium-4 large-4 columns"><b><%= project_gem.output_latest_version %></b></div>
|
44
|
+
</div>
|
45
|
+
</a>
|
46
|
+
<div class="accordion-content" data-tab-content>
|
47
|
+
Comming Soon! (Info on the gem)
|
48
|
+
</div>
|
49
|
+
</li>
|
50
|
+
<% end %>
|
51
|
+
<% end %>
|
52
|
+
</ul>
|
53
|
+
</div>
|
54
|
+
</div>
|
55
|
+
</div>
|
56
|
+
<script>
|
57
|
+
$(document).foundation();
|
58
|
+
</script>
|
59
|
+
</body>
|
60
|
+
</html>
|
@@ -0,0 +1,34 @@
|
|
1
|
+
module GemMonitor
|
2
|
+
module Generators
|
3
|
+
class InstallGenerator < Rails::Generators::Base
|
4
|
+
desc "Create gem_monitor files"
|
5
|
+
require "fileutils"
|
6
|
+
|
7
|
+
def create_taks_file
|
8
|
+
app_task_path = File.join("lib", "tasks", "gem_monitor.rake")
|
9
|
+
if File.exist? app_task_path
|
10
|
+
puts "Task file already exists"
|
11
|
+
else
|
12
|
+
puts "Creating task file"
|
13
|
+
FileUtils.cp "#{GemMonitor.root}/lib/gem_monitor/tasks/gem_monitor.rake", app_task_path
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
def add_files_to_gitignore
|
18
|
+
gitignore_content = "./gem_monitor"
|
19
|
+
gitignore_file_path = File.join(".gitignore")
|
20
|
+
if File.exist? gitignore_file_path
|
21
|
+
gitignore_file_content = GemMonitor::Reader.new(file_path: gitignore_file_path).read
|
22
|
+
if gitignore_file_content.include? gitignore_content
|
23
|
+
puts "Report files are already added to the gitignore file"
|
24
|
+
else
|
25
|
+
puts "Adding report files to the gitignore file"
|
26
|
+
open(gitignore_file_path, "a") do |f|
|
27
|
+
f.puts gitignore_content
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
metadata
ADDED
@@ -0,0 +1,195 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: gem_monitor
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Ruben Estevez
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-10-18 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rest-client
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: colorize
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: railties
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: bundler
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.12'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '1.12'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rake
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '10.0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '10.0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rspec
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '3.0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '3.0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: pry
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: simplecov
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: webmock
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
description: Crosscheck the gem file versions against ruby gems latest versions and
|
140
|
+
create a report.
|
141
|
+
email:
|
142
|
+
- ruben.a.estevez@gmail.com
|
143
|
+
executables: []
|
144
|
+
extensions: []
|
145
|
+
extra_rdoc_files: []
|
146
|
+
files:
|
147
|
+
- ".gitignore"
|
148
|
+
- ".rspec"
|
149
|
+
- ".simplecov"
|
150
|
+
- ".travis.yml"
|
151
|
+
- CODE_OF_CONDUCT.md
|
152
|
+
- Gemfile
|
153
|
+
- LICENSE.txt
|
154
|
+
- README.md
|
155
|
+
- Rakefile
|
156
|
+
- bin/console
|
157
|
+
- bin/setup
|
158
|
+
- gem_monitor.gemspec
|
159
|
+
- lib/gem_monitor.rb
|
160
|
+
- lib/gem_monitor/error.rb
|
161
|
+
- lib/gem_monitor/extractor.rb
|
162
|
+
- lib/gem_monitor/gem_object.rb
|
163
|
+
- lib/gem_monitor/inspector.rb
|
164
|
+
- lib/gem_monitor/reader.rb
|
165
|
+
- lib/gem_monitor/service.rb
|
166
|
+
- lib/gem_monitor/tasks/gem_monitor.rake
|
167
|
+
- lib/gem_monitor/templates/index.html.erb
|
168
|
+
- lib/gem_monitor/version.rb
|
169
|
+
- lib/generators/gem_monitor/install_generator.rb
|
170
|
+
homepage: https://github.com/rubene/gem_monitor
|
171
|
+
licenses:
|
172
|
+
- MIT
|
173
|
+
metadata: {}
|
174
|
+
post_install_message:
|
175
|
+
rdoc_options: []
|
176
|
+
require_paths:
|
177
|
+
- lib
|
178
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
179
|
+
requirements:
|
180
|
+
- - ">="
|
181
|
+
- !ruby/object:Gem::Version
|
182
|
+
version: '0'
|
183
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - ">="
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: '0'
|
188
|
+
requirements: []
|
189
|
+
rubyforge_project:
|
190
|
+
rubygems_version: 2.5.1
|
191
|
+
signing_key:
|
192
|
+
specification_version: 4
|
193
|
+
summary: Crosscheck the gem file versions against ruby gems latest versions and create
|
194
|
+
a report.
|
195
|
+
test_files: []
|