pugs 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 39e405b9506d9c8f36fbb5f402d24c7cbb874320
4
+ data.tar.gz: 59fceaff64ebaefa3c28d025824bc378d8fc7cea
5
+ SHA512:
6
+ metadata.gz: a63cfd91eda3c141acb79d6513283b04c2523fc130dc059fb089b3e2914bf275a4e35b1b4fc3e73ed65b82190309d0f5f7652e00d4f54bb46b6d46100f46661a
7
+ data.tar.gz: 7bf8ae3a7aa0f335022688f0fd43ec480a126be33bd0f4c3230db9ceb5a317f4d8e8f4adccb425e19b33e3a6bdca600507b23efe4c0ff494cc89e9b8b4da8ed4
@@ -0,0 +1,10 @@
1
+ lib/*.bundle
2
+ coverage
3
+ rdoc
4
+ doc
5
+ .yardoc
6
+ .bundle
7
+ Gemfile.lock
8
+ pkg
9
+ tmp
10
+ dump.rdb
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in sheaf.gemspec
4
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License
2
+
3
+ Copyright (c) 2016 Tobias Svensson <tob@tobiassvensson.co.uk>
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.
@@ -0,0 +1,35 @@
1
+ # Pugs
2
+
3
+ > In Ruby `pugs "thing"` should output "🐕 things" to stdout
4
+
5
+ - *Schneems (https://twitter.com/schneems/status/767795350564245504)*
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ``` ruby
12
+ gem pugs'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ ```
18
+ $ bundle
19
+ ```
20
+
21
+ ## Getting started
22
+
23
+ ```
24
+ pugs "things"
25
+ 🐕 things
26
+ => nil
27
+ ```
28
+
29
+ ## License
30
+
31
+ Released under the MIT license. See the LICENSE file for details.
32
+
33
+ ## Author
34
+
35
+ Tobias Svensson, [@endofunky](https://twitter.com/endofunky), [http://github.com/endofunky](http://github.com/endofunky)
@@ -0,0 +1,5 @@
1
+ require File.join(Dir.pwd, 'lib', 'pugs', 'version')
2
+
3
+ Dir["tasks/**/*.rb"].each { |task| load task }
4
+
5
+ task default: :test
@@ -0,0 +1,13 @@
1
+ require 'pugs/version'
2
+
3
+ module Pugs
4
+ def pugs(*objs)
5
+ objs.each do |obj|
6
+ puts "🐕 #{obj}"
7
+ end
8
+
9
+ nil
10
+ end
11
+ end
12
+
13
+ require 'pugs/core_ext'
@@ -0,0 +1,4 @@
1
+ class Object
2
+ include Pugs
3
+ end
4
+
@@ -0,0 +1,14 @@
1
+ module Pugs
2
+ VERSION = "1.0.0"
3
+
4
+ def pugs(*objs)
5
+ objs.each do |obj|
6
+ puts "🐕 #{obj}"
7
+ end
8
+ end
9
+ end
10
+
11
+ class Object
12
+ include Pugs
13
+ end
14
+
@@ -0,0 +1,25 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'pugs/version'
5
+
6
+ Gem::Specification.new do |gem|
7
+ gem.name = "pugs"
8
+ gem.version = Pugs::VERSION
9
+ gem.authors = ["Tobias Svensson"]
10
+ gem.email = ["tob@tobiassvensson.co.uk"]
11
+ gem.summary = "Woof woof."
12
+ gem.description = gem.summary
13
+ gem.homepage = "https://github.com/endofunky/pugs"
14
+ gem.license = "MIT"
15
+
16
+ gem.files = `git ls-files -z`.split("\x0")
17
+ gem.executables = gem.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
19
+ gem.require_paths = ["lib"]
20
+
21
+ gem.add_development_dependency "bundler", "~> 1.7"
22
+ gem.add_development_dependency "mocha", "1.1.0"
23
+ gem.add_development_dependency "minitest", "~> 5.9.0"
24
+ gem.add_development_dependency "rake", "~> 10.0"
25
+ end
@@ -0,0 +1,5 @@
1
+ require 'bundler/gem_helper'
2
+
3
+ namespace :gem do
4
+ Bundler::GemHelper.install_tasks name: 'pugs'
5
+ end
@@ -0,0 +1,35 @@
1
+ class RakeConsole
2
+ GEM = Dir["*.gemspec"].first.sub('.gemspec', '')
3
+ REQUIRE_PATH = File.join(Dir.pwd, 'lib', GEM)
4
+
5
+ module Helpers
6
+ def reload!
7
+ puts "Reloading..."
8
+ $LOADED_FEATURES.select do |feat|
9
+ feat =~ /\/#{GEM}\//
10
+ end.each { |file| load file }
11
+ true
12
+ end
13
+ end
14
+
15
+ def start
16
+ require REQUIRE_PATH
17
+ ARGV.clear
18
+ Object.include(Helpers)
19
+
20
+ begin
21
+ require 'pry'
22
+ TOPLEVEL_BINDING.pry
23
+ rescue LoadError
24
+ require 'irb'
25
+ require 'irb/completion'
26
+ IRB.start
27
+ end
28
+ end
29
+ end
30
+
31
+ desc "Start development console"
32
+ task :console do
33
+ RakeConsole.new.start
34
+ end
35
+
@@ -0,0 +1,8 @@
1
+ require 'rake/testtask'
2
+
3
+ Rake::TestTask.new do |t|
4
+ t.libs << "test"
5
+ t.test_files = FileList['test/**/*_test.rb']
6
+ t.verbose = false
7
+ end
8
+
@@ -0,0 +1,4 @@
1
+ require 'minitest/autorun'
2
+ require 'minitest/pride'
3
+ require 'mocha/mini_test'
4
+ require 'pugs'
@@ -0,0 +1,14 @@
1
+ require 'helper'
2
+
3
+ class PugsTest < Minitest::Test
4
+ def test_pugs
5
+ self.expects(:puts).with("🐕 foobar").once
6
+ pugs "foobar"
7
+ end
8
+
9
+ def test_a_grumble_of_pugs
10
+ self.expects(:puts).with("🐕 foo").once
11
+ self.expects(:puts).with("🐕 bar").once
12
+ pugs "foo", "bar"
13
+ end
14
+ end
metadata ADDED
@@ -0,0 +1,116 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: pugs
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Tobias Svensson
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-08-22 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.7'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.7'
27
+ - !ruby/object:Gem::Dependency
28
+ name: mocha
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '='
32
+ - !ruby/object:Gem::Version
33
+ version: 1.1.0
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '='
39
+ - !ruby/object:Gem::Version
40
+ version: 1.1.0
41
+ - !ruby/object:Gem::Dependency
42
+ name: minitest
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: 5.9.0
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: 5.9.0
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '10.0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '10.0'
69
+ description: Woof woof.
70
+ email:
71
+ - tob@tobiassvensson.co.uk
72
+ executables: []
73
+ extensions: []
74
+ extra_rdoc_files: []
75
+ files:
76
+ - ".gitignore"
77
+ - Gemfile
78
+ - LICENSE
79
+ - README.md
80
+ - Rakefile
81
+ - lib/pugs.rb
82
+ - lib/pugs/core_ext.rb
83
+ - lib/pugs/version.rb
84
+ - pugs.gemspec
85
+ - tasks/bundler.rb
86
+ - tasks/console.rb
87
+ - tasks/minitest.rb
88
+ - test/helper.rb
89
+ - test/pugs/pugs_test.rb
90
+ homepage: https://github.com/endofunky/pugs
91
+ licenses:
92
+ - MIT
93
+ metadata: {}
94
+ post_install_message:
95
+ rdoc_options: []
96
+ require_paths:
97
+ - lib
98
+ required_ruby_version: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - ">="
101
+ - !ruby/object:Gem::Version
102
+ version: '0'
103
+ required_rubygems_version: !ruby/object:Gem::Requirement
104
+ requirements:
105
+ - - ">="
106
+ - !ruby/object:Gem::Version
107
+ version: '0'
108
+ requirements: []
109
+ rubyforge_project:
110
+ rubygems_version: 2.5.1
111
+ signing_key:
112
+ specification_version: 4
113
+ summary: Woof woof.
114
+ test_files:
115
+ - test/helper.rb
116
+ - test/pugs/pugs_test.rb