license-list 1.0.0

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 7f05a9cc9ba7a5b7a71bf88862c14f5aaacf13ec
4
+ data.tar.gz: 745decb7a5f2bb131eb875d88ef761ce76b5e28a
5
+ SHA512:
6
+ metadata.gz: 356d59cdb67f650763216ae8fbf0faafbe562c21a5c4af6870f186aab0a315e4c2233bdc1057e782caa14554ab1cf85f31fbb551fcc957a01cfde07cc488fdac
7
+ data.tar.gz: d99ef4c3a42399ecb0587ff290b83b58f0f52c2ef71f0056ee98f3f552b880280ae75e321a3a77cc6c90f9153c1593bcc6aec73ad2c2ebc0ca76afd5a7f37611
data/.gitignore ADDED
@@ -0,0 +1,31 @@
1
+ *.rbc
2
+ capybara-*.html
3
+ .rspec
4
+ /log
5
+ /tmp
6
+ /db/*.sqlite3
7
+ /public/system
8
+ /coverage/
9
+ /spec/tmp
10
+ **.orig
11
+ rerun.txt
12
+ pickle-email-*.html
13
+
14
+ # TODO Comment out these rules if you are OK with secrets being uploaded to the repo
15
+ config/initializers/secret_token.rb
16
+ config/secrets.yml
17
+
18
+ ## Environment normalisation:
19
+ /.bundle
20
+ /vendor/bundle
21
+
22
+ # these should all be checked in to normalise the environment:
23
+ # Gemfile.lock, .ruby-version, .ruby-gemset
24
+
25
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
26
+ .rvmrc
27
+
28
+ # if using bower-rails ignore default bower_components path bower.json files
29
+ /vendor/assets/bower_components
30
+ *.bowerrc
31
+ bower.json
data/Gemfile ADDED
@@ -0,0 +1,2 @@
1
+ source 'http://rubygems.org'
2
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,85 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ license-list (0.0.0)
5
+ rails (~> 4.1)
6
+
7
+ GEM
8
+ remote: http://rubygems.org/
9
+ specs:
10
+ actionmailer (4.1.6)
11
+ actionpack (= 4.1.6)
12
+ actionview (= 4.1.6)
13
+ mail (~> 2.5, >= 2.5.4)
14
+ actionpack (4.1.6)
15
+ actionview (= 4.1.6)
16
+ activesupport (= 4.1.6)
17
+ rack (~> 1.5.2)
18
+ rack-test (~> 0.6.2)
19
+ actionview (4.1.6)
20
+ activesupport (= 4.1.6)
21
+ builder (~> 3.1)
22
+ erubis (~> 2.7.0)
23
+ activemodel (4.1.6)
24
+ activesupport (= 4.1.6)
25
+ builder (~> 3.1)
26
+ activerecord (4.1.6)
27
+ activemodel (= 4.1.6)
28
+ activesupport (= 4.1.6)
29
+ arel (~> 5.0.0)
30
+ activesupport (4.1.6)
31
+ i18n (~> 0.6, >= 0.6.9)
32
+ json (~> 1.7, >= 1.7.7)
33
+ minitest (~> 5.1)
34
+ thread_safe (~> 0.1)
35
+ tzinfo (~> 1.1)
36
+ arel (5.0.1.20140414130214)
37
+ builder (3.2.2)
38
+ erubis (2.7.0)
39
+ hike (1.2.3)
40
+ i18n (0.6.11)
41
+ json (1.8.1)
42
+ mail (2.6.1)
43
+ mime-types (>= 1.16, < 3)
44
+ mime-types (2.3)
45
+ minitest (5.4.1)
46
+ multi_json (1.10.1)
47
+ rack (1.5.2)
48
+ rack-test (0.6.2)
49
+ rack (>= 1.0)
50
+ rails (4.1.6)
51
+ actionmailer (= 4.1.6)
52
+ actionpack (= 4.1.6)
53
+ actionview (= 4.1.6)
54
+ activemodel (= 4.1.6)
55
+ activerecord (= 4.1.6)
56
+ activesupport (= 4.1.6)
57
+ bundler (>= 1.3.0, < 2.0)
58
+ railties (= 4.1.6)
59
+ sprockets-rails (~> 2.0)
60
+ railties (4.1.6)
61
+ actionpack (= 4.1.6)
62
+ activesupport (= 4.1.6)
63
+ rake (>= 0.8.7)
64
+ thor (>= 0.18.1, < 2.0)
65
+ rake (10.3.2)
66
+ sprockets (2.12.2)
67
+ hike (~> 1.2)
68
+ multi_json (~> 1.0)
69
+ rack (~> 1.0)
70
+ tilt (~> 1.1, != 1.3.0)
71
+ sprockets-rails (2.1.4)
72
+ actionpack (>= 3.0)
73
+ activesupport (>= 3.0)
74
+ sprockets (~> 2.8)
75
+ thor (0.19.1)
76
+ thread_safe (0.3.4)
77
+ tilt (1.4.1)
78
+ tzinfo (1.2.2)
79
+ thread_safe (~> 0.1)
80
+
81
+ PLATFORMS
82
+ ruby
83
+
84
+ DEPENDENCIES
85
+ license-list!
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2014 Kirk
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 all
13
+ 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 THE
21
+ SOFTWARE.
22
+
data/README.md ADDED
@@ -0,0 +1,24 @@
1
+ license-list
2
+ ============
3
+
4
+ Rake tasks to list gems and their licenses. It also supports exporting to csv format.
5
+
6
+ The format is two columns: gem name and the license. If a gem has multiple licenses, they are listed as multiple lines.
7
+
8
+ List gems and their licenses
9
+ ----------------------------
10
+
11
+ The following rake task will list the gems and their licenses
12
+
13
+ rake license:list
14
+
15
+ Export gems and their licenses
16
+ ------------------------------
17
+
18
+ The following rake task will export the gems and their licenses to license.csv.
19
+
20
+ rake license:export
21
+
22
+ You can also specify your own file name.
23
+
24
+ rake license:export[my_license.csv]
@@ -0,0 +1,9 @@
1
+ require 'license-list'
2
+ require 'rails'
3
+ module LicenseList
4
+ class Railtie < Rails::Railtie
5
+ rake_tasks do
6
+ Dir[File.join(File.dirname(__FILE__),'tasks/*.rake')].each { |f| load f }
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,11 @@
1
+ namespace :license do
2
+ desc "List licenses"
3
+ task :list => :environment do
4
+ ::LicenseList::Tasks::License.list
5
+ end
6
+
7
+ desc "Export licenses"
8
+ task :export, [:file_name] => :environment do |t, args|
9
+ ::LicenseList::Tasks::License.export(args.file_name)
10
+ end
11
+ end
@@ -0,0 +1,34 @@
1
+ module LicenseList
2
+ module Tasks
3
+ module License
4
+ extend self
5
+ def list
6
+ list_licenses($stdout)
7
+ end
8
+ def export(file_name)
9
+ if file_name.blank?
10
+ file_name = "license.csv"
11
+ end
12
+
13
+ if File.exist?(file_name)
14
+ puts "file #{file_name} already exists"
15
+ else
16
+ puts "writing to #{file_name}"
17
+ File.open(file_name, "w+") do |f|
18
+ list_licenses(f)
19
+ end
20
+ end
21
+ end
22
+
23
+ private
24
+
25
+ def list_licenses(output)
26
+ Gem.loaded_specs.each do |key, spec|
27
+ spec.licenses.each do |license|
28
+ output.write("\"#{spec.name.gsub('"', '""')}\",\"#{license.gsub('"', '""')}\"\n")
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,5 @@
1
+ require 'license-list/tasks/license'
2
+
3
+ module LicenseList
4
+ require "license-list/railtie" if defined?(Rails)
5
+ end
@@ -0,0 +1,13 @@
1
+ Gem::Specification.new do |s|
2
+ s.name = 'license-list'
3
+ s.version = '1.0.0'
4
+ s.summary = "Rake tasks to list gems and their licenses. It also supports exporting to csv format."
5
+ s.description = "Rake tasks to list gems and their licenses. It also supports exporting to csv format."
6
+ s.authors = ["Kirk Chen"]
7
+ s.email = 'chen.kirk@gmail.com'
8
+ s.files = `git ls-files`.split("\n")
9
+ s.homepage = 'http://rubygems.org/gems/license-list'
10
+ s.license = 'MIT'
11
+
12
+ s.add_dependency "rails", "~> 4.1"
13
+ end
metadata ADDED
@@ -0,0 +1,69 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: license-list
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Kirk Chen
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-09-23 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: '4.1'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '4.1'
27
+ description: Rake tasks to list gems and their licenses. It also supports exporting
28
+ to csv format.
29
+ email: chen.kirk@gmail.com
30
+ executables: []
31
+ extensions: []
32
+ extra_rdoc_files: []
33
+ files:
34
+ - .gitignore
35
+ - Gemfile
36
+ - Gemfile.lock
37
+ - LICENSE
38
+ - README.md
39
+ - lib/license-list.rb
40
+ - lib/license-list/railtie.rb
41
+ - lib/license-list/tasks/license.rake
42
+ - lib/license-list/tasks/license.rb
43
+ - license-list.gemspec
44
+ homepage: http://rubygems.org/gems/license-list
45
+ licenses:
46
+ - MIT
47
+ metadata: {}
48
+ post_install_message:
49
+ rdoc_options: []
50
+ require_paths:
51
+ - lib
52
+ required_ruby_version: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - '>='
55
+ - !ruby/object:Gem::Version
56
+ version: '0'
57
+ required_rubygems_version: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ requirements: []
63
+ rubyforge_project:
64
+ rubygems_version: 2.2.2
65
+ signing_key:
66
+ specification_version: 4
67
+ summary: Rake tasks to list gems and their licenses. It also supports exporting to
68
+ csv format.
69
+ test_files: []