gem_deps 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/.rvmrc ADDED
@@ -0,0 +1 @@
1
+ rvm use 1.9.3@gem_deps --create
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in gem_deps.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 George Opritescu
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,35 @@
1
+ # GemDeps
2
+
3
+ Simple way to check the versions of gems on a specific environment. Inspired by http://stackoverflow.com/questions/15498611/how-can-i-view-all-the-gems-for-a-specific-gem-group
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem 'gem_deps'
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install gem_deps
18
+
19
+ ## Usage
20
+
21
+ Run the following task to view the gems for the current environment:
22
+
23
+ $ rake gem_deps:list_gems
24
+
25
+ Or run it like this to view for a specific environment:
26
+
27
+ $ rake gem_deps:list_gems FOR_ENV=test
28
+
29
+ ## Contributing
30
+
31
+ 1. Fork it
32
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
33
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
34
+ 4. Push to the branch (`git push origin my-new-feature`)
35
+ 5. Create new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,3 @@
1
+ require "bundler/gem_tasks"
2
+ Bundler::GemHelper.install_tasks
3
+
data/gem_deps.gemspec ADDED
@@ -0,0 +1,21 @@
1
+ # -*- encoding: utf-8 -*-
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'gem_deps/version'
5
+
6
+ Gem::Specification.new do |gem|
7
+ gem.name = "gem_deps"
8
+ gem.version = GemDeps::VERSION
9
+ gem.authors = ["George Opritescu"]
10
+ gem.email = ["ssscripting@gmail.com"]
11
+ gem.description = %q{Simple way to check the versions of gems on a specific environment}
12
+ gem.summary = %q{Simple way to check the versions of gems on a specific environment}
13
+ gem.homepage = "https://github.com/International/gem_deps"
14
+
15
+ gem.add_dependency "rake"
16
+
17
+ gem.files = `git ls-files`.split($/)
18
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
19
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
20
+ gem.require_paths = ["lib"]
21
+ end
data/lib/gem_deps.rb ADDED
@@ -0,0 +1,5 @@
1
+ require "gem_deps/version"
2
+ require "gem_deps/railtie" if defined? Rails
3
+
4
+ module GemDeps
5
+ end
@@ -0,0 +1,8 @@
1
+ module GemDeps
2
+ class Railtie < Rails::Railtie
3
+ rake_tasks do
4
+ puts "Loading gem_deps"
5
+ load "tasks/gem_deps.rake"
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,3 @@
1
+ module GemDeps
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1,27 @@
1
+ namespace :gem_deps do
2
+ desc "View all installed gems for an environment"
3
+ task :list_gems => :environment do
4
+
5
+ group = if var_env = ENV["FOR_ENV"]
6
+ var_env
7
+ elsif defined?(Rails)
8
+ Rails.env
9
+ else
10
+ :default
11
+ end
12
+
13
+ group = group.to_sym
14
+ searched_groups = [group, :default].uniq
15
+
16
+ deps = Bundler.environment.dependencies.select do |dep|
17
+ searched_groups.any? {|e| dep.groups.include?(e) }
18
+ end
19
+
20
+ puts "Gems included by the bundle in group #{group}:"
21
+ deps.each do |dep|
22
+ spec = dep.to_spec
23
+ puts "* #{spec.name} (#{spec.version})"
24
+ end
25
+ end
26
+ end
27
+
metadata ADDED
@@ -0,0 +1,78 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: gem_deps
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - George Opritescu
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-03-28 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rake
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ description: Simple way to check the versions of gems on a specific environment
31
+ email:
32
+ - ssscripting@gmail.com
33
+ executables: []
34
+ extensions: []
35
+ extra_rdoc_files: []
36
+ files:
37
+ - .gitignore
38
+ - .rvmrc
39
+ - Gemfile
40
+ - LICENSE.txt
41
+ - README.md
42
+ - Rakefile
43
+ - gem_deps.gemspec
44
+ - lib/gem_deps.rb
45
+ - lib/gem_deps/railtie.rb
46
+ - lib/gem_deps/version.rb
47
+ - lib/tasks/gem_deps.rake
48
+ homepage: https://github.com/International/gem_deps
49
+ licenses: []
50
+ post_install_message:
51
+ rdoc_options: []
52
+ require_paths:
53
+ - lib
54
+ required_ruby_version: !ruby/object:Gem::Requirement
55
+ none: false
56
+ requirements:
57
+ - - ! '>='
58
+ - !ruby/object:Gem::Version
59
+ version: '0'
60
+ segments:
61
+ - 0
62
+ hash: -113455409
63
+ required_rubygems_version: !ruby/object:Gem::Requirement
64
+ none: false
65
+ requirements:
66
+ - - ! '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ segments:
70
+ - 0
71
+ hash: -113455409
72
+ requirements: []
73
+ rubyforge_project:
74
+ rubygems_version: 1.8.24
75
+ signing_key:
76
+ specification_version: 3
77
+ summary: Simple way to check the versions of gems on a specific environment
78
+ test_files: []