raise 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 83d2f990774a12bb14eb518b5c793f035dacac5e
4
- data.tar.gz: 710616f9a6605803935ebb03a446d6e952b1c802
3
+ metadata.gz: 32021df475e3ae65370b4fc57f5d457deb606ba9
4
+ data.tar.gz: ff780bcf162b753334f38669d88891de07f11a66
5
5
  SHA512:
6
- metadata.gz: 349c80fc18c31d7ff2a9764baa1d9c8460a899da9e44d4b1251bd087daacec04e9e298460855d92a39a6994e4592487b2b50aeb74598e9204fff7fcc1bd7501f
7
- data.tar.gz: 5df9382ceddf49c436cbad76778770df7fa2e09aadb433a35eb4d937705ce3f0e8d8e935eaf206bbcffff332d5514f5807ab70ca29da7d95fe92f7f6dad726ce
6
+ metadata.gz: 391abb66d51a81ace9ed0c641dff3404c870504a6973599bb1de3571fac8ee30bb0798f5afb5fd7d96b4f387950258ea547069e1282ca039f84481fd18b7fa5a
7
+ data.tar.gz: cd33f55b804fe116b2e2b072c8c2a0668f2cbca0aaa6aaee8021b03d1f1ffcdbff8677a6eb49ad83151792aaf10d3306024b3a6dc96dd5f106cf3b76f6ff5b3a
@@ -1,5 +1,5 @@
1
1
  sudo: false
2
2
  language: ruby
3
3
  rvm:
4
- - 2.3.1
5
- before_install: gem install bundler -v 1.12.5
4
+ - 2.3.3
5
+ before_install: gem install bundler -v 1.14.4
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # Raise
2
2
 
3
- Patches `Kernel#raise` to automatically call `inspect` on the argument.
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/raise`. 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
4
6
 
5
7
  ## Installation
6
8
 
@@ -10,4 +12,25 @@ Add this line to your application's Gemfile:
10
12
  gem 'raise'
11
13
  ```
12
14
 
13
- Then `require "raise"` in your application.
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install raise
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 `rake test` to run the tests. You can also 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`, 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).
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/Nick Sutterer/raise.
36
+
@@ -11,4 +11,4 @@ require "raise"
11
11
  # Pry.start
12
12
 
13
13
  require "irb"
14
- IRB.start
14
+ IRB.start(__FILE__)
@@ -1,13 +1,13 @@
1
1
  require "raise/version"
2
2
 
3
- module Kernel
4
- alias __original_raise raise
5
-
6
- def raise(*args)
7
- exception = args.first
3
+ module Raise
4
+ # Your code goes here...
5
+ end
8
6
 
9
- return __original_raise(*args) if exception.kind_of?(Exception)
10
- return __original_raise(*args) if args.size==0
11
- __original_raise(RuntimeError, exception.inspect, caller)
7
+ require "raise/print"
8
+ Object.class_eval do
9
+ # alias_method Raise.method(:print), put
10
+ def put(*args)
11
+ Raise.print(*args)
12
12
  end
13
13
  end
@@ -0,0 +1,11 @@
1
+ module Raise
2
+ module_function
3
+ def print(*objects)
4
+ invoker = caller[1].match(/`(.+)'/)
5
+ puts "@@@ ##{bold(invoker)}: #{objects.map(&:inspect).join("\n ---------\n ")}"
6
+ end
7
+
8
+ def bold(string)
9
+ "\e[1m#{string}\e[22m"
10
+ end
11
+ end
@@ -1,3 +1,3 @@
1
1
  module Raise
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -1,4 +1,3 @@
1
- # coding: utf-8
2
1
  lib = File.expand_path('../lib', __FILE__)
3
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
3
  require 'raise/version'
@@ -9,17 +8,18 @@ Gem::Specification.new do |spec|
9
8
  spec.authors = ["Nick Sutterer"]
10
9
  spec.email = ["apotonick@gmail.com"]
11
10
 
12
- spec.summary = %q{Raise-driven development.}
13
- spec.description = %q{Raise-driven development. Patches Kernel#raise to automatically inspect the argument.}
14
- spec.homepage = "http://github.com/apotonick/raise"
15
- spec.license = "MIT"
11
+ spec.summary = %q{My toolset.}
12
+ spec.description = %q{Apotonick's programming tools.}
13
+ spec.homepage = "http://trailblazer.to"
16
14
 
17
- spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
15
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
16
+ f.match(%r{^(test|spec|features)/})
17
+ end
18
18
  spec.bindir = "exe"
19
19
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
20
  spec.require_paths = ["lib"]
21
21
 
22
- spec.add_development_dependency "bundler", "~> 1.12"
22
+ spec.add_development_dependency "bundler", "~> 1.14"
23
23
  spec.add_development_dependency "rake", "~> 10.0"
24
24
  spec.add_development_dependency "minitest", "~> 5.0"
25
25
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: raise
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Sutterer
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-10-25 00:00:00.000000000 Z
11
+ date: 2017-04-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.12'
19
+ version: '1.14'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.12'
26
+ version: '1.14'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -52,8 +52,7 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '5.0'
55
- description: Raise-driven development. Patches Kernel#raise to automatically inspect
56
- the argument.
55
+ description: Apotonick's programming tools.
57
56
  email:
58
57
  - apotonick@gmail.com
59
58
  executables: []
@@ -68,11 +67,11 @@ files:
68
67
  - bin/console
69
68
  - bin/setup
70
69
  - lib/raise.rb
70
+ - lib/raise/print.rb
71
71
  - lib/raise/version.rb
72
72
  - raise.gemspec
73
- homepage: http://github.com/apotonick/raise
74
- licenses:
75
- - MIT
73
+ homepage: http://trailblazer.to
74
+ licenses: []
76
75
  metadata: {}
77
76
  post_install_message:
78
77
  rdoc_options: []
@@ -90,8 +89,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
90
89
  version: '0'
91
90
  requirements: []
92
91
  rubyforge_project:
93
- rubygems_version: 2.5.1
92
+ rubygems_version: 2.5.2
94
93
  signing_key:
95
94
  specification_version: 4
96
- summary: Raise-driven development.
95
+ summary: My toolset.
97
96
  test_files: []