wtfpl_init 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 381c1ad170bbf2241d69f3f986eb3cf820d2a47d
4
+ data.tar.gz: 02934cd629980f044126425cb99ec8a825e1085b
5
+ SHA512:
6
+ metadata.gz: 62e8701170be526cc884c6d7abc915e1519424f60375c982c0fa82f38a15537ca88e1ec96778dcc69c613440633c58f2fc34316a5955d8901d600540247febda
7
+ data.tar.gz: 884550e2305ee1eac62904a8b2e0206003f40177da4c19b513d66a9023e6080f10d971ef1c170f973facffb90cb405e800b8349890f475848723d58c87811846
data/.gitignore ADDED
@@ -0,0 +1,9 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
data/.travis.yml ADDED
@@ -0,0 +1,4 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.0.0
4
+ before_install: gem install bundler -v 1.10.4
@@ -0,0 +1,13 @@
1
+ # Contributor Code of Conduct
2
+
3
+ As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
4
+
5
+ We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.
6
+
7
+ Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
8
+
9
+ Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
10
+
11
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
12
+
13
+ This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in wtfpl_init.gemspec
4
+ gemspec
data/LICENSE.md ADDED
@@ -0,0 +1,14 @@
1
+ DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
2
+ Version 2, December 2004
3
+
4
+ Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
5
+
6
+ Everyone is permitted to copy and distribute verbatim or modified
7
+ copies of this license document, and changing it is allowed as long
8
+ as the name is changed.
9
+
10
+ DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
11
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
12
+
13
+ 0. You just DO WHAT THE FUCK YOU WANT TO.
14
+
data/README.md ADDED
@@ -0,0 +1,43 @@
1
+ # WtfplInit
2
+
3
+ Create LICENSE.md file from WTFPL plain text (http://www.wtfpl.net/txt/copying/)
4
+
5
+ TODO: auto add LICENSE info to README.md
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'wtfpl_init'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle exec wtfpl
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install wtfpl_init
22
+
23
+ ## Usage
24
+
25
+ $ bundle exec wtfpl
26
+
27
+ or
28
+
29
+ $ wtfpl
30
+
31
+ ## Development
32
+
33
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake rspec` 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]/wtfpl_init. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.
40
+
41
+ ## LICENSE
42
+
43
+ DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "wtfpl_init"
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
@@ -0,0 +1,7 @@
1
+ #!/bin/bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+
5
+ bundle install
6
+
7
+ # Do any other automated setup that you need to do here
data/bin/wtfpl ADDED
@@ -0,0 +1,23 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require 'wtfpl_init'
5
+ require 'thor'
6
+
7
+ class WtfplInit::Cli::Exec < Thor
8
+ default_command :wtfpl_init
9
+
10
+ desc "wtfpl", "Download and rename WTFPL License file"
11
+ def wtfpl_init
12
+ begin
13
+ WtfplInit::Cli.new.run
14
+ say('LICENSE.md created', :green)
15
+ rescue Errno::EEXIST
16
+ say('LICENSE.md already exists', :red)
17
+ rescue => e
18
+ say("something wrong #{e.message}", :red)
19
+ end
20
+ end
21
+ end
22
+
23
+ WtfplInit::Cli::Exec.start(ARGV)
data/lib/wtfpl_init.rb ADDED
@@ -0,0 +1,12 @@
1
+ require "wtfpl_init/version"
2
+ require "wtfpl_init/cli"
3
+ require "open-uri"
4
+
5
+
6
+ module WtfplInit
7
+ WTFPL_PLAIN_TEXT_URI = 'http://www.wtfpl.net/txt/copying/'
8
+
9
+ def self.fetch
10
+ URI.parse(self::WTFPL_PLAIN_TEXT_URI).read
11
+ end
12
+ end
@@ -0,0 +1,13 @@
1
+ require 'fileutils'
2
+
3
+ module WtfplInit
4
+ class Cli
5
+ DEFAULT_LICENSE_FILE_NAME = 'LICENSE.md'
6
+
7
+ def run(license_file = DEFAULT_LICENSE_FILE_NAME)
8
+ File.open(license_file, File::CREAT|File::EXCL|File::WRONLY, 0644) do |f|
9
+ f.write(WtfplInit.fetch)
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,3 @@
1
+ module WtfplInit
2
+ VERSION = "0.1.0"
3
+ end
@@ -0,0 +1,27 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'wtfpl_init/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "wtfpl_init"
8
+ spec.version = WtfplInit::VERSION
9
+ spec.authors = ["Kinoshita.Yasuhiro"]
10
+ spec.email = ["WhoIsDissolvedGirl+github@gmail.com"]
11
+ spec.license = 'WTFPL'
12
+
13
+ spec.summary = %q{Download WTFPL}
14
+ spec.description = %q{Download WTFPL license file and rename to LICENSE.md or something}
15
+ spec.homepage = "https://github.com/YasuhiroKinoshita/wtfpl_init"
16
+
17
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
18
+ spec.bindir = "bin"
19
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
20
+ spec.require_paths = ["lib"]
21
+
22
+ spec.add_runtime_dependency "thor", "~> 0.19"
23
+
24
+ spec.add_development_dependency "bundler", "~> 1.10"
25
+ spec.add_development_dependency "rake", "~> 10.0"
26
+ spec.add_development_dependency "rspec"
27
+ end
metadata ADDED
@@ -0,0 +1,118 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: wtfpl_init
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Kinoshita.Yasuhiro
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-09-22 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: thor
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: '0.19'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '0.19'
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: '1.10'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: '1.10'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ~>
46
+ - !ruby/object:Gem::Version
47
+ version: '10.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: '10.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ description: Download WTFPL license file and rename to LICENSE.md or something
70
+ email:
71
+ - WhoIsDissolvedGirl+github@gmail.com
72
+ executables:
73
+ - console
74
+ - setup
75
+ - wtfpl
76
+ extensions: []
77
+ extra_rdoc_files: []
78
+ files:
79
+ - .gitignore
80
+ - .rspec
81
+ - .travis.yml
82
+ - CODE_OF_CONDUCT.md
83
+ - Gemfile
84
+ - LICENSE.md
85
+ - README.md
86
+ - Rakefile
87
+ - bin/console
88
+ - bin/setup
89
+ - bin/wtfpl
90
+ - lib/wtfpl_init.rb
91
+ - lib/wtfpl_init/cli.rb
92
+ - lib/wtfpl_init/version.rb
93
+ - wtfpl_init.gemspec
94
+ homepage: https://github.com/YasuhiroKinoshita/wtfpl_init
95
+ licenses:
96
+ - WTFPL
97
+ metadata: {}
98
+ post_install_message:
99
+ rdoc_options: []
100
+ require_paths:
101
+ - lib
102
+ required_ruby_version: !ruby/object:Gem::Requirement
103
+ requirements:
104
+ - - '>='
105
+ - !ruby/object:Gem::Version
106
+ version: '0'
107
+ required_rubygems_version: !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - '>='
110
+ - !ruby/object:Gem::Version
111
+ version: '0'
112
+ requirements: []
113
+ rubyforge_project:
114
+ rubygems_version: 2.0.14
115
+ signing_key:
116
+ specification_version: 4
117
+ summary: Download WTFPL
118
+ test_files: []