rake_coffee 0.1.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: e676ffd4fa3bf8c45f20cef25b4dc346ff88fe70
4
+ data.tar.gz: afb88f7269af59ed52b62714243aa72c6fa8609a
5
+ SHA512:
6
+ metadata.gz: 3d3774eebdd84843af7c46b2f8e340751e036797a5ebb35932cf1cbe85cf949f928edba93eac73f1bd0aca862e89abbc183c3f71dcb56e0684d51353b47985c0
7
+ data.tar.gz: 9918541bbf65233e1ed0e74054357ac1fe8cfada23f221392a7e667fce4d3dc965dbce6c2bd6d142034d416f6835ef64cd31845af3b3c41aaad6e6ccec205606
data/.gitignore ADDED
@@ -0,0 +1,10 @@
1
+ .idea
2
+ /.bundle/
3
+ /.yardoc
4
+ /Gemfile.lock
5
+ /_yardoc/
6
+ /coverage/
7
+ /doc/
8
+ /pkg/
9
+ /spec/reports/
10
+ /tmp/
data/.travis.yml ADDED
@@ -0,0 +1,3 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.1.5
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in rake_coffee.gemspec
4
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 JIANG Di
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,39 @@
1
+ # RakeCoffee
2
+
3
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/rake_coffee`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'rake_coffee'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install rake_coffee
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## Development
28
+
29
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/console` for an interactive prompt that will allow you to experiment.
30
+
31
+ 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` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
+
33
+ ## Contributing
34
+
35
+ 1. Fork it ( https://github.com/[my-github-username]/rake_coffee/fork )
36
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
37
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
38
+ 4. Push to the branch (`git push origin my-new-feature`)
39
+ 5. Create a new Pull Request
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,3 @@
1
+ module RakeCoffee
2
+ VERSION = "0.1.0"
3
+ end
@@ -0,0 +1,48 @@
1
+ require "rake_coffee/version"
2
+ require "rake"
3
+ require "rake/tasklib"
4
+ require "rake/clean"
5
+
6
+ CLOBBER.include("**/**.js")
7
+
8
+ module Rake
9
+ class CoffeeTask < TaskLib
10
+ attr_accessor :test_cmd, :test_coverage_cmd,
11
+ :compile_opts, :lint_opts
12
+
13
+ def initialize
14
+ @test_cmd = "mocha"
15
+ @test_coverage_cmd = "istanbul cover _mocha"
16
+ @lint_opts = ""
17
+ @compile_opts = ""
18
+ yield self if block_given?
19
+ define
20
+ end
21
+
22
+ def define
23
+ task :default => :test
24
+
25
+ coffee_files = ::Rake::FileList["**/*.coffee"]
26
+ js_files = coffee_files.ext("js")
27
+
28
+ desc "compile CoffeeScript files"
29
+ task :compile => js_files
30
+
31
+ rule ".js" => ".coffee" do |t|
32
+ sh "coffeelint #{lint_opts} #{t.source}"
33
+ sh "coffee --compile #{compile_opts} #{t.source}"
34
+ end
35
+
36
+ desc "run unit test"
37
+ task :test => :compile do
38
+ sh test_cmd
39
+ end
40
+
41
+ desc "run unit test with coverage"
42
+ task :cov => :compile do
43
+ sh test_coverage_cmd
44
+ end
45
+ end
46
+ end
47
+ end
48
+
@@ -0,0 +1,20 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'rake_coffee/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "rake_coffee"
8
+ spec.version = RakeCoffee::VERSION
9
+ spec.authors = ["JIANG Di"]
10
+ spec.email = ["dd19941105@gmail.com"]
11
+
12
+ spec.summary = %q{a rake plugin for CoffeeScript Relative tasks}
13
+ spec.homepage = "https://github.com/dd1994/rake_coffee"
14
+ spec.license = "MIT"
15
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
16
+ spec.require_paths = ["lib"]
17
+
18
+ spec.add_development_dependency "bundler", "~> 1.9"
19
+ spec.add_development_dependency "rake", "~> 10.0"
20
+ end
metadata ADDED
@@ -0,0 +1,82 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rake_coffee
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - JIANG Di
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-03-31 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.9'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.9'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ description:
42
+ email:
43
+ - dd19941105@gmail.com
44
+ executables: []
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - ".gitignore"
49
+ - ".travis.yml"
50
+ - Gemfile
51
+ - LICENSE
52
+ - README.md
53
+ - Rakefile
54
+ - lib/rake_coffee.rb
55
+ - lib/rake_coffee/version.rb
56
+ - rake_coffee.gemspec
57
+ homepage: https://github.com/dd1994/rake_coffee
58
+ licenses:
59
+ - MIT
60
+ metadata: {}
61
+ post_install_message:
62
+ rdoc_options: []
63
+ require_paths:
64
+ - lib
65
+ required_ruby_version: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ required_rubygems_version: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: '0'
75
+ requirements: []
76
+ rubyforge_project:
77
+ rubygems_version: 2.4.6
78
+ signing_key:
79
+ specification_version: 4
80
+ summary: a rake plugin for CoffeeScript Relative tasks
81
+ test_files: []
82
+ has_rdoc: