taint_aliases 0.0.1

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: d136c988aa4aad350531a6574f3b4e629227a49a
4
+ data.tar.gz: 1996fccb9a2941cf04ffce5d16c35406595518f8
5
+ SHA512:
6
+ metadata.gz: f088b7e63521d6feb0a03c1b20f4677083fd719b2874145bba8f0a0a7ace8dcd22e66f2e9531e2c2f87cba768ce655ef05423ec9f357f286bd0eac27f80f6ade
7
+ data.tar.gz: 79f909d3a63a455cd8399674dc12d79f9483e2ed11dd7296a10165d205e3871cd10db05df22fbb8d063492037255d9f8cb148c63b6807e2e6922e60014bdca04
data/.gitignore ADDED
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --format progress
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in taint_aliases.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 Jason Lewis
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,56 @@
1
+ # TaintAliases
2
+
3
+ [![Build Status](https://travis-ci.org/ruby-jokes/taint_aliases.png?branch=master)](https://travis-ci.org/ruby-jokes/taint_aliases)
4
+ [![Code Climate](https://codeclimate.com/github/ruby-jokes/taint_aliases.png)](https://codeclimate.com/github/ruby-jokes/taint_aliases)
5
+ [![Coverage Status](https://coveralls.io/repos/ruby-jokes/taint_aliases/badge.png?branch=master)](https://coveralls.io/r/ruby-jokes/taint_aliases?branch=master)
6
+ [![Dependency Status](https://gemnasium.com/ruby-jokes/taint_aliases.png)](https://gemnasium.com/ruby-jokes/taint_aliases)
7
+
8
+ Aliases `Object#taint` with other common idioms for taint, such as `#grundle` and `#fleshy_fun_bridge`
9
+
10
+ ## Installation
11
+
12
+ Add this line to your application's Gemfile:
13
+
14
+ gem 'taint_aliases', require: true
15
+
16
+ And then execute:
17
+
18
+ $ bundle
19
+
20
+ Or install it yourself as:
21
+
22
+ $ gem install taint_aliases
23
+
24
+ ## Usage
25
+
26
+ Just `require taint_aliases`, or require in your Gemfile; then you can do this:
27
+
28
+ ```ruby
29
+
30
+ obj = Object.new
31
+ obj.grundle
32
+
33
+ obj.tainted?
34
+ => true
35
+
36
+ str = "Test String"
37
+ str.fleshy_fun_bridge
38
+
39
+ str.tainted?
40
+ => true
41
+ ```
42
+ It's that easy!
43
+
44
+ ## Contributing
45
+
46
+ 1. Fork it
47
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
48
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
49
+ 4. Push to the branch (`git push origin my-new-feature`)
50
+ 5. Create new Pull Request
51
+
52
+ ## License
53
+
54
+ Copyright © 2014 Jason Lewis
55
+
56
+ Distributed under the MIT License; see LICENSE.txt
data/Rakefile ADDED
@@ -0,0 +1,7 @@
1
+ require "bundler/gem_tasks"
2
+
3
+ require "rspec/core/rake_task"
4
+
5
+ RSpec::Core::RakeTask.new(:spec)
6
+
7
+ task :default => :spec
@@ -0,0 +1,3 @@
1
+ module TaintAliases
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1,14 @@
1
+ require "taint_aliases/version"
2
+
3
+ module TaintAliases
4
+ TAINT_ALIASES = %w[grundle fleshy_fun_bridge]
5
+ def self.included(receiver)
6
+ TAINT_ALIASES.each do |a|
7
+ receiver.send(:alias_method, a, :taint)
8
+ end
9
+ end
10
+ end
11
+
12
+ class Object
13
+ include TaintAliases
14
+ end
@@ -0,0 +1,21 @@
1
+ # This file was generated by the `rspec --init` command. Conventionally, all
2
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
3
+ # Require this file using `require "spec_helper"` to ensure that it is only
4
+ # loaded once.
5
+ #
6
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
7
+ RSpec.configure do |config|
8
+ config.treat_symbols_as_metadata_keys_with_true_values = true
9
+ config.run_all_when_everything_filtered = true
10
+ config.filter_run :focus
11
+
12
+ # Run specs in random order to surface order dependencies. If you find an
13
+ # order dependency and want to debug it, you can fix the order by providing
14
+ # the seed, which is printed after each run.
15
+ # --seed 1234
16
+ config.order = 'random'
17
+ end
18
+
19
+ require 'coveralls'
20
+
21
+ Coveralls.wear!
@@ -0,0 +1,40 @@
1
+ require 'spec_helper'
2
+ require File.expand_path("../../lib/taint_aliases", __FILE__)
3
+
4
+ module TaintAliasesSpec
5
+
6
+ describe "taint should be aliased to grundle and fleshy_fun_bridge" do
7
+
8
+ before(:each) do
9
+ @obj = Object.new
10
+ end
11
+
12
+ it "should be tainted with grundle" do
13
+ @obj.grundle
14
+ @obj.should be_tainted
15
+ end
16
+
17
+ it "should be tainted with fleshy_fun_bridge" do
18
+ @obj.fleshy_fun_bridge
19
+ @obj.should be_tainted
20
+ end
21
+
22
+ end
23
+
24
+ describe "subclasses should inherit the aliases" do
25
+
26
+ it "should work on Strings" do
27
+ str = "I'm gettin' tainted"
28
+ str.grundle
29
+ str.should be_tainted
30
+ end
31
+
32
+ it "should work on Arrays" do
33
+ ary = []
34
+ ary.fleshy_fun_bridge
35
+ ary.should be_tainted
36
+ end
37
+
38
+ end
39
+
40
+ end
@@ -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 'taint_aliases/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "taint_aliases"
8
+ spec.version = TaintAliases::VERSION
9
+ spec.authors = ["Jason Lewis"]
10
+ spec.email = ["jason@decomplecting.org"]
11
+ spec.description = %q{Handy aliases for Object#taint}
12
+ spec.summary = %q{Handy aliases for Object#taint}
13
+ spec.homepage = "http://ruby-jokes.github.io/taint_aliases/"
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files`.split($/)
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_development_dependency "bundler", "~> 1.3"
22
+ spec.add_development_dependency "rake"
23
+ spec.add_development_dependency "rspec"
24
+ spec.add_development_dependency "coveralls"
25
+ end
metadata ADDED
@@ -0,0 +1,113 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: taint_aliases
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Jason Lewis
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-01-23 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.3'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '1.3'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: coveralls
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: Handy aliases for Object#taint
70
+ email:
71
+ - jason@decomplecting.org
72
+ executables: []
73
+ extensions: []
74
+ extra_rdoc_files: []
75
+ files:
76
+ - .gitignore
77
+ - .rspec
78
+ - Gemfile
79
+ - LICENSE.txt
80
+ - README.md
81
+ - Rakefile
82
+ - lib/taint_aliases.rb
83
+ - lib/taint_aliases/version.rb
84
+ - spec/spec_helper.rb
85
+ - spec/taint_aliases_spec.rb
86
+ - taint_aliases.gemspec
87
+ homepage: http://ruby-jokes.github.io/taint_aliases/
88
+ licenses:
89
+ - MIT
90
+ metadata: {}
91
+ post_install_message:
92
+ rdoc_options: []
93
+ require_paths:
94
+ - lib
95
+ required_ruby_version: !ruby/object:Gem::Requirement
96
+ requirements:
97
+ - - '>='
98
+ - !ruby/object:Gem::Version
99
+ version: '0'
100
+ required_rubygems_version: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - '>='
103
+ - !ruby/object:Gem::Version
104
+ version: '0'
105
+ requirements: []
106
+ rubyforge_project:
107
+ rubygems_version: 2.0.3
108
+ signing_key:
109
+ specification_version: 4
110
+ summary: Handy aliases for Object#taint
111
+ test_files:
112
+ - spec/spec_helper.rb
113
+ - spec/taint_aliases_spec.rb